@pairdraw/core 0.20.0 → 0.21.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/noise/render.js +1 -1
- package/dist/canvas/noise/render.js.map +1 -1
- package/dist/canvas/noise/shader.d.ts +6 -3
- package/dist/canvas/noise/shader.d.ts.map +1 -1
- package/dist/canvas/noise/shader.js +12 -7
- package/dist/canvas/noise/shader.js.map +1 -1
- package/dist/canvas/noise/tile.d.ts.map +1 -1
- package/dist/canvas/noise/tile.js +2 -1
- package/dist/canvas/noise/tile.js.map +1 -1
- package/dist/canvas/renderer/colors.d.ts +20 -5
- package/dist/canvas/renderer/colors.d.ts.map +1 -1
- package/dist/canvas/renderer/colors.js +48 -42
- package/dist/canvas/renderer/colors.js.map +1 -1
- package/dist/canvas/renderer/document-surface.d.ts +25 -0
- package/dist/canvas/renderer/document-surface.d.ts.map +1 -0
- package/dist/canvas/renderer/document-surface.js +46 -0
- package/dist/canvas/renderer/document-surface.js.map +1 -0
- package/dist/canvas/renderer/fonts.d.ts.map +1 -1
- package/dist/canvas/renderer/fonts.js +6 -4
- package/dist/canvas/renderer/fonts.js.map +1 -1
- package/dist/canvas/renderer/lifecycle.js +4 -3
- package/dist/canvas/renderer/lifecycle.js.map +1 -1
- package/dist/canvas/renderer/methods.d.ts.map +1 -1
- package/dist/canvas/renderer/methods.js +1 -0
- package/dist/canvas/renderer/methods.js.map +1 -1
- package/dist/canvas/renderer/pipeline.d.ts.map +1 -1
- package/dist/canvas/renderer/pipeline.js +23 -2
- package/dist/canvas/renderer/pipeline.js.map +1 -1
- package/dist/canvas/renderer/retained-backing.d.ts.map +1 -1
- package/dist/canvas/renderer/retained-backing.js +2 -1
- package/dist/canvas/renderer/retained-backing.js.map +1 -1
- package/dist/canvas/renderer/tiles/surface-pool.d.ts.map +1 -1
- package/dist/canvas/renderer/tiles/surface-pool.js +2 -7
- package/dist/canvas/renderer/tiles/surface-pool.js.map +1 -1
- package/dist/canvas/renderer.d.ts +20 -2
- package/dist/canvas/renderer.d.ts.map +1 -1
- package/dist/canvas/renderer.js +28 -4
- package/dist/canvas/renderer.js.map +1 -1
- package/dist/canvas/scene.d.ts.map +1 -1
- package/dist/canvas/scene.js +4 -3
- package/dist/canvas/scene.js.map +1 -1
- package/dist/canvas/shaders/compile.d.ts +3 -1
- package/dist/canvas/shaders/compile.d.ts.map +1 -1
- package/dist/canvas/shaders/compile.js +12 -3
- package/dist/canvas/shaders/compile.js.map +1 -1
- package/dist/canvas/shaders/draw.d.ts.map +1 -1
- package/dist/canvas/shaders/draw.js +10 -3
- package/dist/canvas/shaders/draw.js.map +1 -1
- package/dist/canvas/shaders/effect.d.ts.map +1 -1
- package/dist/canvas/shaders/effect.js +8 -17
- package/dist/canvas/shaders/effect.js.map +1 -1
- package/dist/canvas/shadows/shape.d.ts.map +1 -1
- package/dist/canvas/shadows/shape.js +4 -2
- package/dist/canvas/shadows/shape.js.map +1 -1
- package/dist/canvas/shadows.d.ts.map +1 -1
- package/dist/canvas/shadows.js +4 -2
- package/dist/canvas/shadows.js.map +1 -1
- package/dist/canvas/text/decorations.d.ts +2 -2
- package/dist/canvas/text/decorations.d.ts.map +1 -1
- package/dist/canvas/text/decorations.js +5 -5
- package/dist/canvas/text/decorations.js.map +1 -1
- package/dist/canvas/text/index.js +1 -1
- package/dist/canvas/text/index.js.map +1 -1
- package/dist/canvas/text/paragraph/index.d.ts +2 -2
- package/dist/canvas/text/paragraph/index.d.ts.map +1 -1
- package/dist/canvas/text/paragraph/index.js +16 -5
- package/dist/canvas/text/paragraph/index.js.map +1 -1
- package/dist/canvas/text/renderer.d.ts +2 -1
- package/dist/canvas/text/renderer.d.ts.map +1 -1
- package/dist/canvas/text/shape.js +4 -4
- package/dist/canvas/text/shape.js.map +1 -1
- package/dist/canvas/texture.d.ts.map +1 -1
- package/dist/canvas/texture.js +2 -1
- package/dist/canvas/texture.js.map +1 -1
- package/dist/design-memory/rules.js +1 -1
- package/dist/editor/clipboard/assets.d.ts.map +1 -1
- package/dist/editor/clipboard/assets.js +2 -2
- package/dist/editor/clipboard/assets.js.map +1 -1
- package/dist/editor/clipboard/component-matches.d.ts +13 -0
- package/dist/editor/clipboard/component-matches.d.ts.map +1 -0
- package/dist/editor/clipboard/component-matches.js +50 -0
- package/dist/editor/clipboard/component-matches.js.map +1 -0
- package/dist/editor/clipboard/dependencies.d.ts +7 -0
- package/dist/editor/clipboard/dependencies.d.ts.map +1 -1
- package/dist/editor/clipboard/dependencies.js +5 -0
- package/dist/editor/clipboard/dependencies.js.map +1 -1
- package/dist/editor/clipboard/export.js +2 -2
- package/dist/editor/clipboard/export.js.map +1 -1
- package/dist/editor/clipboard.d.ts.map +1 -1
- package/dist/editor/clipboard.js +48 -19
- package/dist/editor/clipboard.js.map +1 -1
- package/dist/editor/components/properties.d.ts.map +1 -1
- package/dist/editor/components/properties.js +3 -3
- package/dist/editor/components/properties.js.map +1 -1
- package/dist/editor/eyedropper.d.ts +1 -1
- package/dist/editor/eyedropper.d.ts.map +1 -1
- package/dist/editor/eyedropper.js +6 -3
- package/dist/editor/eyedropper.js.map +1 -1
- package/dist/editor/history/atomic-tool.d.ts.map +1 -1
- package/dist/editor/history/atomic-tool.js +3 -2
- package/dist/editor/history/atomic-tool.js.map +1 -1
- package/dist/editor/shapes/pencil.js +1 -1
- package/dist/editor/structure/state.d.ts.map +1 -1
- package/dist/editor/structure/state.js +2 -2
- package/dist/editor/structure/state.js.map +1 -1
- package/dist/editor/text.d.ts.map +1 -1
- package/dist/editor/text.js +2 -2
- package/dist/editor/text.js.map +1 -1
- package/dist/editor/variables.js +3 -3
- package/dist/editor/variables.js.map +1 -1
- package/dist/figma-api/fresh-read.d.ts +15 -0
- package/dist/figma-api/fresh-read.d.ts.map +1 -0
- package/dist/figma-api/fresh-read.js +54 -0
- package/dist/figma-api/fresh-read.js.map +1 -0
- package/dist/figma-api/graph-ref.d.ts +9 -0
- package/dist/figma-api/graph-ref.d.ts.map +1 -0
- package/dist/figma-api/graph-ref.js +14 -0
- package/dist/figma-api/graph-ref.js.map +1 -0
- package/dist/figma-api/index.d.ts +6 -1
- package/dist/figma-api/index.d.ts.map +1 -1
- package/dist/figma-api/index.js +12 -5
- package/dist/figma-api/index.js.map +1 -1
- package/dist/figma-api/pending-layout.d.ts +3 -3
- package/dist/figma-api/pending-layout.d.ts.map +1 -1
- package/dist/figma-api/pending-layout.js +7 -3
- package/dist/figma-api/pending-layout.js.map +1 -1
- package/dist/figma-api/pending-sync.d.ts +1 -1
- package/dist/figma-api/pending-sync.d.ts.map +1 -1
- package/dist/figma-api/pending-sync.js +3 -1
- package/dist/figma-api/pending-sync.js.map +1 -1
- package/dist/figma-api/proxy.d.ts.map +1 -1
- package/dist/figma-api/proxy.js +3 -2
- package/dist/figma-api/proxy.js.map +1 -1
- package/dist/figma-api/reactions.d.ts +20 -4
- package/dist/figma-api/reactions.d.ts.map +1 -1
- package/dist/figma-api/reactions.js +49 -3
- package/dist/figma-api/reactions.js.map +1 -1
- package/dist/figma-api/variables/index.d.ts.map +1 -1
- package/dist/figma-api/variables/index.js +2 -2
- package/dist/figma-api/variables/index.js.map +1 -1
- package/dist/io/formats/design-tokens/css/known.js +1 -1
- package/dist/io/formats/design-tokens/css/known.js.map +1 -1
- package/dist/io/formats/design-tokens/css/read.d.ts +3 -1
- package/dist/io/formats/design-tokens/css/read.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/css/read.js +11 -5
- package/dist/io/formats/design-tokens/css/read.js.map +1 -1
- package/dist/io/formats/design-tokens/css/sync.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/css/sync.js +17 -4
- package/dist/io/formats/design-tokens/css/sync.js.map +1 -1
- package/dist/io/formats/design-tokens/css/values.d.ts +6 -5
- package/dist/io/formats/design-tokens/css/values.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/css/values.js +24 -8
- package/dist/io/formats/design-tokens/css/values.js.map +1 -1
- package/dist/io/formats/design-tokens/decode.d.ts +7 -6
- package/dist/io/formats/design-tokens/decode.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/decode.js +13 -12
- package/dist/io/formats/design-tokens/decode.js.map +1 -1
- package/dist/io/formats/design-tokens/export.js +3 -3
- package/dist/io/formats/design-tokens/export.js.map +1 -1
- package/dist/io/formats/design-tokens/plan/index.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/plan/index.js +4 -3
- package/dist/io/formats/design-tokens/plan/index.js.map +1 -1
- package/dist/io/formats/design-tokens/plan/styles.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/plan/styles.js +9 -9
- package/dist/io/formats/design-tokens/plan/styles.js.map +1 -1
- package/dist/io/formats/design-tokens/styles.d.ts +4 -4
- package/dist/io/formats/design-tokens/styles.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/styles.js +7 -7
- package/dist/io/formats/design-tokens/styles.js.map +1 -1
- package/dist/io/formats/design-tokens/sync/drift.js +2 -2
- package/dist/io/formats/design-tokens/sync/drift.js.map +1 -1
- package/dist/io/formats/design-tokens/values.d.ts +10 -5
- package/dist/io/formats/design-tokens/values.d.ts.map +1 -1
- package/dist/io/formats/design-tokens/values.js +13 -7
- package/dist/io/formats/design-tokens/values.js.map +1 -1
- package/dist/io/formats/drawio/label.js +1 -1
- package/dist/io/formats/drawio/paint.js +1 -1
- package/dist/io/formats/drawio/warnings.d.ts +17 -2
- package/dist/io/formats/drawio/warnings.d.ts.map +1 -1
- package/dist/io/formats/drawio/warnings.js +15 -8
- package/dist/io/formats/drawio/warnings.js.map +1 -1
- package/dist/io/formats/fig/export/index.d.ts.map +1 -1
- package/dist/io/formats/fig/export/index.js +15 -3
- package/dist/io/formats/fig/export/index.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 +2 -1
- package/dist/io/formats/fig/export/patch/index.js.map +1 -1
- package/dist/io/formats/fig/export/setup.d.ts +7 -2
- package/dist/io/formats/fig/export/setup.d.ts.map +1 -1
- package/dist/io/formats/fig/export/setup.js +12 -13
- 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 +9 -7
- package/dist/io/formats/fig/export/variables.js.map +1 -1
- package/dist/io/formats/html/index.d.ts +1 -0
- package/dist/io/formats/html/index.d.ts.map +1 -1
- package/dist/io/formats/html/index.js +5 -3
- package/dist/io/formats/html/index.js.map +1 -1
- package/dist/io/formats/html/vectors.js +1 -0
- package/dist/io/formats/html/vectors.js.map +1 -1
- package/dist/io/formats/mermaid/layers.js +2 -2
- package/dist/io/formats/mermaid/layers.js.map +1 -1
- package/dist/io/formats/mermaid/styles.js +1 -1
- package/dist/io/formats/pdf/export.d.ts.map +1 -1
- package/dist/io/formats/pdf/export.js +1 -0
- package/dist/io/formats/pdf/export.js.map +1 -1
- package/dist/io/formats/pdf/prepare.d.ts +4 -4
- package/dist/io/formats/pdf/prepare.d.ts.map +1 -1
- package/dist/io/formats/pdf/prepare.js +2 -2
- package/dist/io/formats/pdf/prepare.js.map +1 -1
- package/dist/io/formats/pen/index.d.ts.map +1 -1
- package/dist/io/formats/pen/index.js +13 -2
- package/dist/io/formats/pen/index.js.map +1 -1
- package/dist/io/formats/pptx/style.js +1 -1
- package/dist/io/formats/raster/render.d.ts +1 -1
- package/dist/io/formats/raster/render.d.ts.map +1 -1
- package/dist/io/formats/raster/render.js +9 -4
- package/dist/io/formats/raster/render.js.map +1 -1
- package/dist/io/formats/svg/defs.d.ts +6 -3
- package/dist/io/formats/svg/defs.d.ts.map +1 -1
- package/dist/io/formats/svg/defs.js +12 -11
- package/dist/io/formats/svg/defs.js.map +1 -1
- package/dist/io/formats/svg/effects.js +2 -2
- package/dist/io/formats/svg/effects.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 +4 -2
- package/dist/io/formats/svg/export.js.map +1 -1
- package/dist/io/formats/svg/filter.d.ts +4 -1
- package/dist/io/formats/svg/filter.d.ts.map +1 -1
- package/dist/io/formats/svg/filter.js +6 -2
- package/dist/io/formats/svg/filter.js.map +1 -1
- package/dist/io/formats/svg/grain.js +1 -1
- package/dist/io/formats/svg/grain.js.map +1 -1
- package/dist/io/formats/svg/import.d.ts +4 -2
- package/dist/io/formats/svg/import.d.ts.map +1 -1
- package/dist/io/formats/svg/import.js +2 -1
- package/dist/io/formats/svg/import.js.map +1 -1
- package/dist/io/formats/svg/text/export.d.ts.map +1 -1
- package/dist/io/formats/svg/text/export.js +8 -8
- package/dist/io/formats/svg/text/export.js.map +1 -1
- package/dist/io/formats/svg/text/layout.js +2 -2
- package/dist/io/formats/svg/text/layout.js.map +1 -1
- package/dist/io/formats.d.ts.map +1 -1
- package/dist/io/formats.js +11 -4
- package/dist/io/formats.js.map +1 -1
- package/dist/io/index.d.ts +2 -2
- package/dist/io/subgraph.d.ts.map +1 -1
- package/dist/io/subgraph.js +1 -1
- package/dist/io/subgraph.js.map +1 -1
- package/dist/io/types.d.ts +12 -3
- package/dist/io/types.d.ts.map +1 -1
- package/dist/kiwi/fig/session/options.d.ts +3 -0
- package/dist/kiwi/fig/session/options.d.ts.map +1 -1
- package/dist/kiwi/fig/session/options.js +4 -0
- package/dist/kiwi/fig/session/options.js.map +1 -1
- package/dist/layout/yoga-helpers.d.ts +2 -1
- package/dist/layout/yoga-helpers.d.ts.map +1 -1
- package/dist/layout/yoga-helpers.js +7 -1
- package/dist/layout/yoga-helpers.js.map +1 -1
- package/dist/layout.js +24 -1
- package/dist/layout.js.map +1 -1
- package/dist/lint/fixes.js +1 -1
- package/dist/lint/linter.js +2 -2
- package/dist/lint/linter.js.map +1 -1
- package/dist/pairdraw-api/comments.d.ts +4 -1
- package/dist/pairdraw-api/comments.d.ts.map +1 -1
- package/dist/pairdraw-api/comments.js +5 -0
- package/dist/pairdraw-api/comments.js.map +1 -1
- package/dist/pairdraw-api/index.d.ts +3 -3
- package/dist/pairdraw-api/index.d.ts.map +1 -1
- package/dist/pairdraw-api/index.js +5 -5
- package/dist/pairdraw-api/index.js.map +1 -1
- package/dist/pairdraw-api/nodes.d.ts +1 -1
- package/dist/prototype/scene.js +1 -1
- package/dist/rpc/analyze-commands.js +1 -1
- package/dist/rpc/read-commands.d.ts +2 -2
- package/dist/rpc/read-commands.js +3 -3
- package/dist/rpc/read-commands.js.map +1 -1
- package/dist/rpc/variables-command.js +2 -2
- package/dist/rpc/variables-command.js.map +1 -1
- package/dist/text/font/provider.d.ts +15 -0
- package/dist/text/font/provider.d.ts.map +1 -0
- package/dist/text/font/provider.js +18 -0
- package/dist/text/font/provider.js.map +1 -0
- package/dist/text/font/readiness.d.ts +32 -0
- package/dist/text/font/readiness.d.ts.map +1 -0
- package/dist/text/font/{status.js → readiness.js} +8 -4
- package/dist/text/font/readiness.js.map +1 -0
- package/dist/text/index.d.ts +4 -3
- package/dist/text/index.js +4 -3
- package/dist/text/prepare.d.ts +9 -4
- package/dist/text/prepare.d.ts.map +1 -1
- package/dist/text/prepare.js +9 -4
- package/dist/text/prepare.js.map +1 -1
- package/dist/tools/analyze/colors.js +1 -1
- package/dist/tools/analyze/responsive/index.js +7 -18
- package/dist/tools/analyze/responsive/index.js.map +1 -1
- package/dist/tools/analyze/responsive/widths.d.ts +27 -0
- package/dist/tools/analyze/responsive/widths.d.ts.map +1 -0
- package/dist/tools/analyze/responsive/widths.js +49 -0
- package/dist/tools/analyze/responsive/widths.js.map +1 -0
- package/dist/tools/analyze.d.ts +2 -1
- package/dist/tools/analyze.js +2 -1
- package/dist/tools/codegen/tokens.d.ts.map +1 -1
- package/dist/tools/codegen/tokens.js +2 -2
- package/dist/tools/codegen/tokens.js.map +1 -1
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js +2 -2
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/component-catalog.d.ts.map +1 -1
- package/dist/tools/component-catalog.js +5 -3
- package/dist/tools/component-catalog.js.map +1 -1
- package/dist/tools/create/basic.js +1 -1
- package/dist/tools/create/behaviours.js +1 -1
- package/dist/tools/create/html.d.ts.map +1 -1
- package/dist/tools/create/html.js +1 -3
- package/dist/tools/create/html.js.map +1 -1
- package/dist/tools/create/icons.js +2 -2
- package/dist/tools/create/icons.js.map +1 -1
- package/dist/tools/create/mermaid.js +1 -1
- package/dist/tools/create/render.js +1 -1
- package/dist/tools/create/svg.js +5 -2
- package/dist/tools/create/svg.js.map +1 -1
- package/dist/tools/create/vector.js +3 -3
- package/dist/tools/create/vector.js.map +1 -1
- package/dist/tools/css/shorthand.d.ts +20 -0
- package/dist/tools/css/shorthand.d.ts.map +1 -0
- package/dist/tools/css/shorthand.js +54 -0
- package/dist/tools/css/shorthand.js.map +1 -0
- package/dist/tools/describe/index.js +2 -2
- package/dist/tools/describe/index.js.map +1 -1
- package/dist/tools/describe/issues.js +1 -1
- package/dist/tools/html-host.d.ts.map +1 -1
- package/dist/tools/html-host.js +5 -3
- package/dist/tools/html-host.js.map +1 -1
- package/dist/tools/image-ai/apply.d.ts.map +1 -1
- package/dist/tools/image-ai/apply.js +1 -3
- package/dist/tools/image-ai/apply.js.map +1 -1
- package/dist/tools/image-ai/generate.js +1 -1
- package/dist/tools/image-ai/service.d.ts.map +1 -1
- package/dist/tools/image-ai/service.js +5 -3
- package/dist/tools/image-ai/service.js.map +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +2 -1
- package/dist/tools/modify/effects.js +1 -1
- package/dist/tools/modify/effects.js.map +1 -1
- package/dist/tools/modify/geometry.d.ts.map +1 -1
- package/dist/tools/modify/geometry.js +14 -3
- 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 +35 -8
- package/dist/tools/modify/layout.js.map +1 -1
- package/dist/tools/modify/matching.d.ts.map +1 -1
- package/dist/tools/modify/matching.js +10 -10
- 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 +57 -5
- package/dist/tools/modify/paint.js.map +1 -1
- package/dist/tools/modify/reactions.d.ts.map +1 -1
- package/dist/tools/modify/reactions.js +2 -2
- package/dist/tools/modify/reactions.js.map +1 -1
- package/dist/tools/modify/text.d.ts.map +1 -1
- package/dist/tools/modify/text.js +3 -3
- package/dist/tools/modify/text.js.map +1 -1
- package/dist/tools/prompts/codegen.js +1 -1
- package/dist/tools/prompts/codegen.js.map +1 -1
- package/dist/tools/read/css.d.ts +14 -0
- package/dist/tools/read/css.d.ts.map +1 -0
- package/dist/tools/read/css.js +306 -0
- package/dist/tools/read/css.js.map +1 -0
- package/dist/tools/read/libraries.js +1 -1
- package/dist/tools/read/reactions.js +1 -1
- package/dist/tools/read/reactions.js.map +1 -1
- package/dist/tools/read/space.d.ts.map +1 -1
- package/dist/tools/read/space.js +0 -2
- package/dist/tools/read/space.js.map +1 -1
- package/dist/tools/read.d.ts +2 -1
- package/dist/tools/read.js +2 -1
- package/dist/tools/registry/core.d.ts +1 -1
- package/dist/tools/registry/core.js +3 -1
- package/dist/tools/registry/core.js.map +1 -1
- package/dist/tools/schema.d.ts +6 -4
- package/dist/tools/schema.d.ts.map +1 -1
- package/dist/tools/schema.js +9 -5
- package/dist/tools/schema.js.map +1 -1
- package/dist/tools/script/host.d.ts.map +1 -1
- package/dist/tools/script/host.js +5 -3
- package/dist/tools/script/host.js.map +1 -1
- package/dist/tools/variables/collections.js +1 -1
- package/dist/tools/variables/collections.js.map +1 -1
- package/dist/tools/variables/values.d.ts.map +1 -1
- package/dist/tools/variables/values.js +4 -4
- package/dist/tools/variables/values.js.map +1 -1
- package/dist/tools/vector/vectorize.d.ts.map +1 -1
- package/dist/tools/vector/vectorize.js +6 -4
- package/dist/tools/vector/vectorize.js.map +1 -1
- package/dist/tools/video-host.d.ts.map +1 -1
- package/dist/tools/video-host.js +5 -3
- package/dist/tools/video-host.js.map +1 -1
- package/dist/vector/vectorize/svg/gradients.d.ts +2 -2
- package/dist/vector/vectorize/svg/gradients.d.ts.map +1 -1
- package/dist/vector/vectorize/svg/gradients.js +5 -5
- package/dist/vector/vectorize/svg/gradients.js.map +1 -1
- package/dist/vector/vectorize/svg/to-vectors.d.ts +3 -1
- package/dist/vector/vectorize/svg/to-vectors.d.ts.map +1 -1
- package/dist/vector/vectorize/svg/to-vectors.js +13 -12
- package/dist/vector/vectorize/svg/to-vectors.js.map +1 -1
- package/package.json +9 -9
- package/src/canvas/noise/render.ts +1 -1
- package/src/canvas/noise/shader.ts +13 -5
- package/src/canvas/noise/tile.ts +2 -1
- package/src/canvas/renderer/colors.ts +76 -50
- package/src/canvas/renderer/document-surface.ts +53 -0
- package/src/canvas/renderer/fonts.ts +6 -4
- package/src/canvas/renderer/lifecycle.ts +4 -4
- package/src/canvas/renderer/methods.ts +1 -0
- package/src/canvas/renderer/pipeline.ts +21 -3
- package/src/canvas/renderer/retained-backing.ts +2 -1
- package/src/canvas/renderer/tiles/surface-pool.ts +9 -7
- package/src/canvas/renderer.ts +36 -11
- package/src/canvas/scene.ts +4 -3
- package/src/canvas/shaders/compile.ts +14 -3
- package/src/canvas/shaders/draw.ts +11 -4
- package/src/canvas/shaders/effect.ts +8 -19
- package/src/canvas/shadows/shape.ts +4 -2
- package/src/canvas/shadows.ts +5 -2
- package/src/canvas/text/decorations.ts +15 -5
- package/src/canvas/text/index.ts +9 -1
- package/src/canvas/text/paragraph/index.ts +16 -6
- package/src/canvas/text/renderer.ts +2 -1
- package/src/canvas/text/shape.ts +4 -4
- package/src/canvas/texture.ts +2 -1
- package/src/editor/clipboard/assets.ts +6 -2
- package/src/editor/clipboard/component-matches.ts +65 -0
- package/src/editor/clipboard/dependencies.ts +22 -1
- package/src/editor/clipboard/export.ts +2 -2
- package/src/editor/clipboard.ts +74 -20
- package/src/editor/components/properties.ts +3 -2
- package/src/editor/eyedropper.ts +14 -4
- package/src/editor/history/atomic-tool.ts +3 -2
- package/src/editor/structure/state.ts +2 -1
- package/src/editor/text.ts +2 -1
- package/src/editor/variables.ts +3 -3
- package/src/figma-api/fresh-read.ts +57 -0
- package/src/figma-api/graph-ref.ts +13 -0
- package/src/figma-api/index.ts +12 -4
- package/src/figma-api/pending-layout.ts +7 -3
- package/src/figma-api/pending-sync.ts +4 -1
- package/src/figma-api/proxy.ts +2 -1
- package/src/figma-api/reactions.ts +91 -10
- package/src/figma-api/variables/index.ts +5 -4
- package/src/io/formats/design-tokens/css/known.ts +1 -1
- package/src/io/formats/design-tokens/css/read.ts +20 -7
- package/src/io/formats/design-tokens/css/sync.ts +9 -4
- package/src/io/formats/design-tokens/css/values.ts +37 -9
- package/src/io/formats/design-tokens/decode.ts +17 -12
- package/src/io/formats/design-tokens/export.ts +3 -3
- package/src/io/formats/design-tokens/plan/index.ts +6 -5
- package/src/io/formats/design-tokens/plan/styles.ts +37 -10
- package/src/io/formats/design-tokens/styles.ts +10 -7
- package/src/io/formats/design-tokens/sync/drift.ts +6 -4
- package/src/io/formats/design-tokens/values.ts +15 -8
- package/src/io/formats/drawio/warnings.ts +28 -9
- package/src/io/formats/fig/export/index.ts +36 -3
- package/src/io/formats/fig/export/patch/index.ts +4 -1
- package/src/io/formats/fig/export/setup.ts +25 -15
- package/src/io/formats/fig/export/variables.ts +17 -6
- package/src/io/formats/html/index.ts +9 -3
- package/src/io/formats/html/vectors.ts +1 -0
- package/src/io/formats/mermaid/layers.ts +2 -2
- package/src/io/formats/pdf/export.ts +1 -0
- package/src/io/formats/pdf/prepare.ts +6 -6
- package/src/io/formats/pen/index.ts +15 -4
- package/src/io/formats/raster/render.ts +12 -4
- package/src/io/formats/svg/defs.ts +26 -14
- package/src/io/formats/svg/effects.ts +2 -2
- package/src/io/formats/svg/export.ts +17 -3
- package/src/io/formats/svg/filter.ts +12 -2
- package/src/io/formats/svg/grain.ts +1 -1
- package/src/io/formats/svg/import.ts +6 -3
- package/src/io/formats/svg/text/export.ts +10 -8
- package/src/io/formats/svg/text/layout.ts +2 -2
- package/src/io/formats.ts +18 -5
- package/src/io/index.ts +1 -0
- package/src/io/subgraph.ts +4 -1
- package/src/io/types.ts +10 -0
- package/src/kiwi/fig/session/options.ts +4 -1
- package/src/layout/yoga-helpers.ts +8 -0
- package/src/layout.ts +47 -1
- package/src/lint/linter.ts +1 -1
- package/src/pairdraw-api/comments.ts +6 -0
- package/src/pairdraw-api/index.ts +7 -9
- package/src/rpc/read-commands.ts +4 -4
- package/src/rpc/variables-command.ts +2 -2
- package/src/text/font/provider.ts +26 -0
- package/src/text/font/{status.ts → readiness.ts} +13 -9
- package/src/text/index.ts +2 -1
- package/src/text/prepare.ts +9 -4
- package/src/tools/analyze/responsive/index.ts +8 -15
- package/src/tools/analyze/responsive/widths.ts +63 -0
- package/src/tools/analyze.ts +2 -0
- package/src/tools/codegen/tokens.ts +4 -2
- package/src/tools/comments.ts +6 -4
- package/src/tools/component-catalog.ts +5 -3
- package/src/tools/create/html.ts +0 -3
- package/src/tools/create/icons.ts +1 -1
- package/src/tools/create/svg.ts +4 -1
- package/src/tools/create/vector.ts +2 -2
- package/src/tools/css/shorthand.ts +64 -0
- package/src/tools/describe/index.ts +2 -8
- package/src/tools/html-host.ts +5 -3
- package/src/tools/image-ai/apply.ts +0 -2
- package/src/tools/image-ai/service.ts +5 -3
- package/src/tools/index.ts +2 -0
- package/src/tools/modify/effects.ts +1 -1
- package/src/tools/modify/geometry.ts +16 -3
- package/src/tools/modify/layout.ts +47 -13
- package/src/tools/modify/matching.ts +14 -11
- package/src/tools/modify/paint.ts +85 -5
- package/src/tools/modify/reactions.ts +3 -2
- package/src/tools/modify/text.ts +15 -11
- package/src/tools/prompts/codegen.md +2 -1
- package/src/tools/read/css.ts +365 -0
- package/src/tools/read/reactions.ts +3 -2
- package/src/tools/read/space.ts +0 -2
- package/src/tools/read.ts +1 -0
- package/src/tools/registry/core.ts +3 -2
- package/src/tools/schema.ts +14 -5
- package/src/tools/script/host.ts +6 -3
- package/src/tools/variables/collections.ts +1 -1
- package/src/tools/variables/values.ts +16 -5
- package/src/tools/vector/vectorize.ts +10 -4
- package/src/tools/video-host.ts +5 -3
- package/src/vector/vectorize/svg/gradients.ts +8 -5
- package/src/vector/vectorize/svg/to-vectors.ts +48 -14
- package/dist/text/font/status.d.ts +0 -28
- package/dist/text/font/status.d.ts.map +0 -1
- package/dist/text/font/status.js.map +0 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appendFigRecordBytes,
|
|
3
|
+
compressFigDataSync,
|
|
4
|
+
figRecordBytes,
|
|
5
|
+
readFigArchiveParts,
|
|
6
|
+
renameFigArchive
|
|
7
|
+
} from '@pairdraw/fig'
|
|
2
8
|
import {
|
|
3
9
|
nameImagesForFigma,
|
|
4
10
|
placeSlotContent,
|
|
@@ -8,6 +14,7 @@ import {
|
|
|
8
14
|
import { initCodec } from '@pairdraw/kiwi/fig/codec'
|
|
9
15
|
import type { NodeChange } from '@pairdraw/kiwi/fig/codec'
|
|
10
16
|
import { loadFigDataCompressor, type FigFileKind } from '@pairdraw/kiwi/fig/container'
|
|
17
|
+
import { guidToString } from '@pairdraw/kiwi/fig/guid'
|
|
11
18
|
import type { SceneGraph } from '@pairdraw/scene-graph'
|
|
12
19
|
import { fractionalPosition } from '@pairdraw/scene-graph/order-keys'
|
|
13
20
|
import type { GUID } from '@pairdraw/scene-graph/primitives'
|
|
@@ -16,6 +23,7 @@ import { withFigExportRuntime } from '#core/canvas/text/shape'
|
|
|
16
23
|
import { IS_BROWSER, IS_TAURI } from '#core/constants'
|
|
17
24
|
import { figCompressionLevel } from '#core/io/formats/fig/compression'
|
|
18
25
|
import { cloneSceneGraphForFigExport } from '#core/kiwi/fig/parse/transfer'
|
|
26
|
+
import { figArchive } from '#core/kiwi/fig/session/archive/access'
|
|
19
27
|
import {
|
|
20
28
|
hasPendingReaderPages,
|
|
21
29
|
populateFigInternalPages,
|
|
@@ -139,7 +147,12 @@ async function writeFigFile(
|
|
|
139
147
|
graph = cloneSceneGraphForFigExport(sourceGraph)
|
|
140
148
|
populateReaderExport(sourceGraph, graph)
|
|
141
149
|
}
|
|
142
|
-
|
|
150
|
+
// The archive's records the document never read go back as the file saved them; a source
|
|
151
|
+
// without an archive was never saved, so it has none.
|
|
152
|
+
const archived = await figArchive(sourceGraph)?.info()
|
|
153
|
+
const setup = await prepareFigExport(graph, runtime, {
|
|
154
|
+
unreadVariables: archived?.unreadVariables
|
|
155
|
+
})
|
|
143
156
|
const { compiled, schemaDeflated } = exportSchema(graph)
|
|
144
157
|
const { canvasEntries, internalCanvasGuid, localIdCounter, blobs } = setup
|
|
145
158
|
const nodeChanges: KiwiNodeChange[] = [setup.documentNc]
|
|
@@ -190,7 +203,27 @@ async function writeFigFile(
|
|
|
190
203
|
}
|
|
191
204
|
|
|
192
205
|
const imageNames = nameImagesForFigma(nodeChanges, graph.images)
|
|
193
|
-
|
|
206
|
+
let kiwiData = compiled.encodeMessage(msg)
|
|
207
|
+
// A record of a type the pinned schema does not model cannot be encoded again, so its bytes
|
|
208
|
+
// come from the archive as the file saved them.
|
|
209
|
+
const unread = archived?.unreadVariables ?? []
|
|
210
|
+
if (unread.length > 0) {
|
|
211
|
+
const original = await figArchive(sourceGraph)?.original()
|
|
212
|
+
if (original) {
|
|
213
|
+
const parts = readFigArchiveParts(
|
|
214
|
+
original.buffer.slice(
|
|
215
|
+
original.byteOffset,
|
|
216
|
+
original.byteOffset + original.byteLength
|
|
217
|
+
) as ArrayBuffer
|
|
218
|
+
)
|
|
219
|
+
const ids = unread.flatMap(({ record }) => (record.guid ? [guidToString(record.guid)] : []))
|
|
220
|
+
kiwiData = appendFigRecordBytes(
|
|
221
|
+
parts.schemaDeflated,
|
|
222
|
+
kiwiData,
|
|
223
|
+
figRecordBytes(parts.schemaDeflated, parts.dataRaw, ids)
|
|
224
|
+
)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
194
227
|
const extras = await figFileExtras(graph, imageNames, options)
|
|
195
228
|
|
|
196
229
|
const version = graph.figKiwiVersion ?? undefined
|
|
@@ -333,6 +333,7 @@ function baselineWriter(info: FigArchiveRecordInfo): RecordWriter {
|
|
|
333
333
|
const written = writeRecords(setup, plan)
|
|
334
334
|
if (!written) return null
|
|
335
335
|
const internalPage = graph.getPages(true).find((page) => page.internalOnly)
|
|
336
|
+
// The baseline holds the document's own records; an unread one is not in the graph.
|
|
336
337
|
return [documentRecord(setup, info), ...written, ...variableRecords(setup, !!internalPage)]
|
|
337
338
|
}
|
|
338
339
|
}
|
|
@@ -352,7 +353,8 @@ async function buildPatch(
|
|
|
352
353
|
blobs: Array.from({ length: info.blobCount }, () => new Uint8Array(0)),
|
|
353
354
|
recordOwners: archived.byGuid,
|
|
354
355
|
archiveRecordIds: info.recordIds,
|
|
355
|
-
archiveResourceIds: changes.resourceIds
|
|
356
|
+
archiveResourceIds: changes.resourceIds,
|
|
357
|
+
unreadVariables: info.unreadVariables
|
|
356
358
|
})
|
|
357
359
|
const records = writeRecords(setup, plan)
|
|
358
360
|
if (!records) return null
|
|
@@ -363,6 +365,7 @@ async function buildPatch(
|
|
|
363
365
|
const internalPage = graph.getPages(true).find((page) => page.internalOnly)
|
|
364
366
|
const internal = setup.canvasEntries.find((entry) => entry.page.internalOnly)
|
|
365
367
|
const canvasWritten = records.some((record) => record === internal?.canvasNc)
|
|
368
|
+
// Unread records stay in the archive's bytes, so the patch never encodes them.
|
|
366
369
|
for (const record of variableRecords(setup, !!internalPage || canvasWritten))
|
|
367
370
|
records.push(record)
|
|
368
371
|
}
|
|
@@ -2,7 +2,12 @@ import type { CanvasKit } from 'canvaskit-wasm'
|
|
|
2
2
|
import { deflateSync, inflateSync } from 'fflate'
|
|
3
3
|
import { toUint8Array } from 'js-base64'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
figArchiveMetaJSON,
|
|
7
|
+
figFontEntries,
|
|
8
|
+
figFontsManifest,
|
|
9
|
+
type FigUnreadVariable
|
|
10
|
+
} from '@pairdraw/fig'
|
|
6
11
|
import {
|
|
7
12
|
buildComponentPropIndex,
|
|
8
13
|
exportCanvasGuides,
|
|
@@ -155,15 +160,14 @@ function assignOwnLayerGuids(
|
|
|
155
160
|
|
|
156
161
|
/**
|
|
157
162
|
* The first local ID the counter can mint in sessions 0 and 1: past every saved GUID and every
|
|
158
|
-
* ID that layers, collections, modes, variables and component properties are
|
|
163
|
+
* ID that layers, collections, modes, variables (deleted ones too) and component properties are
|
|
164
|
+
* saved under.
|
|
159
165
|
*/
|
|
160
|
-
/** The first local ID above every GUID the graph's layers, variables, and properties claim. */
|
|
161
166
|
export function firstUnclaimedLocalId(graph: SceneGraph, propertyIds: readonly string[]): number {
|
|
162
|
-
const ids = [...propertyIds]
|
|
167
|
+
const ids = [...propertyIds, ...graph.variables.keys()]
|
|
163
168
|
for (const node of graph.nodes.values()) ids.push(node.source.id || node.id)
|
|
164
169
|
for (const [collectionId, collection] of graph.variableCollections) {
|
|
165
170
|
ids.push(collectionId, ...collection.modes.map((mode) => mode.modeId))
|
|
166
|
-
ids.push(...collection.variableIds)
|
|
167
171
|
}
|
|
168
172
|
let last = 0
|
|
169
173
|
for (const id of ids) {
|
|
@@ -272,7 +276,7 @@ function buildCanvasEntries(
|
|
|
272
276
|
nodeIdToGuid: Map<string, GUID>,
|
|
273
277
|
assignedGuidValues: Set<string>,
|
|
274
278
|
sourceOwners: ReadonlyMap<string, string>,
|
|
275
|
-
|
|
279
|
+
keepsUnreadRecords: boolean
|
|
276
280
|
): { canvasEntries: CanvasExportEntry[]; internalCanvasGuid: GUID | null } {
|
|
277
281
|
const canvasEntries: CanvasExportEntry[] = []
|
|
278
282
|
let internalCanvasGuid: GUID | null = null
|
|
@@ -284,7 +288,7 @@ function buildCanvasEntries(
|
|
|
284
288
|
const canvasGuid = (() => {
|
|
285
289
|
if (!page.source.id) {
|
|
286
290
|
return (
|
|
287
|
-
|
|
291
|
+
ownGuid(page.id, sourceOwners, assignedGuidValues) ?? {
|
|
288
292
|
sessionID: 0,
|
|
289
293
|
localID: localIdCounter.value++
|
|
290
294
|
}
|
|
@@ -319,10 +323,8 @@ function buildCanvasEntries(
|
|
|
319
323
|
|
|
320
324
|
const hasSharedStyles = [...graph.nodes.values()].some((node) => node.sharedStyleType !== null)
|
|
321
325
|
const hasSlotContent = [...graph.nodes.values()].some((node) => ownsSlotContent(graph, node))
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
internalCanvasGuid === null
|
|
325
|
-
) {
|
|
326
|
+
const hasVariables = graph.variableCollections.size > 0 || keepsUnreadRecords
|
|
327
|
+
if ((hasVariables || hasSharedStyles || hasSlotContent) && internalCanvasGuid === null) {
|
|
326
328
|
internalCanvasGuid = { sessionID: 0, localID: localIdCounter.value++ }
|
|
327
329
|
assignedGuidValues.add(`${internalCanvasGuid.sessionID}:${internalCanvasGuid.localID}`)
|
|
328
330
|
canvasEntries.push({
|
|
@@ -383,6 +385,8 @@ export interface FigExportSetup {
|
|
|
383
385
|
componentPropertyDefinitionsById: ReturnType<typeof buildComponentPropIndex>
|
|
384
386
|
pluginDataOverrides: ReadonlyMap<string, PluginDataEntry[]>
|
|
385
387
|
recordOwners?: ReadonlyMap<string, string>
|
|
388
|
+
/** Variable records the document never read, written back as the archive saved them. */
|
|
389
|
+
unreadVariables: readonly FigUnreadVariable[]
|
|
386
390
|
}
|
|
387
391
|
|
|
388
392
|
export interface FigExportSetupOptions {
|
|
@@ -400,6 +404,8 @@ export interface FigExportSetupOptions {
|
|
|
400
404
|
recordOwners?: ReadonlyMap<string, string>
|
|
401
405
|
/** Writing into an archive: the variables, collections and modes it holds keep their GUIDs. */
|
|
402
406
|
archiveResourceIds?: ReadonlySet<string>
|
|
407
|
+
/** Records the document never read, which the write keeps, so nothing new takes their GUIDs. */
|
|
408
|
+
unreadVariables?: readonly FigUnreadVariable[]
|
|
403
409
|
}
|
|
404
410
|
|
|
405
411
|
/**
|
|
@@ -426,6 +432,9 @@ export async function prepareFigExport(
|
|
|
426
432
|
// Reserve the document GUID to prevent imported nodes with source.id "0:0"
|
|
427
433
|
// from reusing the document's own GUID slot.
|
|
428
434
|
assignedGuidValues.add(`${docGuid.sessionID}:${docGuid.localID}`)
|
|
435
|
+
// No layer takes an unread record's GUID either: the save writes that record back.
|
|
436
|
+
for (const { record } of options.unreadVariables ?? [])
|
|
437
|
+
if (record.guid) assignedGuidValues.add(`${record.guid.sessionID}:${record.guid.localID}`)
|
|
429
438
|
const varIdToGuid = new Map<string, GUID>()
|
|
430
439
|
const modeIdToGuid = new Map<string, GUID>()
|
|
431
440
|
const propertyIdToGuid = new Map<string, GUID>()
|
|
@@ -434,10 +443,10 @@ export async function prepareFigExport(
|
|
|
434
443
|
const sourceOwners = layerSourceOwners(graph)
|
|
435
444
|
const archiveRecordIds = new Set(options.archiveRecordIds)
|
|
436
445
|
const propertyIds = collectComponentPropertyIds(graph)
|
|
437
|
-
// Before any canvas, variable or layer takes a counter GUID, so none collides.
|
|
446
|
+
// Before any canvas, variable or layer takes a counter GUID, so none collides with a reserved one.
|
|
438
447
|
localIdCounter.value = Math.max(
|
|
439
448
|
localIdCounter.value,
|
|
440
|
-
firstUnclaimedLocalId(graph, propertyIds),
|
|
449
|
+
firstUnclaimedLocalId(graph, [...propertyIds, ...assignedGuidValues]),
|
|
441
450
|
options.nextLocalId ?? 0
|
|
442
451
|
)
|
|
443
452
|
|
|
@@ -449,7 +458,7 @@ export async function prepareFigExport(
|
|
|
449
458
|
nodeIdToGuid,
|
|
450
459
|
assignedGuidValues,
|
|
451
460
|
sourceOwners,
|
|
452
|
-
|
|
461
|
+
(options.unreadVariables?.length ?? 0) > 0
|
|
453
462
|
)
|
|
454
463
|
// Archive records keep their GUIDs: claim them before any copy that kept one can.
|
|
455
464
|
for (const [guid, nodeId] of options.recordOwners ?? []) {
|
|
@@ -505,7 +514,8 @@ export async function prepareFigExport(
|
|
|
505
514
|
blobIndexByHex: new Map(),
|
|
506
515
|
componentPropertyDefinitionsById: buildComponentPropIndex(graph),
|
|
507
516
|
pluginDataOverrides,
|
|
508
|
-
recordOwners: options.recordOwners
|
|
517
|
+
recordOwners: options.recordOwners,
|
|
518
|
+
unreadVariables: options.unreadVariables ?? []
|
|
509
519
|
}
|
|
510
520
|
}
|
|
511
521
|
|
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
} from '@pairdraw/scene-graph'
|
|
23
23
|
import { fractionalPosition, orderKeyBetween } from '@pairdraw/scene-graph/order-keys'
|
|
24
24
|
import {
|
|
25
|
+
deletedVariablesOf,
|
|
25
26
|
isUnsupportedVariableValue,
|
|
26
27
|
foldFormula,
|
|
27
28
|
formulaValueType,
|
|
@@ -80,7 +81,11 @@ export function assignVariableGuids(
|
|
|
80
81
|
)
|
|
81
82
|
modeIdToGuid.set(mode.modeId, modeGuid)
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
+
// Deleted variables are written too, so they keep their GUIDs like the listed ones.
|
|
85
|
+
for (const varId of [
|
|
86
|
+
...col.variableIds,
|
|
87
|
+
...deletedVariablesOf(graph, colId).map((item) => item.id)
|
|
88
|
+
]) {
|
|
84
89
|
const varGuid = assignVariableGuid(
|
|
85
90
|
varId,
|
|
86
91
|
localIdCounter,
|
|
@@ -265,11 +270,16 @@ export function appendVariableNodeChanges(
|
|
|
265
270
|
})),
|
|
266
271
|
pluginData: collectionPluginDataNodeChange(collection, modeKey),
|
|
267
272
|
key: collection.key,
|
|
268
|
-
version: collection.version
|
|
273
|
+
version: collection.version,
|
|
274
|
+
...(collection.deleted ? { isSoftDeleted: true } : {})
|
|
269
275
|
})
|
|
270
|
-
for
|
|
271
|
-
|
|
272
|
-
|
|
276
|
+
// Deleted variables follow the listed ones: the file keeps them for the layers bound to them.
|
|
277
|
+
const variables = [
|
|
278
|
+
...collection.variableIds.flatMap((id) => graph.variables.get(id) ?? []),
|
|
279
|
+
...deletedVariablesOf(graph, collection.id)
|
|
280
|
+
]
|
|
281
|
+
for (const variable of variables) {
|
|
282
|
+
const id = variable.id
|
|
273
283
|
changes.push({
|
|
274
284
|
guid: ids.get(id) ?? stringToGuid(id),
|
|
275
285
|
parentIndex: { guid: parent, position: nextPosition() },
|
|
@@ -291,7 +301,8 @@ export function appendVariableNodeChanges(
|
|
|
291
301
|
},
|
|
292
302
|
...variableMetadataNodeChange(variable, modeKey),
|
|
293
303
|
key: variable.key,
|
|
294
|
-
version: variable.version
|
|
304
|
+
version: variable.version,
|
|
305
|
+
...(variable.deleted ? { isSoftDeleted: true } : {})
|
|
295
306
|
})
|
|
296
307
|
}
|
|
297
308
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { filename } from 'pathe/utils'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
designNodeDraws,
|
|
4
5
|
exportHTMLBundle,
|
|
5
6
|
sceneNodesToDesignDocument,
|
|
6
7
|
type DesignDocument
|
|
@@ -44,8 +45,9 @@ export async function renderNodesToHTML(
|
|
|
44
45
|
options: HTMLExportOptions = {},
|
|
45
46
|
fileName?: string,
|
|
46
47
|
context?: IOContext
|
|
47
|
-
): Promise<{ html: string; assets: ExportAsset[] }> {
|
|
48
|
-
const
|
|
48
|
+
): Promise<{ html: string; assets: ExportAsset[]; draws: boolean }> {
|
|
49
|
+
const projected = await designDocument(graph, nodeIds, options, context)
|
|
50
|
+
const bundle = await exportHTMLBundle(projected, {
|
|
49
51
|
html: options.html,
|
|
50
52
|
style: options.style,
|
|
51
53
|
assets: options.assets,
|
|
@@ -59,5 +61,9 @@ export async function renderNodesToHTML(
|
|
|
59
61
|
})
|
|
60
62
|
const page = bundle.files.find((file) => file.path === bundle.entrypoint)
|
|
61
63
|
if (typeof page?.content !== 'string') throw new Error('HTML export produced no page')
|
|
62
|
-
return {
|
|
64
|
+
return {
|
|
65
|
+
html: page.content,
|
|
66
|
+
assets: bundle.files.filter((file) => file !== page),
|
|
67
|
+
draws: projected.children.some(designNodeDraws)
|
|
68
|
+
}
|
|
63
69
|
}
|
|
@@ -42,6 +42,7 @@ export const vectorElement = (
|
|
|
42
42
|
const idPrefix = `${idPart(node.id)}-`
|
|
43
43
|
const icon = readIcon(node)
|
|
44
44
|
const drawn = renderNodeSVGElement(graph, node, {
|
|
45
|
+
documentColorSpace: graph.documentColorSpace,
|
|
45
46
|
idPrefix,
|
|
46
47
|
colorSpace: graph.documentColorSpace,
|
|
47
48
|
tint: icon ? readIconTint : undefined,
|
|
@@ -18,7 +18,7 @@ import { applyArrangement, type ArrangePlacement } from '#core/layout/arrange/ap
|
|
|
18
18
|
import { arrangeBoxes, type ArrangeInput } from '#core/layout/arrange/boxes'
|
|
19
19
|
import { connectorLabelSize } from '#core/layout/arrange/routes'
|
|
20
20
|
import { shapeWithTextWidthFor } from '#core/layout/shape-with-text'
|
|
21
|
-
import {
|
|
21
|
+
import { resolveFontReadiness } from '#core/text/prepare'
|
|
22
22
|
|
|
23
23
|
import { figJamShape } from './shapes'
|
|
24
24
|
import { declarationsFor, readStyle, type FlowStyle } from './styles'
|
|
@@ -247,7 +247,7 @@ export async function addFlowchart(
|
|
|
247
247
|
created = added
|
|
248
248
|
// Shapes grow to their labels, and connector labels take their size, before the layout reads
|
|
249
249
|
// them, measured in the fonts they are drawn in.
|
|
250
|
-
await
|
|
250
|
+
await resolveFontReadiness(graph, added)
|
|
251
251
|
for (const node of chart.nodes) builder.fitWidth(node)
|
|
252
252
|
layoutAuthoredNodes(graph, added)
|
|
253
253
|
const enclosing = enclosingSubgraphs(chart)
|
|
@@ -13,8 +13,8 @@ import { shownText } from '#core/text/case'
|
|
|
13
13
|
import { EMOJI_METRICS_FAMILY } from '#core/text/emoji'
|
|
14
14
|
import { ARABIC_CHARACTER } from '#core/text/fallbacks'
|
|
15
15
|
import { fontManager } from '#core/text/font/manager'
|
|
16
|
-
import type {
|
|
17
|
-
import {
|
|
16
|
+
import type { FontReadiness } from '#core/text/font/readiness'
|
|
17
|
+
import { resolveFontReadiness } from '#core/text/prepare'
|
|
18
18
|
import { collectGraphFontRequirements } from '#core/text/requirements/collect'
|
|
19
19
|
|
|
20
20
|
import type { PDFFontFace } from './fonts'
|
|
@@ -28,9 +28,9 @@ import type { PDFPageSpec } from './plan'
|
|
|
28
28
|
export async function preparePDFFonts(
|
|
29
29
|
graph: SceneGraph,
|
|
30
30
|
specs: readonly PDFPageSpec[]
|
|
31
|
-
): Promise<
|
|
31
|
+
): Promise<FontReadiness> {
|
|
32
32
|
const nodeIds = specs.flatMap((spec) => spec.nodeIds)
|
|
33
|
-
return
|
|
33
|
+
return resolveFontReadiness(graph, nodeIds, await pdfWrittenCharacters(graph, nodeIds))
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -71,7 +71,7 @@ export function readPDFPages(graph: SceneGraph, pageIds?: readonly string[]): vo
|
|
|
71
71
|
export async function preparePagesForPDF(
|
|
72
72
|
graph: SceneGraph,
|
|
73
73
|
specs: readonly PDFPageSpec[]
|
|
74
|
-
): Promise<
|
|
74
|
+
): Promise<FontReadiness> {
|
|
75
75
|
const status = await preparePDFFonts(graph, specs)
|
|
76
76
|
graph.applyDerivedLayoutDuring(() => {
|
|
77
77
|
for (const spec of specs) computeAllLayouts(graph, spec.pageId)
|
|
@@ -80,7 +80,7 @@ export async function preparePagesForPDF(
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/** The faces the pages' text uses, with the files the canvas draws them from. */
|
|
83
|
-
export function pdfFontFaces(status:
|
|
83
|
+
export function pdfFontFaces(status: FontReadiness): PDFFontFace[] {
|
|
84
84
|
return status.faces.map((face) => {
|
|
85
85
|
const data =
|
|
86
86
|
face.status === 'available' ? fontManager.loadedData(face.family, face.style) : null
|
|
@@ -9,11 +9,17 @@ import {
|
|
|
9
9
|
withUsedImports,
|
|
10
10
|
writePenDocument,
|
|
11
11
|
type PenIconRequest,
|
|
12
|
-
type PenIconSource
|
|
12
|
+
type PenIconSource,
|
|
13
|
+
type PenWriteWarning
|
|
13
14
|
} from '@pairdraw/pen'
|
|
14
15
|
|
|
15
16
|
import { defaultIcons, drawIcon, type IconData, type IconProvider } from '#core/icons'
|
|
16
|
-
import type {
|
|
17
|
+
import type {
|
|
18
|
+
ExportResult,
|
|
19
|
+
IOFormatAdapter,
|
|
20
|
+
ReadDocumentInput,
|
|
21
|
+
ReadDocumentWarning
|
|
22
|
+
} from '#core/io/types'
|
|
17
23
|
import { layoutAuthoredNodes } from '#core/layout'
|
|
18
24
|
|
|
19
25
|
import { loadPenFonts } from './fonts'
|
|
@@ -208,12 +214,17 @@ export const penFormat: IOFormatAdapter<'pen'> = {
|
|
|
208
214
|
: { graph, sourceFormat: 'pen' }
|
|
209
215
|
},
|
|
210
216
|
async writeDocument(graph) {
|
|
211
|
-
|
|
217
|
+
const warnings: string[] = []
|
|
218
|
+
const warningDetails: PenWriteWarning[] = []
|
|
219
|
+
const data = writePenDocument(graph, { warnings, warningDetails })
|
|
220
|
+
const written: ExportResult = {
|
|
212
221
|
format: 'pen',
|
|
213
222
|
mimeType: 'application/json',
|
|
214
223
|
extension: 'pen',
|
|
215
|
-
data
|
|
224
|
+
data,
|
|
216
225
|
encoding: 'utf8'
|
|
217
226
|
}
|
|
227
|
+
if (warningDetails.length === 0) return written
|
|
228
|
+
return { ...written, warnings, warningDetails }
|
|
218
229
|
}
|
|
219
230
|
}
|
|
@@ -8,6 +8,7 @@ import Matrix, { type Mat3 } from '@pairdraw/scene-graph/matrix'
|
|
|
8
8
|
import { resolvedVariableModes } from '@pairdraw/scene-graph/variables'
|
|
9
9
|
|
|
10
10
|
import type { SkiaRenderer } from '#core/canvas'
|
|
11
|
+
import { skColorSpace } from '#core/canvas/renderer/colors'
|
|
11
12
|
import { getPageColor } from '#core/figma-api/page-backgrounds'
|
|
12
13
|
import { extractExportGraph, findPageId } from '#core/io/subgraph'
|
|
13
14
|
|
|
@@ -148,6 +149,8 @@ function renderToSurface(
|
|
|
148
149
|
setup: (canvas: Canvas) => void,
|
|
149
150
|
trimTransparent = false
|
|
150
151
|
): Uint8Array<ArrayBuffer> | null {
|
|
152
|
+
renderer.useDocumentColorSpace(renderGraph.documentColorSpace)
|
|
153
|
+
const documentSpace = skColorSpace(ck, renderGraph.documentColorSpace)
|
|
151
154
|
const renderScale = exportRenderScale(width, height)
|
|
152
155
|
const renderWidth = width * renderScale
|
|
153
156
|
const renderHeight = height * renderScale
|
|
@@ -156,7 +159,7 @@ function renderToSurface(
|
|
|
156
159
|
{
|
|
157
160
|
alphaType: ck.AlphaType.Premul,
|
|
158
161
|
colorType: ck.ColorType.RGBA_8888,
|
|
159
|
-
colorSpace:
|
|
162
|
+
colorSpace: documentSpace,
|
|
160
163
|
width: renderWidth,
|
|
161
164
|
height: renderHeight
|
|
162
165
|
},
|
|
@@ -198,7 +201,7 @@ function renderToSurface(
|
|
|
198
201
|
{
|
|
199
202
|
alphaType: ck.AlphaType.Premul,
|
|
200
203
|
colorType: ck.ColorType.RGBA_8888,
|
|
201
|
-
colorSpace:
|
|
204
|
+
colorSpace: documentSpace,
|
|
202
205
|
width,
|
|
203
206
|
height
|
|
204
207
|
},
|
|
@@ -441,9 +444,12 @@ export function renderThumbnail(
|
|
|
441
444
|
if (!frame) return null
|
|
442
445
|
const { bounds, scale, width: pixelW, height: pixelH } = frame
|
|
443
446
|
// The page's own background, which the editor's page colour matches only while it is open.
|
|
444
|
-
const
|
|
447
|
+
const stored = getPageColor(graph.getNode(pageId))
|
|
445
448
|
|
|
446
449
|
return renderToSurface(ck, renderer, graph, pageId, pixelW, pixelH, format, quality, (canvas) => {
|
|
450
|
+
// The page's color is stored in the document's profile, and `renderToSurface` has just told
|
|
451
|
+
// the renderer which that is; converting before that call would use the previous document's.
|
|
452
|
+
const background = renderer.renderColor(stored)
|
|
447
453
|
canvas.clear(ck.Color4f(background.r, background.g, background.b, 1))
|
|
448
454
|
canvas.translate(-bounds.minX * scale, -bounds.minY * scale)
|
|
449
455
|
canvas.scale(scale, scale)
|
|
@@ -463,7 +469,9 @@ export function drawRegionToImage(
|
|
|
463
469
|
const pixelH = Math.max(1, Math.round((bounds.maxY - bounds.minY) * scale))
|
|
464
470
|
if (!graph.getNode(pageId) || !Number.isFinite(pixelW * pixelH)) return null
|
|
465
471
|
return renderToSurface(ck, renderer, graph, pageId, pixelW, pixelH, 'PNG', 100, (canvas) => {
|
|
466
|
-
|
|
472
|
+
// `renderToSurface` has just set the renderer's profile, so the page color converts in it.
|
|
473
|
+
const pageBackground = renderer.renderColor(renderer.pageColor)
|
|
474
|
+
canvas.clear(ck.Color4f(pageBackground.r, pageBackground.g, pageBackground.b, 1))
|
|
467
475
|
canvas.scale(scale, scale)
|
|
468
476
|
canvas.translate(-bounds.minX, -bounds.minY)
|
|
469
477
|
})
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { fromUint8Array } from 'js-base64'
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
ColorProfile,
|
|
5
|
+
Fill,
|
|
6
|
+
FontVariation,
|
|
7
|
+
SceneGraph,
|
|
8
|
+
SceneNode
|
|
9
|
+
} from '@pairdraw/scene-graph'
|
|
4
10
|
import {
|
|
5
11
|
colorToHex,
|
|
6
|
-
|
|
12
|
+
colorToProfileCSS,
|
|
13
|
+
convertColor,
|
|
7
14
|
getDefaultRenderColorSpace,
|
|
8
15
|
type RenderColorSpace
|
|
9
16
|
} from '@pairdraw/scene-graph/color'
|
|
@@ -41,7 +48,10 @@ export interface SVGExportContext {
|
|
|
41
48
|
defs: SVGNode[]
|
|
42
49
|
defIdCounter: number
|
|
43
50
|
graph: SceneGraph
|
|
51
|
+
/** The space the export writes colors in. */
|
|
44
52
|
colorSpace: RenderColorSpace
|
|
53
|
+
/** The document's profile: the space its stored color components are in. */
|
|
54
|
+
documentColorSpace: ColorProfile
|
|
45
55
|
/** Starts every def id, so SVGs inlined on one page cannot reference each other's defs. */
|
|
46
56
|
idPrefix?: string
|
|
47
57
|
/** Paints drawn in `currentColor`, such as an icon's tinted paths, so CSS `color` sets them. */
|
|
@@ -60,12 +70,13 @@ export function nextDefId(ctx: SVGExportContext, prefix: string): string {
|
|
|
60
70
|
export function formatColor(
|
|
61
71
|
color: Color,
|
|
62
72
|
opacity = 1,
|
|
63
|
-
colorSpace: RenderColorSpace = getDefaultRenderColorSpace()
|
|
73
|
+
colorSpace: RenderColorSpace = getDefaultRenderColorSpace(),
|
|
74
|
+
documentSpace: ColorProfile = 'srgb'
|
|
64
75
|
): string {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
const painted = { ...color, a: color.a * opacity }
|
|
77
|
+
// Stored components sit in the document's profile; write the color in the profile it is shown in.
|
|
78
|
+
if (colorSpace === 'display-p3') return colorToProfileCSS(painted, documentSpace, 'display-p3')
|
|
79
|
+
const alphaColor = convertColor(painted, documentSpace, 'srgb')
|
|
69
80
|
// Hex has no alpha. Stops and shadows already emit theirs; solid fills use `solidFillOpacity`.
|
|
70
81
|
return colorToHex(alphaColor)
|
|
71
82
|
}
|
|
@@ -78,12 +89,13 @@ export function formatColor(
|
|
|
78
89
|
export function formatSolidColor(
|
|
79
90
|
color: Color,
|
|
80
91
|
opacity: number,
|
|
81
|
-
colorSpace: RenderColorSpace
|
|
92
|
+
colorSpace: RenderColorSpace,
|
|
93
|
+
documentSpace: ColorProfile = 'srgb'
|
|
82
94
|
): string {
|
|
83
95
|
if (colorSpace === 'display-p3') {
|
|
84
|
-
return formatColor({ ...color, a: 1 }, round(opacity), colorSpace)
|
|
96
|
+
return formatColor({ ...color, a: 1 }, round(opacity), colorSpace, documentSpace)
|
|
85
97
|
}
|
|
86
|
-
return formatColor(color, 1, colorSpace)
|
|
98
|
+
return formatColor(color, 1, colorSpace, documentSpace)
|
|
87
99
|
}
|
|
88
100
|
|
|
89
101
|
/**
|
|
@@ -113,7 +125,7 @@ function createGradientDef(
|
|
|
113
125
|
const stopNodes = stops.map((s) =>
|
|
114
126
|
svg('stop', {
|
|
115
127
|
offset: `${round(s.position * 100)}%`,
|
|
116
|
-
'stop-color': formatColor(s.color, 1, ctx.colorSpace),
|
|
128
|
+
'stop-color': formatColor(s.color, 1, ctx.colorSpace, ctx.documentColorSpace),
|
|
117
129
|
'stop-opacity': s.color.a < 1 ? round(s.color.a) : undefined
|
|
118
130
|
})
|
|
119
131
|
)
|
|
@@ -219,18 +231,18 @@ export function resolveFill(fill: Fill, node: SceneNode, ctx: SVGExportContext):
|
|
|
219
231
|
if (!fill.visible) return null
|
|
220
232
|
|
|
221
233
|
if (fill.type === 'SOLID') {
|
|
222
|
-
return formatSolidColor(fill.color, fill.opacity, ctx.colorSpace)
|
|
234
|
+
return formatSolidColor(fill.color, fill.opacity, ctx.colorSpace, ctx.documentColorSpace)
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
// SVG has no mesh element: a mesh exports its own color, as `.fig` records carry it.
|
|
226
238
|
if (fill.type === 'MESH') {
|
|
227
|
-
return formatSolidColor(fill.color, fill.opacity, ctx.colorSpace)
|
|
239
|
+
return formatSolidColor(fill.color, fill.opacity, ctx.colorSpace, ctx.documentColorSpace)
|
|
228
240
|
}
|
|
229
241
|
|
|
230
242
|
// The canvas draws a pattern, noise or custom paint as its own colour when the format has no
|
|
231
243
|
// element for it, so the export must not drop the layer.
|
|
232
244
|
if (fill.type === 'PATTERN' || fill.type === 'NOISE' || fill.type === 'CUSTOM') {
|
|
233
|
-
return formatSolidColor(fill.color, fill.opacity, ctx.colorSpace)
|
|
245
|
+
return formatSolidColor(fill.color, fill.opacity, ctx.colorSpace, ctx.documentColorSpace)
|
|
234
246
|
}
|
|
235
247
|
|
|
236
248
|
if (fill.type.startsWith('GRADIENT')) {
|
|
@@ -61,7 +61,7 @@ export function createFilterDef(
|
|
|
61
61
|
dx: round(effect.offset.x),
|
|
62
62
|
dy: round(effect.offset.y),
|
|
63
63
|
stdDeviation: round(effect.radius / 2),
|
|
64
|
-
'flood-color': floodColor(effect.color, ctx.colorSpace),
|
|
64
|
+
'flood-color': floodColor(effect.color, ctx.colorSpace, ctx.documentColorSpace),
|
|
65
65
|
'flood-opacity': round(effect.color.a),
|
|
66
66
|
result: dropped
|
|
67
67
|
})
|
|
@@ -87,7 +87,7 @@ export function createFilterDef(
|
|
|
87
87
|
})
|
|
88
88
|
filter.push('feComposite', { in: shape, in2: offset, operator: 'out', result: inverted })
|
|
89
89
|
filter.push('feFlood', {
|
|
90
|
-
'flood-color': floodColor(effect.color, ctx.colorSpace),
|
|
90
|
+
'flood-color': floodColor(effect.color, ctx.colorSpace, ctx.documentColorSpace),
|
|
91
91
|
'flood-opacity': round(effect.color.a),
|
|
92
92
|
result: shadow
|
|
93
93
|
})
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ColorProfile,
|
|
3
|
+
Fill,
|
|
4
|
+
SceneGraph,
|
|
5
|
+
SceneNode,
|
|
6
|
+
Stroke,
|
|
7
|
+
VectorNetwork
|
|
8
|
+
} from '@pairdraw/scene-graph'
|
|
1
9
|
import type { RenderColorSpace } from '@pairdraw/scene-graph/color'
|
|
2
10
|
|
|
3
11
|
import { normalizeDashPattern } from '#core/canvas/strokes'
|
|
@@ -29,7 +37,6 @@ import {
|
|
|
29
37
|
|
|
30
38
|
export { geometryBlobToSVGPath, nodeOutlinePath, type OutlineNode } from './paths'
|
|
31
39
|
|
|
32
|
-
import type { SceneGraph, SceneNode, Fill, Stroke, VectorNetwork } from '@pairdraw/scene-graph'
|
|
33
40
|
import { looseSegments, regionSVGPaths } from '@pairdraw/scene-graph/vector-network'
|
|
34
41
|
|
|
35
42
|
import type { BooleanPathResolver } from '#core/io/formats/boolean-path'
|
|
@@ -373,8 +380,9 @@ function buildSVGStrokeAttrs(
|
|
|
373
380
|
// viewer multiplies it by stroke-opacity; the canvas paints stroke.opacity alone.
|
|
374
381
|
stroke:
|
|
375
382
|
stroke.type === 'SOLID'
|
|
376
|
-
? formatSolidColor(stroke.color, 1, ctx.colorSpace)
|
|
377
|
-
: (resolveFill(stroke, node, ctx) ??
|
|
383
|
+
? formatSolidColor(stroke.color, 1, ctx.colorSpace, ctx.documentColorSpace)
|
|
384
|
+
: (resolveFill(stroke, node, ctx) ??
|
|
385
|
+
formatSolidColor(stroke.color, 1, ctx.colorSpace, ctx.documentColorSpace)),
|
|
378
386
|
'stroke-width': round(stroke.weight)
|
|
379
387
|
}
|
|
380
388
|
if (stroke.opacity < 1) attrs['stroke-opacity'] = round(stroke.opacity)
|
|
@@ -770,6 +778,8 @@ export interface SVGExportOptions {
|
|
|
770
778
|
xmlDeclaration?: boolean
|
|
771
779
|
/** Target export color space (default: srgb) */
|
|
772
780
|
colorSpace?: 'srgb' | 'display-p3'
|
|
781
|
+
/** The document's color profile; colors stored in it convert into `colorSpace`. */
|
|
782
|
+
documentColorSpace?: ColorProfile
|
|
773
783
|
/**
|
|
774
784
|
* Line breaks of text nodes as the editor laid them out, wraps included. Without them, only
|
|
775
785
|
* explicit newlines start a new baseline, which renderers that do not wrap SVG text keep.
|
|
@@ -805,6 +815,7 @@ export function renderNodesToSVG(
|
|
|
805
815
|
defIdCounter: 0,
|
|
806
816
|
graph,
|
|
807
817
|
colorSpace: options.colorSpace ?? 'srgb',
|
|
818
|
+
documentColorSpace: options.documentColorSpace ?? graph.documentColorSpace,
|
|
808
819
|
textLayout: options.textLayout,
|
|
809
820
|
fontAlias: options.fontAlias,
|
|
810
821
|
booleanPath: options.booleanPath
|
|
@@ -863,11 +874,13 @@ export function renderNodeSVGElement(
|
|
|
863
874
|
{
|
|
864
875
|
idPrefix,
|
|
865
876
|
colorSpace = 'srgb',
|
|
877
|
+
documentColorSpace,
|
|
866
878
|
tint,
|
|
867
879
|
booleanPath
|
|
868
880
|
}: Pick<SVGExportContext, 'tint' | 'booleanPath'> & {
|
|
869
881
|
idPrefix: string
|
|
870
882
|
colorSpace?: RenderColorSpace
|
|
883
|
+
documentColorSpace?: ColorProfile
|
|
871
884
|
}
|
|
872
885
|
): SVGNode | null {
|
|
873
886
|
const ctx: SVGExportContext = {
|
|
@@ -875,6 +888,7 @@ export function renderNodeSVGElement(
|
|
|
875
888
|
defIdCounter: 0,
|
|
876
889
|
graph,
|
|
877
890
|
colorSpace,
|
|
891
|
+
documentColorSpace: documentColorSpace ?? graph.documentColorSpace,
|
|
878
892
|
idPrefix,
|
|
879
893
|
tint,
|
|
880
894
|
booleanPath
|