Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: yoga imports #2873

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/layout/src/image/measureImage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import getRatio from './getRatio';
import getMargin from '../node/getMargin';
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/getBorderWidth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

const getComputedBorder = (yogaNode, edge) =>
yogaNode ? yogaNode.getComputedBorder(edge) : 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/getMargin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

const getComputedMargin = (node, edge) => {
const { yogaNode } = node;
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/getPadding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

const getComputedPadding = (node, edge) => {
const { yogaNode } = node;
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setAlign.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';
import { upperFirst } from '@react-pdf/fns';

const ALIGN = {
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setBorderWidth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setYogaValue from './setYogaValue';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setDisplay.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

/**
* @typedef {Function} NodeInstanceWrapper
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setFlexDirection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

const FLEX_DIRECTIONS = {
row: Yoga.FlexDirection.Row,
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setFlexWrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

const FLEX_WRAP = {
wrap: Yoga.Wrap.Wrap,
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setGap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';
import { isNil, matchPercent } from '@react-pdf/fns';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setJustifyContent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';
import { isNil } from '@react-pdf/fns';

const JUSTIFY_CONTENT = {
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setMargin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setYogaValue from './setYogaValue';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setOverflow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';
import { isNil } from '@react-pdf/fns';

const OVERFLOW = {
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setPadding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setYogaValue from './setYogaValue';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setPosition.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setYogaValue from './setYogaValue';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/node/setPositionType.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';
import { isNil } from '@react-pdf/fns';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/svg/measureSvg.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

const getAspectRatio = (viewbox) => {
if (!viewbox) return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/text/measureText.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-param-reassign */

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import layoutText from './layoutText';
import linesWidth from './linesWidth';
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/getBorderWidth.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import getBorderWidth from '../../src/node/getBorderWidth';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/getMargin.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import getMargin from '../../src/node/getMargin';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/getPadding.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import getPadding from '../../src/node/getPadding';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setAlignContent.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setAlignContent from '../../src/node/setAlignContent';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setAlignItems.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setAlignItems from '../../src/node/setAlignItems';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setAlignSelf.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setAlignSelf from '../../src/node/setAlignSelf';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setBorderWidth.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setBorder, {
setBorderTop,
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setDisplay.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setDisplay from '../../src/node/setDisplay';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setFlexDirection.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setFlexDirection from '../../src/node/setFlexDirection';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setFlexWrap.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setFlexWrap from '../../src/node/setFlexWrap';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setJustifyContent.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setJustifyContent from '../../src/node/setJustifyContent';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setMargin.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setMargin, {
setMarginTop,
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setOverflow.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setOverflow from '../../src/node/setOverflow';

Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setPadding.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setPadding, {
setPaddingTop,
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setPosition.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setPosition, {
setPositionTop,
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/tests/node/setPositionType.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, test, vi } from 'vitest';

import * as Yoga from 'yoga-layout';
import * as Yoga from 'yoga-layout/load';

import setPositionType from '../../src/node/setPositionType';

Expand Down
7 changes: 0 additions & 7 deletions packages/layout/yoga.js

This file was deleted.