@pairdraw/core 0.17.0 → 0.19.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/effects.d.ts +5 -11
- package/dist/canvas/effects.d.ts.map +1 -1
- package/dist/canvas/effects.js +25 -30
- package/dist/canvas/effects.js.map +1 -1
- package/dist/canvas/labels/hit-test.d.ts +5 -0
- package/dist/canvas/labels/hit-test.d.ts.map +1 -1
- package/dist/canvas/labels/hit-test.js +1 -1
- package/dist/canvas/labels/hit-test.js.map +1 -1
- package/dist/canvas/labels/paragraph-cache.d.ts.map +1 -1
- package/dist/canvas/labels/paragraph-cache.js +3 -2
- package/dist/canvas/labels/paragraph-cache.js.map +1 -1
- package/dist/canvas/labels/selection.js +3 -2
- package/dist/canvas/labels/selection.js.map +1 -1
- package/dist/canvas/labels/style.d.ts +1 -1
- package/dist/canvas/node-edit-overlay.js +2 -2
- package/dist/canvas/node-edit-overlay.js.map +1 -1
- package/dist/canvas/outline-stroke.d.ts.map +1 -1
- package/dist/canvas/outline-stroke.js.map +1 -1
- package/dist/canvas/overlays/index.d.ts +2 -2
- package/dist/canvas/overlays/index.js +2 -2
- package/dist/canvas/overlays/prototype.d.ts +2 -5
- package/dist/canvas/overlays/prototype.d.ts.map +1 -1
- package/dist/canvas/overlays/prototype.js +3 -19
- package/dist/canvas/overlays/prototype.js.map +1 -1
- package/dist/canvas/overlays/selection.d.ts +1 -2
- package/dist/canvas/overlays/selection.d.ts.map +1 -1
- package/dist/canvas/overlays/selection.js +4 -37
- package/dist/canvas/overlays/selection.js.map +1 -1
- package/dist/canvas/region-hatch.js +3 -2
- package/dist/canvas/region-hatch.js.map +1 -1
- package/dist/canvas/renderer/colors.d.ts.map +1 -1
- package/dist/canvas/renderer/colors.js +36 -18
- package/dist/canvas/renderer/colors.js.map +1 -1
- package/dist/canvas/renderer/font-waiters.d.ts +9 -0
- package/dist/canvas/renderer/font-waiters.d.ts.map +1 -0
- package/dist/canvas/renderer/font-waiters.js +26 -0
- package/dist/canvas/renderer/font-waiters.js.map +1 -0
- package/dist/canvas/renderer/fonts.d.ts +4 -2
- package/dist/canvas/renderer/fonts.d.ts.map +1 -1
- package/dist/canvas/renderer/fonts.js +25 -10
- package/dist/canvas/renderer/fonts.js.map +1 -1
- package/dist/canvas/renderer/lifecycle.d.ts.map +1 -1
- package/dist/canvas/renderer/lifecycle.js +6 -9
- package/dist/canvas/renderer/lifecycle.js.map +1 -1
- package/dist/canvas/renderer/methods.d.ts +4 -5
- package/dist/canvas/renderer/methods.d.ts.map +1 -1
- package/dist/canvas/renderer/methods.js +1 -4
- package/dist/canvas/renderer/methods.js.map +1 -1
- package/dist/canvas/renderer/paints.d.ts.map +1 -1
- package/dist/canvas/renderer/paints.js +0 -6
- package/dist/canvas/renderer/paints.js.map +1 -1
- package/dist/canvas/renderer/pipeline.d.ts.map +1 -1
- package/dist/canvas/renderer/pipeline.js +20 -2
- package/dist/canvas/renderer/pipeline.js.map +1 -1
- package/dist/canvas/renderer/retained-backing.js +4 -4
- package/dist/canvas/renderer/retained-backing.js.map +1 -1
- package/dist/canvas/renderer/state.js +1 -1
- package/dist/canvas/renderer/state.js.map +1 -1
- package/dist/canvas/renderer/tiles/controller.d.ts +2 -0
- package/dist/canvas/renderer/tiles/controller.d.ts.map +1 -1
- package/dist/canvas/renderer/tiles/controller.js +8 -0
- package/dist/canvas/renderer/tiles/controller.js.map +1 -1
- package/dist/canvas/renderer/tiles/surface-pool.js +1 -1
- package/dist/canvas/renderer/tiles/surface-pool.js.map +1 -1
- package/dist/canvas/renderer/visual-bounds.d.ts.map +1 -1
- package/dist/canvas/renderer/visual-bounds.js +7 -5
- package/dist/canvas/renderer/visual-bounds.js.map +1 -1
- package/dist/canvas/renderer.d.ts +26 -7
- package/dist/canvas/renderer.d.ts.map +1 -1
- package/dist/canvas/renderer.js +50 -11
- package/dist/canvas/renderer.js.map +1 -1
- package/dist/canvas/rulers.d.ts +8 -1
- package/dist/canvas/rulers.d.ts.map +1 -1
- package/dist/canvas/rulers.js +30 -5
- package/dist/canvas/rulers.js.map +1 -1
- package/dist/canvas/scene.d.ts +2 -1
- package/dist/canvas/scene.d.ts.map +1 -1
- package/dist/canvas/scene.js +90 -54
- package/dist/canvas/scene.js.map +1 -1
- package/dist/canvas/shadows/shape.js +1 -1
- package/dist/canvas/shadows/shape.js.map +1 -1
- package/dist/canvas/shadows/silhouette.d.ts.map +1 -1
- package/dist/canvas/shadows/silhouette.js +4 -2
- package/dist/canvas/shadows/silhouette.js.map +1 -1
- package/dist/canvas/shadows.d.ts.map +1 -1
- package/dist/canvas/shadows.js +3 -2
- package/dist/canvas/shadows.js.map +1 -1
- package/dist/canvas/text/derived.d.ts +1 -2
- package/dist/canvas/text/derived.d.ts.map +1 -1
- package/dist/canvas/text/derived.js +1 -7
- package/dist/canvas/text/derived.js.map +1 -1
- package/dist/canvas/text/emoji/index.js +1 -1
- package/dist/canvas/text/emoji/raster.d.ts.map +1 -1
- package/dist/canvas/text/emoji/raster.js +14 -10
- package/dist/canvas/text/emoji/raster.js.map +1 -1
- package/dist/canvas/text/font-families.d.ts +4 -3
- package/dist/canvas/text/font-families.d.ts.map +1 -1
- package/dist/canvas/text/font-families.js +13 -9
- package/dist/canvas/text/font-families.js.map +1 -1
- package/dist/canvas/text/index.d.ts +1 -3
- package/dist/canvas/text/index.d.ts.map +1 -1
- package/dist/canvas/text/index.js +2 -9
- package/dist/canvas/text/index.js.map +1 -1
- package/dist/canvas/text/layout/build.d.ts.map +1 -1
- package/dist/canvas/text/layout/build.js +25 -9
- package/dist/canvas/text/layout/build.js.map +1 -1
- package/dist/canvas/text/layout/index.d.ts.map +1 -1
- package/dist/canvas/text/layout/index.js +8 -4
- package/dist/canvas/text/layout/index.js.map +1 -1
- package/dist/canvas/text/layout/lines.js +5 -3
- package/dist/canvas/text/layout/lines.js.map +1 -1
- package/dist/canvas/text/paragraph/index.d.ts +5 -0
- package/dist/canvas/text/paragraph/index.d.ts.map +1 -1
- package/dist/canvas/text/paragraph/index.js +18 -9
- package/dist/canvas/text/paragraph/index.js.map +1 -1
- package/dist/canvas/text/paragraph/inputs.d.ts +1 -1
- package/dist/canvas/text/paragraph/inputs.d.ts.map +1 -1
- package/dist/canvas/text/paragraph/inputs.js +9 -2
- package/dist/canvas/text/paragraph/inputs.js.map +1 -1
- package/dist/canvas/text/placed.js +3 -3
- package/dist/canvas/text/placed.js.map +1 -1
- package/dist/canvas/text/renderer.d.ts +2 -0
- package/dist/canvas/text/renderer.d.ts.map +1 -1
- package/dist/canvas/text/shape.d.ts +4 -3
- package/dist/canvas/text/shape.d.ts.map +1 -1
- package/dist/canvas/text/shape.js +9 -22
- package/dist/canvas/text/shape.js.map +1 -1
- package/dist/constants.d.ts +6 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -2
- package/dist/constants.js.map +1 -1
- package/dist/design-jsx/renderer.d.ts.map +1 -1
- package/dist/editor/bridges/clipboard.d.ts +1 -0
- package/dist/editor/bridges/clipboard.js +1 -0
- package/dist/editor/bridges/clipboard.js.map +1 -1
- package/dist/editor/bridges/components.d.ts +2 -0
- package/dist/editor/bridges/components.d.ts.map +1 -1
- package/dist/editor/bridges/components.js +2 -0
- package/dist/editor/bridges/components.js.map +1 -1
- package/dist/editor/bridges/frames.d.ts +4 -3
- package/dist/editor/bridges/frames.d.ts.map +1 -1
- package/dist/editor/bridges/frames.js +6 -4
- package/dist/editor/bridges/frames.js.map +1 -1
- package/dist/editor/bridges/structure.d.ts +1 -0
- package/dist/editor/bridges/structure.d.ts.map +1 -1
- package/dist/editor/bridges/structure.js +1 -0
- package/dist/editor/bridges/structure.js.map +1 -1
- package/dist/editor/bridges/undo.d.ts +1 -1
- package/dist/editor/clipboard/detach.js +2 -2
- package/dist/editor/clipboard/detach.js.map +1 -1
- package/dist/editor/clipboard/paste/properties.js +1 -1
- package/dist/editor/clipboard/paste/target.js +2 -2
- package/dist/editor/clipboard/paste/target.js.map +1 -1
- package/dist/editor/clipboard/snapshot.d.ts +3 -0
- package/dist/editor/clipboard/snapshot.d.ts.map +1 -1
- package/dist/editor/clipboard/snapshot.js +2 -0
- package/dist/editor/clipboard/snapshot.js.map +1 -1
- package/dist/editor/clipboard/variables.d.ts.map +1 -1
- package/dist/editor/clipboard/variables.js +14 -1
- package/dist/editor/clipboard/variables.js.map +1 -1
- package/dist/editor/clipboard.d.ts +1 -0
- package/dist/editor/clipboard.d.ts.map +1 -1
- package/dist/editor/clipboard.js +122 -16
- package/dist/editor/clipboard.js.map +1 -1
- package/dist/editor/component-sync.d.ts +10 -1
- package/dist/editor/component-sync.d.ts.map +1 -1
- package/dist/editor/component-sync.js +25 -8
- package/dist/editor/component-sync.js.map +1 -1
- package/dist/editor/components/authoring/text-edit.d.ts.map +1 -1
- package/dist/editor/components/authoring/text-edit.js +11 -2
- package/dist/editor/components/authoring/text-edit.js.map +1 -1
- package/dist/editor/components/authoring/visibility-edit.d.ts.map +1 -1
- package/dist/editor/components/authoring/visibility-edit.js +7 -3
- package/dist/editor/components/authoring/visibility-edit.js.map +1 -1
- package/dist/editor/components/instances.d.ts +2 -0
- package/dist/editor/components/instances.d.ts.map +1 -1
- package/dist/editor/components/instances.js +37 -7
- package/dist/editor/components/instances.js.map +1 -1
- package/dist/editor/components/properties.d.ts.map +1 -1
- package/dist/editor/components/properties.js +3 -0
- package/dist/editor/components/properties.js.map +1 -1
- package/dist/editor/components/slots/authoring.js +2 -1
- package/dist/editor/components/slots/authoring.js.map +1 -1
- package/dist/editor/components.d.ts +2 -0
- package/dist/editor/components.d.ts.map +1 -1
- package/dist/editor/create.d.ts +18 -4
- package/dist/editor/create.d.ts.map +1 -1
- package/dist/editor/create.js +43 -6
- package/dist/editor/create.js.map +1 -1
- package/dist/editor/guides.d.ts.map +1 -1
- package/dist/editor/guides.js +20 -13
- package/dist/editor/guides.js.map +1 -1
- package/dist/editor/history/document-change.d.ts +19 -3
- package/dist/editor/history/document-change.d.ts.map +1 -1
- package/dist/editor/history/document-change.js +94 -8
- package/dist/editor/history/document-change.js.map +1 -1
- package/dist/editor/history/edit.d.ts.map +1 -1
- package/dist/editor/history/edit.js +56 -12
- package/dist/editor/history/edit.js.map +1 -1
- package/dist/editor/history/position.js +1 -4
- package/dist/editor/history/position.js.map +1 -1
- package/dist/editor/history/sources.d.ts +14 -0
- package/dist/editor/history/sources.d.ts.map +1 -0
- package/dist/editor/history/sources.js +24 -0
- package/dist/editor/history/sources.js.map +1 -0
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +1 -1
- package/dist/editor/layout-mode.d.ts.map +1 -1
- package/dist/editor/layout-mode.js +16 -1
- package/dist/editor/layout-mode.js.map +1 -1
- package/dist/editor/node-preview.d.ts.map +1 -1
- package/dist/editor/node-preview.js +26 -7
- package/dist/editor/node-preview.js.map +1 -1
- package/dist/editor/nodes.d.ts.map +1 -1
- package/dist/editor/nodes.js +33 -10
- package/dist/editor/nodes.js.map +1 -1
- package/dist/editor/nudge.d.ts.map +1 -1
- package/dist/editor/nudge.js +12 -2
- package/dist/editor/nudge.js.map +1 -1
- package/dist/editor/pages.d.ts +2 -1
- package/dist/editor/pages.d.ts.map +1 -1
- package/dist/editor/pages.js +94 -15
- package/dist/editor/pages.js.map +1 -1
- package/dist/editor/play/states.d.ts.map +1 -1
- package/dist/editor/play/states.js +0 -5
- package/dist/editor/play/states.js.map +1 -1
- package/dist/editor/read-only/actions.js +3 -0
- package/dist/editor/read-only/actions.js.map +1 -1
- package/dist/editor/selection/hit-test.d.ts +2 -1
- package/dist/editor/selection/hit-test.d.ts.map +1 -1
- package/dist/editor/selection/hit-test.js +29 -4
- package/dist/editor/selection/hit-test.js.map +1 -1
- package/dist/editor/selection.d.ts +2 -2
- package/dist/editor/selection.d.ts.map +1 -1
- package/dist/editor/shapes/pen.js +6 -2
- package/dist/editor/shapes/pen.js.map +1 -1
- package/dist/editor/shapes.d.ts.map +1 -1
- package/dist/editor/shapes.js +2 -1
- package/dist/editor/shapes.js.map +1 -1
- package/dist/editor/structure/auto-layout-wrap.d.ts.map +1 -1
- package/dist/editor/structure/auto-layout-wrap.js +12 -0
- package/dist/editor/structure/auto-layout-wrap.js.map +1 -1
- package/dist/editor/structure/boolean.js +1 -1
- package/dist/editor/structure/group/bounds.d.ts +4 -2
- package/dist/editor/structure/group/bounds.d.ts.map +1 -1
- package/dist/editor/structure/group/bounds.js +17 -4
- package/dist/editor/structure/group/bounds.js.map +1 -1
- package/dist/editor/structure/rename.d.ts +2 -3
- package/dist/editor/structure/rename.d.ts.map +1 -1
- package/dist/editor/structure/rename.js +2 -5
- package/dist/editor/structure/rename.js.map +1 -1
- package/dist/editor/structure/reorder.d.ts.map +1 -1
- package/dist/editor/structure/reorder.js +20 -9
- package/dist/editor/structure/reorder.js.map +1 -1
- package/dist/editor/structure/state.js +1 -1
- package/dist/editor/structure.d.ts +1 -0
- package/dist/editor/structure.d.ts.map +1 -1
- package/dist/editor/structure.js +76 -20
- package/dist/editor/structure.js.map +1 -1
- package/dist/editor/text/hyperlink.d.ts.map +1 -1
- package/dist/editor/text/hyperlink.js +1 -1
- package/dist/editor/text/hyperlink.js.map +1 -1
- package/dist/editor/text/name.d.ts +13 -5
- package/dist/editor/text/name.d.ts.map +1 -1
- package/dist/editor/text/name.js +47 -17
- package/dist/editor/text/name.js.map +1 -1
- package/dist/editor/text/pending-layout.d.ts +2 -1
- package/dist/editor/text/pending-layout.d.ts.map +1 -1
- package/dist/editor/text/pending-layout.js +33 -6
- package/dist/editor/text/pending-layout.js.map +1 -1
- package/dist/editor/text/selection-style.d.ts +1 -0
- package/dist/editor/text/selection-style.d.ts.map +1 -1
- package/dist/editor/text/selection-style.js +16 -4
- package/dist/editor/text/selection-style.js.map +1 -1
- package/dist/editor/text.d.ts +5 -0
- package/dist/editor/text.d.ts.map +1 -1
- package/dist/editor/text.js +70 -3
- package/dist/editor/text.js.map +1 -1
- package/dist/editor/types.d.ts +18 -1
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/editor/undo.d.ts.map +1 -1
- package/dist/editor/undo.js +14 -2
- package/dist/editor/undo.js.map +1 -1
- package/dist/editor/variable-bindings.d.ts.map +1 -1
- package/dist/editor/variable-bindings.js +21 -2
- package/dist/editor/variable-bindings.js.map +1 -1
- package/dist/editor/variables.d.ts +1 -1
- package/dist/editor/variables.d.ts.map +1 -1
- package/dist/editor/variables.js +7 -8
- package/dist/editor/variables.js.map +1 -1
- package/dist/editor/viewport.d.ts +11 -2
- package/dist/editor/viewport.d.ts.map +1 -1
- package/dist/editor/viewport.js +61 -21
- package/dist/editor/viewport.js.map +1 -1
- package/dist/editor/views/actions.d.ts.map +1 -1
- package/dist/editor/views/actions.js +13 -5
- package/dist/editor/views/actions.js.map +1 -1
- package/dist/editor/views/present.d.ts +6 -4
- package/dist/editor/views/present.d.ts.map +1 -1
- package/dist/editor/views/present.js +12 -10
- package/dist/editor/views/present.js.map +1 -1
- package/dist/editor/views/types.d.ts +11 -5
- package/dist/editor/views/types.d.ts.map +1 -1
- package/dist/figma-api/accessor-utils.d.ts.map +1 -1
- package/dist/figma-api/accessor-utils.js +4 -1
- package/dist/figma-api/accessor-utils.js.map +1 -1
- package/dist/figma-api/accessors/basic.d.ts.map +1 -1
- package/dist/figma-api/accessors/basic.js +41 -21
- package/dist/figma-api/accessors/basic.js.map +1 -1
- package/dist/figma-api/accessors/layout.d.ts.map +1 -1
- package/dist/figma-api/accessors/layout.js +37 -7
- package/dist/figma-api/accessors/layout.js.map +1 -1
- package/dist/figma-api/accessors/reactions.d.ts +11 -0
- package/dist/figma-api/accessors/reactions.d.ts.map +1 -0
- package/dist/figma-api/accessors/reactions.js +30 -0
- package/dist/figma-api/accessors/reactions.js.map +1 -0
- package/dist/figma-api/accessors/strokes.d.ts.map +1 -1
- package/dist/figma-api/accessors/strokes.js +12 -4
- package/dist/figma-api/accessors/strokes.js.map +1 -1
- package/dist/figma-api/accessors/text/index.d.ts.map +1 -1
- package/dist/figma-api/accessors/text/index.js +3 -1
- package/dist/figma-api/accessors/text/index.js.map +1 -1
- package/dist/figma-api/accessors/vector.d.ts.map +1 -1
- package/dist/figma-api/accessors/vector.js +1 -1
- package/dist/figma-api/accessors/vector.js.map +1 -1
- package/dist/figma-api/accessors/visual.d.ts +6 -5
- package/dist/figma-api/accessors/visual.d.ts.map +1 -1
- package/dist/figma-api/accessors/visual.js +20 -17
- package/dist/figma-api/accessors/visual.js.map +1 -1
- package/dist/figma-api/components.d.ts.map +1 -1
- package/dist/figma-api/components.js +2 -1
- package/dist/figma-api/components.js.map +1 -1
- package/dist/figma-api/finite.d.ts +27 -0
- package/dist/figma-api/finite.d.ts.map +1 -0
- package/dist/figma-api/finite.js +69 -0
- package/dist/figma-api/finite.js.map +1 -0
- package/dist/figma-api/fonts/list.d.ts +13 -0
- package/dist/figma-api/fonts/list.d.ts.map +1 -0
- package/dist/figma-api/fonts/list.js +25 -0
- package/dist/figma-api/fonts/list.js.map +1 -0
- package/dist/figma-api/index.d.ts +63 -10
- package/dist/figma-api/index.d.ts.map +1 -1
- package/dist/figma-api/index.js +104 -17
- package/dist/figma-api/index.js.map +1 -1
- package/dist/figma-api/overrides.d.ts +6 -1
- package/dist/figma-api/overrides.d.ts.map +1 -1
- package/dist/figma-api/overrides.js +2 -2
- package/dist/figma-api/overrides.js.map +1 -1
- package/dist/figma-api/pending-layout.d.ts +12 -2
- package/dist/figma-api/pending-layout.d.ts.map +1 -1
- package/dist/figma-api/pending-layout.js +41 -1
- package/dist/figma-api/pending-layout.js.map +1 -1
- package/dist/figma-api/pending-sync.d.ts +19 -0
- package/dist/figma-api/pending-sync.d.ts.map +1 -0
- package/dist/figma-api/pending-sync.js +52 -0
- package/dist/figma-api/pending-sync.js.map +1 -0
- package/dist/figma-api/proxy.d.ts +15 -2
- package/dist/figma-api/proxy.d.ts.map +1 -1
- package/dist/figma-api/proxy.js +23 -3
- package/dist/figma-api/proxy.js.map +1 -1
- package/dist/figma-api/reactions.d.ts +104 -0
- package/dist/figma-api/reactions.d.ts.map +1 -0
- package/dist/figma-api/reactions.js +157 -0
- package/dist/figma-api/reactions.js.map +1 -0
- package/dist/figma-api/render-bounds.d.ts.map +1 -1
- package/dist/figma-api/render-bounds.js +4 -4
- package/dist/figma-api/render-bounds.js.map +1 -1
- package/dist/figma-api/serialization.js +12 -2
- package/dist/figma-api/serialization.js.map +1 -1
- package/dist/figma-api/slots.d.ts +7 -1
- package/dist/figma-api/slots.d.ts.map +1 -1
- package/dist/figma-api/slots.js +12 -4
- package/dist/figma-api/slots.js.map +1 -1
- package/dist/figma-api/strokes.d.ts +5 -2
- package/dist/figma-api/strokes.d.ts.map +1 -1
- package/dist/figma-api/strokes.js +12 -19
- package/dist/figma-api/strokes.js.map +1 -1
- package/dist/figma-api/text/bindings.js +1 -1
- package/dist/figma-api/text/index.d.ts +2 -3
- package/dist/figma-api/text/index.d.ts.map +1 -1
- package/dist/figma-api/text/index.js +2 -12
- package/dist/figma-api/text/index.js.map +1 -1
- package/dist/figma-api/variables/bindings.js +1 -1
- package/dist/figma-api/variables/variable.d.ts.map +1 -1
- package/dist/figma-api/variables/variable.js +2 -2
- package/dist/figma-api/variables/variable.js.map +1 -1
- package/dist/geometry/connectors.js +2 -14
- package/dist/geometry/connectors.js.map +1 -1
- package/dist/geometry/figma.d.ts +6 -1
- package/dist/geometry/figma.d.ts.map +1 -1
- package/dist/geometry/figma.js +8 -1
- package/dist/geometry/figma.js.map +1 -1
- package/dist/geometry/index.d.ts +3 -3
- package/dist/geometry/index.js +2 -2
- package/dist/geometry/scene.d.ts +3 -1
- package/dist/geometry/scene.d.ts.map +1 -1
- package/dist/geometry/scene.js +16 -1
- package/dist/geometry/scene.js.map +1 -1
- package/dist/geometry/types.d.ts +7 -1
- package/dist/geometry/types.d.ts.map +1 -1
- package/dist/icons/api.d.ts +3 -2
- package/dist/icons/api.d.ts.map +1 -1
- package/dist/icons/api.js +12 -12
- package/dist/icons/api.js.map +1 -1
- package/dist/icons/provider.d.ts +4 -3
- package/dist/icons/provider.d.ts.map +1 -1
- package/dist/icons/provider.js +6 -13
- package/dist/icons/provider.js.map +1 -1
- package/dist/icons/schema.d.ts +33 -1
- package/dist/icons/schema.d.ts.map +1 -1
- package/dist/icons/schema.js +30 -1
- package/dist/icons/schema.js.map +1 -1
- package/dist/icons/svg/presentation.d.ts +8 -1
- package/dist/icons/svg/presentation.d.ts.map +1 -1
- package/dist/icons/svg/presentation.js +21 -3
- package/dist/icons/svg/presentation.js.map +1 -1
- package/dist/icons/svg/text.js +1 -1
- package/dist/icons/svg/text.js.map +1 -1
- package/dist/icons/svg.d.ts +8 -3
- package/dist/icons/svg.d.ts.map +1 -1
- package/dist/icons/svg.js +15 -13
- package/dist/icons/svg.js.map +1 -1
- package/dist/icons/types.d.ts +1 -19
- package/dist/icons/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/io/formats/design-tokens/css/read.js +1 -1
- package/dist/io/formats/design-tokens/decode.js +1 -1
- package/dist/io/formats/design-tokens/plan/index.js +4 -2
- package/dist/io/formats/design-tokens/plan/index.js.map +1 -1
- package/dist/io/formats/design-tokens/plan/styles.d.ts +9 -1
- package/dist/io/formats/design-tokens/plan/styles.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/plan/styles.js +23 -3
- package/dist/io/formats/design-tokens/plan/styles.js.map +1 -1
- package/dist/io/formats/design-tokens/styles.d.ts +9 -1
- package/dist/io/formats/design-tokens/styles.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/styles.js +41 -4
- package/dist/io/formats/design-tokens/styles.js.map +1 -1
- package/dist/io/formats/design-tokens/types.d.ts +5 -0
- package/dist/io/formats/design-tokens/types.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/types.js +1 -0
- package/dist/io/formats/design-tokens/types.js.map +1 -1
- package/dist/io/formats/drawio/export.d.ts.map +1 -1
- package/dist/io/formats/drawio/export.js +10 -0
- package/dist/io/formats/drawio/export.js.map +1 -1
- package/dist/io/formats/drawio/index.d.ts.map +1 -1
- package/dist/io/formats/drawio/index.js +32 -1
- package/dist/io/formats/drawio/index.js.map +1 -1
- package/dist/io/formats/drawio/shapes.d.ts +10 -5
- package/dist/io/formats/drawio/shapes.d.ts.map +1 -1
- package/dist/io/formats/drawio/shapes.js +10 -6
- package/dist/io/formats/drawio/shapes.js.map +1 -1
- package/dist/io/formats/drawio/warnings.d.ts +11 -0
- package/dist/io/formats/drawio/warnings.d.ts.map +1 -0
- package/dist/io/formats/drawio/warnings.js +23 -0
- package/dist/io/formats/drawio/warnings.js.map +1 -0
- package/dist/io/formats/fig/export/setup.d.ts.map +1 -1
- package/dist/io/formats/fig/export/setup.js +8 -4
- package/dist/io/formats/fig/export/setup.js.map +1 -1
- package/dist/io/formats/fig/export/variables.d.ts.map +1 -1
- package/dist/io/formats/fig/export/variables.js +2 -2
- package/dist/io/formats/fig/export/variables.js.map +1 -1
- package/dist/io/formats/fig/index.d.ts +2 -2
- package/dist/io/formats/fig/index.js +2 -2
- package/dist/io/formats/fig/read.d.ts +9 -2
- package/dist/io/formats/fig/read.d.ts.map +1 -1
- package/dist/io/formats/fig/read.js +44 -20
- package/dist/io/formats/fig/read.js.map +1 -1
- package/dist/io/formats/html/index.d.ts.map +1 -1
- package/dist/io/formats/html/index.js +2 -6
- package/dist/io/formats/html/index.js.map +1 -1
- package/dist/io/formats/pdf/dom.d.ts +10 -1
- package/dist/io/formats/pdf/dom.d.ts.map +1 -1
- package/dist/io/formats/pdf/dom.js +96 -2
- package/dist/io/formats/pdf/dom.js.map +1 -1
- package/dist/io/formats/pdf/export.js +3 -2
- package/dist/io/formats/pdf/export.js.map +1 -1
- package/dist/io/formats/pdf/prepare.js +1 -1
- package/dist/io/formats/pen/fonts.d.ts +14 -0
- package/dist/io/formats/pen/fonts.d.ts.map +1 -0
- package/dist/io/formats/pen/fonts.js +39 -0
- package/dist/io/formats/pen/fonts.js.map +1 -0
- package/dist/io/formats/pen/index.d.ts.map +1 -1
- package/dist/io/formats/pen/index.js +25 -6
- package/dist/io/formats/pen/index.js.map +1 -1
- package/dist/io/formats/raster/headless.d.ts +3 -3
- package/dist/io/formats/raster/headless.d.ts.map +1 -1
- package/dist/io/formats/raster/headless.js +25 -14
- package/dist/io/formats/raster/headless.js.map +1 -1
- package/dist/io/formats/raster/index.d.ts +2 -2
- package/dist/io/formats/raster/index.js +2 -2
- package/dist/io/formats/raster/render.d.ts +8 -2
- package/dist/io/formats/raster/render.d.ts.map +1 -1
- package/dist/io/formats/raster/render.js +42 -8
- package/dist/io/formats/raster/render.js.map +1 -1
- package/dist/io/formats/svg/export.d.ts.map +1 -1
- package/dist/io/formats/svg/export.js +28 -24
- package/dist/io/formats/svg/export.js.map +1 -1
- package/dist/io/formats/svg/paths.d.ts +8 -2
- package/dist/io/formats/svg/paths.d.ts.map +1 -1
- package/dist/io/formats/svg/paths.js +11 -3
- package/dist/io/formats/svg/paths.js.map +1 -1
- package/dist/io/formats/svg/strokes.d.ts.map +1 -1
- package/dist/io/formats/svg/strokes.js +2 -5
- package/dist/io/formats/svg/strokes.js.map +1 -1
- package/dist/io/formats/svg/text/export.d.ts.map +1 -1
- package/dist/io/formats/svg/text/export.js +19 -1
- package/dist/io/formats/svg/text/export.js.map +1 -1
- package/dist/io/formats/svg/text/import.d.ts.map +1 -1
- package/dist/io/formats/svg/text/import.js +2 -1
- package/dist/io/formats/svg/text/import.js.map +1 -1
- package/dist/io/formats.d.ts.map +1 -1
- package/dist/io/formats.js +3 -1
- package/dist/io/formats.js.map +1 -1
- package/dist/io/registry.d.ts +2 -0
- package/dist/io/registry.d.ts.map +1 -1
- package/dist/io/registry.js +5 -0
- package/dist/io/registry.js.map +1 -1
- package/dist/io/subgraph.d.ts.map +1 -1
- package/dist/io/subgraph.js +5 -2
- package/dist/io/subgraph.js.map +1 -1
- package/dist/io/types.d.ts +2 -0
- package/dist/io/types.d.ts.map +1 -1
- package/dist/kiwi/fig/population/client.d.ts.map +1 -1
- package/dist/kiwi/fig/population/client.js +63 -45
- package/dist/kiwi/fig/population/client.js.map +1 -1
- package/dist/kiwi/fig/population/delta.d.ts +34 -3
- package/dist/kiwi/fig/population/delta.d.ts.map +1 -1
- package/dist/kiwi/fig/population/delta.js +99 -16
- package/dist/kiwi/fig/population/delta.js.map +1 -1
- package/dist/kiwi/fig/population/edits.d.ts +51 -0
- package/dist/kiwi/fig/population/edits.d.ts.map +1 -0
- package/dist/kiwi/fig/population/edits.js +169 -0
- package/dist/kiwi/fig/population/edits.js.map +1 -0
- package/dist/kiwi/fig/session/archive/access.d.ts +3 -0
- package/dist/kiwi/fig/session/archive/access.d.ts.map +1 -1
- package/dist/kiwi/fig/session/archive/access.js +8 -1
- package/dist/kiwi/fig/session/archive/access.js.map +1 -1
- package/dist/kiwi/fig/session/archive/changes.d.ts +2 -1
- package/dist/kiwi/fig/session/archive/changes.d.ts.map +1 -1
- package/dist/kiwi/fig/session/archive/changes.js +12 -5
- package/dist/kiwi/fig/session/archive/changes.js.map +1 -1
- package/dist/kiwi/fig/session/document-state.d.ts +7 -1
- package/dist/kiwi/fig/session/document-state.d.ts.map +1 -1
- package/dist/kiwi/fig/session/document-state.js +16 -2
- package/dist/kiwi/fig/session/document-state.js.map +1 -1
- package/dist/kiwi/fig/session/protocol.d.ts +31 -3
- package/dist/kiwi/fig/session/protocol.d.ts.map +1 -1
- package/dist/kiwi/fig/session/worker.js +33 -8
- package/dist/kiwi/fig/session/worker.js.map +1 -1
- package/dist/layout/apply.d.ts +6 -1
- package/dist/layout/apply.d.ts.map +1 -1
- package/dist/layout/apply.js +39 -14
- package/dist/layout/apply.js.map +1 -1
- package/dist/layout/arrange/boxes.d.ts.map +1 -1
- package/dist/layout/arrange/boxes.js +31 -0
- package/dist/layout/arrange/boxes.js.map +1 -1
- package/dist/layout/flow-edges.d.ts +26 -0
- package/dist/layout/flow-edges.d.ts.map +1 -0
- package/dist/layout/flow-edges.js +105 -0
- package/dist/layout/flow-edges.js.map +1 -0
- package/dist/layout/grid.d.ts.map +1 -1
- package/dist/layout/grid.js +9 -5
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout/text-auto-resize.d.ts.map +1 -1
- package/dist/layout/text-auto-resize.js +9 -4
- package/dist/layout/text-auto-resize.js.map +1 -1
- package/dist/layout/text-measurement.d.ts +15 -1
- package/dist/layout/text-measurement.d.ts.map +1 -1
- package/dist/layout/text-measurement.js +40 -4
- package/dist/layout/text-measurement.js.map +1 -1
- package/dist/layout/variables.d.ts +1 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/layout.js +35 -35
- package/dist/layout.js.map +1 -1
- package/dist/library/asset-keys.d.ts +3 -2
- package/dist/library/asset-keys.d.ts.map +1 -1
- package/dist/library/asset-keys.js +4 -3
- package/dist/library/asset-keys.js.map +1 -1
- package/dist/library/copied-references.d.ts +8 -3
- package/dist/library/copied-references.d.ts.map +1 -1
- package/dist/library/copied-references.js +15 -5
- package/dist/library/copied-references.js.map +1 -1
- package/dist/library/materialize.js +1 -1
- package/dist/library/materialize.js.map +1 -1
- package/dist/library/schema.js.map +1 -1
- package/dist/library/snapshot.d.ts.map +1 -1
- package/dist/library/snapshot.js +11 -2
- package/dist/library/snapshot.js.map +1 -1
- package/dist/lint/linter.d.ts.map +1 -1
- package/dist/lint/linter.js +11 -2
- package/dist/lint/linter.js.map +1 -1
- package/dist/pairdraw-api/variables.d.ts.map +1 -1
- package/dist/pairdraw-api/variables.js +0 -2
- package/dist/pairdraw-api/variables.js.map +1 -1
- package/dist/profiler/hud-controller.d.ts +4 -3
- package/dist/profiler/hud-controller.d.ts.map +1 -1
- package/dist/profiler/hud-controller.js +7 -5
- package/dist/profiler/hud-controller.js.map +1 -1
- package/dist/profiler/hud-renderer.d.ts +5 -2
- package/dist/profiler/hud-renderer.d.ts.map +1 -1
- package/dist/profiler/hud-renderer.js +8 -5
- package/dist/profiler/hud-renderer.js.map +1 -1
- package/dist/profiler/render-profiler.d.ts +3 -2
- package/dist/profiler/render-profiler.d.ts.map +1 -1
- package/dist/profiler/render-profiler.js +3 -2
- package/dist/profiler/render-profiler.js.map +1 -1
- package/dist/rpc/variables-command.d.ts.map +1 -1
- package/dist/rpc/variables-command.js +4 -2
- package/dist/rpc/variables-command.js.map +1 -1
- package/dist/text/character-style.d.ts +11 -1
- package/dist/text/character-style.d.ts.map +1 -1
- package/dist/text/character-style.js +27 -5
- package/dist/text/character-style.js.map +1 -1
- package/dist/text/coverage.d.ts.map +1 -1
- package/dist/text/coverage.js +16 -14
- package/dist/text/coverage.js.map +1 -1
- package/dist/text/editor.d.ts.map +1 -1
- package/dist/text/editor.js +3 -8
- package/dist/text/editor.js.map +1 -1
- package/dist/text/fallbacks.d.ts +26 -3
- package/dist/text/fallbacks.d.ts.map +1 -1
- package/dist/text/fallbacks.js +135 -18
- package/dist/text/fallbacks.js.map +1 -1
- package/dist/text/font/catalog.d.ts +4 -0
- package/dist/text/font/catalog.d.ts.map +1 -1
- package/dist/text/font/catalog.js +8 -0
- package/dist/text/font/catalog.js.map +1 -1
- package/dist/text/font/collection.d.ts +13 -0
- package/dist/text/font/collection.d.ts.map +1 -0
- package/dist/text/font/collection.js +51 -0
- package/dist/text/font/collection.js.map +1 -0
- package/dist/text/font/faces.d.ts +2 -1
- package/dist/text/font/faces.d.ts.map +1 -1
- package/dist/text/font/faces.js +9 -5
- package/dist/text/font/faces.js.map +1 -1
- package/dist/text/font/glyphs.d.ts +14 -3
- package/dist/text/font/glyphs.d.ts.map +1 -1
- package/dist/text/font/glyphs.js +22 -5
- package/dist/text/font/glyphs.js.map +1 -1
- package/dist/text/font/local.js +2 -2
- package/dist/text/font/local.js.map +1 -1
- package/dist/text/font/manager.d.ts +50 -6
- package/dist/text/font/manager.d.ts.map +1 -1
- package/dist/text/font/manager.js +178 -32
- package/dist/text/font/manager.js.map +1 -1
- package/dist/text/font/style.d.ts +7 -2
- package/dist/text/font/style.d.ts.map +1 -1
- package/dist/text/font/style.js +31 -3
- package/dist/text/font/style.js.map +1 -1
- package/dist/text/index.d.ts +5 -4
- package/dist/text/index.js +5 -4
- package/dist/text/outlines.d.ts.map +1 -1
- package/dist/text/outlines.js +71 -71
- package/dist/text/outlines.js.map +1 -1
- package/dist/text/path/caret.d.ts +2 -4
- package/dist/text/path/caret.d.ts.map +1 -1
- package/dist/text/path/caret.js.map +1 -1
- package/dist/text/prepare.d.ts +5 -1
- package/dist/text/prepare.d.ts.map +1 -1
- package/dist/text/prepare.js +26 -3
- package/dist/text/prepare.js.map +1 -1
- package/dist/text/style-runs.d.ts +14 -2
- package/dist/text/style-runs.d.ts.map +1 -1
- package/dist/text/style-runs.js +22 -14
- package/dist/text/style-runs.js.map +1 -1
- package/dist/text/web-font/assets.d.ts.map +1 -1
- package/dist/text/web-font/assets.js +13 -21
- package/dist/text/web-font/assets.js.map +1 -1
- package/dist/text/web-font/resolver.d.ts.map +1 -1
- package/dist/text/web-font/resolver.js +4 -1
- package/dist/text/web-font/resolver.js.map +1 -1
- package/dist/tools/analyze/overlaps/helpers.d.ts.map +1 -1
- package/dist/tools/analyze/overlaps/helpers.js +9 -1
- package/dist/tools/analyze/overlaps/helpers.js.map +1 -1
- package/dist/tools/analyze/overlaps/index.d.ts.map +1 -1
- package/dist/tools/analyze/overlaps/index.js +27 -5
- package/dist/tools/analyze/overlaps/index.js.map +1 -1
- package/dist/tools/codegen/component-map.js +3 -3
- package/dist/tools/codegen/component-map.js.map +1 -1
- package/dist/tools/create/basic.d.ts.map +1 -1
- package/dist/tools/create/basic.js +5 -4
- package/dist/tools/create/basic.js.map +1 -1
- package/dist/tools/create/components.d.ts +2 -1
- package/dist/tools/create/components.d.ts.map +1 -1
- package/dist/tools/create/components.js +27 -1
- package/dist/tools/create/components.js.map +1 -1
- package/dist/tools/create/html.d.ts.map +1 -1
- package/dist/tools/create/html.js +4 -2
- package/dist/tools/create/html.js.map +1 -1
- package/dist/tools/create/icons.d.ts.map +1 -1
- package/dist/tools/create/icons.js +14 -6
- package/dist/tools/create/icons.js.map +1 -1
- package/dist/tools/create/mermaid.d.ts.map +1 -1
- package/dist/tools/create/mermaid.js +2 -0
- package/dist/tools/create/mermaid.js.map +1 -1
- package/dist/tools/create/render.d.ts.map +1 -1
- package/dist/tools/create/render.js +2 -0
- package/dist/tools/create/render.js.map +1 -1
- package/dist/tools/create/script.js +3 -1
- package/dist/tools/create/script.js.map +1 -1
- package/dist/tools/create/svg.d.ts.map +1 -1
- package/dist/tools/create/svg.js +4 -1
- package/dist/tools/create/svg.js.map +1 -1
- package/dist/tools/create/vector.d.ts.map +1 -1
- package/dist/tools/create/vector.js +13 -10
- package/dist/tools/create/vector.js.map +1 -1
- package/dist/tools/create.d.ts +2 -2
- package/dist/tools/create.js +2 -2
- package/dist/tools/image-ai/apply.js +1 -1
- package/dist/tools/image-ai/generate.d.ts.map +1 -1
- package/dist/tools/image-ai/generate.js +3 -0
- package/dist/tools/image-ai/generate.js.map +1 -1
- package/dist/tools/modify/effects.d.ts.map +1 -1
- package/dist/tools/modify/effects.js +5 -3
- package/dist/tools/modify/effects.js.map +1 -1
- package/dist/tools/modify/matching.d.ts.map +1 -1
- package/dist/tools/modify/matching.js +9 -6
- package/dist/tools/modify/matching.js.map +1 -1
- package/dist/tools/modify/paint.d.ts.map +1 -1
- package/dist/tools/modify/paint.js +7 -5
- package/dist/tools/modify/paint.js.map +1 -1
- package/dist/tools/modify/reactions.d.ts +6 -0
- package/dist/tools/modify/reactions.d.ts.map +1 -0
- package/dist/tools/modify/reactions.js +35 -0
- package/dist/tools/modify/reactions.js.map +1 -0
- package/dist/tools/modify/text.d.ts.map +1 -1
- package/dist/tools/modify/text.js +28 -8
- package/dist/tools/modify/text.js.map +1 -1
- package/dist/tools/modify.d.ts +2 -1
- package/dist/tools/modify.js +2 -1
- package/dist/tools/read/components.js +20 -22
- package/dist/tools/read/components.js.map +1 -1
- package/dist/tools/read/fonts.js +1 -1
- package/dist/tools/read/fonts.js.map +1 -1
- package/dist/tools/read/libraries.d.ts.map +1 -1
- package/dist/tools/read/libraries.js +18 -4
- package/dist/tools/read/libraries.js.map +1 -1
- package/dist/tools/read/nodes.d.ts.map +1 -1
- package/dist/tools/read/nodes.js +38 -16
- package/dist/tools/read/nodes.js.map +1 -1
- package/dist/tools/read/pages.d.ts.map +1 -1
- package/dist/tools/read/pages.js +4 -3
- package/dist/tools/read/pages.js.map +1 -1
- package/dist/tools/read/query.js +1 -0
- package/dist/tools/read/query.js.map +1 -1
- package/dist/tools/read/reactions.d.ts +6 -0
- package/dist/tools/read/reactions.d.ts.map +1 -0
- package/dist/tools/read/reactions.js +24 -0
- package/dist/tools/read/reactions.js.map +1 -0
- package/dist/tools/read/space.js +1 -1
- package/dist/tools/read.d.ts +2 -1
- package/dist/tools/read.js +2 -1
- package/dist/tools/registry/extended.d.ts.map +1 -1
- package/dist/tools/registry/extended.js +6 -1
- package/dist/tools/registry/extended.js.map +1 -1
- package/dist/tools/schema.d.ts +30 -5
- package/dist/tools/schema.d.ts.map +1 -1
- package/dist/tools/schema.js +125 -7
- package/dist/tools/schema.js.map +1 -1
- package/dist/tools/stock-photo/apply.js +8 -9
- package/dist/tools/stock-photo/apply.js.map +1 -1
- package/dist/tools/structure/batch.d.ts.map +1 -1
- package/dist/tools/structure/batch.js +86 -90
- package/dist/tools/structure/batch.js.map +1 -1
- package/dist/tools/variables/values.d.ts.map +1 -1
- package/dist/tools/variables/values.js +4 -2
- package/dist/tools/variables/values.js.map +1 -1
- package/dist/tools/vector/export.d.ts.map +1 -1
- package/dist/tools/vector/export.js +5 -2
- package/dist/tools/vector/export.js.map +1 -1
- package/dist/vector/fill-geometry.d.ts +4 -1
- package/dist/vector/fill-geometry.d.ts.map +1 -1
- package/dist/vector/fill-geometry.js +8 -5
- package/dist/vector/fill-geometry.js.map +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/vector/index.js.map +1 -1
- package/dist/vector/path-helpers.d.ts +1 -1
- package/dist/vector/path-helpers.d.ts.map +1 -1
- package/dist/vector/path-helpers.js +24 -7
- package/dist/vector/path-helpers.js.map +1 -1
- package/dist/vector/placement.js +1 -1
- package/dist/vector/placement.js.map +1 -1
- package/dist/vector/vectorize/preprocess.js +1 -1
- package/dist/vector/vectorize/preprocess.js.map +1 -1
- package/package.json +10 -10
- package/src/canvas/effects.ts +29 -33
- package/src/canvas/labels/hit-test.ts +6 -2
- package/src/canvas/labels/paragraph-cache.ts +2 -1
- package/src/canvas/labels/selection.ts +3 -3
- package/src/canvas/node-edit-overlay.ts +3 -2
- package/src/canvas/outline-stroke.ts +2 -6
- package/src/canvas/overlays/index.ts +0 -1
- package/src/canvas/overlays/prototype.ts +5 -27
- package/src/canvas/overlays/selection.ts +4 -52
- package/src/canvas/region-hatch.ts +7 -2
- package/src/canvas/renderer/colors.ts +41 -26
- package/src/canvas/renderer/font-waiters.ts +25 -0
- package/src/canvas/renderer/fonts.ts +42 -18
- package/src/canvas/renderer/lifecycle.ts +8 -10
- package/src/canvas/renderer/methods.ts +9 -13
- package/src/canvas/renderer/paints.ts +0 -10
- package/src/canvas/renderer/pipeline.ts +29 -3
- package/src/canvas/renderer/retained-backing.ts +4 -4
- package/src/canvas/renderer/state.ts +1 -1
- package/src/canvas/renderer/tiles/controller.ts +8 -0
- package/src/canvas/renderer/tiles/surface-pool.ts +1 -1
- package/src/canvas/renderer/visual-bounds.ts +7 -6
- package/src/canvas/renderer.ts +43 -11
- package/src/canvas/rulers.ts +55 -26
- package/src/canvas/scene.ts +127 -77
- package/src/canvas/shadows/shape.ts +1 -1
- package/src/canvas/shadows/silhouette.ts +4 -2
- package/src/canvas/shadows.ts +4 -2
- package/src/canvas/text/derived.ts +0 -9
- package/src/canvas/text/emoji/raster.ts +14 -10
- package/src/canvas/text/font-families.ts +14 -7
- package/src/canvas/text/index.ts +3 -9
- package/src/canvas/text/layout/build.ts +35 -18
- package/src/canvas/text/layout/index.ts +15 -6
- package/src/canvas/text/layout/lines.ts +10 -4
- package/src/canvas/text/paragraph/index.ts +19 -10
- package/src/canvas/text/paragraph/inputs.ts +4 -2
- package/src/canvas/text/placed.ts +2 -2
- package/src/canvas/text/renderer.ts +2 -0
- package/src/canvas/text/shape.ts +20 -31
- package/src/constants.ts +6 -1
- package/src/editor/bridges/clipboard.ts +1 -0
- package/src/editor/bridges/components.ts +2 -0
- package/src/editor/bridges/frames.ts +6 -4
- package/src/editor/bridges/structure.ts +1 -0
- package/src/editor/clipboard/detach.ts +3 -3
- package/src/editor/clipboard/paste/target.ts +2 -2
- package/src/editor/clipboard/snapshot.ts +7 -0
- package/src/editor/clipboard/variables.ts +20 -0
- package/src/editor/clipboard.ts +133 -14
- package/src/editor/component-sync.ts +28 -7
- package/src/editor/components/authoring/text-edit.ts +15 -2
- package/src/editor/components/authoring/visibility-edit.ts +11 -3
- package/src/editor/components/instances.ts +61 -11
- package/src/editor/components/properties.ts +10 -0
- package/src/editor/components/slots/authoring.ts +4 -1
- package/src/editor/create.ts +58 -8
- package/src/editor/guides.ts +27 -12
- package/src/editor/history/document-change.ts +115 -7
- package/src/editor/history/edit.ts +62 -14
- package/src/editor/history/position.ts +1 -4
- package/src/editor/history/sources.ts +25 -0
- package/src/editor/index.ts +3 -1
- package/src/editor/layout-mode.ts +20 -1
- package/src/editor/node-preview.ts +44 -8
- package/src/editor/nodes.ts +52 -12
- package/src/editor/nudge.ts +16 -2
- package/src/editor/pages.ts +100 -17
- package/src/editor/play/states.ts +0 -7
- package/src/editor/read-only/actions.ts +4 -0
- package/src/editor/selection/hit-test.ts +37 -4
- package/src/editor/shapes/pen.ts +6 -3
- package/src/editor/shapes.ts +2 -1
- package/src/editor/structure/auto-layout-wrap.ts +26 -0
- package/src/editor/structure/group/bounds.ts +22 -4
- package/src/editor/structure/rename.ts +2 -6
- package/src/editor/structure/reorder.ts +26 -8
- package/src/editor/structure.ts +88 -24
- package/src/editor/text/hyperlink.ts +2 -1
- package/src/editor/text/name.ts +51 -15
- package/src/editor/text/pending-layout.ts +42 -4
- package/src/editor/text/selection-style.ts +17 -3
- package/src/editor/text.ts +86 -4
- package/src/editor/types.ts +19 -0
- package/src/editor/undo.ts +21 -2
- package/src/editor/variable-bindings.ts +22 -2
- package/src/editor/variables.ts +10 -6
- package/src/editor/viewport.ts +55 -21
- package/src/editor/views/actions.ts +17 -7
- package/src/editor/views/present.ts +20 -11
- package/src/editor/views/types.ts +11 -5
- package/src/figma-api/accessor-utils.ts +4 -1
- package/src/figma-api/accessors/basic.ts +54 -18
- package/src/figma-api/accessors/layout.ts +46 -7
- package/src/figma-api/accessors/reactions.ts +29 -0
- package/src/figma-api/accessors/strokes.ts +28 -8
- package/src/figma-api/accessors/text/index.ts +4 -0
- package/src/figma-api/accessors/vector.ts +3 -1
- package/src/figma-api/accessors/visual.ts +25 -28
- package/src/figma-api/components.ts +9 -7
- package/src/figma-api/finite.ts +102 -0
- package/src/figma-api/fonts/list.ts +24 -0
- package/src/figma-api/index.ts +170 -19
- package/src/figma-api/overrides.ts +1 -1
- package/src/figma-api/pending-layout.ts +50 -1
- package/src/figma-api/pending-sync.ts +61 -0
- package/src/figma-api/proxy.ts +35 -2
- package/src/figma-api/reactions.ts +212 -0
- package/src/figma-api/render-bounds.ts +13 -4
- package/src/figma-api/serialization.ts +16 -2
- package/src/figma-api/slots.ts +12 -3
- package/src/figma-api/strokes.ts +16 -12
- package/src/figma-api/text/index.ts +9 -15
- package/src/figma-api/variables/variable.ts +3 -2
- package/src/geometry/connectors.ts +2 -12
- package/src/geometry/figma.ts +9 -0
- package/src/geometry/index.ts +2 -1
- package/src/geometry/scene.ts +19 -0
- package/src/geometry/types.ts +8 -0
- package/src/global.d.ts +6 -0
- package/src/icons/api.ts +27 -16
- package/src/icons/provider.ts +9 -20
- package/src/icons/schema.ts +31 -0
- package/src/icons/svg/presentation.ts +27 -3
- package/src/icons/svg/text.ts +1 -1
- package/src/icons/svg.ts +21 -19
- package/src/icons/types.ts +0 -14
- package/src/io/formats/design-tokens/plan/index.ts +7 -1
- package/src/io/formats/design-tokens/plan/styles.ts +40 -4
- package/src/io/formats/design-tokens/styles.ts +60 -3
- package/src/io/formats/design-tokens/types.ts +3 -0
- package/src/io/formats/drawio/export.ts +11 -0
- package/src/io/formats/drawio/index.ts +36 -1
- package/src/io/formats/drawio/shapes.ts +13 -9
- package/src/io/formats/drawio/warnings.ts +27 -0
- package/src/io/formats/fig/export/setup.ts +16 -14
- package/src/io/formats/fig/export/variables.ts +7 -8
- package/src/io/formats/fig/index.ts +1 -0
- package/src/io/formats/fig/read.ts +66 -23
- package/src/io/formats/html/index.ts +2 -6
- package/src/io/formats/pdf/dom.ts +125 -3
- package/src/io/formats/pdf/export.ts +3 -2
- package/src/io/formats/pen/fonts.ts +45 -0
- package/src/io/formats/pen/index.ts +30 -6
- package/src/io/formats/raster/headless.ts +40 -14
- package/src/io/formats/raster/index.ts +3 -0
- package/src/io/formats/raster/render.ts +66 -8
- package/src/io/formats/svg/export.ts +24 -25
- package/src/io/formats/svg/paths.ts +11 -2
- package/src/io/formats/svg/strokes.ts +8 -2
- package/src/io/formats/svg/text/export.ts +23 -0
- package/src/io/formats/svg/text/import.ts +2 -1
- package/src/io/formats.ts +3 -1
- package/src/io/registry.ts +12 -0
- package/src/io/subgraph.ts +3 -1
- package/src/io/types.ts +2 -0
- package/src/kiwi/fig/population/client.ts +77 -43
- package/src/kiwi/fig/population/delta.ts +141 -18
- package/src/kiwi/fig/population/edits.ts +235 -0
- package/src/kiwi/fig/session/archive/access.ts +15 -0
- package/src/kiwi/fig/session/archive/changes.ts +27 -6
- package/src/kiwi/fig/session/document-state.ts +23 -1
- package/src/kiwi/fig/session/protocol.ts +26 -1
- package/src/kiwi/fig/session/worker.ts +38 -11
- package/src/layout/apply.ts +52 -10
- package/src/layout/arrange/boxes.ts +36 -0
- package/src/layout/flow-edges.ts +139 -0
- package/src/layout/grid.ts +14 -4
- package/src/layout/text-auto-resize.ts +13 -4
- package/src/layout/text-measurement.ts +46 -3
- package/src/layout.ts +60 -66
- package/src/library/asset-keys.ts +4 -3
- package/src/library/copied-references.ts +29 -5
- package/src/library/materialize.ts +1 -1
- package/src/library/schema.ts +1 -1
- package/src/library/snapshot.ts +12 -2
- package/src/lint/linter.ts +12 -2
- package/src/pairdraw-api/variables.ts +1 -3
- package/src/profiler/hud-controller.ts +8 -6
- package/src/profiler/hud-renderer.ts +9 -6
- package/src/profiler/render-profiler.ts +4 -3
- package/src/rpc/variables-command.ts +6 -5
- package/src/text/character-style.ts +29 -9
- package/src/text/coverage.ts +29 -15
- package/src/text/editor.ts +3 -8
- package/src/text/fallbacks.ts +163 -22
- package/src/text/font/catalog.ts +10 -0
- package/src/text/font/collection.ts +60 -0
- package/src/text/font/faces.ts +9 -5
- package/src/text/font/glyphs.ts +29 -4
- package/src/text/font/local.ts +2 -2
- package/src/text/font/manager.ts +220 -49
- package/src/text/font/style.ts +52 -3
- package/src/text/index.ts +1 -0
- package/src/text/outlines.ts +106 -90
- package/src/text/path/caret.ts +3 -4
- package/src/text/prepare.ts +51 -2
- package/src/text/style-runs.ts +43 -16
- package/src/text/web-font/assets.ts +11 -15
- package/src/text/web-font/resolver.ts +7 -1
- package/src/tools/analyze/overlaps/helpers.ts +18 -1
- package/src/tools/analyze/overlaps/index.ts +37 -6
- package/src/tools/codegen/component-map.ts +3 -3
- package/src/tools/create/basic.ts +6 -4
- package/src/tools/create/components.ts +33 -0
- package/src/tools/create/html.ts +3 -1
- package/src/tools/create/icons.ts +16 -6
- package/src/tools/create/mermaid.ts +2 -0
- package/src/tools/create/render.ts +2 -0
- package/src/tools/create/script.ts +5 -1
- package/src/tools/create/svg.ts +4 -1
- package/src/tools/create/vector.ts +20 -10
- package/src/tools/create.ts +1 -0
- package/src/tools/image-ai/generate.ts +3 -0
- package/src/tools/modify/effects.ts +11 -4
- package/src/tools/modify/matching.ts +10 -6
- package/src/tools/modify/paint.ts +13 -5
- package/src/tools/modify/reactions.ts +40 -0
- package/src/tools/modify/text.ts +53 -20
- package/src/tools/modify.ts +1 -0
- package/src/tools/read/components.ts +28 -25
- package/src/tools/read/fonts.ts +1 -1
- package/src/tools/read/libraries.ts +24 -4
- package/src/tools/read/nodes.ts +47 -17
- package/src/tools/read/pages.ts +7 -3
- package/src/tools/read/query.ts +2 -0
- package/src/tools/read/reactions.ts +21 -0
- package/src/tools/read.ts +1 -0
- package/src/tools/registry/extended.ts +6 -0
- package/src/tools/schema.ts +166 -6
- package/src/tools/stock-photo/apply.ts +17 -5
- package/src/tools/structure/batch.ts +84 -98
- package/src/tools/variables/values.ts +6 -3
- package/src/tools/vector/export.ts +5 -1
- package/src/vector/fill-geometry.ts +11 -5
- package/src/vector/index.ts +1 -1
- package/src/vector/path-helpers.ts +34 -8
- package/src/vector/placement.ts +1 -1
- package/src/vector/vectorize/preprocess.ts +1 -1
package/src/icons/provider.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { iconToHTML, iconToSVG } from '@iconify/utils'
|
|
1
|
+
import { getIconData, iconToHTML, iconToSVG, type IconifyIcon } from '@iconify/utils'
|
|
2
2
|
import { chunk } from 'es-toolkit'
|
|
3
3
|
|
|
4
4
|
import type { IconOptions } from '@pairdraw/scene-graph/icons'
|
|
5
5
|
|
|
6
6
|
import { createIconifyAPIClient } from './api'
|
|
7
7
|
import { buildIconData } from './svg'
|
|
8
|
-
import type { IconCollection, IconData,
|
|
8
|
+
import type { IconCollection, IconData, IconSearchResult } from './types'
|
|
9
9
|
|
|
10
10
|
export interface IconSearchOptions {
|
|
11
11
|
limit?: number
|
|
@@ -50,15 +50,13 @@ export function parseIconName(name: string): { prefix: string; iconName: string
|
|
|
50
50
|
/** Names per request, so the query string of a long list stays well within URL limits. */
|
|
51
51
|
const NAMES_PER_REQUEST = 100
|
|
52
52
|
|
|
53
|
-
/** An icon's body and box, with the set's default box filled in. */
|
|
54
|
-
type IconEntry = Required<IconifyIconEntry>
|
|
55
|
-
|
|
56
53
|
/**
|
|
57
54
|
* Icons from the Iconify API, fetched one request per set and cached by name, so search
|
|
58
55
|
* previews and placed icons share what was loaded.
|
|
59
56
|
*/
|
|
60
57
|
export function createIconifyProvider(client = createIconifyAPIClient()): IconProvider {
|
|
61
|
-
|
|
58
|
+
/** Icons with their aliases and the set's defaults resolved, as Iconify draws them. */
|
|
59
|
+
const entries = new Map<string, IconifyIcon>()
|
|
62
60
|
const built = new Map<string, IconData>()
|
|
63
61
|
// Shared answers; a failed one is dropped so the next call asks again.
|
|
64
62
|
let catalogue: Promise<IconCollection[]> | null = null
|
|
@@ -77,18 +75,11 @@ export function createIconifyProvider(client = createIconifyAPIClient()): IconPr
|
|
|
77
75
|
async function request(prefix: string, iconNames: string[]): Promise<void> {
|
|
78
76
|
const collection = await client.fetchCollection(prefix, iconNames)
|
|
79
77
|
for (const iconName of iconNames) {
|
|
80
|
-
|
|
81
|
-
const
|
|
78
|
+
// An alias may flip, turn, or resize its parent; a set may give every icon a box.
|
|
79
|
+
const icon = getIconData(collection, iconName)
|
|
82
80
|
const name = `${prefix}:${iconName}`
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
continue
|
|
86
|
-
}
|
|
87
|
-
entries.set(name, {
|
|
88
|
-
body: entry.body,
|
|
89
|
-
width: entry.width ?? collection.width ?? 24,
|
|
90
|
-
height: entry.height ?? collection.height ?? 24
|
|
91
|
-
})
|
|
81
|
+
if (icon) entries.set(name, icon)
|
|
82
|
+
else absent.add(name)
|
|
92
83
|
}
|
|
93
84
|
}
|
|
94
85
|
|
|
@@ -136,9 +127,7 @@ export function createIconifyProvider(client = createIconifyAPIClient()): IconPr
|
|
|
136
127
|
const parsed = parseIconName(name)
|
|
137
128
|
if (!entry || !parsed) continue
|
|
138
129
|
const key = `${name}@${size}`
|
|
139
|
-
const icon =
|
|
140
|
-
built.get(key) ??
|
|
141
|
-
buildIconData(entry, parsed.prefix, parsed.iconName, entry.width, entry.height, size)
|
|
130
|
+
const icon = built.get(key) ?? buildIconData(entry, parsed.prefix, parsed.iconName, size)
|
|
142
131
|
built.set(key, icon)
|
|
143
132
|
found.set(name, icon)
|
|
144
133
|
}
|
package/src/icons/schema.ts
CHANGED
|
@@ -29,3 +29,34 @@ export const collectionListSchema = v.pipe(
|
|
|
29
29
|
hidden: v.optional(v.array(v.string()))
|
|
30
30
|
})
|
|
31
31
|
)
|
|
32
|
+
|
|
33
|
+
/** An icon's box and turn, as an icon, an alias, or a whole set gives them. */
|
|
34
|
+
const iconPropsEntries = {
|
|
35
|
+
left: v.optional(v.number()),
|
|
36
|
+
top: v.optional(v.number()),
|
|
37
|
+
width: v.optional(v.number()),
|
|
38
|
+
height: v.optional(v.number()),
|
|
39
|
+
rotate: v.optional(v.number()),
|
|
40
|
+
hFlip: v.optional(v.boolean()),
|
|
41
|
+
vFlip: v.optional(v.boolean())
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* `GET /{prefix}.json?icons=…`: the asked-for icons and the aliases that lead to them, with the
|
|
46
|
+
* set's default box, which `getIconData` resolves into one icon.
|
|
47
|
+
*/
|
|
48
|
+
export const iconSetSchema = v.pipe(
|
|
49
|
+
v.string(),
|
|
50
|
+
v.parseJson(),
|
|
51
|
+
v.object({
|
|
52
|
+
prefix: v.string(),
|
|
53
|
+
left: v.optional(v.number()),
|
|
54
|
+
top: v.optional(v.number()),
|
|
55
|
+
width: v.optional(v.number()),
|
|
56
|
+
height: v.optional(v.number()),
|
|
57
|
+
icons: v.record(v.string(), v.object({ body: v.string(), ...iconPropsEntries })),
|
|
58
|
+
aliases: v.optional(v.record(v.string(), v.object({ parent: v.string(), ...iconPropsEntries })))
|
|
59
|
+
})
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
export type IconSet = v.InferOutput<typeof iconSetSchema>
|
|
@@ -2,6 +2,8 @@ import type { Element, Node } from '@xmldom/xmldom'
|
|
|
2
2
|
|
|
3
3
|
/** SVG presentation attributes as an element inherits them, still as source strings. */
|
|
4
4
|
export interface PresentationAttributes {
|
|
5
|
+
/** The CSS `color` that `currentColor` paints take; empty when no element sets one. */
|
|
6
|
+
color: string
|
|
5
7
|
fill: string
|
|
6
8
|
stroke: string
|
|
7
9
|
strokeWidth: string
|
|
@@ -22,7 +24,9 @@ export interface PresentationAttributes {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export const DEFAULT_PRESENTATION: PresentationAttributes = {
|
|
25
|
-
|
|
27
|
+
color: '',
|
|
28
|
+
// No fill set: the host's color, as an icon's, never the `color` an ancestor sets.
|
|
29
|
+
fill: '',
|
|
26
30
|
stroke: 'none',
|
|
27
31
|
strokeWidth: '1',
|
|
28
32
|
strokeCap: 'butt',
|
|
@@ -76,7 +80,10 @@ export function presentationFor(
|
|
|
76
80
|
const styles = inlineStyles(element)
|
|
77
81
|
const attribute = (name: string, value: string) =>
|
|
78
82
|
inheritedAttribute(element, styles, name, value)
|
|
83
|
+
const color = attribute('color', inherited.color).trim()
|
|
79
84
|
return {
|
|
85
|
+
// `inherit` and `currentColor` as a color both mean the parent's.
|
|
86
|
+
color: isCurrentColor(color) || color.toLowerCase() === 'inherit' ? inherited.color : color,
|
|
80
87
|
fill: attribute('fill', inherited.fill),
|
|
81
88
|
stroke: attribute('stroke', inherited.stroke),
|
|
82
89
|
strokeWidth: attribute('stroke-width', inherited.strokeWidth),
|
|
@@ -121,8 +128,25 @@ export function num(element: Element, attr: string, fallback = 0): number {
|
|
|
121
128
|
return Number.isFinite(parsed) ? parsed : fallback
|
|
122
129
|
}
|
|
123
130
|
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
const CURRENT_COLOR = 'currentColor'
|
|
132
|
+
|
|
133
|
+
/** CSS keywords match in any case, so `currentcolor` is `currentColor`. */
|
|
134
|
+
function isCurrentColor(value: string): boolean {
|
|
135
|
+
return value.trim().toLowerCase() === CURRENT_COLOR.toLowerCase()
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* A paint as drawn: null for `none`, and `currentColor`, in any case, as the element's `color`
|
|
140
|
+
* when one is set. Without one, and for a fill no element sets, it is `currentColor`, which the
|
|
141
|
+
* host's color fills, as an icon's color does.
|
|
142
|
+
*/
|
|
143
|
+
export function normalizeSVGPaint(value: string | null, color = ''): string | null {
|
|
144
|
+
if (value === null) return null
|
|
145
|
+
const paint = value.trim()
|
|
146
|
+
if (paint === '') return CURRENT_COLOR
|
|
147
|
+
if (paint.toLowerCase() === 'none') return null
|
|
148
|
+
if (!isCurrentColor(paint)) return value
|
|
149
|
+
return color || CURRENT_COLOR
|
|
126
150
|
}
|
|
127
151
|
|
|
128
152
|
export function combinedTransform(parent: string | null, element: Element): string | null {
|
package/src/icons/svg/text.ts
CHANGED
|
@@ -59,7 +59,7 @@ function textRun(text: string, presentation: PresentationAttributes): SVGTextRun
|
|
|
59
59
|
const spacing = Number.parseFloat(presentation.letterSpacing)
|
|
60
60
|
return {
|
|
61
61
|
text,
|
|
62
|
-
fill: normalizeSVGPaint(presentation.fill),
|
|
62
|
+
fill: normalizeSVGPaint(presentation.fill, presentation.color),
|
|
63
63
|
fillOpacity: opacityValue(presentation.fillOpacity),
|
|
64
64
|
fontFamily: fontFamily(presentation.fontFamily),
|
|
65
65
|
fontSize: Number.isFinite(size) && size > 0 ? size : DEFAULT_FONT_SIZE,
|
package/src/icons/svg.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { iconToSVG } from '@iconify/utils'
|
|
1
|
+
import { iconToSVG, type IconifyIcon } from '@iconify/utils'
|
|
2
2
|
import { DOMImplementation, type Document as XMLDocument, type Element } from '@xmldom/xmldom'
|
|
3
3
|
import svgpath from 'svgpath'
|
|
4
4
|
|
|
@@ -21,7 +21,6 @@ import { elementLayer, type Scope, type Traversal } from './svg/scope'
|
|
|
21
21
|
import { textInfo } from './svg/text'
|
|
22
22
|
import type {
|
|
23
23
|
IconData,
|
|
24
|
-
IconifyIconEntry,
|
|
25
24
|
IconPathInfo,
|
|
26
25
|
SVGClipPathRegion,
|
|
27
26
|
SVGElementLayer,
|
|
@@ -129,8 +128,8 @@ function appendShapePath(
|
|
|
129
128
|
const strokeWidth = Number.parseFloat(presentation.strokeWidth)
|
|
130
129
|
result.push({
|
|
131
130
|
d: pathData,
|
|
132
|
-
fill: normalizeSVGPaint(presentation.fill),
|
|
133
|
-
stroke: normalizeSVGPaint(presentation.stroke),
|
|
131
|
+
fill: normalizeSVGPaint(presentation.fill, presentation.color),
|
|
132
|
+
stroke: normalizeSVGPaint(presentation.stroke, presentation.color),
|
|
134
133
|
strokeWidth: Number.isFinite(strokeWidth) ? strokeWidth : 1,
|
|
135
134
|
strokeCap: presentation.strokeCap,
|
|
136
135
|
strokeJoin: presentation.strokeJoin,
|
|
@@ -330,31 +329,30 @@ export function extractPaths(svgBody: string): IconPathInfo[] {
|
|
|
330
329
|
return extractSVGContent(svgBody).paths.filter(isSVGPathShown)
|
|
331
330
|
}
|
|
332
331
|
|
|
332
|
+
/**
|
|
333
|
+
* An Iconify icon at `size`. Iconify's own rendering applies its box, defaulting to 16, and any
|
|
334
|
+
* turn or flip, before the shapes are placed in the icon box as SVG import places them.
|
|
335
|
+
*/
|
|
333
336
|
export function buildIconData(
|
|
334
|
-
|
|
337
|
+
icon: IconifyIcon,
|
|
335
338
|
prefix: string,
|
|
336
339
|
iconName: string,
|
|
337
|
-
defaultW: number,
|
|
338
|
-
defaultH: number,
|
|
339
340
|
size: number
|
|
340
341
|
): IconData {
|
|
341
|
-
const rendered = iconToSVG(
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
const scaleY = size / viewBoxHeight
|
|
349
|
-
|
|
350
|
-
const pathInfos = extractPaths(rendered.body)
|
|
342
|
+
const rendered = iconToSVG(icon)
|
|
343
|
+
const [x, y, width, height] = rendered.viewBox
|
|
344
|
+
// As a browser draws the SVG: one scale for both axes, centered in the icon box, and the box's
|
|
345
|
+
// own origin moved to the box's top-left.
|
|
346
|
+
const scale = Math.min(size / width, size / height)
|
|
347
|
+
const offsetX = -x * scale + (size - width * scale) / 2
|
|
348
|
+
const offsetY = -y * scale + (size - height * scale) / 2
|
|
351
349
|
|
|
352
350
|
return {
|
|
353
351
|
prefix,
|
|
354
352
|
name: iconName,
|
|
355
353
|
width: size,
|
|
356
354
|
height: size,
|
|
357
|
-
paths: scalePathInfos(
|
|
355
|
+
paths: scalePathInfos(extractPaths(rendered.body), scale, scale, offsetX, offsetY)
|
|
358
356
|
}
|
|
359
357
|
}
|
|
360
358
|
|
|
@@ -381,7 +379,9 @@ function transformStrokeScale(transform: string | null | undefined): number {
|
|
|
381
379
|
export function scalePathInfos(
|
|
382
380
|
pathInfos: IconPathInfo[],
|
|
383
381
|
scaleX: number,
|
|
384
|
-
scaleY: number
|
|
382
|
+
scaleY: number,
|
|
383
|
+
offsetX = 0,
|
|
384
|
+
offsetY = 0
|
|
385
385
|
): IconData['paths'] {
|
|
386
386
|
return pathInfos.map((path) => {
|
|
387
387
|
let transformedPath = svgpath(path.d)
|
|
@@ -389,6 +389,8 @@ export function scalePathInfos(
|
|
|
389
389
|
transformedPath = transformedPath.transform(path.transform)
|
|
390
390
|
}
|
|
391
391
|
if (scaleX !== 1 || scaleY !== 1) transformedPath = transformedPath.scale(scaleX, scaleY)
|
|
392
|
+
if (offsetX !== 0 || offsetY !== 0)
|
|
393
|
+
transformedPath = transformedPath.translate(offsetX, offsetY)
|
|
392
394
|
const scaledD = transformedPath.round(2).toString()
|
|
393
395
|
const fill = normalizeSVGPaint(path.fill)
|
|
394
396
|
const stroke = normalizeSVGPaint(path.stroke)
|
package/src/icons/types.ts
CHANGED
|
@@ -27,20 +27,6 @@ export type IconOption =
|
|
|
27
27
|
| { key: string; name: string; min: number; max: number; default: number; step: number }
|
|
28
28
|
| { key: string; name: string; values: readonly string[]; default: string }
|
|
29
29
|
|
|
30
|
-
export interface IconifyIconEntry {
|
|
31
|
-
body: string
|
|
32
|
-
width?: number
|
|
33
|
-
height?: number
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface IconifyResponse {
|
|
37
|
-
prefix: string
|
|
38
|
-
width?: number
|
|
39
|
-
height?: number
|
|
40
|
-
icons: { [key: string]: IconifyIconEntry | undefined }
|
|
41
|
-
aliases?: { [key: string]: { parent: string } | undefined }
|
|
42
|
-
}
|
|
43
|
-
|
|
44
30
|
export interface IconSearchResult {
|
|
45
31
|
icons: string[]
|
|
46
32
|
total: number
|
|
@@ -457,7 +457,13 @@ export function planTokenImport(
|
|
|
457
457
|
planner.graph,
|
|
458
458
|
bundle,
|
|
459
459
|
(path) => resolveLiteral(planner, path),
|
|
460
|
-
(path) =>
|
|
460
|
+
(path, target) =>
|
|
461
|
+
aliasTarget(planner, 0, {
|
|
462
|
+
kind: 'alias',
|
|
463
|
+
path,
|
|
464
|
+
collection: target?.targetVariableSetName,
|
|
465
|
+
name: target?.targetVariableName
|
|
466
|
+
})
|
|
461
467
|
)
|
|
462
468
|
: { styles: [], skipped: [] }
|
|
463
469
|
const skipped = [...planner.skipped, ...styles.skipped]
|
|
@@ -39,6 +39,26 @@ const TEXT_BINDING_FIELDS: readonly TextBindingField[] = [
|
|
|
39
39
|
'lineHeight'
|
|
40
40
|
]
|
|
41
41
|
|
|
42
|
+
/** The collection and variable a bound style field points at, as Pairdraw records them. */
|
|
43
|
+
const bindingTargetSchema = v.object({
|
|
44
|
+
targetVariableSetName: v.string(),
|
|
45
|
+
targetVariableName: v.string()
|
|
46
|
+
})
|
|
47
|
+
type BindingTarget = v.InferOutput<typeof bindingTargetSchema>
|
|
48
|
+
|
|
49
|
+
/** Recorded targets by field; one that does not read is left out, not the whole extension. */
|
|
50
|
+
const aliasDataSchema = v.pipe(
|
|
51
|
+
v.record(v.string(), v.unknown()),
|
|
52
|
+
v.transform((entries): Record<string, BindingTarget> =>
|
|
53
|
+
Object.fromEntries(
|
|
54
|
+
Object.entries(entries).flatMap(([field, entry]) => {
|
|
55
|
+
const target = v.safeParse(bindingTargetSchema, entry)
|
|
56
|
+
return target.success ? [[field, target.output]] : []
|
|
57
|
+
})
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
|
|
42
62
|
const ownTextSchema = v.object({
|
|
43
63
|
text: v.object({
|
|
44
64
|
fontFamily: v.string(),
|
|
@@ -50,7 +70,8 @@ const ownTextSchema = v.object({
|
|
|
50
70
|
textDecoration: v.picklist(['NONE', 'UNDERLINE', 'STRIKETHROUGH']),
|
|
51
71
|
textCase: v.picklist(['ORIGINAL', 'UPPER', 'LOWER', 'TITLE'])
|
|
52
72
|
}),
|
|
53
|
-
bindings: v.optional(v.record(v.string(), v.string()))
|
|
73
|
+
bindings: v.optional(v.record(v.string(), v.string())),
|
|
74
|
+
aliasData: v.optional(v.fallback(aliasDataSchema, {}))
|
|
54
75
|
})
|
|
55
76
|
const ownEffectsSchema = v.object({ effects: v.array(v.unknown()) })
|
|
56
77
|
|
|
@@ -61,7 +82,8 @@ const STYLE_KINDS: Partial<Record<string, PlannedStyle['kind']>> = {
|
|
|
61
82
|
}
|
|
62
83
|
|
|
63
84
|
type Resolve = (path: readonly string[]) => ResolvedReference | undefined
|
|
64
|
-
|
|
85
|
+
/** The variable a reference names; the collection and name a file records find it among same paths. */
|
|
86
|
+
type Alias = (path: readonly string[], target?: BindingTarget) => AliasTarget | undefined
|
|
65
87
|
|
|
66
88
|
/** A field's value: its own, or what the token it references holds, decoded the same way. */
|
|
67
89
|
function fieldValue<T>(
|
|
@@ -134,13 +156,27 @@ function textBindings(token: ReadToken, alias: Alias): PlannedStyle['bindings']
|
|
|
134
156
|
else if (isPlainObject(token.value)) references = token.value
|
|
135
157
|
const bindings: PlannedStyle['bindings'] = {}
|
|
136
158
|
for (const field of TEXT_BINDING_FIELDS) {
|
|
137
|
-
const
|
|
138
|
-
const
|
|
159
|
+
const reference = references[field]
|
|
160
|
+
const path = referencePath(reference)
|
|
161
|
+
const target = path && alias(path, recordedTarget(own, field, reference))
|
|
139
162
|
if (target) bindings[field] = target
|
|
140
163
|
}
|
|
141
164
|
return bindings
|
|
142
165
|
}
|
|
143
166
|
|
|
167
|
+
/**
|
|
168
|
+
* The variable Pairdraw recorded for a bound field, while the field still holds the reference
|
|
169
|
+
* it wrote; another tool's edit to the reference goes by its path.
|
|
170
|
+
*/
|
|
171
|
+
function recordedTarget(
|
|
172
|
+
own: { bindings?: Record<string, string>; aliasData?: Record<string, BindingTarget> } | null,
|
|
173
|
+
field: string,
|
|
174
|
+
reference: unknown
|
|
175
|
+
): BindingTarget | undefined {
|
|
176
|
+
if (!own || reference === undefined || own.bindings?.[field] !== reference) return undefined
|
|
177
|
+
return own.aliasData?.[field]
|
|
178
|
+
}
|
|
179
|
+
|
|
144
180
|
/** One shadow of a shadow token, or the shadows a referenced shadow token holds. */
|
|
145
181
|
function shadowEffects(raw: unknown, resolve: Resolve, depth = 0): Effect[] | null {
|
|
146
182
|
const path = referencePath(raw)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { countBy } from 'es-toolkit/array'
|
|
1
2
|
import { isEmptyObject, isPlainObject } from 'es-toolkit/predicate'
|
|
2
3
|
|
|
3
4
|
import type { Effect, ShadowEffect, SceneGraph, SceneNode } from '@pairdraw/scene-graph'
|
|
@@ -12,6 +13,40 @@ import { colorTokenValue, dimensionTokenValue, trimNumber } from './values'
|
|
|
12
13
|
/** Where a variable's token sits, for references to it. */
|
|
13
14
|
export type TokenReferences = ReadonlyMap<string, readonly string[]>
|
|
14
15
|
|
|
16
|
+
/**
|
|
17
|
+
* The variable a bound style field points at, by collection and name, as Figma's
|
|
18
|
+
* `com.figma.aliasData` names an alias target, since a path alone can be in several collections.
|
|
19
|
+
*/
|
|
20
|
+
export interface BindingTarget {
|
|
21
|
+
targetVariableSetName: string
|
|
22
|
+
targetVariableName: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** The variables a style's bound fields point at, by field, for those a reference was written for. */
|
|
26
|
+
function bindingTargets(
|
|
27
|
+
graph: SceneGraph,
|
|
28
|
+
node: SceneNode,
|
|
29
|
+
fields: Iterable<string>
|
|
30
|
+
): Record<string, BindingTarget> {
|
|
31
|
+
const targets: Record<string, BindingTarget> = {}
|
|
32
|
+
for (const field of fields) {
|
|
33
|
+
const variable = graph.variables.get(node.boundVariables[field] ?? '')
|
|
34
|
+
const collection = variable && graph.variableCollections.get(variable.collectionId)
|
|
35
|
+
if (variable && collection)
|
|
36
|
+
targets[field] = { targetVariableSetName: collection.name, targetVariableName: variable.name }
|
|
37
|
+
}
|
|
38
|
+
return targets
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** The fields a style binds and how a file read back finds each: its reference and its target. */
|
|
42
|
+
function ownBindings(graph: SceneGraph, node: SceneNode, bindings: Record<string, string>) {
|
|
43
|
+
const own: Record<string, unknown> = {}
|
|
44
|
+
if (isEmptyObject(bindings)) return own
|
|
45
|
+
own.bindings = bindings
|
|
46
|
+
own.aliasData = bindingTargets(graph, node, Object.keys(bindings))
|
|
47
|
+
return own
|
|
48
|
+
}
|
|
49
|
+
|
|
15
50
|
/** Figma's auto line height, written as the multiplier browsers use for `normal`. */
|
|
16
51
|
const AUTO_LINE_HEIGHT = 1.2
|
|
17
52
|
|
|
@@ -57,7 +92,11 @@ export function typographyValue(
|
|
|
57
92
|
}
|
|
58
93
|
|
|
59
94
|
/** A text style as a typography token; its own fields ride along so Pairdraw reads it back exactly. */
|
|
60
|
-
function typographyToken(
|
|
95
|
+
function typographyToken(
|
|
96
|
+
graph: SceneGraph,
|
|
97
|
+
node: SceneNode,
|
|
98
|
+
references: TokenReferences
|
|
99
|
+
): DesignToken {
|
|
61
100
|
const bound = bindingReferences(node, references)
|
|
62
101
|
return {
|
|
63
102
|
$type: 'typography',
|
|
@@ -74,7 +113,7 @@ function typographyToken(node: SceneNode, references: TokenReferences): DesignTo
|
|
|
74
113
|
textDecoration: node.textDecoration,
|
|
75
114
|
textCase: node.textCase
|
|
76
115
|
},
|
|
77
|
-
...(
|
|
116
|
+
...ownBindings(graph, node, bound)
|
|
78
117
|
}
|
|
79
118
|
}
|
|
80
119
|
}
|
|
@@ -136,6 +175,11 @@ function shadowToken(node: SceneNode): DesignToken | undefined {
|
|
|
136
175
|
}
|
|
137
176
|
}
|
|
138
177
|
|
|
178
|
+
/** Whether a style's token writes a reference for this bound field. */
|
|
179
|
+
function writesBinding(node: SceneNode, field: string): boolean {
|
|
180
|
+
return node.sharedStyleType === 'TEXT' && TEXT_BINDING_FIELDS.some((bound) => bound === field)
|
|
181
|
+
}
|
|
182
|
+
|
|
139
183
|
/** Text and effect styles as typography and shadow tokens, nested by their names. */
|
|
140
184
|
export function styleTokens(
|
|
141
185
|
graph: SceneGraph,
|
|
@@ -147,9 +191,15 @@ export function styleTokens(
|
|
|
147
191
|
(node.sharedStyleType === 'TEXT' || node.sharedStyleType === 'EFFECT') &&
|
|
148
192
|
node.source.id !== null
|
|
149
193
|
)
|
|
194
|
+
// Another tool reads a reference to a path several collections hold as whichever comes last.
|
|
195
|
+
const shared = new Set(
|
|
196
|
+
Object.entries(countBy([...references.values()], (path) => tokenReference(path)))
|
|
197
|
+
.filter(([, count]) => count > 1)
|
|
198
|
+
.map(([reference]) => reference)
|
|
199
|
+
)
|
|
150
200
|
const candidates = styles.flatMap((node) => {
|
|
151
201
|
const token =
|
|
152
|
-
node.sharedStyleType === 'TEXT' ? typographyToken(node, references) : shadowToken(node)
|
|
202
|
+
node.sharedStyleType === 'TEXT' ? typographyToken(graph, node, references) : shadowToken(node)
|
|
153
203
|
if (!token) {
|
|
154
204
|
issues.push({ kind: 'unsupported-effect', style: node.name })
|
|
155
205
|
return []
|
|
@@ -159,6 +209,13 @@ export function styleTokens(
|
|
|
159
209
|
const { placed, duplicates } = placeTokens(candidates)
|
|
160
210
|
for (const { node } of duplicates)
|
|
161
211
|
issues.push({ kind: 'duplicate-path', collection: 'Styles', token: node.name })
|
|
212
|
+
for (const [{ node }] of placed) {
|
|
213
|
+
for (const [field, variableId] of Object.entries(node.boundVariables)) {
|
|
214
|
+
const path = writesBinding(node, field) ? references.get(variableId) : undefined
|
|
215
|
+
if (path && shared.has(tokenReference(path)))
|
|
216
|
+
issues.push({ kind: 'ambiguous-reference', style: node.name, field, token: pathName(path) })
|
|
217
|
+
}
|
|
218
|
+
}
|
|
162
219
|
const tokens = [...placed].map(([{ node, token }, path]) => ({
|
|
163
220
|
path,
|
|
164
221
|
token: withOriginalName(token, node.name, path)
|
|
@@ -39,6 +39,7 @@ export type DesignTokenIssue =
|
|
|
39
39
|
| { kind: 'missing-alias'; collection: string; mode: string; token: string }
|
|
40
40
|
| { kind: 'duplicate-path'; collection: string; token: string }
|
|
41
41
|
| { kind: 'unsupported-effect'; style: string }
|
|
42
|
+
| { kind: 'ambiguous-reference'; style: string; field: string; token: string }
|
|
42
43
|
|
|
43
44
|
/** An issue as one line of text, for the CLI and tool output. */
|
|
44
45
|
export function designTokenIssueMessage(issue: DesignTokenIssue): string {
|
|
@@ -50,6 +51,8 @@ export function designTokenIssueMessage(issue: DesignTokenIssue): string {
|
|
|
50
51
|
return `${issue.collection} / ${issue.mode}: ${issue.token} points at a variable that is gone`
|
|
51
52
|
if (issue.kind === 'duplicate-path')
|
|
52
53
|
return `${issue.collection}: ${issue.token} has the same token path as another variable`
|
|
54
|
+
if (issue.kind === 'ambiguous-reference')
|
|
55
|
+
return `${issue.style}: ${issue.field} refers to ${issue.token}, a path several collections hold, so other tools may read another variable`
|
|
53
56
|
return `${issue.style}: an effect style with no visible shadow has no token`
|
|
54
57
|
}
|
|
55
58
|
|
|
@@ -44,6 +44,11 @@ function style(names: string[], values: Record<string, string | undefined>): Dra
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/** A layer's name, which draw.io has no field of its own for, so it travels in the style. */
|
|
48
|
+
function nameValues(node: SceneNode): Record<string, string> {
|
|
49
|
+
return { pairdrawName: encodeURIComponent(node.name) }
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
/** A layer's first visible solid fill, or the first stop of a gradient, as draw.io's colour. */
|
|
48
53
|
function fillColor(node: SceneNode): string {
|
|
49
54
|
const fill = node.fills.find((paint) => paint.visible)
|
|
@@ -296,6 +301,7 @@ class PageWriter {
|
|
|
296
301
|
style: style(['text'], {
|
|
297
302
|
html: '1',
|
|
298
303
|
whiteSpace: 'wrap',
|
|
304
|
+
...nameValues(node),
|
|
299
305
|
...placedValues(placement),
|
|
300
306
|
...fontValues(node)
|
|
301
307
|
}),
|
|
@@ -349,6 +355,7 @@ class PageWriter {
|
|
|
349
355
|
style: style([], {
|
|
350
356
|
container: '1',
|
|
351
357
|
html: '1',
|
|
358
|
+
...nameValues(node),
|
|
352
359
|
...paintValues(node),
|
|
353
360
|
...placedValues(placement)
|
|
354
361
|
}),
|
|
@@ -361,7 +368,10 @@ class PageWriter {
|
|
|
361
368
|
kind: 'vertex',
|
|
362
369
|
value: '',
|
|
363
370
|
style: style(node.type === 'ELLIPSE' ? ['ellipse'] : [], {
|
|
371
|
+
...(node.type === 'RECTANGLE' ? { pairdrawType: 'RECTANGLE' } : {}),
|
|
364
372
|
rounded: node.cornerRadius > 0 ? '1' : undefined,
|
|
373
|
+
pairdrawCornerRadius: node.cornerRadius > 0 ? String(node.cornerRadius) : undefined,
|
|
374
|
+
...nameValues(node),
|
|
365
375
|
...placedValues(placement),
|
|
366
376
|
...paintValues(node)
|
|
367
377
|
}),
|
|
@@ -378,6 +388,7 @@ class PageWriter {
|
|
|
378
388
|
const label = shapeWithTextLabel(this.graph, node)
|
|
379
389
|
const values: Record<string, string | undefined> = {
|
|
380
390
|
...drawioShapeValues(node.shapeWithTextType),
|
|
391
|
+
...nameValues(node),
|
|
381
392
|
whiteSpace: 'wrap',
|
|
382
393
|
html: '1',
|
|
383
394
|
...paintValues(node),
|
|
@@ -33,6 +33,25 @@ function nameOf(text: string, fallback: string): string {
|
|
|
33
33
|
return text.split('\n')[0]?.trim() || fallback
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* The name Pairdraw wrote into a cell's style. draw.io has no field of its own for a layer whose
|
|
38
|
+
* cell draws no text, and a text cell's label is its content, so the name travels beside them.
|
|
39
|
+
*/
|
|
40
|
+
function writtenName(style: DrawIOStyle): string | undefined {
|
|
41
|
+
const value = style.values.pairdrawName
|
|
42
|
+
if (value === undefined) return undefined
|
|
43
|
+
try {
|
|
44
|
+
return decodeURIComponent(value)
|
|
45
|
+
} catch {
|
|
46
|
+
return undefined
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A layer's name: the one Pairdraw wrote, else the first line of its label. */
|
|
51
|
+
function layerName(style: DrawIOStyle, text: string, fallback: string): string {
|
|
52
|
+
return writtenName(style) ?? nameOf(text, fallback)
|
|
53
|
+
}
|
|
54
|
+
|
|
36
55
|
/** Builds one draw.io page's cells into `pageId`, in draw.io's drawing order. */
|
|
37
56
|
class PageBuilder {
|
|
38
57
|
/** The layer each draw.io cell or layer became. */
|
|
@@ -113,13 +132,29 @@ class PageBuilder {
|
|
|
113
132
|
return graph.createNode('TEXT', parentId, {
|
|
114
133
|
...box,
|
|
115
134
|
...placementOf(cell.style),
|
|
116
|
-
name:
|
|
135
|
+
name: layerName(cell.style, label.text, 'Text'),
|
|
117
136
|
...labelFields(cell.style, label.format),
|
|
118
137
|
text: label.text,
|
|
119
138
|
styleRuns: label.runs,
|
|
120
139
|
textAutoResize: 'NONE'
|
|
121
140
|
})
|
|
122
141
|
}
|
|
142
|
+
if (kind.type === 'FRAME') {
|
|
143
|
+
return graph.createNode('FRAME', parentId, {
|
|
144
|
+
...box,
|
|
145
|
+
...shapePaint(cell.style),
|
|
146
|
+
name: layerName(cell.style, label.text, 'Frame')
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
if (kind.type === 'RECTANGLE') {
|
|
150
|
+
const radius = Number.parseFloat(cell.style.values.pairdrawCornerRadius ?? '')
|
|
151
|
+
return graph.createNode('RECTANGLE', parentId, {
|
|
152
|
+
...box,
|
|
153
|
+
...shapePaint(cell.style),
|
|
154
|
+
...(radius > 0 ? { cornerRadius: radius } : {}),
|
|
155
|
+
name: layerName(cell.style, label.text, 'Rectangle')
|
|
156
|
+
})
|
|
157
|
+
}
|
|
123
158
|
if (kind.type === 'SECTION') {
|
|
124
159
|
return graph.createNode('SECTION', parentId, {
|
|
125
160
|
...box,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { DrawIOStyle } from '@pairdraw/drawio'
|
|
2
2
|
import type { ShapeWithTextType } from '@pairdraw/scene-graph/shape-with-text'
|
|
3
3
|
|
|
4
|
-
/** What a draw.io vertex becomes: a
|
|
4
|
+
/** What a draw.io vertex becomes: a shape, text, a frame or section around its cells, or a group. */
|
|
5
5
|
export type VertexKind =
|
|
6
6
|
/** A FigJam shape, turned clockwise by `rotation` degrees about its centre. */
|
|
7
7
|
| { type: 'SHAPE_WITH_TEXT'; shape: ShapeWithTextType; rotation: number; stencil: boolean }
|
|
8
8
|
| { type: 'TEXT' }
|
|
9
|
+
| { type: 'FRAME' }
|
|
9
10
|
| { type: 'SECTION' }
|
|
11
|
+
| { type: 'RECTANGLE' }
|
|
10
12
|
| { type: 'GROUP' }
|
|
11
13
|
|
|
12
14
|
/**
|
|
@@ -82,18 +84,20 @@ const DIRECTION_TURN = new Map([
|
|
|
82
84
|
])
|
|
83
85
|
|
|
84
86
|
/**
|
|
85
|
-
* What a vertex becomes. Text stays text; a swimlane
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
87
|
+
* What a vertex becomes. Text stays text; a swimlane becomes a section holding its cells, and
|
|
88
|
+
* any other vertex its style makes a container becomes a frame, as Pairdraw writes one; a group
|
|
89
|
+
* stays a group. A style Pairdraw wrote says when it drew a rectangle, which draw.io has no
|
|
90
|
+
* style of its own for. A shape draw.io turns by `direction` keeps its turn. Any other shape, a
|
|
91
|
+
* stencil FigJam has no shape for among them, becomes a shape named after the stencil.
|
|
89
92
|
*/
|
|
90
93
|
export function vertexKind(style: DrawIOStyle, hasChildren: boolean): VertexKind {
|
|
91
94
|
const name = shapeName(style)
|
|
92
95
|
if (name === 'text') return { type: 'TEXT' }
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
if (
|
|
96
|
+
if (style.values.pairdrawType === 'RECTANGLE') return { type: 'RECTANGLE' }
|
|
97
|
+
if (name === 'swimlane') return { type: 'SECTION' }
|
|
98
|
+
if (name === 'group') return { type: 'GROUP' }
|
|
99
|
+
if (style.values.container === '1') return { type: 'FRAME' }
|
|
100
|
+
if (hasChildren && !SHAPES.has(name)) return { type: 'GROUP' }
|
|
97
101
|
let shape = SHAPES.get(name) ?? 'SQUARE'
|
|
98
102
|
const direction = style.values.direction ?? 'east'
|
|
99
103
|
let rotation = 0
|