@almadar/core 10.29.0 → 10.30.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.
@@ -1,7 +1,7 @@
1
1
  // src/patterns/patterns-registry.json
2
2
  var patterns_registry_default = {
3
3
  version: "1.0.0",
4
- exportedAt: "2026-07-13T15:27:57.365Z",
4
+ exportedAt: "2026-07-16T19:33:37.203Z",
5
5
  patterns: {
6
6
  "entity-table": {
7
7
  type: "entity-table",
@@ -706,7 +706,7 @@ var patterns_registry_default = {
706
706
  types: [
707
707
  "function"
708
708
  ],
709
- description: "renderItem prop",
709
+ description: "Render function for each item. In .lolo: renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.",
710
710
  kind: "callback",
711
711
  callbackArgs: [
712
712
  {
@@ -876,15 +876,6 @@ var patterns_registry_default = {
876
876
  ],
877
877
  typicalSize: "medium",
878
878
  propsSchema: {
879
- entity: {
880
- types: [
881
- "object",
882
- "array"
883
- ],
884
- description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
885
- kind: "entity",
886
- cardinality: "collection"
887
- },
888
879
  className: {
889
880
  types: [
890
881
  "string"
@@ -988,6 +979,15 @@ var patterns_registry_default = {
988
979
  ]
989
980
  }
990
981
  },
982
+ entity: {
983
+ types: [
984
+ "object",
985
+ "array"
986
+ ],
987
+ description: "Entity data (single record or collection).",
988
+ kind: "entity",
989
+ cardinality: "collection"
990
+ },
991
991
  minCardWidth: {
992
992
  types: [
993
993
  "number"
@@ -4223,7 +4223,7 @@ var patterns_registry_default = {
4223
4223
  types: [
4224
4224
  "string"
4225
4225
  ],
4226
- description: "Declarative step click event \u2014 emits UI:{stepClickEvent} with { stepIndex }",
4226
+ description: "Declarative step click event \u2014 emits UI:{stepClickEvent} with { stepIndex }. Setting it requires declaring that event (with a `{ stepIndex }` payload) and a transition handling it in the same trait; omit this prop for non-clickable progress indicators.",
4227
4227
  kind: "event-ref",
4228
4228
  emitPayloadSchema: [
4229
4229
  {
@@ -7672,7 +7672,7 @@ var patterns_registry_default = {
7672
7672
  types: [
7673
7673
  "string"
7674
7674
  ],
7675
- description: "Input type - supports 'select' and 'textarea' in addition to standard types",
7675
+ description: "Input type \u2014 selects the field's data mode. Use 'password' for masked credentials / secret / passphrase entry (there is no separate password pattern); 'email', 'tel', 'url', 'number', 'search', 'date', and 'time' for their respective values; and 'select' / 'textarea' for choice and multi-line entry in addition to the standard single-line types.",
7676
7676
  enumValues: [
7677
7677
  "text",
7678
7678
  "email",
@@ -8950,7 +8950,7 @@ var patterns_registry_default = {
8950
8950
  types: [
8951
8951
  "function"
8952
8952
  ],
8953
- description: "Render function for each item",
8953
+ description: "Render function for each item. In .lolo: renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.",
8954
8954
  required: true,
8955
8955
  kind: "callback",
8956
8956
  callbackArgs: [
@@ -10386,7 +10386,7 @@ var patterns_registry_default = {
10386
10386
  types: [
10387
10387
  "string"
10388
10388
  ],
10389
- description: "Input type - supports 'select' and 'textarea' in addition to standard types",
10389
+ description: "Input type \u2014 selects the field's data mode. Use 'password' for masked credentials / secret / passphrase entry (there is no separate password pattern); 'email', 'tel', 'url', 'number', 'search', 'date', and 'time' for their respective values; and 'select' / 'textarea' for choice and multi-line entry in addition to the standard single-line types.",
10390
10390
  enumValues: [
10391
10391
  "text",
10392
10392
  "email",
@@ -14489,6 +14489,11 @@ var patterns_registry_default = {
14489
14489
  "number"
14490
14490
  ]
14491
14491
  },
14492
+ badge: {
14493
+ types: [
14494
+ "number"
14495
+ ]
14496
+ },
14492
14497
  x: {
14493
14498
  types: [
14494
14499
  "number"
@@ -14509,7 +14514,7 @@ var patterns_registry_default = {
14509
14514
  types: [
14510
14515
  "array"
14511
14516
  ],
14512
- description: "Graph edges",
14517
+ description: "Graph edges (the only rendered links)",
14513
14518
  items: {
14514
14519
  types: [
14515
14520
  "object"
@@ -14547,6 +14552,39 @@ var patterns_registry_default = {
14547
14552
  ]
14548
14553
  }
14549
14554
  },
14555
+ similarity: {
14556
+ types: [
14557
+ "array"
14558
+ ],
14559
+ description: "All-pairs similarity (cosine 0\u20131) used ONLY for layout, never drawn. It is the secondary macro-layout: non-connected pairs get a weak spring (higher cosine \u21D2 closer) so clusters arrange relative to each other; drawn `edges` stay the primary tight structure. When omitted, edges alone drive the layout.",
14560
+ items: {
14561
+ types: [
14562
+ "object"
14563
+ ],
14564
+ properties: {
14565
+ source: {
14566
+ types: [
14567
+ "string"
14568
+ ]
14569
+ },
14570
+ target: {
14571
+ types: [
14572
+ "string"
14573
+ ]
14574
+ },
14575
+ weight: {
14576
+ types: [
14577
+ "number"
14578
+ ]
14579
+ }
14580
+ },
14581
+ required: [
14582
+ "source",
14583
+ "target",
14584
+ "weight"
14585
+ ]
14586
+ }
14587
+ },
14550
14588
  height: {
14551
14589
  types: [
14552
14590
  "number"
@@ -14656,6 +14694,11 @@ var patterns_registry_default = {
14656
14694
  "number"
14657
14695
  ]
14658
14696
  },
14697
+ badge: {
14698
+ types: [
14699
+ "number"
14700
+ ]
14701
+ },
14659
14702
  x: {
14660
14703
  types: [
14661
14704
  "number"
@@ -14714,6 +14757,74 @@ var patterns_registry_default = {
14714
14757
  "number"
14715
14758
  ]
14716
14759
  },
14760
+ badge: {
14761
+ types: [
14762
+ "number"
14763
+ ]
14764
+ },
14765
+ x: {
14766
+ types: [
14767
+ "number"
14768
+ ]
14769
+ },
14770
+ y: {
14771
+ types: [
14772
+ "number"
14773
+ ]
14774
+ }
14775
+ },
14776
+ required: [
14777
+ "id"
14778
+ ]
14779
+ }
14780
+ }
14781
+ ]
14782
+ },
14783
+ onBadgeClick: {
14784
+ types: [
14785
+ "function"
14786
+ ],
14787
+ description: "On node badge click (e.g. to expand a merged cluster).",
14788
+ kind: "callback",
14789
+ callbackArgs: [
14790
+ {
14791
+ name: "node",
14792
+ type: "object",
14793
+ schema: {
14794
+ types: [
14795
+ "object"
14796
+ ],
14797
+ properties: {
14798
+ id: {
14799
+ types: [
14800
+ "string"
14801
+ ]
14802
+ },
14803
+ label: {
14804
+ types: [
14805
+ "string"
14806
+ ]
14807
+ },
14808
+ group: {
14809
+ types: [
14810
+ "string"
14811
+ ]
14812
+ },
14813
+ color: {
14814
+ types: [
14815
+ "string"
14816
+ ]
14817
+ },
14818
+ size: {
14819
+ types: [
14820
+ "number"
14821
+ ]
14822
+ },
14823
+ badge: {
14824
+ types: [
14825
+ "number"
14826
+ ]
14827
+ },
14717
14828
  x: {
14718
14829
  types: [
14719
14830
  "number"
@@ -16729,7 +16840,7 @@ var patterns_registry_default = {
16729
16840
  types: [
16730
16841
  "array"
16731
16842
  ],
16732
- description: "Field definitions for rendering each card. The pattern contract in `@almadar/patterns` documents `columns` as the wire-format alias the compiler emits \u2014 both names resolve to the same shape here. Pass either.",
16843
+ description: "Field definitions for rendering each card. The pattern contract in `@almadar/core/patterns` documents `columns` as the wire-format alias the compiler emits \u2014 both names resolve to the same shape here. Pass either.",
16733
16844
  items: {
16734
16845
  types: [
16735
16846
  "object"
@@ -17061,7 +17172,7 @@ var patterns_registry_default = {
17061
17172
  types: [
17062
17173
  "function"
17063
17174
  ],
17064
- description: 'Per-item render function (schema-level alias for children render prop). In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }] The compiler converts this to the children render prop.',
17175
+ description: 'Per-item render function (schema-level alias for children render prop). In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }] The compiler converts this to the children render prop. In .lolo, author the per-item renderer as renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.',
17065
17176
  kind: "callback",
17066
17177
  callbackArgs: [
17067
17178
  {
@@ -17174,7 +17285,7 @@ var patterns_registry_default = {
17174
17285
  types: [
17175
17286
  "array"
17176
17287
  ],
17177
- description: "Field definitions for rendering each row. The pattern contract in `@almadar/patterns` documents `columns` as the wire-format alias the compiler emits \u2014 both names resolve to the same shape here. Pass either.",
17288
+ description: "Field definitions for rendering each row. The pattern contract in `@almadar/core/patterns` documents `columns` as the wire-format alias the compiler emits \u2014 both names resolve to the same shape here. Pass either.",
17178
17289
  items: {
17179
17290
  types: [
17180
17291
  "object"
@@ -17578,7 +17689,7 @@ var patterns_registry_default = {
17578
17689
  types: [
17579
17690
  "function"
17580
17691
  ],
17581
- description: 'Per-item render function (schema-level alias for children render prop). In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }] The compiler converts this to the children render prop.',
17692
+ description: 'Per-item render function (schema-level alias for children render prop). In .orb schemas: ["fn", "item", { pattern tree with @item.field bindings }] The compiler converts this to the children render prop. In .lolo, author the per-item renderer as renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.',
17582
17693
  kind: "callback",
17583
17694
  callbackArgs: [
17584
17695
  {
@@ -18608,6 +18719,12 @@ var patterns_registry_default = {
18608
18719
  ],
18609
18720
  description: "Text to display after the number"
18610
18721
  },
18722
+ format: {
18723
+ types: [
18724
+ "string"
18725
+ ],
18726
+ description: `Display format: "number" (locale grouping), "currency" ($x.xx), "percent" (rounded %). Unset preserves the value's own decimals.`
18727
+ },
18611
18728
  className: {
18612
18729
  types: [
18613
18730
  "string"
@@ -18794,7 +18911,7 @@ var patterns_registry_default = {
18794
18911
  types: [
18795
18912
  "function"
18796
18913
  ],
18797
- description: "Render function for each slide",
18914
+ description: "Render function for each slide. In .lolo: renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.",
18798
18915
  kind: "callback",
18799
18916
  callbackArgs: [
18800
18917
  {
@@ -18967,7 +19084,7 @@ var patterns_registry_default = {
18967
19084
  types: [
18968
19085
  "function"
18969
19086
  ],
18970
- description: "renderItem prop",
19087
+ description: "Render function for each item. In .lolo: renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.",
18971
19088
  required: true,
18972
19089
  kind: "callback",
18973
19090
  callbackArgs: [
@@ -32989,7 +33106,7 @@ var patterns_registry_default = {
32989
33106
  types: [
32990
33107
  "function"
32991
33108
  ],
32992
- description: 'Per-row render function (schema alias). In .orb: ["fn","item",{...}]. The compiler converts this to the children render prop.',
33109
+ description: 'Per-row render function (schema alias). In .orb: ["fn","item",{...}]. The compiler converts this to the children render prop. In .lolo, author the per-row renderer as renderItem: (fn item <Component \u2026={@item.field}/>), binding per-item fields via @item.field.',
32993
33110
  kind: "callback",
32994
33111
  callbackArgs: [
32995
33112
  {
@@ -38595,31 +38712,31 @@ var patterns_registry_default = {
38595
38712
  types: [
38596
38713
  "number"
38597
38714
  ],
38598
- description: "Rect width in px."
38715
+ description: "Rect width in world units (fractions of `projector.tileWidth`)."
38599
38716
  },
38600
38717
  height: {
38601
38718
  types: [
38602
38719
  "number"
38603
38720
  ],
38604
- description: "Rect height in px."
38721
+ description: "Rect height in world units (fractions of `projector.tileWidth`)."
38605
38722
  },
38606
38723
  radiusX: {
38607
38724
  types: [
38608
38725
  "number"
38609
38726
  ],
38610
- description: "Ellipse horizontal radius in px."
38727
+ description: "Ellipse horizontal radius in world units (fractions of `projector.tileWidth`)."
38611
38728
  },
38612
38729
  radiusY: {
38613
38730
  types: [
38614
38731
  "number"
38615
38732
  ],
38616
- description: "Ellipse vertical radius in px; omitted \u2192 `radiusX` (a circle)."
38733
+ description: "Ellipse vertical radius in world units; omitted \u2192 `radiusX` (a circle)."
38617
38734
  },
38618
38735
  offsetX: {
38619
38736
  types: [
38620
38737
  "number"
38621
38738
  ],
38622
- description: "Fine px nudge from the anchor point (e.g. a disc drawn at `groundY - 8*scale`)."
38739
+ description: "Fine nudge from the anchor point in world units."
38623
38740
  },
38624
38741
  offsetY: {
38625
38742
  types: [
@@ -38631,7 +38748,7 @@ var patterns_registry_default = {
38631
38748
  types: [
38632
38749
  "array"
38633
38750
  ],
38634
- description: "Poly vertices as px offsets relative to the cell's projected top-left.",
38751
+ description: "Poly vertices as world-unit offsets relative to the cell's projected top-left.",
38635
38752
  items: {
38636
38753
  types: [
38637
38754
  "object"
@@ -40449,7 +40566,7 @@ var integrators_registry_default = {
40449
40566
  // src/patterns/component-mapping.json
40450
40567
  var component_mapping_default = {
40451
40568
  version: "1.0.0",
40452
- exportedAt: "2026-07-13T15:27:57.365Z",
40569
+ exportedAt: "2026-07-16T19:33:37.203Z",
40453
40570
  mappings: {
40454
40571
  "page-header": {
40455
40572
  component: "PageHeader",
@@ -41804,7 +41921,7 @@ var component_mapping_default = {
41804
41921
  // src/patterns/event-contracts.json
41805
41922
  var event_contracts_default = {
41806
41923
  version: "1.0.0",
41807
- exportedAt: "2026-07-13T15:27:57.365Z",
41924
+ exportedAt: "2026-07-16T19:33:37.203Z",
41808
41925
  contracts: {
41809
41926
  form: {
41810
41927
  emits: [
@@ -43291,10 +43408,13 @@ var ORB_ALLOWED_ENTITY_PATTERNS = /* @__PURE__ */ new Set([
43291
43408
  "data-grid",
43292
43409
  "search-input",
43293
43410
  "form-section",
43294
- "meter"
43411
+ "meter",
43412
+ "table-view",
43413
+ "filter-group",
43414
+ "timeline",
43415
+ "media-gallery"
43295
43416
  ]);
43296
43417
  var ORB_EXCLUDED_CATEGORIES = /* @__PURE__ */ new Set([
43297
- "game",
43298
43418
  "debug",
43299
43419
  "template"
43300
43420
  ]);
@@ -43375,6 +43495,40 @@ function getOrbAllowedPatternsFiltered(patternNames) {
43375
43495
  return lines.join("\n");
43376
43496
  }
43377
43497
 
43498
+ // src/types/json.ts
43499
+ function isJsonObject(value) {
43500
+ return value !== null && typeof value === "object" && !Array.isArray(value);
43501
+ }
43502
+ function isJsonArray(value) {
43503
+ return Array.isArray(value);
43504
+ }
43505
+
43506
+ // src/patterns/helpers/render-ui-pattern-types.ts
43507
+ function collectPatternTypeTokens(node, out) {
43508
+ if (!isJsonObject(node)) return;
43509
+ const type = node["type"];
43510
+ if (typeof type === "string" && !type.startsWith("@")) out.add(type);
43511
+ const children = node["children"];
43512
+ if (isJsonArray(children)) {
43513
+ for (const child of children) collectPatternTypeTokens(child, out);
43514
+ }
43515
+ }
43516
+ function collectRenderUiPatternTypes(ir, out) {
43517
+ if (isJsonArray(ir)) {
43518
+ if (ir.length >= 3 && ir[0] === "render-ui" && typeof ir[1] === "string") {
43519
+ collectPatternTypeTokens(ir[2], out);
43520
+ }
43521
+ for (const item of ir) collectRenderUiPatternTypes(item, out);
43522
+ } else if (isJsonObject(ir)) {
43523
+ for (const value of Object.values(ir)) collectRenderUiPatternTypes(value, out);
43524
+ }
43525
+ }
43526
+ function renderUiPatternTypesOf(ir) {
43527
+ const out = /* @__PURE__ */ new Set();
43528
+ collectRenderUiPatternTypes(ir, out);
43529
+ return out;
43530
+ }
43531
+
43378
43532
  // src/patterns/helpers/pattern-recommender.ts
43379
43533
  var DOMAIN_KEYWORDS = {
43380
43534
  business: ["admin panels", "data-dense views", "list pages", "data entry", "comparisons"],
@@ -43628,6 +43782,6 @@ function propHostsDrawables(schema) {
43628
43782
  return false;
43629
43783
  }
43630
43784
 
43631
- export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, component_mapping_default as componentMapping, event_contracts_default as eventContracts, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry };
43785
+ export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, collectRenderUiPatternTypes, component_mapping_default as componentMapping, event_contracts_default as eventContracts, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry, renderUiPatternTypesOf };
43632
43786
  //# sourceMappingURL=index.js.map
43633
43787
  //# sourceMappingURL=index.js.map