@rasamjs/core 0.2.0 → 0.3.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.
Files changed (178) hide show
  1. package/API.md +14 -4
  2. package/CHANGELOG.md +71 -0
  3. package/COMPONENTS.md +229 -0
  4. package/README.md +46 -6
  5. package/RELEASING.md +4 -2
  6. package/dist/advanced.d.ts +1 -1
  7. package/dist/advanced.d.ts.map +1 -1
  8. package/dist/catalog/fragment.d.ts +2 -2
  9. package/dist/catalog/fragment.d.ts.map +1 -1
  10. package/dist/catalog/fragment.js.map +1 -1
  11. package/dist/changes/derived.d.ts +10 -0
  12. package/dist/changes/derived.d.ts.map +1 -0
  13. package/dist/changes/derived.js +14 -0
  14. package/dist/changes/derived.js.map +1 -0
  15. package/dist/changes/restore.d.ts.map +1 -1
  16. package/dist/changes/restore.js +76 -28
  17. package/dist/changes/restore.js.map +1 -1
  18. package/dist/changes/service.d.ts +5 -0
  19. package/dist/changes/service.d.ts.map +1 -1
  20. package/dist/changes/service.js +18 -4
  21. package/dist/changes/service.js.map +1 -1
  22. package/dist/changes/state.d.ts.map +1 -1
  23. package/dist/changes/state.js +33 -27
  24. package/dist/changes/state.js.map +1 -1
  25. package/dist/changes.d.ts.map +1 -1
  26. package/dist/changes.js +20 -4
  27. package/dist/changes.js.map +1 -1
  28. package/dist/components/changes.d.ts +34 -0
  29. package/dist/components/changes.d.ts.map +1 -0
  30. package/dist/components/changes.js +119 -0
  31. package/dist/components/changes.js.map +1 -0
  32. package/dist/components/component.d.ts +62 -0
  33. package/dist/components/component.d.ts.map +1 -0
  34. package/dist/components/component.js +355 -0
  35. package/dist/components/component.js.map +1 -0
  36. package/dist/components/decorators.d.ts +7 -0
  37. package/dist/components/decorators.d.ts.map +1 -0
  38. package/dist/components/decorators.js +83 -0
  39. package/dist/components/decorators.js.map +1 -0
  40. package/dist/components/metadata.d.ts +10 -0
  41. package/dist/components/metadata.d.ts.map +1 -0
  42. package/dist/components/metadata.js +85 -0
  43. package/dist/components/metadata.js.map +1 -0
  44. package/dist/components/registry.d.ts +24 -0
  45. package/dist/components/registry.d.ts.map +1 -0
  46. package/dist/components/registry.js +78 -0
  47. package/dist/components/registry.js.map +1 -0
  48. package/dist/components/types.d.ts +54 -0
  49. package/dist/components/types.d.ts.map +1 -0
  50. package/dist/components/types.js +2 -0
  51. package/dist/components/types.js.map +1 -0
  52. package/dist/components/view.d.ts +9 -0
  53. package/dist/components/view.d.ts.map +1 -0
  54. package/dist/components/view.js +104 -0
  55. package/dist/components/view.js.map +1 -0
  56. package/dist/components.d.ts +6 -0
  57. package/dist/components.d.ts.map +1 -0
  58. package/dist/components.js +5 -0
  59. package/dist/components.js.map +1 -0
  60. package/dist/core/node.d.ts +7 -0
  61. package/dist/core/node.d.ts.map +1 -1
  62. package/dist/core/node.js +30 -0
  63. package/dist/core/node.js.map +1 -1
  64. package/dist/interchange/clone.d.ts.map +1 -1
  65. package/dist/interchange/clone.js +3 -2
  66. package/dist/interchange/clone.js.map +1 -1
  67. package/dist/interchange/reconstruct.d.ts.map +1 -1
  68. package/dist/interchange/reconstruct.js +16 -12
  69. package/dist/interchange/reconstruct.js.map +1 -1
  70. package/dist/interchange/references.d.ts.map +1 -1
  71. package/dist/interchange/references.js +10 -4
  72. package/dist/interchange/references.js.map +1 -1
  73. package/dist/mixins/parent-internals.d.ts +6 -0
  74. package/dist/mixins/parent-internals.d.ts.map +1 -1
  75. package/dist/mixins/parent-internals.js +34 -0
  76. package/dist/mixins/parent-internals.js.map +1 -1
  77. package/dist/mixins/parent.d.ts.map +1 -1
  78. package/dist/mixins/parent.js +6 -1
  79. package/dist/mixins/parent.js.map +1 -1
  80. package/dist/mixins/types.d.ts +2 -2
  81. package/dist/mixins/types.d.ts.map +1 -1
  82. package/dist/resources/references.d.ts +2 -0
  83. package/dist/resources/references.d.ts.map +1 -1
  84. package/dist/resources/references.js +3 -3
  85. package/dist/resources/references.js.map +1 -1
  86. package/dist/services/catalog.d.ts.map +1 -1
  87. package/dist/services/catalog.js +5 -3
  88. package/dist/services/catalog.js.map +1 -1
  89. package/dist/services/claims.d.ts +7 -0
  90. package/dist/services/claims.d.ts.map +1 -0
  91. package/dist/services/claims.js +11 -0
  92. package/dist/services/claims.js.map +1 -0
  93. package/dist/services/defs-manager.d.ts +2 -0
  94. package/dist/services/defs-manager.d.ts.map +1 -1
  95. package/dist/services/defs-manager.js +4 -0
  96. package/dist/services/defs-manager.js.map +1 -1
  97. package/dist/services/element-key.d.ts +4 -0
  98. package/dist/services/element-key.d.ts.map +1 -0
  99. package/dist/services/element-key.js +12 -0
  100. package/dist/services/element-key.js.map +1 -0
  101. package/dist/services/initialization.d.ts +7 -0
  102. package/dist/services/initialization.d.ts.map +1 -0
  103. package/dist/services/initialization.js +27 -0
  104. package/dist/services/initialization.js.map +1 -0
  105. package/dist/services/registry.d.ts +8 -0
  106. package/dist/services/registry.d.ts.map +1 -1
  107. package/dist/services/registry.js +47 -10
  108. package/dist/services/registry.js.map +1 -1
  109. package/dist/services/types.d.ts +17 -0
  110. package/dist/services/types.d.ts.map +1 -1
  111. package/dist/template/parts.d.ts +12 -6
  112. package/dist/template/parts.d.ts.map +1 -1
  113. package/dist/template/parts.js +36 -29
  114. package/dist/template/parts.js.map +1 -1
  115. package/dist/template/render.d.ts +6 -7
  116. package/dist/template/render.d.ts.map +1 -1
  117. package/dist/template/render.js +188 -44
  118. package/dist/template/render.js.map +1 -1
  119. package/dist/template/svg-tag.d.ts +5 -1
  120. package/dist/template/svg-tag.d.ts.map +1 -1
  121. package/dist/template/svg-tag.js.map +1 -1
  122. package/dist/text/internals.d.ts +1 -0
  123. package/dist/text/internals.d.ts.map +1 -1
  124. package/dist/types/common.d.ts +27 -0
  125. package/dist/types/common.d.ts.map +1 -1
  126. package/package.json +10 -1
  127. package/reports/adoption.json +20 -20
  128. package/reports/animation-benchmark.json +613 -613
  129. package/reports/benchmark.json +27 -27
  130. package/reports/change-groups-benchmark.json +471 -0
  131. package/reports/components-benchmark-before.json +10 -0
  132. package/reports/components-benchmark.json +10 -0
  133. package/reports/creation.json +26 -26
  134. package/reports/interchange-benchmark.json +85 -85
  135. package/reports/phase-3-core-after.json +40 -0
  136. package/reports/phase-3-core-before.json +40 -0
  137. package/reports/public-api-contract.json +335 -17
  138. package/reports/size-components.json +103 -0
  139. package/reports/size-parity.json +50 -34
  140. package/reports/size.json +7 -4
  141. package/reports/svgjs-comparison.json +3049 -3049
  142. package/reports/svgjs-comparison.md +15 -15
  143. package/reports/svgjs-parity-current.json +133 -46
  144. package/src/advanced.ts +1 -1
  145. package/src/catalog/fragment.ts +2 -2
  146. package/src/changes/derived.ts +19 -0
  147. package/src/changes/restore.ts +78 -36
  148. package/src/changes/service.ts +23 -8
  149. package/src/changes/state.ts +37 -28
  150. package/src/changes.ts +24 -5
  151. package/src/components/changes.ts +131 -0
  152. package/src/components/component.ts +401 -0
  153. package/src/components/decorators.ts +106 -0
  154. package/src/components/metadata.ts +111 -0
  155. package/src/components/registry.ts +79 -0
  156. package/src/components/types.ts +66 -0
  157. package/src/components/view.ts +123 -0
  158. package/src/components.ts +15 -0
  159. package/src/core/node.ts +32 -1
  160. package/src/interchange/clone.ts +3 -2
  161. package/src/interchange/reconstruct.ts +16 -12
  162. package/src/interchange/references.ts +12 -4
  163. package/src/mixins/parent-internals.ts +37 -0
  164. package/src/mixins/parent.ts +13 -4
  165. package/src/mixins/types.ts +2 -2
  166. package/src/resources/references.ts +5 -5
  167. package/src/services/catalog.ts +5 -3
  168. package/src/services/claims.ts +14 -0
  169. package/src/services/defs-manager.ts +5 -0
  170. package/src/services/element-key.ts +14 -0
  171. package/src/services/initialization.ts +25 -0
  172. package/src/services/registry.ts +49 -10
  173. package/src/services/types.ts +21 -0
  174. package/src/template/parts.ts +54 -39
  175. package/src/template/render.ts +211 -54
  176. package/src/template/svg-tag.ts +6 -1
  177. package/src/text/internals.ts +1 -0
  178. package/src/types/common.ts +29 -0
package/API.md CHANGED
@@ -14,9 +14,9 @@ Runtime exports (32):
14
14
 
15
15
  `BBox`, `Circle`, `ClipPath`, `Defs`, `Ellipse`, `Group`, `Line`, `LinearGradient`, `Marker`, `Matrix`, `Path`, `PathArray`, `PathBuilder`, `PointArray`, `Polygon`, `Polyline`, `RadialGradient`, `Rect`, `Renderer`, `SVG`, `Shape`, `Stop`, `Svg`, `SvgNode`, `SvgTemplate`, `SvgText`, `Use`, `Vec2`, `ViewBox`, `ViewportError`, `attr`, `svg`.
16
16
 
17
- Type-only exports (46):
17
+ Type-only exports (48):
18
18
 
19
- `AnyNode`, `AttributeValue`, `Bounds`, `Box`, `CircleOptions`, `ClipPathOptions`, `CommonAttributes`, `Disposable`, `DrawingPointerEvent`, `EllipseOptions`, `GeometryChange`, `GradientStop`, `Length`, `LineOptions`, `LinearGradientOptions`, `MarkerOptions`, `MatrixDecomposition`, `MatrixValues`, `NestedSvgOptions`, `NodeEvents`, `PaintValue`, `PathAttributes`, `PathCommand`, `PathInput`, `PathOptions`, `PathSegment`, `Point`, `PointInput`, `PointerEventType`, `PolygonOptions`, `PolylineAttributes`, `PolylineOptions`, `RadialGradientOptions`, `RectOptions`, `ResourceReference`, `SVGOptions`, `StyleProperties`, `SvgAttributes`, `SvgOptions`, `TemplateInstance`, `TemplateValue`, `TextAttributes`, `TextMeasurementProvider`, `TextOptions`, `TransformState`, `UseOptions`.
19
+ `AnyNode`, `AttributeValue`, `Bounds`, `Box`, `CircleOptions`, `ClipPathOptions`, `CommonAttributes`, `Disposable`, `DrawingPointerEvent`, `EditRules`, `EllipseOptions`, `GeometryChange`, `GradientStop`, `Length`, `LineOptions`, `LinearGradientOptions`, `MarkerOptions`, `MatrixDecomposition`, `MatrixValues`, `NestedSvgOptions`, `NodeEvents`, `PaintValue`, `PathAttributes`, `PathCommand`, `PathInput`, `PathOptions`, `PathSegment`, `Point`, `PointInput`, `PointerEventType`, `PolygonOptions`, `PolylineAttributes`, `PolylineOptions`, `PortDefinition`, `RadialGradientOptions`, `RectOptions`, `ResourceReference`, `SVGOptions`, `StyleProperties`, `SvgAttributes`, `SvgOptions`, `TemplateInstance`, `TemplateValue`, `TextAttributes`, `TextMeasurementProvider`, `TextOptions`, `TransformState`, `UseOptions`.
20
20
 
21
21
  ## @rasamjs/core/advanced
22
22
 
@@ -24,9 +24,9 @@ Runtime exports (57):
24
24
 
25
25
  `Attributes`, `BBox`, `BoundsService`, `Circle`, `ClipPath`, `Creatable`, `Defs`, `DefsManager`, `DomFactory`, `DrawingContext`, `Elements`, `Ellipse`, `Emitter`, `Gradient`, `Group`, `Guards`, `Line`, `LinearGradient`, `Marker`, `Matrix`, `Namespace`, `Parent`, `Path`, `PathArray`, `PathBuilder`, `PathGeometry`, `PointArray`, `PointerRouter`, `Polygon`, `Polyline`, `RadialGradient`, `Rect`, `Registry`, `Renderer`, `SVG`, `Scheduler`, `Shape`, `Sizable`, `Stop`, `Styleable`, `Svg`, `SvgNode`, `SvgTag`, `SvgTemplate`, `SvgText`, `Textual`, `Transformable`, `Use`, `Vec2`, `ViewBox`, `ViewportError`, `attr`, `isParent`, `isTextual`, `isTransformable`, `mix`, `svg`.
26
26
 
27
- Type-only exports (52):
27
+ Type-only exports (55):
28
28
 
29
- `AnyNode`, `AttributeValue`, `Bounds`, `Box`, `CircleOptions`, `ClipPathOptions`, `CommonAttributes`, `CreatableFeature`, `Ctor`, `Disposable`, `DrawingPointerEvent`, `ElementClass`, `EllipseOptions`, `GeometryChange`, `GradientStop`, `Length`, `LineOptions`, `LinearGradientOptions`, `MarkerOptions`, `MatrixDecomposition`, `MatrixValues`, `NestedSvgOptions`, `NodeEvents`, `PaintValue`, `ParentFeature`, `ParentNode`, `PathAttributes`, `PathCommand`, `PathInput`, `PathOptions`, `PathSegment`, `Point`, `PointInput`, `PointerEventType`, `PolygonOptions`, `PolylineAttributes`, `PolylineOptions`, `RadialGradientOptions`, `RectOptions`, `ResourceReference`, `SVGOptions`, `SizableFeature`, `StyleProperties`, `SvgAttributes`, `SvgOptions`, `TemplateInstance`, `TemplateValue`, `TextAttributes`, `TextMeasurementProvider`, `TextOptions`, `TransformState`, `UseOptions`.
29
+ `AnyNode`, `AttributeValue`, `Bounds`, `Box`, `CircleOptions`, `ClipPathOptions`, `CommonAttributes`, `CreatableFeature`, `Ctor`, `Disposable`, `DrawingPointerEvent`, `EditRules`, `ElementClass`, `ElementVariant`, `EllipseOptions`, `GeometryChange`, `GradientStop`, `Length`, `LineOptions`, `LinearGradientOptions`, `MarkerOptions`, `MatrixDecomposition`, `MatrixValues`, `NestedSvgOptions`, `NodeEvents`, `PaintValue`, `ParentFeature`, `ParentNode`, `PathAttributes`, `PathCommand`, `PathInput`, `PathOptions`, `PathSegment`, `Point`, `PointInput`, `PointerEventType`, `PolygonOptions`, `PolylineAttributes`, `PolylineOptions`, `PortDefinition`, `RadialGradientOptions`, `RectOptions`, `ResourceReference`, `SVGOptions`, `SizableFeature`, `StyleProperties`, `SvgAttributes`, `SvgOptions`, `TemplateInstance`, `TemplateValue`, `TextAttributes`, `TextMeasurementProvider`, `TextOptions`, `TransformState`, `UseOptions`.
30
30
 
31
31
  ## @rasamjs/core/animation
32
32
 
@@ -58,6 +58,16 @@ Type-only exports (14):
58
58
 
59
59
  `ChangeBatch`, `ChangeDerivation`, `ChangeEvent`, `ChangeGroup`, `ChangeMetadata`, `ContentState`, `ModelChange`, `ModelFeatures`, `ModelSnapshot`, `NativeNodeState`, `NodeHandle`, `Placement`, `PropertyState`, `TextPolicies`.
60
60
 
61
+ ## @rasamjs/core/components
62
+
63
+ Runtime exports (7):
64
+
65
+ `Component`, `ComponentTypes`, `action`, `component`, `isComponentChild`, `prop`, `state`.
66
+
67
+ Type-only exports (9):
68
+
69
+ `ActionDefinition`, `ComponentClass`, `ComponentDefinition`, `ComponentFields`, `ComponentOptions`, `ComponentProps`, `PropDefinition`, `PropOptions`, `PropValue`.
70
+
61
71
  ## @rasamjs/core/data
62
72
 
63
73
  Runtime exports (5):
package/CHANGELOG.md CHANGED
@@ -2,6 +2,77 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.3.1 - 2026-11-09
6
+
7
+ - Collect raw group changes and combine at cancellation instead of re-merging the
8
+ entire group on every event. Compact before overlapping outside edits to release
9
+ net-zero state. Index sibling positions, replay sibling counts and SVG IDs, schedule
10
+ restored placements by dependency, and drain reentrant notifications without
11
+ shifting the event queue. Public APIs and saved data are unchanged.
12
+ - Component construction no longer copies every registered node to prepare its failure
13
+ cleanup, which made importing or pasting n components cost n². An internal claim
14
+ counter marks the start instead; a failed construction still destroys exactly the
15
+ nodes it created. Opening a saved 400-part Circuit Lab schematic is about 4% faster.
16
+
17
+ ## [0.3.0] - 2026-11-07
18
+
19
+ - Add `DefsManager.consumersOf(target)`, the nodes holding a typed reference to a target,
20
+ read from the reference index instead of scanning the drawing.
21
+ - Treat connector ends (`data-rasam-connector-start` and `-end`) as links, not
22
+ resources: exporting or copying a connector no longer copies its targets into
23
+ `<defs>`, and importing one whose target was left out drops that link instead of
24
+ throwing.
25
+ - Add component ports: override `ports()` to declare named connection points from
26
+ props and the saved size, in local coordinates with an optional side. The frozen,
27
+ validated `portDefinitions` getter is computed again only when saved props change,
28
+ and core exports the structural `PortDefinition` type that connectors read.
29
+ - Add `actionDefinitions` to components: their `@action` methods with undo labels.
30
+ - Add `resize: 'props'` components and edit rules: the size is saved as built-in
31
+ `width` and `height` props that `render()` reads through `width()` and `height()`,
32
+ `size()` changes them as one undo step and redraws at once, and the transformer
33
+ resizes such a component through `size()` instead of scaling it.
34
+ - Add the `notation: 'si'` prop option, so editors accept and show engineering
35
+ notation such as `4.7k`, `4k7` or `4.7 kΩ`.
36
+ - Render `@state` changes for every component in one shared frame per drawing, as one
37
+ temporary change. History now restores a component's props, position and existence
38
+ but not its rendered children; after undo, redo or a cancelled group the component
39
+ redraws them from restored props and current live state. Live renders that add or
40
+ remove nodes no longer make undo fail, recreated instances start from state
41
+ defaults, and the conflict exception for live-painted holes is removed.
42
+ - Preserve restored props and redo when `created()` writes defaults; the hook still
43
+ runs on every copy. Isolate internal edits from application `edit()` methods,
44
+ validate raw props JSON before mutation, and rebuild saved views with extra attrs.
45
+ - Share component change routing per drawing, discover only added subtrees, and cache
46
+ sibling order between structural edits so moves do not scale with drawing size.
47
+ - Rename the type registry to `ComponentTypes` and infer `create()` option names and
48
+ value types from public primitive fields. Record delegated 34 KiB catalog, 41 KiB
49
+ components and 20.5 KiB root gzip caps, with a reproducible component benchmark.
50
+ - Add the opt-in `@rasamjs/core/components` entry: class components, `@component`,
51
+ `@prop`, `@state`, `@action`, per-drawing type registries, metadata and icons.
52
+ Preserve classes and props through migration, native adoption, import, clone,
53
+ clipboard and replay; bind saved children before subsequent updates. Batch live
54
+ state per frame as temporary changes and reject inherited-member field collisions.
55
+
56
+ - Compare template bindings with current model values so rendering after undo or
57
+ cancellation restores attributes and text without replacing element nodes.
58
+ - Add element variants: a class with `static variant` registers for one `data-*`
59
+ attribute value of its tag, next to the tag's base class. Creation, adoption, import,
60
+ clone and change replay resolve it, and the identifying value is fixed and reserved.
61
+ The registry adds `resolve(element)`, `registered(Constructor)` and `variant()`.
62
+ - Templates render nested templates in holes between elements or at the top level:
63
+ a template, an iterable of templates, or `null`/`undefined`/booleans/`''` for
64
+ nothing. Items whose literal matches by index update in place; updates validate and
65
+ build new items off the drawing before changing it. Replacing a template, or removing
66
+ nested items, now disposes them semantically, so undo restores them and no longer
67
+ clears history.
68
+ - Add the structural `EditRules` type that editing tools read from `node.editRules`
69
+ to limit rotation, resizing and flips per node.
70
+ - Add `static ownsChildren` for containers whose class owns its children. Outside
71
+ structural edits throw before allocating or moving anything; the class edits them
72
+ through `withOwnChildren()`, and core's adoption, replay and owner destruction pass.
73
+
74
+ ## [0.2.0] - 2026-11-06
75
+
5
76
  - Add `document: 'presentation'` imports to retain scoped root styles and compositing
6
77
  while omitting the viewport envelope. Validate document envelopes before unwrapping.
7
78
  Add `document: 'replace'` for empty drawings so full-document restoration does not
package/COMPONENTS.md ADDED
@@ -0,0 +1,229 @@
1
+ # Class components
2
+
3
+ Import the opt-in `@rasamjs/core/components` entry. Components are trusted application
4
+ classes extending `Component`, which is a closed `Group`. Position, rotation and scale
5
+ belong to that group; transforming it never calls `render()`.
6
+
7
+ ```ts
8
+ import { SVG, svg } from '@rasamjs/core';
9
+ import {
10
+ Component,
11
+ ComponentTypes,
12
+ component,
13
+ prop,
14
+ state,
15
+ action,
16
+ } from '@rasamjs/core/components';
17
+
18
+ @component({ type: 'status', name: 'Status', category: 'Indicators', version: 1 })
19
+ class Status extends Component {
20
+ @prop({ label: 'Caption' }) caption = 'Ready';
21
+ @prop() active = false;
22
+ @state() brightness = 1;
23
+
24
+ @action('Toggle status')
25
+ toggle() {
26
+ this.active = !this.active;
27
+ }
28
+
29
+ override render() {
30
+ return svg`<circle r="15" fill="${this.active ? 'lime' : 'gray'}" opacity="${this.brightness}"/><text y="35">${this.caption}</text>`;
31
+ }
32
+ }
33
+
34
+ const drawing = SVG(document.querySelector<HTMLElement>('#canvas')!, { elements: [Status] });
35
+ const types = new ComponentTypes(drawing, [Status]);
36
+ const status = drawing.create(Status, { caption: 'Connected' });
37
+ status.translate(100, 80);
38
+ status.toggle();
39
+ ```
40
+
41
+ Use standard TypeScript decorators with `useDefineForClassFields` (the default for
42
+ ES2022). Do not enable legacy `experimentalDecorators`. The playground's Vite transform
43
+ handles these decorators. Each concrete type needs its own `@component` decorator.
44
+ Application classes declare no static fields: the decorator supplies core's variant
45
+ registration, and the base class supplies owned-child behavior.
46
+
47
+ `@prop()` supports strings, finite numbers, booleans and null. Defaults come from field
48
+ initializers. Its options are `label`, `unit`, `min`, `max`, `step`, `options`,
49
+ `type: 'color'` and `notation: 'si'` for property-panel metadata. With `notation: 'si'`,
50
+ editors accept `4.7k`, `4k7` or `100n` and show values as `4.7 kΩ`. Numeric limits and choice lists are checked
51
+ on construction, loading and assignment. Unknown props and fields colliding with
52
+ rasam's inherited members are rejected. Use names such as `active` and `renderedFill`:
53
+ `on` and `fill` already name rasam methods. `propDefinitions` exposes frozen metadata.
54
+ The same validation applies to direct `data-rasam-props` writes, before any model
55
+ or rendered value changes.
56
+
57
+ `create(Type, options)` infers field names and value types from the concrete class,
58
+ so misspelled keys and wrong value types are TypeScript errors. Standard decorators
59
+ cannot distinguish `@prop` from state, helpers or getters in TypeScript's type system:
60
+ the inferred `ComponentFields<Type>` includes public primitive values. Runtime
61
+ validation still rejects every creation option that is not a decorated prop.
62
+
63
+ Every changed prop creates one labelled edit. Rendering runs synchronously as a
64
+ derived change in that edit, updating existing template holes. An enclosing core
65
+ change group or `@action('Label')` groups several writes into one undo step. Actions
66
+ must be synchronous. Failed actions roll back saved props and rendered children;
67
+ live state remains outside history. `actionDefinitions` lists an instance's `@action`
68
+ methods as frozen `{ name, label }` entries, inherited ones first; an overriding
69
+ `@action` keeps its place and takes the new label. Editors use it for action buttons. Plain helper fields do not trigger rendering.
70
+
71
+ `@state()` keeps values in memory. Assignments coalesce into one shared animation
72
+ frame per drawing: every changed instance renders once, together, as one temporary
73
+ `components` change, so a thousand animated instances cost one change event per frame.
74
+ They never create undo steps or dirty the editor's document autosave. Live state may
75
+ change structure too, for example a glow drawn only while `on` is true, or a row of
76
+ pins whose length is a state value.
77
+
78
+ If one instance's render throws, the others still render and the error surfaces from
79
+ that frame. `resetState()` restores the instance's
80
+ initial state; `types.resetState()` resets its drawing. Object state defaults must be
81
+ structured-cloneable; nested mutations do not trigger a render, so assign a new value.
82
+
83
+ Subclasses inherit decorated fields, ordinary methods and edit rules, and can add
84
+ fields or override `render()`. Redeclaring an inherited decorated field is rejected.
85
+ `created()` runs synchronously after initialization for every instance, including
86
+ load, clone, paste and history reconstruction. It may initialize props for a brand-new
87
+ instance. On restored instances (`this.adopting`), prop assignments in this hook are
88
+ ignored, including raw props-attribute writes, so saved values and redo remain intact.
89
+ Use the hook for per-instance state and subscriptions; use `migrate` to update saved
90
+ props. `destroyed()` runs on disposal and `changed(name)` for decorated-field changes,
91
+ including replayed prop changes.
92
+
93
+ Rendered children are derived from props and live state. History restores a
94
+ component's props, position and existence, never its children: right after undo,
95
+ redo or a cancelled group, each restored or recreated component redraws, as one
96
+ temporary change, from its restored props and its current live state. A recreated
97
+ instance starts from its state defaults. So live renders that add or remove nodes
98
+ never break undo, and an outside write to a rendered child lasts only until the next
99
+ render.
100
+
101
+ `@component` takes a stable lowercase hyphenated `type`, a display `name`, optional
102
+ `category` (default `General`), `version` (default 1), and editing rules. `rotate` is
103
+ `'free'`, `false`, or a positive degree step dividing 360; `flip` defaults to true;
104
+ `resize` defaults to `'scale'` and can be false or `'props'`. The read-only `editRules`
105
+ getter lets the existing transformer and flip commands enforce them without importing
106
+ this entry.
107
+
108
+ With `resize: 'props'`, a resize changes the component's size instead of scaling it,
109
+ so strokes and text keep their size. The size is saved as built-in `width` and `height`
110
+ props, with defaults from `@component({ resize: 'props', width, height })` (100 when
111
+ left out). Read them in `render()` with `this.width()` and `this.height()`; set them
112
+ with `size(width, height)`, `width(value)`, `height(value)` or `create(Type, { width })`.
113
+ Each change is one undo step and redraws at once. Sizes are at least 1 user unit. The
114
+ transformer resizes such a component through `size()` when it is selected alone; a
115
+ multi-selection that contains one cannot resize. Draw the component inside the box
116
+ from (0, 0) to its width and height, so resize handles follow the pointer exactly.
117
+
118
+ ```ts
119
+ @component({ type: 'panel', name: 'Panel', resize: 'props', width: 150, height: 90 })
120
+ class Panel extends Component {
121
+ @prop() title = 'Notes';
122
+ override render() {
123
+ return svg`<g><rect width="${this.width()}" height="${this.height()}" fill="white" stroke="black"/><text x="10" y="17">${this.title}</text></g>`;
124
+ }
125
+ }
126
+ ```
127
+
128
+ Multi-selections use the strictest permissions and the smallest rotation step shared
129
+ by all members. The editor's geometry properties follow the same rules. Application
130
+ commands can use `combineEditRules` from `@rasamjs/transformer` before making edits;
131
+ core setters remain available for programmatic transforms.
132
+
133
+ Outside structural child edits throw before allocating or moving anything. Components
134
+ can themselves be moved, removed, cloned and edited as normal nodes. Compose
135
+ `!isComponentChild(node)` with a selection filter to prevent drilling into their
136
+ rendered children. The editor playground demonstrates that composition.
137
+ `@rasamjs/editor/components` adds editor registration, palette placement tools and a
138
+ properties service built from `@prop` metadata.
139
+
140
+ ## Ports
141
+
142
+ Ports are named points where links attach, such as the two ends of a resistor or the
143
+ pins of a chip. Override `ports()` to declare them. Like `render()`, it reads `this`:
144
+ use props and, with `resize: 'props'`, the saved size. Points are in the component's
145
+ local coordinates at 0°, so moves, rotations and flips carry them along. The optional
146
+ `side` (`'left'`, `'right'`, `'top'` or `'bottom'`) is the direction a link leaves in.
147
+
148
+ ```ts
149
+ @component({ type: 'chip', name: 'Chip' })
150
+ class Chip extends Component {
151
+ @prop({ min: 2, max: 16, step: 2 }) pins = 4;
152
+
153
+ override ports(): PortDefinition[] {
154
+ const half = this.pins / 2;
155
+ return Array.from({ length: this.pins }, (_, index) => ({
156
+ name: `p${index + 1}`,
157
+ x: index < half ? 0 : 60,
158
+ y: 10 + (index % half) * 20,
159
+ side: index < half ? 'left' : 'right',
160
+ }));
161
+ }
162
+
163
+ override render() {
164
+ return svg`<rect width="60" height="${(this.pins / 2) * 20}"/>`;
165
+ }
166
+ }
167
+ ```
168
+
169
+ `portDefinitions` returns them validated and frozen. It calls `ports()` again only when
170
+ the saved props change, including after undo, redo or a raw props write. Names must be
171
+ unique, non-empty strings, `x` and `y` finite numbers, and `side` one of the four
172
+ names; anything else throws a clear error. Live state never moves a port: reading a
173
+ `@state` field inside `ports()` throws. Subclasses inherit ports and can extend them
174
+ with `super.ports()`. Components have no ports by default. `PortDefinition` comes from
175
+ `@rasamjs/core`, so other packages can read `node.portDefinitions` without importing
176
+ this entry, the way tools read `editRules`. `@rasamjs/connectors` attaches link ends
177
+ to them with `{ target, port }`.
178
+
179
+ ## Save, load and migrate
180
+
181
+ Saved SVG contains the rendered children and three attributes on the component group:
182
+
183
+ ```xml
184
+ <g data-rasam-component="status" data-rasam-version="1"
185
+ data-rasam-props='{"caption":"Connected","active":false}'>…</g>
186
+ ```
187
+
188
+ Register constructors through `SVG(..., { elements: [Status] })` before loading, or
189
+ `new ComponentTypes(drawing, [Status])` before import. Core's `parent.create()` also
190
+ registers the constructor for that drawing. Loads, clones, clipboard operations and
191
+ history retain the class. Reconstruction finishes after references and model features
192
+ are copied; the engine then binds matching saved wrappers or replaces the saved tree
193
+ when the template structure changed. Later rendering never appends a second copy.
194
+ Saved hosts or descendants with attributes absent from the template are rebuilt,
195
+ including unmanaged native attributes, so loading cannot retain stale styling.
196
+
197
+ For a new saved version, provide `migrate(props, oldVersion)` returning props for the
198
+ current version. It is called once on older saved input. Missing props use current
199
+ field defaults. Future versions, missing migrations for old versions, malformed JSON
200
+ and invalid props throw. Migration code should be synchronous and free of external
201
+ side effects. Unknown types remain plain groups with their saved appearance; a
202
+ `ComponentTypes` service reports each unknown type once through `console.warn`.
203
+
204
+ State fields are absent from saved props. Explicit SVG export includes their current
205
+ appearance, so passive viewers see the current drawing. Loading recomputes the look
206
+ from saved props and fresh state defaults.
207
+
208
+ ## Type registry and icons
209
+
210
+ `ComponentTypes.register(Type)` registers another type locally. `list(category?)` returns
211
+ sorted frozen definitions; `get(type)` returns the constructor. `icon(type, parent)`
212
+ renders a default instance through the same class into a supplied drawing or group.
213
+ Use a separate small drawing for palette icons. `destroy()` stops the service's
214
+ observer; drawing disposal also cleans it up.
215
+
216
+ The engine shares one change observer and one derivation callback per drawing.
217
+ Dispatch targets changed components, and type discovery visits only newly added
218
+ subtrees or a node whose type attribute changed. Movement does not scan the drawing.
219
+
220
+ The Phase 1 demos use primitive template bindings. Core's separately developed
221
+ template-power work controls nested templates and arrays; component definitions
222
+ do not require those features. Filters, embedded HTML and component nesting are not
223
+ part of this phase.
224
+
225
+ Validate the entry with `bun run check:size:components` (42 KiB gzip cap).
226
+ `bun run api:check`, `bun run check:consumer`
227
+ and `bun run check:docs` also cover the new public entry.
228
+ Use `bun run bench:components` for the 2,000-object/200-move benchmark, or
229
+ `bun run bench:components --revision=07a1160` to reproduce the reviewed version.
package/README.md CHANGED
@@ -9,6 +9,9 @@ Start with the generated [public entry points](API.md) and the
9
9
  The [release procedure](RELEASING.md) describes reproducible acceptance checks;
10
10
  publishing remains separately authorized.
11
11
 
12
+ For class-defined SVG nodes with saved props, live state and undoable actions, see
13
+ the opt-in [`@rasamjs/core/components` guide](COMPONENTS.md).
14
+
12
15
  ## Start
13
16
 
14
17
  Install dependencies at the repository root, then run the remaining commands in
@@ -437,20 +440,50 @@ instance.destroy();
437
440
  ```
438
441
 
439
442
  `Renderer.render(parent, template)` is also available. Each instance owns a host
440
- group and its mounted nodes. A different template literal identity destroys and
441
- replaces the prior instance. Compilation is cached by literal identity.
443
+ group and its mounted nodes. A different template literal identity replaces the prior
444
+ instance. Compilation is cached by literal identity.
445
+
446
+ A hole between elements, or at the top level, renders nested templates. It takes a
447
+ template, an array or other iterable of templates (nested arrays flatten), or `null`,
448
+ `undefined`, a boolean or `''` for nothing, so it can draw lists and conditions:
449
+
450
+ ```ts
451
+ const chip = (pins: number[], on: boolean) => svg`
452
+ <g>
453
+ <rect width="40" height="60"/>
454
+ ${pins.map((y) => svg`<line x1="0" y1="${y}" x2="-10" y2="${y}"/>`)}
455
+ ${on ? svg`<circle cx="20" cy="30" r="6" fill="lime"/>` : null}
456
+ </g>`;
457
+ ```
458
+
459
+ On update, an item whose template literal matches the one at the same index updates
460
+ in place; other items are rebuilt. An update validates every binding and builds new
461
+ items off the drawing first, so a failed update changes nothing. Nested items follow
462
+ their container's child rules, such as only `stop` inside a gradient. Removed items and
463
+ replaced templates are disposed so that undo restores them without clearing history.
442
464
 
443
465
  Static markup is trusted application code. Dynamic primitives become text or
444
466
  attribute values, never markup. Whole quoted attribute holes remove the attribute
445
- for null/undefined; mixed attributes and text use empty segments. Tag names,
446
- attribute names, and child structure are static. Text holes belong inside `text`
447
- elements. Dynamic `on*` bindings, dynamic CSS strings, and external URL references
467
+ for null/undefined; mixed attributes and text use empty segments. Tag names and
468
+ attribute names are static. Text holes belong inside `text` elements and take only
469
+ primitives. Dynamic `on*` bindings, dynamic CSS strings, and external URL references
448
470
  are rejected. Dynamic URLs are restricted to local `#id` and `url(#id)` references.
449
471
 
450
472
  Templates initialize shapes from their bindings and keep declared resources inside
451
473
  their template-owned containers. Resource IDs may be declared in markup and remain
452
474
  immutable after initialization.
453
475
 
476
+ A custom class can share a tag with a built-in class. A `Group` subclass with
477
+ `static variant = { attribute: 'data-type', value: 'led' }` registers for
478
+ `<g data-type="led">` only. Creation writes that attribute, it can't change, and other
479
+ classes can't use its value. Once the class is registered in a drawing, adoption,
480
+ import, clone and undo/redo rebuild it instead of a plain group; `registry.resolve(element)`
481
+ returns the class an element would get. `static ownsChildren = true` reserves a
482
+ container's children for its class: outside builders, `add()`, moves, reordering,
483
+ removal and templates throw before changing anything. The class edits them inside
484
+ `this.withOwnChildren(callback)`, and adoption, clone, undo/redo and destroying the
485
+ owner keep working.
486
+
454
487
  Registration is local to each drawing. `SVG()` registers the full built-in catalog;
455
488
  `create(Constructor, options)` registers a custom constructor as it creates the node.
456
489
  With the lower-level `Svg` constructor, `Elements.register(registry)` can register
@@ -567,6 +600,7 @@ bun run test:browser
567
600
  bun run check:consumer
568
601
  bun run check:size
569
602
  bun run bench
603
+ bun run bench:changes
570
604
  bun run bench:create
571
605
  bun run bench:adopt
572
606
  bun run bench:svgjs
@@ -584,6 +618,12 @@ includes the full element catalog for its ready-to-use factories. The benchmark
584
618
  existing circles over 100 warmed batches, including synchronous `flush()` commits
585
619
  and excluding paint. Machine, browser, median, p95, and samples are recorded in
586
620
  `reports/benchmark.json`; bundle composition is in `reports/size.json`.
621
+ `bench:changes` compares grouped edits and history replay against commit `c21aee1`
622
+ in alternating before/after order in Chromium, using minified bundles, three
623
+ warm-ups and 30 samples at 100, 500 and 1,000 targets. It validates cancellation,
624
+ undo and redo outside each timer and writes samples and source/bundle fingerprints
625
+ to `reports/change-groups-benchmark.json`. Set `RASAM_CHANGES_BASELINE` to compare
626
+ against a different commit. Setup, teardown and paint are excluded.
587
627
  The pre-parity release-preparation run measured 13,257 bytes gzip (12.95 KiB)
588
628
  against the 15 KiB budget. P0–P2 measurements are retained in the current reports; the pre-change snapshot is in
589
629
  `reports/svgjs-parity-baseline.json`. Fill updates retain the 16 ms median target.
@@ -744,7 +784,7 @@ URLs still require `externalUrls: 'http'`. Register the media catalog before imp
744
784
 
745
785
  ## Release status and license
746
786
 
747
- `@rasamjs/core@0.1.2` is published,
787
+ `@rasamjs/core@0.2.0` is published,
748
788
  licensed under [MIT](./LICENSE). The name is not reserved by these checks. Recheck the intended registry at the
749
789
  time of a separately authorized publication.
750
790
  The package remains `private: true` until publication is separately authorized.
package/RELEASING.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Release preparation
2
2
 
3
- The source manifest is `@rasamjs/core@0.1.2`, ESM-only, MIT-licensed and kept
4
- `private: true` between releases. It has no runtime dependencies. Core 0.1.2 was
3
+ The source manifest is `@rasamjs/core@0.3.0`, ESM-only, MIT-licensed and kept
4
+ `private: true` between releases. It has no runtime dependencies. The 0.3.0 release
5
+ adds class components, named ports, nested templates and the reference-index APIs
6
+ used by connectors 0.2.0. The owner authorized publication on 2026-11-07. Core 0.1.2 was
5
7
  published on 2026-11-02 with transformer 0.4.0, selection 0.3.0, tools 0.2.0 and the first
6
8
  viewport 0.1.0 in the [editor release](https://github.com/hdevlop/rasam/releases/tag/viewport-v0.1.0);
7
9
  it gives replay observers the restored sibling order and keeps text reads out of change
@@ -7,7 +7,7 @@ export { Namespace } from './dom/namespace.js';
7
7
  export { DrawingContext } from './services/context.js';
8
8
  export { Scheduler } from './services/scheduler.js';
9
9
  export { Registry } from './services/registry.js';
10
- export type { ElementClass } from './services/types.js';
10
+ export type { ElementClass, ElementVariant } from './services/types.js';
11
11
  export { BoundsService } from './services/bounds.js';
12
12
  export { DefsManager } from './services/defs-manager.js';
13
13
  export { Transformable } from './mixins/transformable.js';
@@ -1 +1 @@
1
- {"version":3,"file":"advanced.d.ts","sourceRoot":"","sources":["../src/advanced.ts"],"names":[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EAAE,MAAM,mBAAmB,CAAC;AAC1D,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { AnyNode } from '../core/types.js';
2
- import type { ElementClass } from '../services/types.js';
2
+ import type { ElementClass, CreationOptions } from '../services/types.js';
3
3
  import type { ParentNode } from '../mixins/types.js';
4
4
  /** A detached managed forest. Insertion moves its nodes and leaves this reusable value empty. */
5
5
  export declare class SvgFragment {
@@ -8,7 +8,7 @@ export declare class SvgFragment {
8
8
  get isDestroyed(): boolean;
9
9
  get nodes(): readonly AnyNode[];
10
10
  add<Node extends AnyNode>(node: Node, index?: number): Node;
11
- create<Options, Child extends AnyNode>(Constructor: ElementClass<Options, Child>, options: Options): Child;
11
+ create<Options, Child extends AnyNode>(Constructor: ElementClass<Options, Child>, options: NoInfer<CreationOptions<Options, Child>>): Child;
12
12
  insertInto(parent: ParentNode, index?: number): readonly AnyNode[];
13
13
  detachChildren(): readonly AnyNode[];
14
14
  clear(): this;
@@ -1 +1 @@
1
- {"version":3,"file":"fragment.d.ts","sourceRoot":"","sources":["../../src/catalog/fragment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC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AC,gDAAgD,CAAC,CAAC;gBACpE,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QACD,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACpC,IAAI;YACJ,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;SAC3C,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC;YACH,KAAK,MAAM,IAAI,IAAI,KAAK;gBAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,QAAQ,CAAC,IAAI,CACjD,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAC1C,EAAE,CAAC;gBACF,IAAI,MAAM;oBAAE,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;;oBAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,KAAK,GAAuB,EAAE;IACrE,OAAO,IAAI,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { AnyNode } from '../core/types.js';
2
+ import type { ModelChange } from './types.js';
3
+ /** Marks a class whose children are drawn from its own state, such as a component. */
4
+ export declare const derivesChildren: unique symbol;
5
+ export declare const ownsDerived: (Constructor: unknown) => boolean;
6
+ /** Records the owner's current descendants as derived. The owner redraws them after replay. */
7
+ export declare function markDerived(owner: AnyNode): void;
8
+ /** Replay skips derived nodes and their owners' child lists. */
9
+ export declare const isDerivedChange: (change: ModelChange) => boolean;
10
+ //# sourceMappingURL=derived.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derived.d.ts","sourceRoot":"","sources":["../../src/changes/derived.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,sFAAsF;AACtF,eAAO,MAAM,eAAe,eAA4B,CAAC;AAGzD,eAAO,MAAM,WAAW,gBAAiB,OAAO,KAAG,OACgC,CAAC;AAEpF,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEhD;AAED,gEAAgE;AAChE,eAAO,MAAM,eAAe,WAAY,WAAW,KAAG,OAEyB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /** Marks a class whose children are drawn from its own state, such as a component. */
2
+ export const derivesChildren = Symbol('derivesChildren');
3
+ const derived = new WeakSet();
4
+ export const ownsDerived = (Constructor) => !!Constructor?.[derivesChildren];
5
+ /** Records the owner's current descendants as derived. The owner redraws them after replay. */
6
+ export function markDerived(owner) {
7
+ for (const node of owner.descendants())
8
+ if (node !== owner)
9
+ derived.add(node);
10
+ }
11
+ /** Replay skips derived nodes and their owners' child lists. */
12
+ export const isDerivedChange = (change) => derived.has(change.target.node) ||
13
+ (change.domain === 'children' && ownsDerived(change.target.node.constructor));
14
+ //# sourceMappingURL=derived.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derived.js","sourceRoot":"","sources":["../../src/changes/derived.ts"],"names":[],"mappings":"AAGA,sFAAsF;AACtF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACzD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,WAAoB,EAAW,EAAE,CAC3D,CAAC,CAAE,WAA2D,EAAE,CAAC,eAAe,CAAC,CAAC;AAEpF,+FAA+F;AAC/F,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,WAAW,EAAE;QAAE,IAAI,IAAI,KAAK,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAChF,CAAC;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAmB,EAAW,EAAE,CAC9D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC/B,CAAC,MAAM,CAAC,MAAM,KAAK,UAAU,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../src/changes/restore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAahD,OAAO,KAAK,EAEV,WAAW,EAIZ,MAAM,YAAY,CAAC;AA6CpB,qFAAqF;AACrF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,IAAI,CAKN"}
1
+ {"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../src/changes/restore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAehD,OAAO,KAAK,EAEV,WAAW,EAIZ,MAAM,YAAY,CAAC;AAqDpB,qFAAqF;AACrF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,SAAS,EAAE,MAAM,GAAG,MAAM,GACzB,IAAI,CAKN"}