@pairdraw/core 0.21.1 → 0.22.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/boolean.d.ts +6 -1
- package/dist/canvas/boolean.d.ts.map +1 -1
- package/dist/canvas/boolean.js +10 -2
- package/dist/canvas/boolean.js.map +1 -1
- package/dist/canvas/color-space.d.ts +45 -0
- package/dist/canvas/color-space.d.ts.map +1 -0
- package/dist/canvas/color-space.js +39 -0
- package/dist/canvas/color-space.js.map +1 -0
- package/dist/canvas/fills.d.ts +10 -10
- package/dist/canvas/fills.d.ts.map +1 -1
- package/dist/canvas/fills.js +116 -62
- package/dist/canvas/fills.js.map +1 -1
- package/dist/canvas/flatten.d.ts +11 -3
- package/dist/canvas/flatten.d.ts.map +1 -1
- package/dist/canvas/flatten.js +62 -4
- package/dist/canvas/flatten.js.map +1 -1
- package/dist/canvas/images/previews.d.ts +1 -1
- package/dist/canvas/index.d.ts +2 -1
- package/dist/canvas/index.js +2 -1
- package/dist/canvas/layout-grids.d.ts +5 -2
- package/dist/canvas/layout-grids.d.ts.map +1 -1
- package/dist/canvas/layout-grids.js +7 -2
- package/dist/canvas/layout-grids.js.map +1 -1
- package/dist/canvas/noise/render.d.ts +17 -4
- package/dist/canvas/noise/render.d.ts.map +1 -1
- package/dist/canvas/noise/render.js +21 -6
- package/dist/canvas/noise/render.js.map +1 -1
- package/dist/canvas/noise/shader.d.ts +4 -4
- package/dist/canvas/noise/shader.d.ts.map +1 -1
- package/dist/canvas/noise/shader.js +5 -6
- package/dist/canvas/noise/shader.js.map +1 -1
- package/dist/canvas/overlays/annotations.d.ts +19 -0
- package/dist/canvas/overlays/annotations.d.ts.map +1 -0
- package/dist/canvas/overlays/annotations.js +110 -0
- package/dist/canvas/overlays/annotations.js.map +1 -0
- package/dist/canvas/overlays/auto-layout-hover.d.ts +11 -1
- package/dist/canvas/overlays/auto-layout-hover.d.ts.map +1 -1
- package/dist/canvas/overlays/auto-layout-hover.js +25 -1
- package/dist/canvas/overlays/auto-layout-hover.js.map +1 -1
- package/dist/canvas/overlays/feedback.js +1 -1
- package/dist/canvas/overlays/feedback.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/measurement.d.ts +7 -1
- package/dist/canvas/overlays/measurement.d.ts.map +1 -1
- package/dist/canvas/overlays/measurement.js +42 -4
- package/dist/canvas/overlays/measurement.js.map +1 -1
- package/dist/canvas/overlays/presence.d.ts.map +1 -1
- package/dist/canvas/overlays/presence.js +21 -24
- package/dist/canvas/overlays/presence.js.map +1 -1
- package/dist/canvas/renderer/colors.d.ts +7 -1
- package/dist/canvas/renderer/colors.d.ts.map +1 -1
- package/dist/canvas/renderer/colors.js +9 -1
- package/dist/canvas/renderer/colors.js.map +1 -1
- package/dist/canvas/renderer/document-surface.d.ts +15 -6
- package/dist/canvas/renderer/document-surface.d.ts.map +1 -1
- package/dist/canvas/renderer/document-surface.js +1 -0
- package/dist/canvas/renderer/document-surface.js.map +1 -1
- package/dist/canvas/renderer/lifecycle.d.ts.map +1 -1
- package/dist/canvas/renderer/lifecycle.js +2 -2
- package/dist/canvas/renderer/lifecycle.js.map +1 -1
- package/dist/canvas/renderer/methods.d.ts +1 -0
- package/dist/canvas/renderer/methods.d.ts.map +1 -1
- package/dist/canvas/renderer/methods.js +4 -1
- package/dist/canvas/renderer/methods.js.map +1 -1
- package/dist/canvas/renderer/overlay-pass.d.ts.map +1 -1
- package/dist/canvas/renderer/overlay-pass.js +6 -1
- package/dist/canvas/renderer/overlay-pass.js.map +1 -1
- package/dist/canvas/renderer/pipeline.d.ts.map +1 -1
- package/dist/canvas/renderer/pipeline.js +7 -0
- package/dist/canvas/renderer/pipeline.js.map +1 -1
- package/dist/canvas/renderer/types.d.ts +10 -0
- package/dist/canvas/renderer/types.d.ts.map +1 -1
- package/dist/canvas/renderer.d.ts +10 -2
- package/dist/canvas/renderer.d.ts.map +1 -1
- package/dist/canvas/renderer.js +15 -3
- package/dist/canvas/renderer.js.map +1 -1
- package/dist/canvas/scene.d.ts.map +1 -1
- package/dist/canvas/scene.js +9 -9
- package/dist/canvas/scene.js.map +1 -1
- package/dist/clipboard/pairdraw.d.ts.map +1 -1
- package/dist/clipboard/pairdraw.js +1 -0
- package/dist/clipboard/pairdraw.js.map +1 -1
- package/dist/editor/bridges/clipboard.d.ts +2 -0
- package/dist/editor/bridges/clipboard.d.ts.map +1 -1
- package/dist/editor/bridges/clipboard.js +1 -0
- package/dist/editor/bridges/clipboard.js.map +1 -1
- package/dist/editor/bridges/components.d.ts +14 -7
- package/dist/editor/bridges/components.d.ts.map +1 -1
- package/dist/editor/bridges/components.js +6 -0
- package/dist/editor/bridges/components.js.map +1 -1
- package/dist/editor/bridges/structure.d.ts +1 -1
- package/dist/editor/bridges/structure.d.ts.map +1 -1
- package/dist/editor/bridges/undo.d.ts +1 -1
- package/dist/editor/clipboard/code.d.ts +32 -0
- package/dist/editor/clipboard/code.d.ts.map +1 -0
- package/dist/editor/clipboard/code.js +30 -0
- package/dist/editor/clipboard/code.js.map +1 -0
- package/dist/editor/clipboard/paste/dependencies.d.ts +14 -0
- package/dist/editor/clipboard/paste/dependencies.d.ts.map +1 -0
- package/dist/editor/clipboard/paste/dependencies.js +0 -0
- package/dist/editor/clipboard/paste/run.d.ts +14 -0
- package/dist/editor/clipboard/paste/run.d.ts.map +1 -0
- package/dist/editor/clipboard/paste/run.js +47 -0
- package/dist/editor/clipboard/paste/run.js.map +1 -0
- package/dist/editor/clipboard/styled.d.ts +2 -8
- package/dist/editor/clipboard/styled.d.ts.map +1 -1
- package/dist/editor/clipboard/styled.js +2 -32
- package/dist/editor/clipboard/styled.js.map +1 -1
- package/dist/editor/clipboard.d.ts +2 -0
- package/dist/editor/clipboard.d.ts.map +1 -1
- package/dist/editor/clipboard.js +34 -0
- package/dist/editor/clipboard.js.map +1 -1
- package/dist/editor/components/instances.d.ts +5 -0
- package/dist/editor/components/instances.d.ts.map +1 -1
- package/dist/editor/components/instances.js +69 -4
- package/dist/editor/components/instances.js.map +1 -1
- package/dist/editor/components/slots/index.d.ts.map +1 -1
- package/dist/editor/components/slots/index.js +7 -0
- package/dist/editor/components/slots/index.js.map +1 -1
- package/dist/editor/components.d.ts +6 -0
- package/dist/editor/components.d.ts.map +1 -1
- package/dist/editor/components.js +14 -2
- package/dist/editor/components.js.map +1 -1
- package/dist/editor/create.d.ts +30 -3
- package/dist/editor/create.d.ts.map +1 -1
- package/dist/editor/create.js +11 -2
- package/dist/editor/create.js.map +1 -1
- package/dist/editor/design-tokens.d.ts +1 -1
- package/dist/editor/design-tokens.d.ts.map +1 -1
- package/dist/editor/design-tokens.js +4 -18
- package/dist/editor/design-tokens.js.map +1 -1
- package/dist/editor/image-edit.d.ts.map +1 -1
- package/dist/editor/image-edit.js +1 -2
- package/dist/editor/image-edit.js.map +1 -1
- package/dist/editor/index.d.ts +4 -4
- package/dist/editor/index.js +1 -1
- package/dist/editor/layout-mode.d.ts +3 -1
- package/dist/editor/layout-mode.d.ts.map +1 -1
- package/dist/editor/layout-mode.js +97 -2
- package/dist/editor/layout-mode.js.map +1 -1
- package/dist/editor/nodes.d.ts +2 -0
- package/dist/editor/nodes.d.ts.map +1 -1
- package/dist/editor/nodes.js +22 -7
- package/dist/editor/nodes.js.map +1 -1
- package/dist/editor/read-only/actions.js +6 -0
- package/dist/editor/read-only/actions.js.map +1 -1
- package/dist/editor/selection/overlays.d.ts +1 -0
- package/dist/editor/selection/overlays.d.ts.map +1 -1
- package/dist/editor/selection/overlays.js +7 -0
- package/dist/editor/selection/overlays.js.map +1 -1
- package/dist/editor/selection/read.d.ts +8 -0
- package/dist/editor/selection.d.ts +9 -0
- package/dist/editor/selection.d.ts.map +1 -1
- package/dist/editor/state/shared.js +1 -0
- package/dist/editor/state/shared.js.map +1 -1
- package/dist/editor/state/view.d.ts.map +1 -1
- package/dist/editor/state/view.js +2 -0
- package/dist/editor/state/view.js.map +1 -1
- package/dist/editor/structure/boolean.d.ts +1 -1
- package/dist/editor/structure/boolean.d.ts.map +1 -1
- package/dist/editor/structure/boolean.js +20 -1
- package/dist/editor/structure/boolean.js.map +1 -1
- package/dist/editor/structure/container-wrap.d.ts +8 -2
- package/dist/editor/structure/container-wrap.d.ts.map +1 -1
- package/dist/editor/structure/container-wrap.js +17 -5
- package/dist/editor/structure/container-wrap.js.map +1 -1
- package/dist/editor/structure/flatten.d.ts.map +1 -1
- package/dist/editor/structure/flatten.js +8 -7
- package/dist/editor/structure/flatten.js.map +1 -1
- package/dist/editor/structure/group/ungroup.d.ts.map +1 -1
- package/dist/editor/structure/group/ungroup.js +2 -0
- package/dist/editor/structure/group/ungroup.js.map +1 -1
- package/dist/editor/structure/outline-stroke.d.ts.map +1 -1
- package/dist/editor/structure/outline-stroke.js +5 -0
- package/dist/editor/structure/outline-stroke.js.map +1 -1
- package/dist/editor/structure.d.ts +1 -1
- package/dist/editor/structure.d.ts.map +1 -1
- package/dist/editor/styles.d.ts +26 -0
- package/dist/editor/styles.d.ts.map +1 -0
- package/dist/editor/styles.js +127 -0
- package/dist/editor/styles.js.map +1 -0
- 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 +10 -2
- package/dist/editor/text/selection-style.js.map +1 -1
- package/dist/editor/tool-registry.d.ts.map +1 -1
- package/dist/editor/tool-registry.js +6 -0
- package/dist/editor/tool-registry.js.map +1 -1
- package/dist/editor/types.d.ts +14 -2
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/editor/variable-bindings.d.ts.map +1 -1
- package/dist/editor/variable-bindings.js +6 -1
- package/dist/editor/variable-bindings.js.map +1 -1
- package/dist/figma-api/accessors/basic.d.ts.map +1 -1
- package/dist/figma-api/accessors/basic.js +22 -1
- package/dist/figma-api/accessors/basic.js.map +1 -1
- package/dist/figma-api/accessors/shape.js +1 -1
- package/dist/figma-api/accessors/text/index.js +1 -1
- package/dist/figma-api/accessors/text/ranges.js +1 -1
- package/dist/figma-api/accessors/text/references.js +1 -1
- package/dist/figma-api/accessors/variables.js +1 -1
- package/dist/figma-api/accessors/vector.d.ts.map +1 -1
- package/dist/figma-api/accessors/vector.js +8 -22
- package/dist/figma-api/accessors/vector.js.map +1 -1
- package/dist/figma-api/accessors/visual.js +1 -1
- package/dist/figma-api/compatibility.d.ts +1 -1
- package/dist/figma-api/compatibility.d.ts.map +1 -1
- package/dist/figma-api/component-scope.d.ts +14 -0
- package/dist/figma-api/component-scope.d.ts.map +1 -0
- package/dist/figma-api/component-scope.js +28 -0
- package/dist/figma-api/component-scope.js.map +1 -0
- package/dist/figma-api/components.d.ts.map +1 -1
- package/dist/figma-api/components.js +26 -2
- package/dist/figma-api/components.js.map +1 -1
- package/dist/figma-api/flatten.js +3 -3
- package/dist/figma-api/flatten.js.map +1 -1
- package/dist/figma-api/index.d.ts +77 -6
- package/dist/figma-api/index.d.ts.map +1 -1
- package/dist/figma-api/index.js +188 -2
- package/dist/figma-api/index.js.map +1 -1
- package/dist/figma-api/node-types.d.ts +2 -1
- package/dist/figma-api/node-types.d.ts.map +1 -1
- package/dist/figma-api/overrides.d.ts +26 -1
- package/dist/figma-api/overrides.d.ts.map +1 -1
- package/dist/figma-api/overrides.js +157 -10
- package/dist/figma-api/overrides.js.map +1 -1
- package/dist/figma-api/proxy.d.ts +2 -0
- package/dist/figma-api/proxy.d.ts.map +1 -1
- package/dist/figma-api/proxy.js +10 -2
- package/dist/figma-api/proxy.js.map +1 -1
- package/dist/figma-api/reactions.d.ts +65 -9
- package/dist/figma-api/reactions.d.ts.map +1 -1
- package/dist/figma-api/reactions.js +144 -11
- package/dist/figma-api/reactions.js.map +1 -1
- package/dist/figma-api/shape-with-text.js +1 -1
- package/dist/figma-api/slots.d.ts +3 -1
- package/dist/figma-api/slots.d.ts.map +1 -1
- package/dist/figma-api/slots.js +9 -8
- package/dist/figma-api/slots.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/io/formats/code/detect.d.ts +23 -0
- package/dist/io/formats/code/detect.d.ts.map +1 -0
- package/dist/io/formats/code/detect.js +46 -0
- package/dist/io/formats/code/detect.js.map +1 -0
- package/dist/io/formats/code/index.d.ts +5 -0
- package/dist/io/formats/code/index.js +5 -0
- package/dist/io/formats/code/read.d.ts +45 -0
- package/dist/io/formats/code/read.d.ts.map +1 -0
- package/dist/io/formats/code/read.js +86 -0
- package/dist/io/formats/code/read.js.map +1 -0
- package/dist/io/formats/code/stylesheet.d.ts +13 -0
- package/dist/io/formats/code/stylesheet.d.ts.map +1 -0
- package/dist/io/formats/code/stylesheet.js +21 -0
- package/dist/io/formats/code/stylesheet.js.map +1 -0
- package/dist/io/formats/code/tokens.d.ts +18 -0
- package/dist/io/formats/code/tokens.d.ts.map +1 -0
- package/dist/io/formats/code/tokens.js +135 -0
- package/dist/io/formats/code/tokens.js.map +1 -0
- package/dist/io/formats/design-tokens/apply.d.ts +7 -3
- package/dist/io/formats/design-tokens/apply.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/apply.js.map +1 -1
- package/dist/io/formats/fig/export/patch/fields.js +5 -0
- package/dist/io/formats/fig/export/patch/fields.js.map +1 -1
- package/dist/io/formats/fig/export/patch/index.d.ts.map +1 -1
- package/dist/io/formats/fig/export/patch/index.js +20 -20
- package/dist/io/formats/fig/export/patch/index.js.map +1 -1
- package/dist/io/formats/fig/export/setup.d.ts.map +1 -1
- package/dist/io/formats/fig/export/setup.js +5 -1
- package/dist/io/formats/fig/export/setup.js.map +1 -1
- package/dist/io/formats/fig/index.d.ts +3 -2
- package/dist/io/formats/fig/index.js +2 -2
- package/dist/io/formats/fig/read.d.ts.map +1 -1
- package/dist/io/formats/fig/read.js +5 -2
- package/dist/io/formats/fig/read.js.map +1 -1
- package/dist/io/formats/html/layers.d.ts +3 -1
- package/dist/io/formats/html/layers.d.ts.map +1 -1
- package/dist/io/formats/html/layers.js +6 -1
- package/dist/io/formats/html/layers.js.map +1 -1
- package/dist/io/formats/pdf/export.d.ts.map +1 -1
- package/dist/io/formats/pdf/export.js +7 -3
- package/dist/io/formats/pdf/export.js.map +1 -1
- package/dist/io/formats/pdf/plan.d.ts +3 -0
- package/dist/io/formats/pdf/plan.d.ts.map +1 -1
- package/dist/io/formats/pdf/plan.js +60 -36
- package/dist/io/formats/pdf/plan.js.map +1 -1
- package/dist/io/formats/raster/headless.d.ts.map +1 -1
- package/dist/io/formats/raster/headless.js +3 -2
- 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 +10 -2
- package/dist/io/formats/raster/render.d.ts.map +1 -1
- package/dist/io/formats/raster/render.js +35 -9
- package/dist/io/formats/raster/render.js.map +1 -1
- package/dist/io/formats/svg/defs.d.ts.map +1 -1
- package/dist/io/formats/svg/defs.js +19 -1
- package/dist/io/formats/svg/defs.js.map +1 -1
- package/dist/io/formats/svg/export.d.ts +5 -2
- package/dist/io/formats/svg/export.d.ts.map +1 -1
- package/dist/io/formats/svg/export.js +59 -10
- package/dist/io/formats/svg/export.js.map +1 -1
- package/dist/io/formats/svg/index.d.ts +2 -2
- package/dist/io/formats/svg/index.js +2 -2
- package/dist/io/formats/svg/text/layout.d.ts.map +1 -1
- package/dist/io/formats/svg/text/layout.js +4 -2
- package/dist/io/formats/svg/text/layout.js.map +1 -1
- package/dist/io/formats/video/record.d.ts.map +1 -1
- package/dist/io/formats/video/record.js +24 -9
- package/dist/io/formats/video/record.js.map +1 -1
- package/dist/io/formats.d.ts.map +1 -1
- package/dist/io/formats.js +20 -13
- package/dist/io/formats.js.map +1 -1
- package/dist/kiwi/fig/population/client.d.ts.map +1 -1
- package/dist/kiwi/fig/population/client.js +2 -1
- package/dist/kiwi/fig/population/client.js.map +1 -1
- package/dist/kiwi/fig/session/document-state.d.ts +46 -2
- package/dist/kiwi/fig/session/document-state.d.ts.map +1 -1
- package/dist/kiwi/fig/session/document-state.js +113 -5
- package/dist/kiwi/fig/session/document-state.js.map +1 -1
- package/dist/kiwi/fig/session/options.d.ts +4 -0
- package/dist/kiwi/fig/session/options.d.ts.map +1 -1
- package/dist/kiwi/fig/session/options.js.map +1 -1
- package/dist/layout/apply.d.ts.map +1 -1
- package/dist/layout/apply.js +8 -4
- package/dist/layout/apply.js.map +1 -1
- package/dist/layout/auto-layout-handles.js +1 -1
- package/dist/layout/auto-layout-handles.js.map +1 -1
- package/dist/layout/axis-sizing.d.ts.map +1 -1
- package/dist/layout/axis-sizing.js +1 -1
- package/dist/layout/axis-sizing.js.map +1 -1
- package/dist/layout/derived.d.ts.map +1 -1
- package/dist/layout/derived.js +1 -1
- package/dist/layout/derived.js.map +1 -1
- package/dist/layout/effective-generated-text.js +1 -1
- package/dist/layout/effective-generated-text.js.map +1 -1
- package/dist/layout/grid.d.ts +3 -1
- package/dist/layout/grid.d.ts.map +1 -1
- package/dist/layout/grid.js +57 -16
- package/dist/layout/grid.js.map +1 -1
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +6 -5
- package/dist/layout.js.map +1 -1
- package/dist/node/fs.d.ts.map +1 -1
- package/dist/node/fs.js +28 -7
- package/dist/node/fs.js.map +1 -1
- package/dist/prototype/easing.d.ts +13 -5
- package/dist/prototype/easing.d.ts.map +1 -1
- package/dist/prototype/easing.js +46 -6
- package/dist/prototype/easing.js.map +1 -1
- package/dist/prototype/scenes.d.ts +31 -0
- package/dist/prototype/scenes.d.ts.map +1 -1
- package/dist/prototype/scenes.js +220 -31
- package/dist/prototype/scenes.js.map +1 -1
- package/dist/prototype/session.d.ts.map +1 -1
- package/dist/prototype/session.js +1 -0
- package/dist/prototype/session.js.map +1 -1
- package/dist/prototype/smart-animate/animation.d.ts +2 -1
- package/dist/prototype/smart-animate/animation.d.ts.map +1 -1
- package/dist/prototype/smart-animate/animation.js +2 -2
- package/dist/prototype/smart-animate/animation.js.map +1 -1
- package/dist/prototype/timeline.d.ts +10 -1
- package/dist/prototype/timeline.d.ts.map +1 -1
- package/dist/prototype/timeline.js +69 -23
- package/dist/prototype/timeline.js.map +1 -1
- package/dist/prototype/variables.d.ts +23 -0
- package/dist/prototype/variables.d.ts.map +1 -0
- package/dist/prototype/variables.js +237 -0
- package/dist/prototype/variables.js.map +1 -0
- package/dist/rpc/read-commands.d.ts +5 -0
- package/dist/rpc/read-commands.d.ts.map +1 -1
- package/dist/rpc/read-commands.js +4 -1
- package/dist/rpc/read-commands.js.map +1 -1
- package/dist/text/character-style.d.ts +8 -1
- package/dist/text/character-style.d.ts.map +1 -1
- package/dist/text/character-style.js +39 -1
- package/dist/text/character-style.js.map +1 -1
- package/dist/text/font/batch.d.ts +26 -0
- package/dist/text/font/batch.d.ts.map +1 -0
- package/dist/text/font/batch.js +31 -0
- package/dist/text/font/batch.js.map +1 -0
- package/dist/text/font/manager.d.ts.map +1 -1
- package/dist/text/font/manager.js +14 -1
- package/dist/text/font/manager.js.map +1 -1
- package/dist/text/index.d.ts +3 -2
- package/dist/text/index.js +3 -2
- package/dist/tools/create/basic.js +3 -4
- package/dist/tools/create/basic.js.map +1 -1
- package/dist/tools/create/behaviours.js +1 -1
- package/dist/tools/create/code.d.ts +6 -0
- package/dist/tools/create/code.d.ts.map +1 -0
- package/dist/tools/create/code.js +68 -0
- package/dist/tools/create/code.js.map +1 -0
- package/dist/tools/create/html.d.ts.map +1 -1
- package/dist/tools/create/html.js +9 -57
- package/dist/tools/create/html.js.map +1 -1
- package/dist/tools/create/icons.js +1 -1
- package/dist/tools/create/inputs.d.ts +11 -0
- package/dist/tools/create/inputs.d.ts.map +1 -0
- package/dist/tools/create/inputs.js +15 -0
- package/dist/tools/create/inputs.js.map +1 -0
- package/dist/tools/create/mermaid.d.ts.map +1 -1
- package/dist/tools/create/mermaid.js +5 -6
- package/dist/tools/create/mermaid.js.map +1 -1
- package/dist/tools/create/place.d.ts +30 -0
- package/dist/tools/create/place.d.ts.map +1 -0
- package/dist/tools/create/place.js +70 -0
- package/dist/tools/create/place.js.map +1 -0
- package/dist/tools/create/render.js +1 -1
- package/dist/tools/create/svg.js +1 -1
- package/dist/tools/create/vector.js +1 -1
- package/dist/tools/create.d.ts +2 -1
- package/dist/tools/create.js +2 -1
- package/dist/tools/css/gradient.d.ts +28 -0
- package/dist/tools/css/gradient.d.ts.map +1 -0
- package/dist/tools/css/gradient.js +118 -0
- package/dist/tools/css/gradient.js.map +1 -0
- package/dist/tools/image-ai/generate.js +1 -1
- package/dist/tools/modify/geometry.js +5 -5
- package/dist/tools/modify/geometry.js.map +1 -1
- package/dist/tools/modify/layout.d.ts.map +1 -1
- package/dist/tools/modify/layout.js +7 -1
- package/dist/tools/modify/layout.js.map +1 -1
- package/dist/tools/modify/matching.js +1 -1
- package/dist/tools/modify/overrides.d.ts +6 -0
- package/dist/tools/modify/overrides.d.ts.map +1 -0
- package/dist/tools/modify/overrides.js +27 -0
- package/dist/tools/modify/overrides.js.map +1 -0
- package/dist/tools/modify/paint.d.ts.map +1 -1
- package/dist/tools/modify/paint.js +84 -39
- package/dist/tools/modify/paint.js.map +1 -1
- package/dist/tools/modify/text.d.ts +2 -1
- package/dist/tools/modify/text.d.ts.map +1 -1
- package/dist/tools/modify/text.js +79 -8
- package/dist/tools/modify/text.js.map +1 -1
- package/dist/tools/modify/update.d.ts.map +1 -1
- package/dist/tools/modify/update.js +18 -2
- package/dist/tools/modify/update.js.map +1 -1
- package/dist/tools/modify.d.ts +3 -2
- package/dist/tools/modify.js +3 -2
- package/dist/tools/read/css.d.ts.map +1 -1
- package/dist/tools/read/css.js +29 -12
- package/dist/tools/read/css.js.map +1 -1
- package/dist/tools/read/libraries.js +1 -1
- package/dist/tools/read/nodes.d.ts.map +1 -1
- package/dist/tools/read/nodes.js +19 -5
- package/dist/tools/read/nodes.js.map +1 -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/text-range.d.ts +11 -0
- package/dist/tools/text-range.d.ts.map +1 -0
- package/dist/tools/text-range.js +26 -0
- package/dist/tools/text-range.js.map +1 -0
- package/dist/tools/variables/bindings.js +1 -1
- package/dist/tools/variables/bindings.js.map +1 -1
- package/dist/tools/variables/unbind.js +1 -1
- package/dist/tools/variables/unbind.js.map +1 -1
- package/dist/tools/vector/path.d.ts.map +1 -1
- package/dist/tools/vector/path.js +7 -21
- package/dist/tools/vector/path.js.map +1 -1
- package/dist/vector/rebase.d.ts +17 -0
- package/dist/vector/rebase.d.ts.map +1 -0
- package/dist/vector/rebase.js +32 -0
- package/dist/vector/rebase.js.map +1 -0
- package/package.json +14 -9
- package/src/canvas/boolean.ts +12 -1
- package/src/canvas/color-space.ts +73 -0
- package/src/canvas/fills.ts +130 -83
- package/src/canvas/flatten.ts +92 -7
- package/src/canvas/index.ts +9 -0
- package/src/canvas/layout-grids.ts +15 -2
- package/src/canvas/noise/render.ts +35 -7
- package/src/canvas/noise/shader.ts +8 -10
- package/src/canvas/overlays/annotations.ts +117 -0
- package/src/canvas/overlays/auto-layout-hover.ts +41 -1
- package/src/canvas/overlays/feedback.ts +7 -2
- package/src/canvas/overlays/index.ts +1 -1
- package/src/canvas/overlays/measurement.ts +49 -3
- package/src/canvas/overlays/presence.ts +35 -32
- package/src/canvas/renderer/colors.ts +14 -0
- package/src/canvas/renderer/document-surface.ts +16 -6
- package/src/canvas/renderer/lifecycle.ts +2 -2
- package/src/canvas/renderer/methods.ts +4 -0
- package/src/canvas/renderer/overlay-pass.ts +4 -0
- package/src/canvas/renderer/pipeline.ts +8 -0
- package/src/canvas/renderer/types.ts +8 -0
- package/src/canvas/renderer.ts +21 -2
- package/src/canvas/scene.ts +15 -7
- package/src/clipboard/pairdraw.ts +1 -0
- package/src/editor/bridges/clipboard.ts +1 -0
- package/src/editor/bridges/components.ts +10 -0
- package/src/editor/clipboard/code.ts +50 -0
- package/src/editor/clipboard/paste/dependencies.ts +18 -0
- package/src/editor/clipboard/paste/run.ts +64 -0
- package/src/editor/clipboard/styled.ts +4 -52
- package/src/editor/clipboard.ts +40 -0
- package/src/editor/components/instances.ts +92 -4
- package/src/editor/components/slots/index.ts +7 -0
- package/src/editor/components.ts +16 -2
- package/src/editor/create.ts +15 -1
- package/src/editor/design-tokens.ts +3 -23
- package/src/editor/image-edit.ts +5 -2
- package/src/editor/index.ts +1 -0
- package/src/editor/layout-mode.ts +131 -3
- package/src/editor/nodes.ts +30 -5
- package/src/editor/read-only/actions.ts +6 -0
- package/src/editor/selection/overlays.ts +8 -0
- package/src/editor/state/shared.ts +1 -0
- package/src/editor/state/view.ts +2 -0
- package/src/editor/structure/boolean.ts +29 -1
- package/src/editor/structure/container-wrap.ts +20 -4
- package/src/editor/structure/flatten.ts +15 -8
- package/src/editor/structure/group/ungroup.ts +2 -0
- package/src/editor/structure/outline-stroke.ts +5 -0
- package/src/editor/styles.ts +203 -0
- package/src/editor/text/selection-style.ts +18 -1
- package/src/editor/tool-registry.ts +2 -0
- package/src/editor/types.ts +14 -0
- package/src/editor/variable-bindings.ts +11 -0
- package/src/figma-api/accessors/basic.ts +33 -1
- package/src/figma-api/accessors/vector.ts +6 -13
- package/src/figma-api/compatibility.ts +1 -0
- package/src/figma-api/component-scope.ts +36 -0
- package/src/figma-api/components.ts +24 -0
- package/src/figma-api/flatten.ts +7 -3
- package/src/figma-api/index.ts +302 -6
- package/src/figma-api/node-types.ts +1 -0
- package/src/figma-api/overrides.ts +192 -5
- package/src/figma-api/proxy.ts +16 -1
- package/src/figma-api/reactions.ts +163 -12
- package/src/figma-api/slots.ts +10 -9
- package/src/io/formats/code/detect.ts +67 -0
- package/src/io/formats/code/index.ts +17 -0
- package/src/io/formats/code/read.ts +143 -0
- package/src/io/formats/code/stylesheet.ts +24 -0
- package/src/io/formats/code/tokens.ts +159 -0
- package/src/io/formats/design-tokens/apply.ts +3 -2
- package/src/io/formats/fig/export/patch/fields.ts +11 -0
- package/src/io/formats/fig/export/patch/index.ts +23 -19
- package/src/io/formats/fig/export/setup.ts +8 -1
- package/src/io/formats/fig/index.ts +6 -0
- package/src/io/formats/fig/read.ts +11 -2
- package/src/io/formats/html/layers.ts +7 -0
- package/src/io/formats/pdf/export.ts +19 -7
- package/src/io/formats/pdf/plan.ts +71 -32
- package/src/io/formats/raster/headless.ts +3 -1
- package/src/io/formats/raster/index.ts +2 -0
- package/src/io/formats/raster/render.ts +49 -9
- package/src/io/formats/svg/defs.ts +27 -1
- package/src/io/formats/svg/export.ts +75 -13
- package/src/io/formats/svg/index.ts +1 -0
- package/src/io/formats/svg/text/layout.ts +5 -3
- package/src/io/formats/video/record.ts +33 -9
- package/src/io/formats.ts +35 -15
- package/src/kiwi/fig/population/client.ts +6 -1
- package/src/kiwi/fig/session/document-state.ts +195 -5
- package/src/kiwi/fig/session/options.ts +2 -0
- package/src/layout/apply.ts +12 -4
- package/src/layout/auto-layout-handles.ts +1 -1
- package/src/layout/axis-sizing.ts +3 -1
- package/src/layout/derived.ts +3 -1
- package/src/layout/effective-generated-text.ts +1 -1
- package/src/layout/grid.ts +91 -21
- package/src/layout.ts +16 -3
- package/src/node/fs.ts +32 -7
- package/src/prototype/easing.ts +79 -7
- package/src/prototype/scenes.ts +244 -15
- package/src/prototype/session.ts +1 -0
- package/src/prototype/smart-animate/animation.ts +4 -3
- package/src/prototype/timeline.ts +118 -26
- package/src/prototype/variables.ts +189 -0
- package/src/rpc/read-commands.ts +19 -1
- package/src/text/character-style.ts +47 -0
- package/src/text/font/batch.ts +58 -0
- package/src/text/font/manager.ts +17 -1
- package/src/text/index.ts +2 -1
- package/src/tools/create/basic.ts +2 -3
- package/src/tools/create/code.ts +85 -0
- package/src/tools/create/html.ts +9 -46
- package/src/tools/create/inputs.ts +12 -0
- package/src/tools/create/mermaid.ts +6 -6
- package/src/tools/create/place.ts +80 -0
- package/src/tools/create.ts +1 -0
- package/src/tools/css/gradient.ts +147 -0
- package/src/tools/modify/geometry.ts +5 -5
- package/src/tools/modify/layout.ts +19 -0
- package/src/tools/modify/overrides.ts +35 -0
- package/src/tools/modify/paint.ts +124 -54
- package/src/tools/modify/text.ts +91 -7
- package/src/tools/modify/update.ts +23 -2
- package/src/tools/modify.ts +9 -1
- package/src/tools/read/css.ts +46 -12
- package/src/tools/read/nodes.ts +26 -4
- package/src/tools/registry/extended.ts +6 -0
- package/src/tools/text-range.ts +29 -0
- package/src/tools/variables/bindings.ts +4 -1
- package/src/tools/variables/unbind.ts +4 -1
- package/src/tools/vector/path.ts +11 -13
- package/src/vector/rebase.ts +33 -0
|
@@ -7,19 +7,111 @@ import type {
|
|
|
7
7
|
SceneNode,
|
|
8
8
|
Stroke
|
|
9
9
|
} from '@pairdraw/scene-graph'
|
|
10
|
-
import {
|
|
10
|
+
import { AUTO_LAYOUT_FIELDS, SIZE_FIELDS } from '@pairdraw/scene-graph/fields'
|
|
11
11
|
import {
|
|
12
|
+
findInstanceAncestor,
|
|
13
|
+
INSTANCE_OVERRIDE_FIELDS,
|
|
14
|
+
INSTANCE_SYNC_FIELD_OWNERS,
|
|
15
|
+
isReplacedLayer
|
|
16
|
+
} from '@pairdraw/scene-graph/instances'
|
|
17
|
+
import {
|
|
18
|
+
clearInstanceOverrides,
|
|
19
|
+
cloneInstanceOverrideState,
|
|
12
20
|
overriddenAssignmentId,
|
|
13
21
|
overriddenBindingField,
|
|
14
22
|
overriddenVariableModeCollection,
|
|
15
23
|
REPLACED_LAYER_OVERRIDE,
|
|
16
24
|
type InstanceOverrideState
|
|
17
25
|
} from '@pairdraw/scene-graph/instances/overrides'
|
|
26
|
+
import { slotScope } from '@pairdraw/scene-graph/slots'
|
|
18
27
|
|
|
19
28
|
import type { NodeProxyInternals, ProxyThis } from './accessor-utils'
|
|
20
29
|
import { assertProxyEditable, graph, raw } from './accessor-utils'
|
|
21
30
|
import { flushPendingLayout } from './pending-layout'
|
|
22
31
|
|
|
32
|
+
/** The names an instance can record, as the file's own table says. */
|
|
33
|
+
const recordableOverrideFields = new Set<string>(INSTANCE_OVERRIDE_FIELDS)
|
|
34
|
+
const onlyRecorded = (fields: readonly string[]): readonly string[] =>
|
|
35
|
+
fields.filter((field) => recordableOverrideFields.has(field))
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* The fields each property marker row writes, as the panel's sections pass them. They live here so
|
|
39
|
+
* the reset tool and the editor reset clear the same names.
|
|
40
|
+
*/
|
|
41
|
+
export const FILL_OVERRIDE_FIELDS = onlyRecorded(['fills', 'fillStyleId'])
|
|
42
|
+
export const STROKE_OVERRIDE_FIELDS = onlyRecorded([
|
|
43
|
+
'strokes',
|
|
44
|
+
'strokeWeight',
|
|
45
|
+
'strokeAlign',
|
|
46
|
+
'strokeJoin',
|
|
47
|
+
'strokeMiterLimit',
|
|
48
|
+
'dashPattern',
|
|
49
|
+
'strokeStyleId'
|
|
50
|
+
])
|
|
51
|
+
export const EFFECT_OVERRIDE_FIELDS = onlyRecorded(['effects', 'effectStyleId'])
|
|
52
|
+
export const TEXT_OVERRIDE_FIELDS = onlyRecorded([
|
|
53
|
+
'text',
|
|
54
|
+
'fontFamily',
|
|
55
|
+
'fontSize',
|
|
56
|
+
'fontWeight',
|
|
57
|
+
'lineHeight',
|
|
58
|
+
'letterSpacing',
|
|
59
|
+
'italic',
|
|
60
|
+
'textAlignHorizontal',
|
|
61
|
+
'textAlignVertical',
|
|
62
|
+
'textCase',
|
|
63
|
+
'textDecoration',
|
|
64
|
+
'fontVariations',
|
|
65
|
+
'fontFeatures',
|
|
66
|
+
'textAutoResize',
|
|
67
|
+
'textTruncation',
|
|
68
|
+
'maxLines',
|
|
69
|
+
'leadingTrim',
|
|
70
|
+
'listSpacing',
|
|
71
|
+
'hangingList',
|
|
72
|
+
'textDirection',
|
|
73
|
+
'styleRuns',
|
|
74
|
+
'textParagraphs',
|
|
75
|
+
'textStyleId'
|
|
76
|
+
])
|
|
77
|
+
/** A layer in an instance keeps no size limit of its own (the file holds one for the component). */
|
|
78
|
+
export const SIZE_OVERRIDE_FIELDS = onlyRecorded([...SIZE_FIELDS])
|
|
79
|
+
export const CORNER_OVERRIDE_FIELDS = onlyRecorded([
|
|
80
|
+
'cornerRadius',
|
|
81
|
+
'topLeftRadius',
|
|
82
|
+
'topRightRadius',
|
|
83
|
+
'bottomLeftRadius',
|
|
84
|
+
'bottomRightRadius',
|
|
85
|
+
'cornerSmoothing'
|
|
86
|
+
])
|
|
87
|
+
export const AUTO_LAYOUT_OVERRIDE_FIELDS = onlyRecorded([
|
|
88
|
+
...AUTO_LAYOUT_FIELDS,
|
|
89
|
+
'itemReverseZIndex',
|
|
90
|
+
'layoutAlignSelf',
|
|
91
|
+
'layoutGrow',
|
|
92
|
+
'counterAxisAlignContent'
|
|
93
|
+
])
|
|
94
|
+
export const GRID_OVERRIDE_FIELDS = onlyRecorded(['layoutGrids', 'gridStyleId'])
|
|
95
|
+
/** Only what a control edits today; overflow and scroll behaviour are whole-layer reset only. */
|
|
96
|
+
export const CLIP_OVERRIDE_FIELDS = onlyRecorded(['clipsContent'])
|
|
97
|
+
export const APPEARANCE_OVERRIDE_FIELDS = onlyRecorded(['visible'])
|
|
98
|
+
export const OPACITY_OVERRIDE_FIELDS = onlyRecorded(['opacity', 'blendMode'])
|
|
99
|
+
|
|
100
|
+
/** The marker names an agent can pass, each standing for the row's fields. */
|
|
101
|
+
export const OVERRIDE_FIELD_GROUPS: Readonly<Record<string, readonly string[]>> = {
|
|
102
|
+
fills: FILL_OVERRIDE_FIELDS,
|
|
103
|
+
strokes: STROKE_OVERRIDE_FIELDS,
|
|
104
|
+
effects: EFFECT_OVERRIDE_FIELDS,
|
|
105
|
+
text: TEXT_OVERRIDE_FIELDS,
|
|
106
|
+
size: SIZE_OVERRIDE_FIELDS,
|
|
107
|
+
corners: CORNER_OVERRIDE_FIELDS,
|
|
108
|
+
autoLayout: AUTO_LAYOUT_OVERRIDE_FIELDS,
|
|
109
|
+
layoutGrids: GRID_OVERRIDE_FIELDS,
|
|
110
|
+
clip: CLIP_OVERRIDE_FIELDS,
|
|
111
|
+
appearance: APPEARANCE_OVERRIDE_FIELDS,
|
|
112
|
+
opacity: OPACITY_OVERRIDE_FIELDS
|
|
113
|
+
}
|
|
114
|
+
|
|
23
115
|
/** One layer of an instance and the fields an edit changed on it, as Figma's `overrides`. */
|
|
24
116
|
export interface FigmaInstanceOverride {
|
|
25
117
|
id: string
|
|
@@ -268,10 +360,17 @@ function editedFields(graph: SceneGraph, node: SceneNode, root: SceneNode): stri
|
|
|
268
360
|
export function instanceOverrides(graph: SceneGraph, root: SceneNode): FigmaInstanceOverride[] {
|
|
269
361
|
const result: FigmaInstanceOverride[] = []
|
|
270
362
|
const visit = (node: SceneNode) => {
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
363
|
+
const parentId = node.parentId
|
|
364
|
+
// Content an instance put in a slot is its own layer, not an override Figma lists; layers
|
|
365
|
+
// inside it can still carry overrides of nested instances.
|
|
366
|
+
const slotContent =
|
|
367
|
+
node.id !== root.id && !!parentId && slotScope(graph, parentId).kind === 'slot'
|
|
368
|
+
if (!slotContent) {
|
|
369
|
+
const skipped = propertyFields(node)
|
|
370
|
+
if (node.id !== root.id) skipped.add('width').add('height')
|
|
371
|
+
const overriddenFields = figmaFields(editedFields(graph, node, root), skipped)
|
|
372
|
+
if (overriddenFields.length > 0) result.push({ id: node.id, overriddenFields })
|
|
373
|
+
}
|
|
275
374
|
for (const child of graph.getChildren(node.id)) visit(child)
|
|
276
375
|
}
|
|
277
376
|
visit(root)
|
|
@@ -281,6 +380,10 @@ export function instanceOverrides(graph: SceneGraph, root: SceneNode): FigmaInst
|
|
|
281
380
|
/** Clears an override state but what component properties set, which Figma keeps on reset. */
|
|
282
381
|
function withoutEdits(graph: SceneGraph, state: InstanceOverrideState): InstanceOverrideState {
|
|
283
382
|
const keep = (nodeId: string, fields: Map<string, unknown>) => {
|
|
383
|
+
// A layer the instance itself put inside a slot is its content, not a component override:
|
|
384
|
+
// Reset all changes keeps it whole, as Figma does.
|
|
385
|
+
const parentId = graph.getNode(nodeId)?.parentId
|
|
386
|
+
if (parentId && slotScope(graph, parentId).kind === 'slot') return new Map(fields)
|
|
284
387
|
const node = graph.getNode(nodeId)
|
|
285
388
|
const driven = node ? propertyFields(node) : new Set<string>()
|
|
286
389
|
return new Map([...fields].filter(([field]) => driven.has(field)))
|
|
@@ -518,6 +621,90 @@ function followingComponents(graph: SceneGraph, components: string[]): string[]
|
|
|
518
621
|
* Figma's `resetOverrides`: the instance and every instance inside it go back to their
|
|
519
622
|
* components, keeping the values their component properties set.
|
|
520
623
|
*/
|
|
624
|
+
/** The fields a marker name stands for: itself plus every recorded key it owns. */
|
|
625
|
+
export function overrideRecordedKeys(fields: readonly string[]): string[] {
|
|
626
|
+
const keys = new Set<string>(fields)
|
|
627
|
+
for (const [recorded, owner] of Object.entries(INSTANCE_SYNC_FIELD_OWNERS)) {
|
|
628
|
+
if (owner && fields.includes(owner)) keys.add(recorded)
|
|
629
|
+
}
|
|
630
|
+
return [...keys]
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** Whether a name is a field the property markers can reset. */
|
|
634
|
+
export function isOverrideMarkerField(field: string): boolean {
|
|
635
|
+
return (
|
|
636
|
+
Object.hasOwn(OVERRIDE_FIELD_GROUPS, field) ||
|
|
637
|
+
(INSTANCE_OVERRIDE_FIELDS as readonly string[]).includes(field) ||
|
|
638
|
+
Object.values(INSTANCE_SYNC_FIELD_OWNERS).includes(field)
|
|
639
|
+
)
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/** The recorded keys a marker name's row writes: the group's fields and their owned keys. */
|
|
643
|
+
function resetKeys(fields: readonly string[]): string[] {
|
|
644
|
+
const names = fields.flatMap((field) => OVERRIDE_FIELD_GROUPS[field] ?? [field])
|
|
645
|
+
return overrideRecordedKeys(names)
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Resets named fields on one layer of an instance, as the property markers do, and syncs the
|
|
650
|
+
* outermost instance once. Without fields it resets the whole layer; an instance resets its own
|
|
651
|
+
* self state. Returns an error for slot content, which is the instance's content, not an override.
|
|
652
|
+
*/
|
|
653
|
+
export function resetInstanceOverrideFields(
|
|
654
|
+
graph: SceneGraph,
|
|
655
|
+
nodeId: string,
|
|
656
|
+
fields?: readonly string[]
|
|
657
|
+
): string | null {
|
|
658
|
+
const node = graph.getNode(nodeId)
|
|
659
|
+
if (!node) return `Node "${nodeId}" not found.`
|
|
660
|
+
const parentId = node.type === 'INSTANCE' ? undefined : node.parentId
|
|
661
|
+
if (parentId && slotScope(graph, parentId).kind === 'slot')
|
|
662
|
+
return 'slot content is not an override; reset the content instead.'
|
|
663
|
+
let owner: SceneNode | undefined = node.type === 'INSTANCE' ? node : undefined
|
|
664
|
+
if (!owner && node.parentId) owner = findInstanceAncestor(graph, node.parentId)
|
|
665
|
+
if (!owner) return `Layer "${nodeId}" is not inside an instance.`
|
|
666
|
+
if (fields) {
|
|
667
|
+
const unknown = fields.find((field) => !isOverrideMarkerField(field))
|
|
668
|
+
if (unknown !== undefined) return `Unknown override field "${unknown}".`
|
|
669
|
+
}
|
|
670
|
+
const keys = fields ? resetKeys(fields) : undefined
|
|
671
|
+
const without = (state: InstanceOverrideState, targetId: string): void => {
|
|
672
|
+
if (!keys) {
|
|
673
|
+
state.descendants.delete(targetId)
|
|
674
|
+
return
|
|
675
|
+
}
|
|
676
|
+
const entry = state.descendants.get(targetId)
|
|
677
|
+
if (!entry) return
|
|
678
|
+
for (const key of keys) entry.delete(key)
|
|
679
|
+
if (entry.size === 0) state.descendants.delete(targetId)
|
|
680
|
+
}
|
|
681
|
+
if (node.type === 'INSTANCE') {
|
|
682
|
+
const state = cloneInstanceOverrideState(node.instanceOverrides)
|
|
683
|
+
if (keys) for (const field of keys) state.self.delete(field)
|
|
684
|
+
else clearInstanceOverrides(state)
|
|
685
|
+
graph.updateNode(node.id, { instanceOverrides: state })
|
|
686
|
+
if (node.id !== owner.id) {
|
|
687
|
+
const holding = cloneInstanceOverrideState(owner.instanceOverrides)
|
|
688
|
+
without(holding, node.id)
|
|
689
|
+
graph.updateNode(owner.id, { instanceOverrides: holding })
|
|
690
|
+
}
|
|
691
|
+
} else {
|
|
692
|
+
const state = cloneInstanceOverrideState(owner.instanceOverrides)
|
|
693
|
+
without(state, node.id)
|
|
694
|
+
graph.updateNode(owner.id, { instanceOverrides: state })
|
|
695
|
+
}
|
|
696
|
+
let outermost = owner
|
|
697
|
+
for (
|
|
698
|
+
let parent = owner.parentId ? findInstanceAncestor(graph, owner.parentId) : undefined;
|
|
699
|
+
parent;
|
|
700
|
+
) {
|
|
701
|
+
outermost = parent
|
|
702
|
+
parent = parent.parentId ? findInstanceAncestor(graph, parent.parentId) : undefined
|
|
703
|
+
}
|
|
704
|
+
graph.syncInstance(outermost.id)
|
|
705
|
+
return null
|
|
706
|
+
}
|
|
707
|
+
|
|
521
708
|
export function resetInstanceOverrides(graph: SceneGraph, root: SceneNode): void {
|
|
522
709
|
// A layer put in place of a component's layer goes, and the sync brings that layer back.
|
|
523
710
|
const replaced: string[] = []
|
package/src/figma-api/proxy.ts
CHANGED
|
@@ -52,7 +52,12 @@ import { installPluginDataMethods, type PluginDataMethods } from './plugin-data'
|
|
|
52
52
|
import type { FigmaReaction } from './reactions'
|
|
53
53
|
import { nodeProxyToJSON } from './serialization'
|
|
54
54
|
import { installShapeWithTextAccessors } from './shape-with-text'
|
|
55
|
-
import {
|
|
55
|
+
import {
|
|
56
|
+
installSlotAccessors,
|
|
57
|
+
prepareNodeClone,
|
|
58
|
+
prepareSlotMove,
|
|
59
|
+
prepareSlotRemoval
|
|
60
|
+
} from './slots'
|
|
56
61
|
import type { FigmaLetterSpacing, FigmaLineHeight } from './text'
|
|
57
62
|
import * as TextProxy from './text'
|
|
58
63
|
import { containerTransform, setContainerTransform } from './transform'
|
|
@@ -361,6 +366,15 @@ export class FigmaNodeProxy {
|
|
|
361
366
|
this._update({ maskType: v as SceneNode['maskType'] })
|
|
362
367
|
}
|
|
363
368
|
|
|
369
|
+
get booleanOperation(): string | undefined {
|
|
370
|
+
return this._raw().booleanOperation
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
set booleanOperation(v: string) {
|
|
374
|
+
if (this._raw().type !== 'BOOLEAN_OPERATION') return
|
|
375
|
+
this._update({ booleanOperation: v as SceneNode['booleanOperation'] })
|
|
376
|
+
}
|
|
377
|
+
|
|
364
378
|
// --- UI state ---
|
|
365
379
|
|
|
366
380
|
get expanded(): boolean {
|
|
@@ -494,6 +508,7 @@ export class FigmaNodeProxy {
|
|
|
494
508
|
assertNodeEditable(this[INTERNAL_GRAPH], this[INTERNAL_ID])
|
|
495
509
|
const n = this._raw()
|
|
496
510
|
const parentId = n.parentId ?? this[INTERNAL_API].currentPageId
|
|
511
|
+
prepareNodeClone(this[INTERNAL_GRAPH], this[INTERNAL_ID], 'clone')
|
|
497
512
|
const cloned = this[INTERNAL_GRAPH].cloneTree(this[INTERNAL_ID], parentId)
|
|
498
513
|
if (!cloned) throw new Error(`Failed to clone node ${this[INTERNAL_ID]}`)
|
|
499
514
|
// A slot's copy is a plain frame: the slot binding belongs to the original alone.
|
|
@@ -3,6 +3,8 @@ import * as v from 'valibot'
|
|
|
3
3
|
import { generateId } from '@pairdraw/scene-graph'
|
|
4
4
|
import type {
|
|
5
5
|
PrototypeAction,
|
|
6
|
+
PrototypeExpressionFunction,
|
|
7
|
+
PrototypeVariableValue,
|
|
6
8
|
PrototypeNavigationType,
|
|
7
9
|
PrototypeOverlayPositionType,
|
|
8
10
|
PrototypeReaction,
|
|
@@ -32,10 +34,7 @@ const UNSUPPORTED_TRIGGERS: Record<string, true> = {
|
|
|
32
34
|
|
|
33
35
|
/** Actions Figma's plugin API offers that a prototype in Pairdraw cannot run. */
|
|
34
36
|
const UNSUPPORTED_ACTIONS: Record<string, true> = {
|
|
35
|
-
URL: true
|
|
36
|
-
SET_VARIABLE: true,
|
|
37
|
-
CONDITIONAL: true,
|
|
38
|
-
SET_VARIABLE_MODE: true
|
|
37
|
+
URL: true
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
// No `v.finite()` action: the MCP tool contract turns this schema into JSON Schema, which
|
|
@@ -97,10 +96,81 @@ const nodeActionSchema = v.strictObject({
|
|
|
97
96
|
overlayRelativePosition: v.optional(overlayPositionSchema, 'CENTER')
|
|
98
97
|
})
|
|
99
98
|
|
|
99
|
+
const colorSchema = v.strictObject({
|
|
100
|
+
r: v.pipe(v.number(), v.minValue(0), v.maxValue(1)),
|
|
101
|
+
g: v.pipe(v.number(), v.minValue(0), v.maxValue(1)),
|
|
102
|
+
b: v.pipe(v.number(), v.minValue(0), v.maxValue(1)),
|
|
103
|
+
a: v.optional(v.pipe(v.number(), v.minValue(0), v.maxValue(1)))
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
const expressionFunctionSchema = v.picklist([
|
|
107
|
+
'ADDITION',
|
|
108
|
+
'SUBTRACTION',
|
|
109
|
+
'RESOLVE_VARIANT',
|
|
110
|
+
'MULTIPLY',
|
|
111
|
+
'DIVIDE',
|
|
112
|
+
'EQUALS',
|
|
113
|
+
'NOT_EQUAL',
|
|
114
|
+
'LESS_THAN',
|
|
115
|
+
'LESS_THAN_OR_EQUAL',
|
|
116
|
+
'GREATER_THAN',
|
|
117
|
+
'GREATER_THAN_OR_EQUAL',
|
|
118
|
+
'AND',
|
|
119
|
+
'OR',
|
|
120
|
+
'NOT',
|
|
121
|
+
'STRINGIFY',
|
|
122
|
+
'TERNARY',
|
|
123
|
+
'VAR_MODE_LOOKUP',
|
|
124
|
+
'NEGATE',
|
|
125
|
+
'IS_TRUTHY',
|
|
126
|
+
'KEYFRAME',
|
|
127
|
+
'COMPOSE_COLOR'
|
|
128
|
+
] satisfies PrototypeExpressionFunction[])
|
|
129
|
+
|
|
130
|
+
/** Figma's plugin `VariableData`: a literal, an alias, or an expression tree. */
|
|
131
|
+
const variableDataSchema: v.GenericSchema<PrototypeVariableValue> = v.lazy(() =>
|
|
132
|
+
v.variant('kind', [
|
|
133
|
+
v.strictObject({ kind: v.literal('boolean'), value: v.boolean() }),
|
|
134
|
+
v.strictObject({ kind: v.literal('number'), value: v.number() }),
|
|
135
|
+
v.strictObject({ kind: v.literal('string'), value: v.string() }),
|
|
136
|
+
v.strictObject({ kind: v.literal('color'), value: colorSchema }),
|
|
137
|
+
v.strictObject({ kind: v.literal('alias'), variableId: v.string() }),
|
|
138
|
+
v.strictObject({
|
|
139
|
+
kind: v.literal('expression'),
|
|
140
|
+
fn: expressionFunctionSchema,
|
|
141
|
+
args: v.array(variableDataSchema)
|
|
142
|
+
})
|
|
143
|
+
])
|
|
144
|
+
) as v.GenericSchema<PrototypeVariableValue>
|
|
145
|
+
|
|
146
|
+
const conditionalBlockSchema: v.GenericSchema<{
|
|
147
|
+
condition?: PrototypeVariableValue
|
|
148
|
+
actions: unknown[]
|
|
149
|
+
}> = v.strictObject({
|
|
150
|
+
condition: v.optional(variableDataSchema),
|
|
151
|
+
// Nested actions are validated when the model is written; the schema keeps the tree open to
|
|
152
|
+
// avoid a recursive type that TypeScript cannot name.
|
|
153
|
+
actions: v.array(v.unknown())
|
|
154
|
+
})
|
|
155
|
+
|
|
100
156
|
const actionSchema = v.variant('type', [
|
|
101
157
|
nodeActionSchema,
|
|
102
158
|
v.strictObject({ type: v.literal('BACK') }),
|
|
103
|
-
v.strictObject({ type: v.literal('CLOSE') })
|
|
159
|
+
v.strictObject({ type: v.literal('CLOSE') }),
|
|
160
|
+
v.strictObject({
|
|
161
|
+
type: v.literal('SET_VARIABLE'),
|
|
162
|
+
variableId: v.optional(v.string()),
|
|
163
|
+
variableValue: variableDataSchema
|
|
164
|
+
}),
|
|
165
|
+
v.strictObject({
|
|
166
|
+
type: v.literal('SET_VARIABLE_MODE'),
|
|
167
|
+
variableCollectionId: v.optional(v.string()),
|
|
168
|
+
variableModeId: v.optional(v.string())
|
|
169
|
+
}),
|
|
170
|
+
v.strictObject({
|
|
171
|
+
type: v.literal('CONDITIONAL'),
|
|
172
|
+
conditionalBlocks: v.array(conditionalBlockSchema)
|
|
173
|
+
})
|
|
104
174
|
])
|
|
105
175
|
|
|
106
176
|
const triggerSchema = v.variant('type', [
|
|
@@ -141,6 +211,24 @@ function toFigmaTrigger({ type, delay }: PrototypeReaction['trigger']): FigmaRea
|
|
|
141
211
|
}
|
|
142
212
|
|
|
143
213
|
function toFigmaAction(action: PrototypeAction): FigmaReactionAction {
|
|
214
|
+
if (action.type === 'SET_VARIABLE') {
|
|
215
|
+
const set = { type: 'SET_VARIABLE' as const, variableValue: action.value }
|
|
216
|
+
return action.variableId ? { ...set, variableId: action.variableId } : set
|
|
217
|
+
}
|
|
218
|
+
if (action.type === 'SET_VARIABLE_MODE')
|
|
219
|
+
return {
|
|
220
|
+
type: 'SET_VARIABLE_MODE',
|
|
221
|
+
variableCollectionId: action.collectionId ?? undefined,
|
|
222
|
+
variableModeId: action.modeId ?? undefined
|
|
223
|
+
}
|
|
224
|
+
if (action.type === 'CONDITIONAL')
|
|
225
|
+
return {
|
|
226
|
+
type: 'CONDITIONAL',
|
|
227
|
+
conditionalBlocks: action.blocks.map((block) => ({
|
|
228
|
+
...(block.condition ? { condition: block.condition } : {}),
|
|
229
|
+
actions: block.actions.map(toFigmaAction)
|
|
230
|
+
}))
|
|
231
|
+
}
|
|
144
232
|
if (action.type !== 'NODE') return { type: action.type }
|
|
145
233
|
return {
|
|
146
234
|
type: 'NODE',
|
|
@@ -221,12 +309,51 @@ function toTrigger(trigger: FigmaReactionTrigger): PrototypeReaction['trigger']
|
|
|
221
309
|
return { type, delay: 'delay' in trigger ? trigger.delay : 0 }
|
|
222
310
|
}
|
|
223
311
|
|
|
312
|
+
function parseNestedAction(nested: unknown, reactionIndex: number): FigmaReactionAction {
|
|
313
|
+
if (!nested || typeof nested !== 'object' || Array.isArray(nested)) {
|
|
314
|
+
throw failure(`reactions[${reactionIndex}] has a conditional action that is not an object`)
|
|
315
|
+
}
|
|
316
|
+
const result = v.safeParse(actionSchema, nested)
|
|
317
|
+
if (!result.success) {
|
|
318
|
+
const [issue] = result.issues
|
|
319
|
+
const path = issuePath(issue.path)
|
|
320
|
+
throw failure(
|
|
321
|
+
`reactions[${reactionIndex}] has a conditional action failing validation: ${issue.message}${path ? ` at ${path}` : ''}`
|
|
322
|
+
)
|
|
323
|
+
}
|
|
324
|
+
return result.output
|
|
325
|
+
}
|
|
326
|
+
|
|
224
327
|
function toAction(
|
|
225
328
|
action: FigmaReactionAction,
|
|
226
329
|
context: ReactionContext,
|
|
227
330
|
reactionIndex: number
|
|
228
331
|
): PrototypeAction {
|
|
229
|
-
if (action.type
|
|
332
|
+
if (action.type === 'BACK') return { type: 'BACK' }
|
|
333
|
+
if (action.type === 'CLOSE') return { type: 'CLOSE' }
|
|
334
|
+
if (action.type === 'SET_VARIABLE')
|
|
335
|
+
return {
|
|
336
|
+
type: 'SET_VARIABLE',
|
|
337
|
+
variableId: action.variableId ?? null,
|
|
338
|
+
value: action.variableValue
|
|
339
|
+
}
|
|
340
|
+
if (action.type === 'SET_VARIABLE_MODE')
|
|
341
|
+
return {
|
|
342
|
+
type: 'SET_VARIABLE_MODE',
|
|
343
|
+
collectionId: action.variableCollectionId ?? null,
|
|
344
|
+
modeId: action.variableModeId ?? null
|
|
345
|
+
}
|
|
346
|
+
if (action.type === 'CONDITIONAL')
|
|
347
|
+
return {
|
|
348
|
+
type: 'CONDITIONAL',
|
|
349
|
+
blocks: action.conditionalBlocks.map((block) => ({
|
|
350
|
+
...(block.condition ? { condition: block.condition } : {}),
|
|
351
|
+
actions: block.actions.map((nested) =>
|
|
352
|
+
// The schema keeps nested actions open to a tree, so each nested object is parsed here.
|
|
353
|
+
toAction(parseNestedAction(nested, reactionIndex), context, reactionIndex)
|
|
354
|
+
)
|
|
355
|
+
}))
|
|
356
|
+
}
|
|
230
357
|
const destinationId = resolveDestinationId(action, context, reactionIndex)
|
|
231
358
|
assertDestination({ ...action, destinationId }, context, reactionIndex)
|
|
232
359
|
return {
|
|
@@ -361,6 +488,34 @@ function assertScrollTarget(destination: SceneNode, context: ReactionContext, at
|
|
|
361
488
|
}
|
|
362
489
|
}
|
|
363
490
|
|
|
491
|
+
function unsupportedActionReason(action: unknown): string | null {
|
|
492
|
+
if (!action || typeof action !== 'object' || !('type' in action)) return null
|
|
493
|
+
const { type } = action
|
|
494
|
+
if (typeof type === 'string' && type in UNSUPPORTED_ACTIONS) {
|
|
495
|
+
return `an action is NODE, BACK or CLOSE, not ${type}`
|
|
496
|
+
}
|
|
497
|
+
if (
|
|
498
|
+
type === 'CONDITIONAL' &&
|
|
499
|
+
'conditionalBlocks' in action &&
|
|
500
|
+
Array.isArray(action.conditionalBlocks)
|
|
501
|
+
) {
|
|
502
|
+
for (const block of action.conditionalBlocks) {
|
|
503
|
+
if (
|
|
504
|
+
!block ||
|
|
505
|
+
typeof block !== 'object' ||
|
|
506
|
+
!('actions' in block) ||
|
|
507
|
+
!Array.isArray(block.actions)
|
|
508
|
+
)
|
|
509
|
+
continue
|
|
510
|
+
for (const nested of block.actions) {
|
|
511
|
+
const nestedReason = unsupportedActionReason(nested)
|
|
512
|
+
if (nestedReason) return nestedReason
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return null
|
|
517
|
+
}
|
|
518
|
+
|
|
364
519
|
/** Figma's first unsupported trigger or action kind in `value`, if it has one. */
|
|
365
520
|
function unsupportedKind(value: unknown): string | null {
|
|
366
521
|
if (!Array.isArray(value)) return null
|
|
@@ -379,12 +534,8 @@ function unsupportedKind(value: unknown): string | null {
|
|
|
379
534
|
const actions = reaction.actions
|
|
380
535
|
if (!Array.isArray(actions)) continue
|
|
381
536
|
for (const action of actions) {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
if (typeof type === 'string' && type in UNSUPPORTED_ACTIONS) {
|
|
385
|
-
return `an action is NODE, BACK or CLOSE, not ${type}`
|
|
386
|
-
}
|
|
387
|
-
}
|
|
537
|
+
const reason = unsupportedActionReason(action)
|
|
538
|
+
if (reason) return reason
|
|
388
539
|
}
|
|
389
540
|
}
|
|
390
541
|
return null
|
package/src/figma-api/slots.ts
CHANGED
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
} from '@pairdraw/scene-graph/components'
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_SLOT_SETTINGS,
|
|
8
|
+
assertChildPlacement,
|
|
9
|
+
assertNodeMovable,
|
|
8
10
|
claimSlotContent,
|
|
9
11
|
createSlotProperty,
|
|
10
12
|
resetSlotContent,
|
|
@@ -76,10 +78,8 @@ export function prepareSlotMove(
|
|
|
76
78
|
childId: string,
|
|
77
79
|
method: 'appendChild' | 'insertChild'
|
|
78
80
|
): void {
|
|
79
|
-
|
|
80
|
-
const source = sourceParentId ? slotScope(g, sourceParentId) : undefined
|
|
81
|
+
assertNodeMovable(g, childId, method)
|
|
81
82
|
prepareSlotInsertion(g, parentId, method)
|
|
82
|
-
if (source?.kind === 'slot') claimSlotContent(g, source)
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -88,12 +88,13 @@ export function prepareSlotMove(
|
|
|
88
88
|
* from the component, and a slot's content becomes the instance's own first.
|
|
89
89
|
*/
|
|
90
90
|
export function prepareSlotInsertion(g: SceneGraph, parentId: string, method: string): void {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
assertChildPlacement(g, parentId, method)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Ready a clone under the node's current parent, which that parent's scope decides. */
|
|
95
|
+
export function prepareNodeClone(g: SceneGraph, nodeId: string, method: string): void {
|
|
96
|
+
const parentId = g.getNode(nodeId)?.parentId
|
|
97
|
+
if (parentId) assertChildPlacement(g, parentId, method)
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
/**
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** The most source a paste reads: 200 000 characters of JSX or HTML. */
|
|
2
|
+
export const MAX_CODE_LENGTH = 200_000
|
|
3
|
+
|
|
4
|
+
/** What a pasted source is written in, which decides how its layers are built. */
|
|
5
|
+
export type PasteCodeKind = 'jsx' | 'html'
|
|
6
|
+
|
|
7
|
+
/** Detection's answer for source longer than a paste reads. */
|
|
8
|
+
export const CODE_TOO_LARGE = 'too-large'
|
|
9
|
+
|
|
10
|
+
/** What detection says about a text: the code it holds, or that it is past the size a paste reads. */
|
|
11
|
+
export type CodeDetection = PasteCodeKind | typeof CODE_TOO_LARGE
|
|
12
|
+
|
|
13
|
+
const ELEMENT = /<([A-Za-z][\w.:-]*)(?:\s[^<>]*)?\/?>/
|
|
14
|
+
const CLOSING = /<\/([A-Za-z][\w.:-]*)\s*>/
|
|
15
|
+
const SELF_CLOSING = /<([A-Za-z][\w.:-]*)(?:\s[^<>]*)?\/>/
|
|
16
|
+
const FRAGMENT = /<>[\s\S]*<\/>/
|
|
17
|
+
/** A source that names a component, an export, or an arrow body, rather than plain markup. */
|
|
18
|
+
const JSX_SOURCE =
|
|
19
|
+
/\b(?:className\s*=|export\s+(?:default|function|const)\b|=>|function\s+[A-Z_a-z]\w*\s*\()/
|
|
20
|
+
|
|
21
|
+
/** The end of a paste too long to read whole, where its closing markup still is. */
|
|
22
|
+
const STRUCTURE_TAIL = 4096
|
|
23
|
+
|
|
24
|
+
/** The kind of code a trimmed text draws, or null when it draws no element. */
|
|
25
|
+
function looksLikeCode(trimmed: string, tail: string): PasteCodeKind | null {
|
|
26
|
+
if (!ELEMENT.test(trimmed)) return null
|
|
27
|
+
if (
|
|
28
|
+
!CLOSING.test(trimmed) &&
|
|
29
|
+
!SELF_CLOSING.test(trimmed) &&
|
|
30
|
+
!FRAGMENT.test(trimmed) &&
|
|
31
|
+
!CLOSING.test(tail)
|
|
32
|
+
) {
|
|
33
|
+
return null
|
|
34
|
+
}
|
|
35
|
+
if (!trimmed.startsWith('<')) {
|
|
36
|
+
// Markup with code around it is a component; anything else without a return is markup.
|
|
37
|
+
if (!/\breturn\b|\bimport\b|\bexport\b/.test(trimmed)) return null
|
|
38
|
+
return 'jsx'
|
|
39
|
+
}
|
|
40
|
+
return JSX_SOURCE.test(trimmed) ? 'jsx' : 'html'
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* What a pasted text is: JSX or TSX when it names components or inline props, HTML when it is
|
|
45
|
+
* markup alone, `too-large` when it is either but longer than a paste reads, and nothing when it
|
|
46
|
+
* draws no element, so ordinary text keeps pasting as text.
|
|
47
|
+
*/
|
|
48
|
+
export function detectCode(text: string): CodeDetection | null {
|
|
49
|
+
// A paste past the size a paste reads is only scanned up to that size, so its length bounds work;
|
|
50
|
+
// the tail still decides whether markup is closed, since the cut can land inside an element.
|
|
51
|
+
const tooLarge = text.length > MAX_CODE_LENGTH
|
|
52
|
+
const limited = tooLarge ? text.slice(0, MAX_CODE_LENGTH) : text
|
|
53
|
+
const trimmed = limited.trim()
|
|
54
|
+
const tail = tooLarge ? text.slice(-STRUCTURE_TAIL) : ''
|
|
55
|
+
const kind = trimmed.length > 0 ? looksLikeCode(trimmed, tail) : null
|
|
56
|
+
if (!kind) return null
|
|
57
|
+
return tooLarge ? CODE_TOO_LARGE : kind
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The code a pasted text holds, or null when it is not code or is past the size a paste reads;
|
|
62
|
+
* `detectCode` says which of the two refused it.
|
|
63
|
+
*/
|
|
64
|
+
export function detectCodeText(text: string): PasteCodeKind | null {
|
|
65
|
+
const detection = detectCode(text)
|
|
66
|
+
return detection === CODE_TOO_LARGE ? null : detection
|
|
67
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export {
|
|
2
|
+
CODE_TOO_LARGE,
|
|
3
|
+
detectCode,
|
|
4
|
+
detectCodeText,
|
|
5
|
+
MAX_CODE_LENGTH,
|
|
6
|
+
type CodeDetection,
|
|
7
|
+
type PasteCodeKind
|
|
8
|
+
} from './detect'
|
|
9
|
+
export { codeStylesheet, type CodeStylesheet } from './stylesheet'
|
|
10
|
+
export {
|
|
11
|
+
codeLayerCount,
|
|
12
|
+
readCodeDocument,
|
|
13
|
+
type ReadCodeOptions,
|
|
14
|
+
type ReadCodeReport,
|
|
15
|
+
type ReadCodeResult
|
|
16
|
+
} from './read'
|
|
17
|
+
export { bindCodeTokens, codeLayerNodes, type TokenBindingReport } from './tokens'
|