@almadar/patterns 2.13.0 → 2.14.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "exportedAt": "2026-04-03T05:25:58.152Z",
3
+ "exportedAt": "2026-04-18T11:44:35.778Z",
4
4
  "mappings": {
5
5
  "page-header": {
6
6
  "component": "PageHeader",
@@ -1780,6 +1780,21 @@
1780
1780
  "importPath": "@/components/organisms/OrbInspector",
1781
1781
  "category": "debug"
1782
1782
  },
1783
+ "trait-frame": {
1784
+ "component": "TraitFrame",
1785
+ "importPath": "@/components/atoms/TraitFrame",
1786
+ "category": "component"
1787
+ },
1788
+ "file-tree": {
1789
+ "component": "FileTree",
1790
+ "importPath": "@/components/molecules/FileTree",
1791
+ "category": "component"
1792
+ },
1793
+ "avl-orbitals-cosmic-zoom": {
1794
+ "component": "AvlOrbitalsCosmicZoom",
1795
+ "importPath": "@/components/organisms/AvlOrbitalsCosmicZoom",
1796
+ "category": "display"
1797
+ },
1783
1798
  "heading": {
1784
1799
  "component": "Typography",
1785
1800
  "importPath": "@/components/atoms/Typography",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "exportedAt": "2026-04-03T05:25:58.152Z",
3
+ "exportedAt": "2026-04-18T11:44:35.778Z",
4
4
  "contracts": {
5
5
  "form": {
6
6
  "emits": [
@@ -1292,6 +1292,13 @@
1292
1292
  "type": "object"
1293
1293
  }
1294
1294
  },
1295
+ {
1296
+ "event": "CODE_CHANGE",
1297
+ "trigger": "action",
1298
+ "payload": {
1299
+ "type": "object"
1300
+ }
1301
+ },
1295
1302
  {
1296
1303
  "event": "SERVICE_MODE_TOGGLE",
1297
1304
  "trigger": "action",
package/dist/index.d.ts CHANGED
@@ -7168,6 +7168,18 @@ export declare const registry: {
7168
7168
  types: string[];
7169
7169
  description: string;
7170
7170
  };
7171
+ editable: {
7172
+ types: string[];
7173
+ description: string;
7174
+ };
7175
+ onChange: {
7176
+ types: string[];
7177
+ description: string;
7178
+ };
7179
+ errorLines: {
7180
+ types: string[];
7181
+ description: string;
7182
+ };
7171
7183
  };
7172
7184
  };
7173
7185
  "markdown-content": {
@@ -13891,6 +13903,14 @@ export declare const registry: {
13891
13903
  types: string[];
13892
13904
  description: string;
13893
13905
  };
13906
+ onOrbitalDoubleClick: {
13907
+ types: string[];
13908
+ description: string;
13909
+ };
13910
+ cosmicEntryLevel: {
13911
+ types: string[];
13912
+ description: string;
13913
+ };
13894
13914
  initialOrbital: {
13895
13915
  types: string[];
13896
13916
  description: string;
@@ -15381,6 +15401,104 @@ export declare const registry: {
15381
15401
  };
15382
15402
  };
15383
15403
  };
15404
+ "trait-frame": {
15405
+ type: string;
15406
+ category: string;
15407
+ description: string;
15408
+ suggestedFor: string[];
15409
+ typicalSize: string;
15410
+ propsSchema: {
15411
+ traitName: {
15412
+ types: string[];
15413
+ description: string;
15414
+ required: boolean;
15415
+ };
15416
+ fallback: {
15417
+ types: string[];
15418
+ description: string;
15419
+ };
15420
+ };
15421
+ };
15422
+ "file-tree": {
15423
+ type: string;
15424
+ category: string;
15425
+ description: string;
15426
+ suggestedFor: string[];
15427
+ typicalSize: string;
15428
+ propsSchema: {
15429
+ tree: {
15430
+ types: string[];
15431
+ description: string;
15432
+ required: boolean;
15433
+ };
15434
+ selectedPath: {
15435
+ types: string[];
15436
+ description: string;
15437
+ };
15438
+ onFileSelect: {
15439
+ types: string[];
15440
+ description: string;
15441
+ };
15442
+ className: {
15443
+ types: string[];
15444
+ description: string;
15445
+ };
15446
+ indent: {
15447
+ types: string[];
15448
+ description: string;
15449
+ };
15450
+ };
15451
+ };
15452
+ "avl-orbitals-cosmic-zoom": {
15453
+ type: string;
15454
+ category: string;
15455
+ description: string;
15456
+ suggestedFor: string[];
15457
+ typicalSize: string;
15458
+ propsSchema: {
15459
+ schema: {
15460
+ types: string[];
15461
+ description: string;
15462
+ required: boolean;
15463
+ };
15464
+ className: {
15465
+ types: string[];
15466
+ description: string;
15467
+ };
15468
+ color: {
15469
+ types: string[];
15470
+ description: string;
15471
+ };
15472
+ animated: {
15473
+ types: string[];
15474
+ description: string;
15475
+ };
15476
+ width: {
15477
+ types: string[];
15478
+ description: string;
15479
+ };
15480
+ height: {
15481
+ types: string[];
15482
+ description: string;
15483
+ };
15484
+ highlightedOrbital: {
15485
+ types: string[];
15486
+ description: string;
15487
+ };
15488
+ onOrbitalSelect: {
15489
+ types: string[];
15490
+ description: string;
15491
+ };
15492
+ minZoom: {
15493
+ types: string[];
15494
+ description: string;
15495
+ };
15496
+ maxZoom: {
15497
+ types: string[];
15498
+ description: string;
15499
+ };
15500
+ };
15501
+ };
15384
15502
  heading: {
15385
15503
  type: string;
15386
15504
  category: string;
@@ -22678,6 +22796,18 @@ export declare const PATTERN_REGISTRY: {
22678
22796
  types: string[];
22679
22797
  description: string;
22680
22798
  };
22799
+ editable: {
22800
+ types: string[];
22801
+ description: string;
22802
+ };
22803
+ onChange: {
22804
+ types: string[];
22805
+ description: string;
22806
+ };
22807
+ errorLines: {
22808
+ types: string[];
22809
+ description: string;
22810
+ };
22681
22811
  };
22682
22812
  };
22683
22813
  "markdown-content": {
@@ -29401,6 +29531,14 @@ export declare const PATTERN_REGISTRY: {
29401
29531
  types: string[];
29402
29532
  description: string;
29403
29533
  };
29534
+ onOrbitalDoubleClick: {
29535
+ types: string[];
29536
+ description: string;
29537
+ };
29538
+ cosmicEntryLevel: {
29539
+ types: string[];
29540
+ description: string;
29541
+ };
29404
29542
  initialOrbital: {
29405
29543
  types: string[];
29406
29544
  description: string;
@@ -30891,6 +31029,104 @@ export declare const PATTERN_REGISTRY: {
30891
31029
  };
30892
31030
  };
30893
31031
  };
31032
+ "trait-frame": {
31033
+ type: string;
31034
+ category: string;
31035
+ description: string;
31036
+ suggestedFor: string[];
31037
+ typicalSize: string;
31038
+ propsSchema: {
31039
+ traitName: {
31040
+ types: string[];
31041
+ description: string;
31042
+ required: boolean;
31043
+ };
31044
+ fallback: {
31045
+ types: string[];
31046
+ description: string;
31047
+ };
31048
+ };
31049
+ };
31050
+ "file-tree": {
31051
+ type: string;
31052
+ category: string;
31053
+ description: string;
31054
+ suggestedFor: string[];
31055
+ typicalSize: string;
31056
+ propsSchema: {
31057
+ tree: {
31058
+ types: string[];
31059
+ description: string;
31060
+ required: boolean;
31061
+ };
31062
+ selectedPath: {
31063
+ types: string[];
31064
+ description: string;
31065
+ };
31066
+ onFileSelect: {
31067
+ types: string[];
31068
+ description: string;
31069
+ };
31070
+ className: {
31071
+ types: string[];
31072
+ description: string;
31073
+ };
31074
+ indent: {
31075
+ types: string[];
31076
+ description: string;
31077
+ };
31078
+ };
31079
+ };
31080
+ "avl-orbitals-cosmic-zoom": {
31081
+ type: string;
31082
+ category: string;
31083
+ description: string;
31084
+ suggestedFor: string[];
31085
+ typicalSize: string;
31086
+ propsSchema: {
31087
+ schema: {
31088
+ types: string[];
31089
+ description: string;
31090
+ required: boolean;
31091
+ };
31092
+ className: {
31093
+ types: string[];
31094
+ description: string;
31095
+ };
31096
+ color: {
31097
+ types: string[];
31098
+ description: string;
31099
+ };
31100
+ animated: {
31101
+ types: string[];
31102
+ description: string;
31103
+ };
31104
+ width: {
31105
+ types: string[];
31106
+ description: string;
31107
+ };
31108
+ height: {
31109
+ types: string[];
31110
+ description: string;
31111
+ };
31112
+ highlightedOrbital: {
31113
+ types: string[];
31114
+ description: string;
31115
+ };
31116
+ onOrbitalSelect: {
31117
+ types: string[];
31118
+ description: string;
31119
+ };
31120
+ minZoom: {
31121
+ types: string[];
31122
+ description: string;
31123
+ };
31124
+ maxZoom: {
31125
+ types: string[];
31126
+ description: string;
31127
+ };
31128
+ };
31129
+ };
30894
31130
  heading: {
30895
31131
  type: string;
30896
31132
  category: string;
@@ -33374,6 +33610,21 @@ export declare const COMPONENT_MAPPING: {
33374
33610
  importPath: string;
33375
33611
  category: string;
33376
33612
  };
33613
+ "trait-frame": {
33614
+ component: string;
33615
+ importPath: string;
33616
+ category: string;
33617
+ };
33618
+ "file-tree": {
33619
+ component: string;
33620
+ importPath: string;
33621
+ category: string;
33622
+ };
33623
+ "avl-orbitals-cosmic-zoom": {
33624
+ component: string;
33625
+ importPath: string;
33626
+ category: string;
33627
+ };
33377
33628
  heading: {
33378
33629
  component: string;
33379
33630
  importPath: string;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/patterns-registry.json
2
2
  var patterns_registry_default = {
3
3
  version: "1.0.0",
4
- exportedAt: "2026-04-03T05:25:58.152Z",
4
+ exportedAt: "2026-04-18T11:44:35.778Z",
5
5
  patterns: {
6
6
  "entity-table": {
7
7
  type: "entity-table",
@@ -10648,6 +10648,24 @@ var patterns_registry_default = {
10648
10648
  "string"
10649
10649
  ],
10650
10650
  description: "Additional CSS classes"
10651
+ },
10652
+ editable: {
10653
+ types: [
10654
+ "boolean"
10655
+ ],
10656
+ description: "When true, render an editable surface that composes a transparent `Textarea` over a Prism-highlighted overlay. The overlay re-tokenizes on each keystroke (driven from a local mirror of the textarea value), so users see syntax-highlighted code while still being able to type. Folding is skipped in editable mode. History: GAP-51 first-cut shipped plain (no-highlighting) editable text; GAP-77 (2026-04-12) added the Prism overlay layer. Default: false (existing read-only behavior unchanged)."
10657
+ },
10658
+ onChange: {
10659
+ types: [
10660
+ "function"
10661
+ ],
10662
+ description: "GAP-51: called with the new code on every keystroke when `editable === true`. Consumers should debounce + parse downstream \u2014 `CodeBlock` does not."
10663
+ },
10664
+ errorLines: {
10665
+ types: [
10666
+ "object"
10667
+ ],
10668
+ description: "GAP-80: line-level error/warning highlights for editable mode. Map of 1-based line number \u2192 severity. The overlay paints a colored background on each line: error = red, warning = yellow. Pass undefined (default) to disable. The consumer is responsible for computing the path \u2192 line map from the schema + validation results."
10651
10669
  }
10652
10670
  }
10653
10671
  },
@@ -20583,6 +20601,18 @@ var patterns_registry_default = {
20583
20601
  ],
20584
20602
  description: "onLevelChange prop"
20585
20603
  },
20604
+ onOrbitalDoubleClick: {
20605
+ types: [
20606
+ "function"
20607
+ ],
20608
+ description: "GAP-52: fired when the user double-clicks an orbital. Consumers (e.g. the builder workspace) use this as the trigger to enter cosmic mode (`AvlOrbitalsCosmicZoom`) for the focused orbital. The level at which this fires is controlled by `cosmicEntryLevel` (default `'expanded'`). At `'expanded'` the existing overview\u2192expanded drill is preserved \u2014 the callback fires only on the second double-click. At `'overview'` the callback fires on the FIRST double-click and the existing drill is suppressed for that interaction. `'both'` fires at either level. The callback runs unconditionally \u2014 persona / permission gating is the consumer's responsibility."
20609
+ },
20610
+ cosmicEntryLevel: {
20611
+ types: [
20612
+ "string"
20613
+ ],
20614
+ description: "GAP-53: which level the `onOrbitalDoubleClick` callback fires at. - `'expanded'` (default, non-breaking) \u2014 fires only at L2 expanded; the first overview double-click still drills overview\u2192expanded. - `'overview'` \u2014 fires at L1 overview on the FIRST double-click. The overview\u2192expanded drill is suppressed when the callback is provided. - `'both'` \u2014 fires at either level."
20615
+ },
20586
20616
  initialOrbital: {
20587
20617
  types: [
20588
20618
  "string"
@@ -22795,6 +22825,155 @@ var patterns_registry_default = {
22795
22825
  }
22796
22826
  }
22797
22827
  },
22828
+ "trait-frame": {
22829
+ type: "trait-frame",
22830
+ category: "component",
22831
+ description: "TraitFrame \u2014 renders the current frame of a referenced trait. Resolves the `@trait.X[.slot]` binding at render time by looking up the referenced trait's last `render-ui` payload from the orbital's `UISlotManager`. Re-renders automatically when that trait transitions via the per-trait subscription channel (`subscribeTrait`). This is the single rendering primitive both runtime paths converge on: - **Interpreted path** \u2014 the trait-binding resolver in `renderer/trait-binding-resolver.ts` walks pattern trees at render time, substituting `\"@trait.X\"` string children with this component. - **Compiled path** \u2014 the TypeScript shell codegen in `orbital-shell-typescript/src/backend.rs::pattern_to_jsx_with_data` emits this component directly into generated JSX wherever a `@trait.*` string appears in a pattern tree. Embedding is passive: the referenced trait's state machine runs unchanged; TraitFrame is only a read-only lens on its current frame. Event propagation happens over the shared event bus, not through this component.",
22832
+ suggestedFor: [
22833
+ "trait",
22834
+ "frame",
22835
+ "trait frame"
22836
+ ],
22837
+ typicalSize: "small",
22838
+ propsSchema: {
22839
+ traitName: {
22840
+ types: [
22841
+ "string"
22842
+ ],
22843
+ description: "Name of the trait whose current frame to embed. Must match a trait declared in the current orbital. Compiler validates that the name exists at build time (see `ORB_BINDING_TRAIT_UNKNOWN`).",
22844
+ required: true
22845
+ },
22846
+ fallback: {
22847
+ types: [
22848
+ "node"
22849
+ ],
22850
+ description: "Rendered when the referenced trait has not (yet) emitted any render-ui. Use a skeleton, spinner, or message. Defaults to `null` (renders nothing), so an unfulfilled reference drops cleanly out of a parent `children:` array."
22851
+ }
22852
+ }
22853
+ },
22854
+ "file-tree": {
22855
+ type: "file-tree",
22856
+ category: "component",
22857
+ description: "FileTree component",
22858
+ suggestedFor: [
22859
+ "file",
22860
+ "tree",
22861
+ "file tree"
22862
+ ],
22863
+ typicalSize: "medium",
22864
+ propsSchema: {
22865
+ tree: {
22866
+ types: [
22867
+ "array"
22868
+ ],
22869
+ description: "The tree data",
22870
+ required: true
22871
+ },
22872
+ selectedPath: {
22873
+ types: [
22874
+ "string"
22875
+ ],
22876
+ description: "Currently selected file path"
22877
+ },
22878
+ onFileSelect: {
22879
+ types: [
22880
+ "function"
22881
+ ],
22882
+ description: "Called when a file is clicked"
22883
+ },
22884
+ className: {
22885
+ types: [
22886
+ "string"
22887
+ ],
22888
+ description: "CSS class"
22889
+ },
22890
+ indent: {
22891
+ types: [
22892
+ "number"
22893
+ ],
22894
+ description: "Indent size per level in px (default: 16)"
22895
+ }
22896
+ }
22897
+ },
22898
+ "avl-orbitals-cosmic-zoom": {
22899
+ type: "avl-orbitals-cosmic-zoom",
22900
+ category: "display",
22901
+ description: "AvlOrbitalsCosmicZoom component",
22902
+ suggestedFor: [
22903
+ "avl",
22904
+ "orbitals",
22905
+ "cosmic",
22906
+ "zoom",
22907
+ "avl orbitals cosmic zoom"
22908
+ ],
22909
+ typicalSize: "large",
22910
+ propsSchema: {
22911
+ schema: {
22912
+ types: [
22913
+ "object",
22914
+ "string"
22915
+ ],
22916
+ description: "The orbital schema (parsed object or JSON string)",
22917
+ required: true
22918
+ },
22919
+ className: {
22920
+ types: [
22921
+ "string"
22922
+ ],
22923
+ description: "CSS class for the outer container"
22924
+ },
22925
+ color: {
22926
+ types: [
22927
+ "string"
22928
+ ],
22929
+ description: "Primary color for the visualization"
22930
+ },
22931
+ animated: {
22932
+ types: [
22933
+ "boolean"
22934
+ ],
22935
+ description: "Enable animations (default: true)"
22936
+ },
22937
+ width: {
22938
+ types: [
22939
+ "number",
22940
+ "string"
22941
+ ],
22942
+ description: "Container width"
22943
+ },
22944
+ height: {
22945
+ types: [
22946
+ "number",
22947
+ "string"
22948
+ ],
22949
+ description: "Container height"
22950
+ },
22951
+ highlightedOrbital: {
22952
+ types: [
22953
+ "string"
22954
+ ],
22955
+ description: "GAP-52: name of the orbital to highlight with a persistent ring/glow. Independent from user-driven selection (click). Used by the builder workspace when entering cosmic mode from a focused orbital \u2014 the focused orbital is highlighted while the user can still click any other orbital to select it."
22956
+ },
22957
+ onOrbitalSelect: {
22958
+ types: [
22959
+ "function"
22960
+ ],
22961
+ description: "GAP-55: fired when the user clicks an orbital tile. Consumers (e.g. the builder workspace) use this as the trigger to drill INTO the clicked orbital \u2014 typically by switching back to the canvas tab and opening the clicked orbital at L2 expanded. Local `selected` toggle (visual highlight + info panel) still fires regardless of whether the callback is provided."
22962
+ },
22963
+ minZoom: {
22964
+ types: [
22965
+ "number"
22966
+ ],
22967
+ description: "GAP-54: minimum zoom factor when scroll-wheel zooming. Default 0.4."
22968
+ },
22969
+ maxZoom: {
22970
+ types: [
22971
+ "number"
22972
+ ],
22973
+ description: "GAP-54: maximum zoom factor when scroll-wheel zooming. Default 3."
22974
+ }
22975
+ }
22976
+ },
22798
22977
  heading: {
22799
22978
  type: "heading",
22800
22979
  category: "component",
@@ -23611,7 +23790,7 @@ var integrators_registry_default = {
23611
23790
  // src/component-mapping.json
23612
23791
  var component_mapping_default = {
23613
23792
  version: "1.0.0",
23614
- exportedAt: "2026-04-03T05:25:58.152Z",
23793
+ exportedAt: "2026-04-18T11:44:35.778Z",
23615
23794
  mappings: {
23616
23795
  "page-header": {
23617
23796
  component: "PageHeader",
@@ -25391,6 +25570,21 @@ var component_mapping_default = {
25391
25570
  importPath: "@/components/organisms/OrbInspector",
25392
25571
  category: "debug"
25393
25572
  },
25573
+ "trait-frame": {
25574
+ component: "TraitFrame",
25575
+ importPath: "@/components/atoms/TraitFrame",
25576
+ category: "component"
25577
+ },
25578
+ "file-tree": {
25579
+ component: "FileTree",
25580
+ importPath: "@/components/molecules/FileTree",
25581
+ category: "component"
25582
+ },
25583
+ "avl-orbitals-cosmic-zoom": {
25584
+ component: "AvlOrbitalsCosmicZoom",
25585
+ importPath: "@/components/organisms/AvlOrbitalsCosmicZoom",
25586
+ category: "display"
25587
+ },
25394
25588
  heading: {
25395
25589
  component: "Typography",
25396
25590
  importPath: "@/components/atoms/Typography",
@@ -25407,7 +25601,7 @@ var component_mapping_default = {
25407
25601
  // src/event-contracts.json
25408
25602
  var event_contracts_default = {
25409
25603
  version: "1.0.0",
25410
- exportedAt: "2026-04-03T05:25:58.152Z",
25604
+ exportedAt: "2026-04-18T11:44:35.778Z",
25411
25605
  contracts: {
25412
25606
  form: {
25413
25607
  emits: [
@@ -26699,6 +26893,13 @@ var event_contracts_default = {
26699
26893
  type: "object"
26700
26894
  }
26701
26895
  },
26896
+ {
26897
+ event: "CODE_CHANGE",
26898
+ trigger: "action",
26899
+ payload: {
26900
+ type: "object"
26901
+ }
26902
+ },
26702
26903
  {
26703
26904
  event: "SERVICE_MODE_TOGGLE",
26704
26905
  trigger: "action",