@weasel-js/ui-canvas 0.0.0-stage → 2.0.0

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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -2
  3. package/dist/chunks/AnchorFields-Cam1xwpt.js +69 -0
  4. package/dist/chunks/AnchorFields-Cam1xwpt.js.map +1 -0
  5. package/dist/chunks/CharacterOptions-CSqKZvwS.js +295 -0
  6. package/dist/chunks/CharacterOptions-CSqKZvwS.js.map +1 -0
  7. package/dist/chunks/PlotDataPanel-uHdh4X0l.js +263 -0
  8. package/dist/chunks/PlotDataPanel-uHdh4X0l.js.map +1 -0
  9. package/dist/chunks/Rulers-hkPFdPkH.js +136 -0
  10. package/dist/chunks/Rulers-hkPFdPkH.js.map +1 -0
  11. package/dist/chunks/SceneGradientHandles-CcXyTVav.js +80 -0
  12. package/dist/chunks/SceneGradientHandles-CcXyTVav.js.map +1 -0
  13. package/dist/chunks/SceneLayerList-D2yc3eIk.js +185 -0
  14. package/dist/chunks/SceneLayerList-D2yc3eIk.js.map +1 -0
  15. package/dist/chunks/SelectionPanel-Dz6_c0rd.js +320 -0
  16. package/dist/chunks/SelectionPanel-Dz6_c0rd.js.map +1 -0
  17. package/dist/components/PlotDataPanel/PlotDataPanel.d.ts +19 -0
  18. package/dist/components/PlotDataPanel/PlotDataPanel.d.ts.map +1 -0
  19. package/dist/components/PlotDataPanel/PlotTableView.d.ts +14 -0
  20. package/dist/components/PlotDataPanel/PlotTableView.d.ts.map +1 -0
  21. package/dist/components/PlotDataPanel/index.d.ts +5 -0
  22. package/dist/components/PlotDataPanel/index.d.ts.map +1 -0
  23. package/dist/components/PlotDataPanel/index.js +3 -0
  24. package/dist/components/PlotDataPanel/rowIds.d.ts +17 -0
  25. package/dist/components/PlotDataPanel/rowIds.d.ts.map +1 -0
  26. package/dist/components/PlotDataPanel/valueControl.d.ts +13 -0
  27. package/dist/components/PlotDataPanel/valueControl.d.ts.map +1 -0
  28. package/dist/components/Rulers/Rulers.d.ts +18 -0
  29. package/dist/components/Rulers/Rulers.d.ts.map +1 -0
  30. package/dist/components/Rulers/index.d.ts +3 -0
  31. package/dist/components/Rulers/index.d.ts.map +1 -0
  32. package/dist/components/Rulers/index.js +3 -0
  33. package/dist/components/SceneGradientHandles/SceneGradientHandles.d.ts +41 -0
  34. package/dist/components/SceneGradientHandles/SceneGradientHandles.d.ts.map +1 -0
  35. package/dist/components/SceneGradientHandles/index.d.ts +2 -0
  36. package/dist/components/SceneGradientHandles/index.d.ts.map +1 -0
  37. package/dist/components/SceneGradientHandles/index.js +3 -0
  38. package/dist/components/SceneLayerList/index.d.ts +2 -0
  39. package/dist/components/SceneLayerList/index.d.ts.map +1 -0
  40. package/dist/components/SceneLayerList/index.js +3 -0
  41. package/dist/components/SceneLayerList/useSceneLayerList.d.ts +47 -0
  42. package/dist/components/SceneLayerList/useSceneLayerList.d.ts.map +1 -0
  43. package/dist/components/inspector/AnchorFields/AnchorFields.d.ts +34 -0
  44. package/dist/components/inspector/AnchorFields/AnchorFields.d.ts.map +1 -0
  45. package/dist/components/inspector/AnchorFields/index.d.ts +2 -0
  46. package/dist/components/inspector/AnchorFields/index.d.ts.map +1 -0
  47. package/dist/components/inspector/AnchorFields/index.js +3 -0
  48. package/dist/components/inspector/CharacterOptions/CharacterOptions.d.ts +27 -0
  49. package/dist/components/inspector/CharacterOptions/CharacterOptions.d.ts.map +1 -0
  50. package/dist/components/inspector/CharacterOptions/characterSchema.d.ts +169 -0
  51. package/dist/components/inspector/CharacterOptions/characterSchema.d.ts.map +1 -0
  52. package/dist/components/inspector/CharacterOptions/index.d.ts +4 -0
  53. package/dist/components/inspector/CharacterOptions/index.d.ts.map +1 -0
  54. package/dist/components/inspector/CharacterOptions/index.js +3 -0
  55. package/dist/components/inspector/SelectionPanel/SelectionPanel.d.ts +80 -0
  56. package/dist/components/inspector/SelectionPanel/SelectionPanel.d.ts.map +1 -0
  57. package/dist/components/inspector/SelectionPanel/commitLeaf.d.ts +23 -0
  58. package/dist/components/inspector/SelectionPanel/commitLeaf.d.ts.map +1 -0
  59. package/dist/components/inspector/SelectionPanel/declaredFields.d.ts +19 -0
  60. package/dist/components/inspector/SelectionPanel/declaredFields.d.ts.map +1 -0
  61. package/dist/components/inspector/SelectionPanel/index.d.ts +3 -0
  62. package/dist/components/inspector/SelectionPanel/index.d.ts.map +1 -0
  63. package/dist/components/inspector/SelectionPanel/index.js +3 -0
  64. package/dist/components/inspector/SelectionPanel/nodeModel.d.ts +14 -0
  65. package/dist/components/inspector/SelectionPanel/nodeModel.d.ts.map +1 -0
  66. package/dist/components/inspector/SelectionPanel/scopes.d.ts +7 -0
  67. package/dist/components/inspector/SelectionPanel/scopes.d.ts.map +1 -0
  68. package/dist/icons.gen.d.ts +3 -0
  69. package/dist/icons.gen.d.ts.map +1 -0
  70. package/dist/index.d.ts +8 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/dist/index.js +9 -0
  73. package/dist/kitIcons.d.ts +4 -0
  74. package/dist/kitIcons.d.ts.map +1 -0
  75. package/dist/kitIcons.js +18 -0
  76. package/dist/kitIcons.js.map +1 -0
  77. package/dist/style.css +119 -0
  78. package/package.json +85 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlotTableView.d.ts","sourceRoot":"","sources":["../../../src/components/PlotDataPanel/PlotTableView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,iBAAiB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAQ1C,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnE;AAID;0DAC0D;AAC1D,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,kBAAkB,GAAG,YAAY,CAoE5F"}
@@ -0,0 +1,5 @@
1
+ export { PlotDataPanel } from './PlotDataPanel.js';
2
+ export type { PlotDataPanelProps } from './PlotDataPanel.js';
3
+ export { PlotTableView } from './PlotTableView.js';
4
+ export type { PlotTableViewProps } from './PlotTableView.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PlotDataPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { n as PlotTableView, t as PlotDataPanel } from "../../chunks/PlotDataPanel-uHdh4X0l.js";
2
+
3
+ export { PlotDataPanel, PlotTableView };
@@ -0,0 +1,17 @@
1
+ import type { PlotData } from '@weasel-js/plot';
2
+ /** What an edit does to the rows' order: the ids before it, to the ids after. */
3
+ export type RowShift = (ids: readonly string[], fresh: () => string) => string[];
4
+ export declare const insertedAt: (at: number) => RowShift;
5
+ export declare const removedAt: (at: number) => RowShift;
6
+ export declare const movedTo: (from: number, to: number) => RowShift;
7
+ /**
8
+ * An id for each of a table's `count` rows that stays with its item through the panel's own inserts, removals and
9
+ * moves, so what a row holds open follows the item rather than its slot. `track` wraps an edit with what it does to
10
+ * the order; the order shifts only once `data` comes back as that edit made it, so an edit the host drops shifts
11
+ * nothing. A change from elsewhere keeps the ids by position.
12
+ */
13
+ export declare function useRowIds(data: PlotData, count: number): {
14
+ ids: readonly string[];
15
+ track: (change: (d: PlotData) => PlotData, shift: RowShift) => (d: PlotData) => PlotData;
16
+ };
17
+ //# sourceMappingURL=rowIds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rowIds.d.ts","sourceRoot":"","sources":["../../../src/components/PlotDataPanel/rowIds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,iFAAiF;AACjF,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,MAAM,KAAK,MAAM,EAAE,CAAC;AAEjF,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,KAAG,QAA4E,CAAC;AACrH,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,KAAG,QAAmD,CAAC;AAC3F,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,EAAE,IAAI,MAAM,KAAG,QAIlD,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG;IACxD,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,QAAQ,EAAE,KAAK,EAAE,QAAQ,KAAK,CAAC,CAAC,EAAE,QAAQ,KAAK,QAAQ,CAAC;CAC1F,CAmBA"}
@@ -0,0 +1,13 @@
1
+ /** A plot schema field or cell as the props of the params control that edits it. */
2
+ import type { PlotValue, PlotValueType } from '@weasel-js/plot';
3
+ import type { PropertyControlProps } from '@weasel-js/ui/components/Properties';
4
+ /** What a field or cell is, for its control: its type, whether it can be unset or only read, and its value. */
5
+ export interface ValueSpec {
6
+ type: PlotValueType;
7
+ value: PlotValue;
8
+ optional?: boolean;
9
+ readOnly?: boolean;
10
+ }
11
+ /** The props of the control for `spec`, reporting each committed value through `set`. */
12
+ export declare function valueControl(spec: ValueSpec, name: string, set: (value: PlotValue) => void): PropertyControlProps;
13
+ //# sourceMappingURL=valueControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueControl.d.ts","sourceRoot":"","sources":["../../../src/components/PlotDataPanel/valueControl.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,+GAA+G;AAC/G,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,oBAAoB,CAwBjH"}
@@ -0,0 +1,18 @@
1
+ import { type ReactElement } from 'react';
2
+ import type { Rulers as RulersModel } from '@weasel-js/guides';
3
+ /** Props for {@link Rulers}. */
4
+ export interface RulersProps {
5
+ /** What `createRulers` returned; its contribution installed on the canvas. */
6
+ rulers: RulersModel;
7
+ /** Additional class for the root, which covers its positioned container. */
8
+ className?: string;
9
+ }
10
+ /**
11
+ * Rulers along the top and left of a canvas, with a box in the corner naming
12
+ * the unit they read in: the chrome half of `createRulers` from
13
+ * `@weasel-js/guides`, whose contribution follows the view and takes the drags
14
+ * that place guides. Place it in the canvas's positioned container; it covers
15
+ * it and passes every pointer event through to the canvas below.
16
+ */
17
+ export declare function Rulers({ rulers, className }: RulersProps): ReactElement | null;
18
+ //# sourceMappingURL=Rulers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rulers.d.ts","sourceRoot":"","sources":["../../../src/components/Rulers/Rulers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,EAAc,MAAM,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAG3E,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,8EAA8E;IAC9E,MAAM,EAAE,WAAW,CAAC;IACpB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,WAAW,GAAG,YAAY,GAAG,IAAI,CAgC9E"}
@@ -0,0 +1,3 @@
1
+ export { Rulers } from './Rulers.js';
2
+ export type { RulersProps } from './Rulers.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Rulers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { t as Rulers } from "../../chunks/Rulers-hkPFdPkH.js";
2
+
3
+ export { Rulers };
@@ -0,0 +1,41 @@
1
+ import { type ReactElement, type RefObject } from 'react';
2
+ import { type Stroke, type Fill, type Inherit } from '@weasel-js/paint';
3
+ import type { View } from '@weasel-js/geom';
4
+ import { type RectPose, type Scene } from '@weasel-js/core';
5
+ import type { PaintSlot } from '@weasel-js/paint';
6
+ import '@weasel-js/paint-kinds/mesh';
7
+ /** What `SceneGradientHandles` reads off a node. Every field is optional, so
8
+ * any richer app data shape satisfies it. */
9
+ export interface PaintedNodeData {
10
+ fill?: Fill | Inherit | null;
11
+ stroke?: Stroke | Inherit | null;
12
+ }
13
+ /** Props for {@link SceneGradientHandles}. */
14
+ export interface SceneGradientHandlesProps<TData extends PaintedNodeData, TLayer extends string, TPose extends RectPose> {
15
+ scene: Scene<TData, TLayer, TPose>;
16
+ /** The element the overlay is positioned in. Must be the canvas's own box,
17
+ * or the handles land somewhere other than the paint. */
18
+ containerRef: RefObject<HTMLElement | null>;
19
+ /** The node whose paint is being edited, and the one a drag writes to, whatever the selection holds. */
20
+ nodeId: string | null | undefined;
21
+ /** Which of the node's two paints these handles move. */
22
+ slot: PaintSlot;
23
+ /** Current viewport; a thunk is re-read per projection. See
24
+ * `useNodeOverlayFrame`. */
25
+ view?: View | (() => View);
26
+ className?: string;
27
+ }
28
+ /**
29
+ * Scene-aware paint handles: on-canvas geometry handles for the gradient in
30
+ * one node's `fill` or `stroke` — `GradientHandles` for the three ramps,
31
+ * `MeshHandles` for a mesh — committed through the `setFill` / `setStroke`
32
+ * actions, on `nodeId` alone, as a single undo entry per drag. A canceled drag cancels the action,
33
+ * and so does unmounting the overlay while a handle is held.
34
+ *
35
+ * Renders nothing unless the targeted slot holds a gradient or a mesh. The
36
+ * node stores its gradient in `units: 'bounds'`, fractions of its own box; the
37
+ * handles get it resolved onto the box and every edit is normalized back on
38
+ * the way out.
39
+ */
40
+ export declare function SceneGradientHandles<TData extends PaintedNodeData, TLayer extends string, TPose extends RectPose>(props: SceneGradientHandlesProps<TData, TLayer, TPose>): ReactElement | null;
41
+ //# sourceMappingURL=SceneGradientHandles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SceneGradientHandles.d.ts","sourceRoot":"","sources":["../../../src/components/SceneGradientHandles/SceneGradientHandles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,EAA+E,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAErJ,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,KAAK,EACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,6BAA6B,CAAC;AAErC;8CAC8C;AAC9C,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAClC;AAED,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB,CACxC,KAAK,SAAS,eAAe,EAC7B,MAAM,SAAS,MAAM,EACrB,KAAK,SAAS,QAAQ;IAEtB,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC;8DAC0D;IAC1D,YAAY,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC5C,wGAAwG;IACxG,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,yDAAyD;IACzD,IAAI,EAAE,SAAS,CAAC;IAChB;iCAC6B;IAC7B,IAAI,CAAC,EAAE,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,SAAS,eAAe,EAC7B,MAAM,SAAS,MAAM,EACrB,KAAK,SAAS,QAAQ,EACtB,KAAK,EAAE,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,YAAY,GAAG,IAAI,CA+C7E"}
@@ -0,0 +1,2 @@
1
+ export { SceneGradientHandles, type SceneGradientHandlesProps, type PaintedNodeData, } from './SceneGradientHandles.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SceneGradientHandles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,GACrB,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { t as SceneGradientHandles } from "../../chunks/SceneGradientHandles-CcXyTVav.js";
2
+
3
+ export { SceneGradientHandles };
@@ -0,0 +1,2 @@
1
+ export { ANNOTATION_LAYER_ROW, type SceneLayerListAnnotations, type SceneLayerListProps, type UseSceneLayerListOptions, useSceneLayerList, } from './useSceneLayerList.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SceneLayerList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,KAAK,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,iBAAiB,GACjI,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { n as useSceneLayerList, t as ANNOTATION_LAYER_ROW } from "../../chunks/SceneLayerList-D2yc3eIk.js";
2
+
3
+ export { ANNOTATION_LAYER_ROW, useSceneLayerList };
@@ -0,0 +1,47 @@
1
+ import type { SelectionApi } from '@weasel-js/routing';
2
+ import type { Scene, SceneNode } from '@weasel-js/core';
3
+ import type { LayerListItem, LayerListProps } from '@weasel-js/ui/components/LayerList';
4
+ /** The id prefix of an annotation layer's own row, which holds its nodes. */
5
+ export declare const ANNOTATION_LAYER_ROW = "annotation-layer:";
6
+ /** How a {@link useSceneLayerList} list shows annotation layers. */
7
+ export interface SceneLayerListAnnotations {
8
+ /** The picked annotation node, which reads as a selected row. */
9
+ picked: string | null;
10
+ /** Selecting an annotation row picks it, leaving the content selection as it was; a selection holding no annotation picks `null`. */
11
+ pick(id: string | null): void;
12
+ /** The row label for annotation layer `layer`. Default: its id. */
13
+ labelOf?(layer: string): string;
14
+ }
15
+ /** Arguments for {@link useSceneLayerList}. */
16
+ export interface UseSceneLayerListOptions<TData, TLayer extends string, TPose> {
17
+ scene: Scene<TData, TLayer, TPose>;
18
+ selection: SelectionApi;
19
+ /** What the reorder op is dispatched against. Default: the scene itself, as one history entry. */
20
+ adapter?: object;
21
+ /** A row's content for a node: its label, a leading swatch or icon. Its
22
+ * `visible` and `locked` come from the node's own flags. */
23
+ itemFor: (node: SceneNode<TData, TLayer, TPose>) => Omit<LayerListItem, 'id' | 'children'>;
24
+ /** The data a rename to `label` writes, which makes rows renamable. The
25
+ * scene has no name of its own, so where one lives is the consumer's call. */
26
+ rename?: (node: SceneNode<TData, TLayer, TPose>, label: string) => TData;
27
+ /** Label of the reorder's history entry. Default `'Reorder'`. */
28
+ label?: string;
29
+ /** Given, each annotation layer (`isAnnotationLayer`) gets a row holding its
30
+ * nodes, marked not printed: the layer can be hidden and locked, its nodes
31
+ * picked and removed. Absent, annotations are left out of the list — the canvas still
32
+ * draws them. */
33
+ annotations?: SceneLayerListAnnotations;
34
+ }
35
+ /** The `<LayerList>` props `useSceneLayerList` answers. */
36
+ export type SceneLayerListProps = Required<Pick<LayerListProps, 'items' | 'selectedIds' | 'onSelectionChange' | 'onReorder' | 'canMove' | 'onVisibilityChange' | 'onLockChange'>> & Pick<LayerListProps, 'onRemove' | 'onRename'>;
37
+ /**
38
+ * The props that put a scene in a `<LayerList>`: a row per node, a container's
39
+ * children nested under it, the front-most at the top, selection read from and
40
+ * written to `selection`, a drag — among siblings or into another container —
41
+ * dispatched as a `MoveToIndexOp`, and each row's visibility and lock toggling
42
+ * the node's own (`setHidden` / `setLocked` ops), each click one undo step, an Alt-click's batch included.
43
+ * Annotation layers are left out unless `annotations` says how to show them;
44
+ * shown, an annotation moves only within its own layer's row.
45
+ */
46
+ export declare function useSceneLayerList<TData, TLayer extends string, TPose>(args: UseSceneLayerListOptions<TData, TLayer, TPose>): SceneLayerListProps;
47
+ //# sourceMappingURL=useSceneLayerList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSceneLayerList.d.ts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C;CACzC;AAoDD,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,aAAa,GAAG,mBAAmB,GAAG,WAAW,GAAG,SAAS,GAAG,oBAAoB,GAAG,cAAc,CAAC,CAAC,GAC7K,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAElD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,SAAS,MAAM,EAAE,KAAK,EACnE,IAAI,EAAE,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GACnD,mBAAmB,CAqHrB"}
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type AnchorFieldsApi } from '@weasel-js/core';
3
+ import type { UnitTable } from '@weasel-js/quantity';
4
+ /** How a lone anchor's handles read: as points, or as a turn and a reach from the anchor. */
5
+ export type HandleCoords = 'xy' | 'polar';
6
+ /** Props for {@link AnchorFields}. */
7
+ export interface AnchorFieldsProps {
8
+ /** Units a person may type, each mapped to the factor that turns it into
9
+ * document units: `{ pt: 1, in: 72, mm: 72 / 25.4 }`. */
10
+ accepts?: Readonly<UnitTable>;
11
+ /** The suffix after each position and length. */
12
+ unit?: ReactNode;
13
+ /** How handles read, held by the caller; the panel's toggle asks to change it through
14
+ * `onHandleCoordsChange`. Absent, the panel holds it, starting at `defaultHandleCoords`. */
15
+ handleCoords?: HandleCoords;
16
+ onHandleCoordsChange?: (next: HandleCoords) => void;
17
+ /** How handles read first when the panel holds it. Default `'xy'`. */
18
+ defaultHandleCoords?: HandleCoords;
19
+ /** Shown while no anchor is selected in path edit. Default: nothing. */
20
+ emptyState?: ReactNode;
21
+ /** The fields to show and write, in place of the canvas in scope's. */
22
+ fields?: AnchorFieldsApi;
23
+ /** Class on the property list. */
24
+ className?: string;
25
+ }
26
+ /**
27
+ * The anchors selected in path edit, as numbers to read and type: their X and
28
+ * Y, and for a lone anchor each handle's X and Y or angle and length. A field
29
+ * the anchors disagree on reads Mixed; typing a number there moves them all to
30
+ * it, and `+=` or `-=` with an amount moves each by that much. Every entry is
31
+ * one undo step.
32
+ */
33
+ export declare function AnchorFields({ accepts, unit, handleCoords, onHandleCoordsChange, defaultHandleCoords, emptyState, fields: given, className, }: AnchorFieldsProps): import("react").JSX.Element;
34
+ //# sourceMappingURL=AnchorFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnchorFields.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/AnchorFields/AnchorFields.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,6FAA6F;AAC7F,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC;AAE1C,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC;8DAC0D;IAC1D,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC9B,iDAAiD;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;iGAC6F;IAC7F,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACpD,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,YAAY,CAAC;IACnC,wEAAwE;IACxE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,uEAAuE;IACvE,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,mBAA0B,EAC1B,UAAiB,EACjB,MAAM,EAAE,KAAK,EACb,SAAS,GACV,EAAE,iBAAiB,+BAyCnB"}
@@ -0,0 +1,2 @@
1
+ export { AnchorFields, type AnchorFieldsProps, type HandleCoords } from './AnchorFields.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/AnchorFields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { t as AnchorFields } from "../../../chunks/AnchorFields-Cam1xwpt.js";
2
+
3
+ export { AnchorFields };
@@ -0,0 +1,27 @@
1
+ import type { RangeStyle, RunStylePatch } from '@weasel-js/text';
2
+ import type { ReactNode } from 'react';
3
+ /** Props for {@link CharacterOptions}. */
4
+ export interface CharacterOptionsProps {
5
+ /** Styling to display. `MIXED` at a key means the sources disagree there.
6
+ * Absent or `null` renders no bar, unless `children` gives it a tenant. */
7
+ value?: RangeStyle | null;
8
+ /** Apply a styling change. One call per completed edit. */
9
+ onChange: (patch: RunStylePatch) => void;
10
+ /** Tenants of the bar that are not character styling, e.g. loupe controls. */
11
+ children?: ReactNode;
12
+ className?: string;
13
+ }
14
+ /**
15
+ * Is `el` part of a `CharacterOptions` bar, or of a kit popover one of its
16
+ * controls opened? Pass it as `useTextEdit`'s `isEditorChrome`, so using the
17
+ * bar does not end the edit it styles.
18
+ */
19
+ export declare function isCharacterChrome(el: Element): boolean;
20
+ /**
21
+ * The strip of character controls for a text edit in progress. Wire it to
22
+ * `useTextEdit`: `value` takes `effectiveStyle`, `onChange` takes
23
+ * `applyStyleToSelection`, and {@link isCharacterChrome} goes in as
24
+ * `isEditorChrome`.
25
+ */
26
+ export declare function CharacterOptions({ value, onChange, children, className }: CharacterOptionsProps): import("react").JSX.Element;
27
+ //# sourceMappingURL=CharacterOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/CharacterOptions/CharacterOptions.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAa,MAAM,iBAAiB,CAAC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC;gFAC4E;IAC5E,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAGtD;AAKD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,qBAAqB,+BAc/F"}
@@ -0,0 +1,169 @@
1
+ /** The schema {@link CharacterOptions} draws: one control per `StyledRun` field a range takes. */
2
+ import type { IconRef } from '@weasel-js/icons';
3
+ /**
4
+ * The character controls for a caret range — the character half of text
5
+ * styling, against the node-level Character group a selection shows.
6
+ *
7
+ * Keyed by {@link StyledRun} field, so a host reads values out of a
8
+ * `RangeStyle` and writes a `RunStylePatch` back with no name mapping of its
9
+ * own. `script` is a preset over `baselineShift` and `fontScale`, so all three
10
+ * are here and naming either primitive overrides that half. `noFill` is the one
11
+ * key that is not a field: on, it is `fill: null`.
12
+ */
13
+ export declare const CHARACTER_OPTIONS: {
14
+ name: string;
15
+ description: string;
16
+ children: {
17
+ bold: {
18
+ pair: {
19
+ with: string[];
20
+ label: string;
21
+ };
22
+ kind: "boolean";
23
+ name: string;
24
+ description: `${string} for the characters in the range.`;
25
+ icon: IconRef;
26
+ control: "toggle";
27
+ default: false;
28
+ };
29
+ italic: {
30
+ readonly kind: "boolean";
31
+ readonly name: string;
32
+ readonly description: `${string} for the characters in the range.`;
33
+ readonly icon: IconRef;
34
+ readonly control: "toggle";
35
+ readonly default: false;
36
+ };
37
+ underline: {
38
+ readonly kind: "boolean";
39
+ readonly name: string;
40
+ readonly description: `${string} for the characters in the range.`;
41
+ readonly icon: IconRef;
42
+ readonly control: "toggle";
43
+ readonly default: false;
44
+ };
45
+ strikethrough: {
46
+ readonly kind: "boolean";
47
+ readonly name: string;
48
+ readonly description: `${string} for the characters in the range.`;
49
+ readonly icon: IconRef;
50
+ readonly control: "toggle";
51
+ readonly default: false;
52
+ };
53
+ overline: {
54
+ readonly kind: "boolean";
55
+ readonly name: string;
56
+ readonly description: `${string} for the characters in the range.`;
57
+ readonly icon: IconRef;
58
+ readonly control: "toggle";
59
+ readonly default: false;
60
+ };
61
+ script: {
62
+ kind: "enum";
63
+ name: string;
64
+ description: string;
65
+ control: "toggle";
66
+ clearable: true;
67
+ default: undefined;
68
+ options: {
69
+ value: string;
70
+ label: string;
71
+ icon: IconRef;
72
+ }[];
73
+ };
74
+ textTransform: {
75
+ kind: "enum";
76
+ name: string;
77
+ description: string;
78
+ control: "toggle";
79
+ default: string;
80
+ options: {
81
+ value: string;
82
+ label: string;
83
+ short: string[];
84
+ }[];
85
+ };
86
+ fontVariantCaps: {
87
+ kind: "enum";
88
+ name: string;
89
+ description: string;
90
+ control: "toggle";
91
+ default: string;
92
+ options: {
93
+ value: string;
94
+ label: string;
95
+ short: string[];
96
+ }[];
97
+ };
98
+ fontFamily: {
99
+ kind: string;
100
+ name: string;
101
+ description: string;
102
+ default: undefined;
103
+ };
104
+ fontWeight: {
105
+ kind: string;
106
+ name: string;
107
+ description: string;
108
+ default: undefined;
109
+ };
110
+ fontSize: {
111
+ kind: "number";
112
+ name: string;
113
+ description: string;
114
+ min: number;
115
+ step: number;
116
+ default: number;
117
+ };
118
+ letterSpacing: {
119
+ kind: "number";
120
+ name: string;
121
+ short: string[];
122
+ description: string;
123
+ step: number;
124
+ default: number;
125
+ };
126
+ baselineShift: {
127
+ kind: "number";
128
+ name: string;
129
+ short: string[];
130
+ description: string;
131
+ step: number;
132
+ unit: {
133
+ scale: number;
134
+ places: number;
135
+ suffix: string;
136
+ };
137
+ default: number;
138
+ };
139
+ fontScale: {
140
+ kind: "number";
141
+ name: string;
142
+ description: string;
143
+ min: number;
144
+ step: number;
145
+ unit: {
146
+ scale: number;
147
+ places: number;
148
+ suffix: string;
149
+ };
150
+ default: number;
151
+ };
152
+ fill: {
153
+ kind: "color";
154
+ name: string;
155
+ description: string;
156
+ alpha: true;
157
+ default: string;
158
+ };
159
+ noFill: {
160
+ kind: "boolean";
161
+ name: string;
162
+ description: string;
163
+ icon: IconRef;
164
+ control: "toggle";
165
+ default: false;
166
+ };
167
+ };
168
+ };
169
+ //# sourceMappingURL=characterSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"characterSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/CharacterOptions/characterSchema.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAqBhD;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGT,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { CharacterOptions, isCharacterChrome } from './CharacterOptions.js';
2
+ export type { CharacterOptionsProps } from './CharacterOptions.js';
3
+ export { CHARACTER_OPTIONS } from './characterSchema.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/CharacterOptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { n as isCharacterChrome, r as CHARACTER_OPTIONS, t as CharacterOptions } from "../../../chunks/CharacterOptions-CSqKZvwS.js";
2
+
3
+ export { CHARACTER_OPTIONS, CharacterOptions, isCharacterChrome };
@@ -0,0 +1,80 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { SelectionApi } from '@weasel-js/routing';
3
+ import type { UnitScope } from '@weasel-js/quantity';
4
+ import { type FeaturePreset, type NodePropertiesEntry, type NodeRoutingEntry, type Scene } from '@weasel-js/core';
5
+ import type { LeafRenderer } from '@weasel-js/ui/components/PanelCells';
6
+ import type { PrefGroup, PrefSection } from '@weasel-js/prefs';
7
+ import type { MarkHiddenProps } from '@weasel-js/ui/components/Prefs';
8
+ import { type PrefSelectHow } from '@weasel-js/ui/components/Prefs';
9
+ import { type HoldProps } from '@weasel-js/ui/components/Disabled';
10
+ /** Props for {@link SelectionPanel}. */
11
+ export interface SelectionPanelProps<TData, TLayer extends string, TPose> extends MarkHiddenProps, HoldProps {
12
+ /** The scene handle (`useScene`). The panel subscribes itself, so it
13
+ * re-renders on scene mutations regardless of parent renders. */
14
+ scene: Scene<TData, TLayer, TPose>;
15
+ /** Selection handle (`useSelection`): the nodes the panel edits. Only `current` is read. */
16
+ selection: Pick<SelectionApi, 'current'>;
17
+ /** The presets the canvas runs (`<SceneCanvas features>`): the routing and
18
+ * properties their node kinds bring are read from them, ahead of
19
+ * `routing` and `properties`, as `nodeTraitsOf` merges them. */
20
+ features?: readonly FeaturePreset[];
21
+ /** Properties-trait entries, e.g. core's `defaultNodeProperties` /
22
+ * `inferredNodeProperties` (+ consumer extras). A later entry of a name
23
+ * replaces an earlier one. Default `inferredNodeProperties`. Memoize or hoist. */
24
+ properties?: readonly NodePropertiesEntry[];
25
+ /** Routing-trait classifiers used to derive each node's kind — pass
26
+ * the same list the canvas's `routing` prop takes. Default
27
+ * `inferredNodeRouting`, as on the canvas. Memoize or hoist. */
28
+ routing?: readonly NodeRoutingEntry[];
29
+ /** Control overrides / app-defined kinds (PrefsForm-style). Keys are
30
+ * leaf paths (`data.fill`, checked first) or leaf kinds (`color`).
31
+ * A renderer returning `null` collapses its leaf (and the row, when
32
+ * every leaf in it collapses). */
33
+ renderers?: Record<string, LeafRenderer>;
34
+ /**
35
+ * The schema the properties schemas' `alias` leaves point into. Default:
36
+ * each kind's own. A panel drawn from layouts of aliases into another
37
+ * schema passes that other: each alias row is drawn as the leaf of it at
38
+ * the alias's path, reads that path of every selected node and writes
39
+ * there, and is hidden and disabled by that leaf's conditions as well as
40
+ * its own. A `PrefGroup`'s keys are steps of the node path (`data`, then
41
+ * `fill`); a `PrefSection`'s leaf keys are whole node paths. A condition
42
+ * of a kind's own schema may read a setting of that one too: a path no
43
+ * leaf of the kind holds is read there, as the panel reads a leaf of its
44
+ * own: a node holding nothing at the path reads as the leaf's default
45
+ * only where the leaf is `absentIsDefault`.
46
+ */
47
+ over?: PrefGroup | PrefSection;
48
+ /** The scene's outermost unit scope. Given, a field whose leaf measures a
49
+ * length shows it in the unit scopes the selected nodes share, through
50
+ * `prefLeafInUnitScopes`; what is typed is still stored in world units. */
51
+ units?: UnitScope;
52
+ /** Kind → header label. Default: capitalized kind name. */
53
+ kindLabel?: (kind: string) => string;
54
+ /** Rendered when the selection is empty. */
55
+ emptyState?: ReactNode;
56
+ /**
57
+ * What to mark: a leaf by its key in the schema (`data.fill`), a field of
58
+ * an object leaf under its leaf's (`data.stroke.width`), and a top-level
59
+ * section drawn under a heading, as a tab, or as a panel by its own key.
60
+ * Leaves a `pair` draws in one row share its mark.
61
+ * Each time the last one changes the panel brings it into view, opening
62
+ * the tab that holds it. A path the panel draws no row for marks the row
63
+ * it lies inside, or nothing.
64
+ */
65
+ marked?: readonly string[];
66
+ /** The reader pressed or focused into a row, reported as `marked` names
67
+ * it: a paired row as its first leaf, and a section's heading, tab, or
68
+ * panel as the section's key. `how.toggle` is true when Cmd or Ctrl was
69
+ * held. A press on one of several marked rows is reported on its click. */
70
+ onMark?: (path: string, how: PrefSelectHow) => void;
71
+ className?: string;
72
+ }
73
+ /**
74
+ * Pre-baked selection properties panel. Shows the selected nodes' kind
75
+ * and the properties-trait schema for that kind; multi-selections show
76
+ * the intersection of the kinds' schemas with per-field Mixed state.
77
+ * Edits commit as one labeled `scene.batch` fan-out per gesture.
78
+ */
79
+ export declare function SelectionPanel<TData, TLayer extends string, TPose>(props: SelectionPanelProps<TData, TLayer, TPose>): import("react").JSX.Element;
80
+ //# sourceMappingURL=SelectionPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/SelectionPanel/SelectionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACX,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,g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KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,+BA0FjD"}
@@ -0,0 +1,23 @@
1
+ import type { SelectionApi } from '@weasel-js/routing';
2
+ import { type NodePropertiesEntry, type Scene } from '@weasel-js/core';
3
+ import { type PanelLeaf, type PanelPaintAbove, type PanelRecord } from '@weasel-js/ui/components/PanelCells';
4
+ import { type AnyNode } from './nodeModel.js';
5
+ import type { LeafWrites } from '@weasel-js/ui/components/PanelCells';
6
+ type Next = (prev: unknown) => unknown;
7
+ /** The `settle` of the properties entry a node is edited under, if it has one. */
8
+ export type SettleOf = (node: AnyNode) => NodePropertiesEntry['settle'];
9
+ /** `node` as a panel reads it, with what an `'inherit'` paint on it takes when `paintAbove` is given and it has a
10
+ * parent. */
11
+ export declare function nodeRecord(node: AnyNode, paintAbove?: (node: AnyNode) => PanelPaintAbove): PanelRecord;
12
+ /** Warn once per kind and path, in dev, of a value leaf that `kinds`' schemas key where no edit can land. */
13
+ export declare function warnUnwritable(kinds: readonly string[], leaves: readonly PanelLeaf[]): void;
14
+ /**
15
+ * Writes, into every selected node, what `next` derives from the value that
16
+ * node holds at the leaf's path, as one labeled batch. A node whose properties
17
+ * entry has a `settle` stores what that returns.
18
+ */
19
+ export declare function commitLeaf<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, selection: Pick<SelectionApi, 'current'>, leaf: PanelLeaf, next: Next, settleOf?: SettleOf): void;
20
+ /** The writes of one panel over `scene`. Keep one per panel: it holds what the drafts in flight wrote over. */
21
+ export declare function leafWrites<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, settleOf?: SettleOf): LeafWrites;
22
+ export {};
23
+ //# sourceMappingURL=commitLeaf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitLeaf.d.ts","sourceRoot":"","sources":["../../../../src/components/inspector/SelectionPanel/commitLeaf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/D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