@almadar/core 10.110.0 → 10.112.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 (102) hide show
  1. package/dist/builders.d.ts +5 -5
  2. package/dist/builders.js +78 -9
  3. package/dist/builders.js.map +1 -1
  4. package/dist/{bus-CuAsuaHW.d.ts → bus-BZ9ekDiD.d.ts} +4 -2
  5. package/dist/{domain-Bf6sf9NR.d.ts → domain-DV8lmH3r.d.ts} +1857 -39
  6. package/dist/{effect-2JoKc8Zj.d.ts → effect-B9nMpTKN.d.ts} +27 -3
  7. package/dist/{entityAccess-CuKaSX0N.d.ts → entityAccess-Ak_ZvGXZ.d.ts} +3 -3
  8. package/dist/{expression-DhTTuu2W.d.ts → expression-Dz84kipC.d.ts} +4 -2
  9. package/dist/factory/index.d.ts +81 -7
  10. package/dist/factory/index.js +560 -16
  11. package/dist/factory/index.js.map +1 -1
  12. package/dist/factory-runtime/index.d.ts +5 -5
  13. package/dist/factory-runtime/index.js +78 -9
  14. package/dist/factory-runtime/index.js.map +1 -1
  15. package/dist/fixtures.d.ts +3 -3
  16. package/dist/fixtures.js +1 -1
  17. package/dist/fixtures.js.map +1 -1
  18. package/dist/i18n/index.js +36 -4
  19. package/dist/i18n/index.js.map +1 -1
  20. package/dist/{index-bC0n_h8G.d.ts → index-DmkUMeXz.d.ts} +79 -10
  21. package/dist/index.d.ts +71 -20
  22. package/dist/index.js +17101 -5233
  23. package/dist/index.js.map +1 -1
  24. package/dist/mock/index.d.ts +20 -7
  25. package/dist/mock/index.js +38 -11
  26. package/dist/mock/index.js.map +1 -1
  27. package/dist/patterns/component-mapping.json +1 -1
  28. package/dist/patterns/event-contracts.json +1 -1
  29. package/dist/patterns/index.d.ts +1042 -228
  30. package/dist/patterns/index.js +392 -13
  31. package/dist/patterns/index.js.map +1 -1
  32. package/dist/patterns/patterns-registry.json +382 -10
  33. package/dist/patterns/registry.json +382 -10
  34. package/dist/{schema-DqBoP7Ab.d.ts → schema-C-HLTS_Q.d.ts} +2969 -44
  35. package/dist/state-machine/index.d.ts +1 -1
  36. package/dist/state-machine/index.js +32 -7
  37. package/dist/state-machine/index.js.map +1 -1
  38. package/dist/themes/index.d.ts +1 -1
  39. package/dist/themes/index.js +16303 -5151
  40. package/dist/themes/index.js.map +1 -1
  41. package/dist/{trait-S5uhI089.d.ts → trait-CRgDZSy_.d.ts} +10 -2
  42. package/dist/types/index.d.ts +8 -8
  43. package/dist/types/index.js +115 -10
  44. package/dist/types/index.js.map +1 -1
  45. package/dist/{types-2uS2WfIo.d.ts → types-C3nlpTDW.d.ts} +2 -2
  46. package/package.json +1 -1
  47. package/themes/almadar-website.json +7 -0
  48. package/themes/almadar.json +16 -4
  49. package/themes/aqua.json +420 -0
  50. package/themes/arabesque.json +512 -0
  51. package/themes/art-deco.json +340 -0
  52. package/themes/art-nouveau.json +340 -0
  53. package/themes/atelier.json +43 -187
  54. package/themes/bauhaus.json +330 -0
  55. package/themes/bloomberg-dense.json +69 -213
  56. package/themes/blueprint.json +330 -0
  57. package/themes/clay.json +53 -188
  58. package/themes/comic.json +107 -146
  59. package/themes/constructivist.json +340 -0
  60. package/themes/corporate.json +62 -197
  61. package/themes/cyberpunk.json +418 -0
  62. package/themes/frutiger-aero.json +422 -0
  63. package/themes/game-adventure.json +46 -21
  64. package/themes/game-rpg.json +48 -22
  65. package/themes/game-sci-fi.json +47 -21
  66. package/themes/game-ui-pack.json +39 -17
  67. package/themes/gazette.json +50 -194
  68. package/themes/glass.json +78 -201
  69. package/themes/gothic.json +329 -0
  70. package/themes/ink-wash.json +512 -0
  71. package/themes/kawaii.json +512 -0
  72. package/themes/kiosk.json +70 -200
  73. package/themes/linear-clean.json +67 -202
  74. package/themes/luxury.json +322 -0
  75. package/themes/mac-classic.json +330 -0
  76. package/themes/material.json +328 -0
  77. package/themes/memphis.json +337 -0
  78. package/themes/mid-century.json +338 -0
  79. package/themes/minimalist.json +60 -204
  80. package/themes/mudcloth.json +512 -0
  81. package/themes/neon.json +51 -212
  82. package/themes/neumorphic.json +322 -0
  83. package/themes/newsprint.json +330 -0
  84. package/themes/notion-editorial.json +51 -186
  85. package/themes/pixel.json +321 -0
  86. package/themes/prism.json +66 -69
  87. package/themes/retro.json +126 -165
  88. package/themes/risograph.json +325 -0
  89. package/themes/scandi.json +512 -0
  90. package/themes/sketch.json +330 -0
  91. package/themes/solarpunk.json +512 -0
  92. package/themes/steampunk.json +327 -0
  93. package/themes/swiss.json +338 -0
  94. package/themes/terminal.json +86 -156
  95. package/themes/trait-wars.json +143 -184
  96. package/themes/ukiyo-e.json +512 -0
  97. package/themes/vaporwave.json +420 -0
  98. package/themes/victorian.json +337 -0
  99. package/themes/wabi-sabi.json +512 -0
  100. package/themes/win95.json +324 -0
  101. package/themes/wireframe.json +44 -179
  102. package/themes/zine.json +330 -0
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { S as SExpr, b as EventPayload, E as Expression } from './expression-DhTTuu2W.js';
2
+ import { S as SExpr, b as EventPayload, E as Expression } from './expression-Dz84kipC.js';
3
3
  import { J as JsonValue, R as RuntimeValue } from './json-D8gmyK3l.js';
4
4
 
5
5
  /**
@@ -2840,7 +2840,7 @@ type EntityData = Record<string, EntityRow[]>;
2840
2840
  *
2841
2841
  * DO NOT EDIT MANUALLY — regenerated by almadar-pattern-sync `patterns` command.
2842
2842
  *
2843
- * Generated: 2026-09-28T12:49:04.983Z
2843
+ * Generated: 2026-09-30T15:57:56.622Z
2844
2844
  * Pattern count: 252
2845
2845
  */
2846
2846
 
@@ -3072,6 +3072,7 @@ interface PatternPropsMap {
3072
3072
  visitedStates?: unknown[] | string | SExpr;
3073
3073
  stateClickEvent?: string | SExpr;
3074
3074
  transitionClickEvent?: string | SExpr;
3075
+ onTransitionClick?: ((...args: unknown[]) => unknown) | string | SExpr;
3075
3076
  selectedState?: string | SExpr;
3076
3077
  pendingSourceState?: string | SExpr;
3077
3078
  nodeShape?: string | SExpr;
@@ -3350,6 +3351,7 @@ interface PatternPropsMap {
3350
3351
  showValues?: boolean | string | SExpr;
3351
3352
  stack?: string | SExpr;
3352
3353
  timeAxis?: boolean | string | SExpr;
3354
+ period?: string | SExpr;
3353
3355
  drillEvent?: string | SExpr;
3354
3356
  actions?: unknown[] | string | SExpr;
3355
3357
  isLoading?: boolean | string | SExpr;
@@ -3529,6 +3531,7 @@ interface PatternPropsMap {
3529
3531
  type: 'confirm-dialog';
3530
3532
  isOpen?: boolean | string | SExpr;
3531
3533
  onClose?: ((...args: unknown[]) => unknown) | string | SExpr;
3534
+ onExited?: ((...args: unknown[]) => unknown) | string | SExpr;
3532
3535
  onConfirm?: ((...args: unknown[]) => unknown) | string | SExpr;
3533
3536
  title: string | SExpr;
3534
3537
  message?: string | unknown | SExpr;
@@ -3673,6 +3676,10 @@ interface PatternPropsMap {
3673
3676
  positionEvent?: string | SExpr;
3674
3677
  dndItemIdField?: string | SExpr;
3675
3678
  dndRoot?: boolean | string | SExpr;
3679
+ emptyIcon?: unknown | string | SExpr;
3680
+ emptyTitle?: string | SExpr;
3681
+ emptyDescription?: string | SExpr;
3682
+ emptyAction?: PatternPropValue | string | SExpr;
3676
3683
  entity: PatternPropValue | unknown[] | string | SExpr;
3677
3684
  fields?: unknown[] | string | SExpr;
3678
3685
  columns?: unknown[] | string | SExpr;
@@ -3707,6 +3714,10 @@ interface PatternPropsMap {
3707
3714
  positionEvent?: string | SExpr;
3708
3715
  dndItemIdField?: string | SExpr;
3709
3716
  dndRoot?: boolean | string | SExpr;
3717
+ emptyIcon?: unknown | string | SExpr;
3718
+ emptyTitle?: string | SExpr;
3719
+ emptyDescription?: string | SExpr;
3720
+ emptyAction?: PatternPropValue | string | SExpr;
3710
3721
  entity: PatternPropValue | unknown[] | string | SExpr;
3711
3722
  fields?: unknown[] | string | SExpr;
3712
3723
  columns?: unknown[] | string | SExpr;
@@ -4079,6 +4090,8 @@ interface PatternPropsMap {
4079
4090
  'drawer': {
4080
4091
  type: 'drawer';
4081
4092
  isOpen?: boolean | string | SExpr;
4093
+ onExited?: ((...args: unknown[]) => unknown) | string | SExpr;
4094
+ contained?: boolean | string | SExpr;
4082
4095
  onClose?: ((...args: unknown[]) => unknown) | string | SExpr;
4083
4096
  title?: unknown | string | SExpr;
4084
4097
  children?: unknown | string | SExpr;
@@ -5067,6 +5080,7 @@ interface PatternPropsMap {
5067
5080
  closeEvent?: string | SExpr;
5068
5081
  swipeDownToClose?: boolean | string | SExpr;
5069
5082
  look?: string | SExpr;
5083
+ contained?: boolean | string | SExpr;
5070
5084
  };
5071
5085
  'modal-slot': {
5072
5086
  type: 'modal-slot';
@@ -5156,6 +5170,7 @@ interface PatternPropsMap {
5156
5170
  'page-header': {
5157
5171
  type: 'page-header';
5158
5172
  title?: string | number | SExpr;
5173
+ icon?: unknown | string | SExpr;
5159
5174
  subtitle?: string | number | SExpr;
5160
5175
  showBack?: boolean | string | SExpr;
5161
5176
  backEvent?: string | SExpr;
@@ -5264,6 +5279,9 @@ interface PatternPropsMap {
5264
5279
  };
5265
5280
  'presence': {
5266
5281
  type: 'presence';
5282
+ animation: string | SExpr;
5283
+ animate?: boolean | string | SExpr;
5284
+ onExited?: ((...args: unknown[]) => unknown) | string | SExpr;
5267
5285
  show: boolean | string | SExpr;
5268
5286
  className?: string | SExpr;
5269
5287
  children: unknown | string | SExpr;
@@ -5779,6 +5797,7 @@ interface PatternPropsMap {
5779
5797
  visitedStates?: unknown[] | string | SExpr;
5780
5798
  stateClickEvent?: string | SExpr;
5781
5799
  transitionClickEvent?: string | SExpr;
5800
+ onTransitionClick?: ((...args: unknown[]) => unknown) | string | SExpr;
5782
5801
  selectedState?: string | SExpr;
5783
5802
  pendingSourceState?: string | SExpr;
5784
5803
  nodeShape?: string | SExpr;
@@ -6029,6 +6048,10 @@ interface PatternPropsMap {
6029
6048
  positionEvent?: string | SExpr;
6030
6049
  dndItemIdField?: string | SExpr;
6031
6050
  dndRoot?: boolean | string | SExpr;
6051
+ emptyIcon?: unknown | string | SExpr;
6052
+ emptyTitle?: string | SExpr;
6053
+ emptyDescription?: string | SExpr;
6054
+ emptyAction?: PatternPropValue | string | SExpr;
6032
6055
  entity: PatternPropValue | unknown[] | string | SExpr;
6033
6056
  columns?: unknown[] | string | SExpr;
6034
6057
  fields?: unknown[] | string | SExpr;
@@ -6239,7 +6262,7 @@ interface PatternPropsMap {
6239
6262
  isLoading?: boolean | string | SExpr;
6240
6263
  error?: PatternPropValue | string | SExpr;
6241
6264
  entity?: string | SExpr;
6242
- children?: unknown | string | SExpr;
6265
+ children?: unknown | ((...args: unknown[]) => unknown) | string | SExpr;
6243
6266
  pattern?: string | SExpr;
6244
6267
  sourceTrait?: string | SExpr;
6245
6268
  fallback?: unknown | string | SExpr;
@@ -6255,6 +6278,7 @@ interface PatternPropsMap {
6255
6278
  error?: PatternPropValue | string | SExpr;
6256
6279
  entity?: string | SExpr;
6257
6280
  suspense?: boolean | PatternPropValue | string | SExpr;
6281
+ pageKey?: string | SExpr;
6258
6282
  };
6259
6283
  'upload-drop-zone': {
6260
6284
  type: 'upload-drop-zone';
@@ -1,6 +1,6 @@
1
- import { O as OrbitalEntity } from './effect-2JoKc8Zj.js';
2
- import { O as OrbitalSchema, a as OrbitalDefinition } from './schema-DqBoP7Ab.js';
3
- import { S as SExpr } from './expression-DhTTuu2W.js';
1
+ import { O as OrbitalEntity } from './effect-B9nMpTKN.js';
2
+ import { O as OrbitalSchema, a as OrbitalDefinition } from './schema-C-HLTS_Q.js';
3
+ import { S as SExpr } from './expression-Dz84kipC.js';
4
4
 
5
5
  /**
6
6
  * Entity access policies — the declared `@read`/`@create`/`@update`/`@delete`
@@ -53,8 +53,10 @@ declare const SExprDataSchema: z.ZodType<SExpr>;
53
53
  */
54
54
  declare const SExprAtomSchema: z.ZodType<SExprAtom>;
55
55
  /**
56
- * Recursive schema for S-expressions.
57
- * Validates that arrays have at least one element and first element is a string (operator).
56
+ * Recursive schema for S-expressions: an atom, or a call — an array whose first element is its
57
+ * string operator. A call's arguments are data (`SExprDataSchema`): an argument array without
58
+ * an operator head is a literal list, as both evaluators read it (an inlined config list in
59
+ * `["array/nth", [{…}, {…}], "@entity.i"]`).
58
60
  */
59
61
  declare const SExprSchema: z.ZodType<SExpr>;
60
62
  /**
@@ -1,10 +1,10 @@
1
- import { k as FactorySignatureCatalog, h as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, j as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, T as TraitOverlay, J as JsonSchema } from '../types-2uS2WfIo.js';
2
- export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, i as FactoryProvenance, l as FactorySignatureEntityField, m as FactoryTraitSignature, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, q as TraitOverlayEntry, r as TraitOverlayListener } from '../types-2uS2WfIo.js';
3
- import { a as EntityPersistence, E as EntityField } from '../effect-2JoKc8Zj.js';
4
- import { a as TraitReference } from '../trait-S5uhI089.js';
5
- export { J as JsonValue } from '../json-D8gmyK3l.js';
1
+ import { k as FactorySignatureCatalog, h as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, j as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, T as TraitOverlay, J as JsonSchema } from '../types-C3nlpTDW.js';
2
+ export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, i as FactoryProvenance, l as FactorySignatureEntityField, m as FactoryTraitSignature, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, q as TraitOverlayEntry, r as TraitOverlayListener } from '../types-C3nlpTDW.js';
3
+ import { J as JsonValue } from '../json-D8gmyK3l.js';
4
+ import { a as EntityPersistence, E as EntityField } from '../effect-B9nMpTKN.js';
5
+ import { a as TraitReference } from '../trait-CRgDZSy_.js';
6
6
  import 'zod';
7
- import '../expression-DhTTuu2W.js';
7
+ import '../expression-Dz84kipC.js';
8
8
 
9
9
  /**
10
10
  * Rehydrate `overridableConfigKeys` from a catalog's `knobDefs` table,
@@ -22,6 +22,80 @@ import '../expression-DhTTuu2W.js';
22
22
  */
23
23
  declare function rehydrateKnobDefs(catalog: FactorySignatureCatalog): FactorySignatureCatalog;
24
24
 
25
+ /**
26
+ * Three-way merge of an orbital's factory params: the common ancestor (`base`), and each side's
27
+ * edit (`ours`, `theirs`). Objects merge key by key; a list whose items are objects carrying a
28
+ * string `id` (entity fields, trait children, nav items) merges item by item and keeps either
29
+ * side's reorder alongside the other's inserts; any other list is one value.
30
+ *
31
+ * Only a value both sides changed differently (`both-changed`) or an item/key one side removed
32
+ * while the other changed it (`delete-vs-edit`) is a conflict. A conflicted value keeps ours in
33
+ * `merged` until it is resolved.
34
+ */
35
+
36
+ type ParamConflictKind = 'both-changed' | 'delete-vs-edit';
37
+ interface ParamConflict {
38
+ /** Keys and item ids from the params root to the conflicted value. */
39
+ path: string[];
40
+ kind: ParamConflictKind;
41
+ /** `null` stands for absent. */
42
+ base: JsonValue;
43
+ ours: JsonValue;
44
+ theirs: JsonValue;
45
+ }
46
+ interface ParamsMerge {
47
+ merged: JsonValue;
48
+ conflicts: ParamConflict[];
49
+ }
50
+ declare function mergeParams(base: JsonValue, ours: JsonValue, theirs: JsonValue): ParamsMerge;
51
+
52
+ /**
53
+ * The behavior-contract slice `orbital-lolo` reads at parse time (a behavior package's
54
+ * `loloContracts` sidecar): per behavior, each trait's `entityContract.requires` and overridable
55
+ * config-key types, its page names, orbital-level config and app-level config.
56
+ *
57
+ * Built from a package's own factory-signature catalog(s) and its own `.orb` documents. A behavior
58
+ * with no factory signature (a template, or a behavior a user published from the Studio) takes its
59
+ * slice from its `.orb` alone. Pure: the cascade (`@almadar-io/almadar-pattern-sync`) and the
60
+ * Studio's behavior packages read their files and call this, one copy of the rule.
61
+ */
62
+
63
+ /** One trait's parse-time-checkable contract. Mirrors `TraitContract` in `orbital-lolo/src/registry.rs`. */
64
+ interface LoloTraitContract {
65
+ /** Entity fields the trait reads (`@entity.<field>`); a rebind target must supply all of these. */
66
+ requires: string[];
67
+ /** Overridable config keys → their lolo type. */
68
+ config: Record<string, string>;
69
+ }
70
+ /** One orbital's parse-time-checkable contract. Mirrors `OrbitalContract` in `orbital-lolo/src/registry.rs`. */
71
+ interface LoloOrbitalContract {
72
+ config: Record<string, string>;
73
+ }
74
+ /** One behavior's slice. Mirrors `Behavior` in `orbital-lolo/src/registry.rs`. */
75
+ interface LoloBehaviorContract {
76
+ traits: Record<string, LoloTraitContract>;
77
+ pages: string[];
78
+ /** Orbital contracts, keyed by orbital name — the `Alias.orbitals.X` surface. */
79
+ orbitals: Record<string, LoloOrbitalContract>;
80
+ /** App-level (organism-wide) declared config keys → their lolo type. */
81
+ appConfig: Record<string, string>;
82
+ }
83
+ /** One behavior's `.orb` document, named as its registry file is (`<name>.orb`). */
84
+ interface NamedOrb {
85
+ name: string;
86
+ orb: JsonValue;
87
+ }
88
+ /**
89
+ * A declared config knob's lolo type: its explicit `type` when present, else inferred from its
90
+ * `default`'s JS runtime type.
91
+ */
92
+ declare function inferConfigType(spec: JsonValue | undefined): string | undefined;
93
+ /** Recursively sort object keys so emitted JSON is byte-stable across runs. */
94
+ declare function sortKeysDeep(v: JsonValue): JsonValue;
95
+ declare function buildLoloBehaviorContracts(catalogs: readonly FactorySignatureCatalog[], orbs: readonly NamedOrb[]): Record<string, LoloBehaviorContract>;
96
+ /** The sidecar file's content: `{ behaviors }`, key-sorted. */
97
+ declare function serializeLoloBehaviorContracts(behaviors: Record<string, LoloBehaviorContract>): string;
98
+
25
99
  /**
26
100
  * Typed questionnaire surface — shapes the studio renders + answers.
27
101
  *
@@ -440,4 +514,4 @@ declare function signatureToParamsSchema(signature: FactorySignature, options?:
440
514
  */
441
515
  declare function assertNoUnsatisfiableEnum(node: JsonSchema, where: string, path?: string): void;
442
516
 
443
- export { type CallSiteDiff, type DomainQuestion, type DomainQuestionAnswer, type DomainQuestionAnswers, type DomainQuestionInputType, type FactoryCallPlanMutation, type FactoryCallPlanMutationTemplate, type FactoryCallPlanState, FactoryCallSite, FactoryConfigParam, FactoryConfigTier, FactoryParamValue, FactorySignature, FactorySignatureCatalog, JsonSchema, type OrbitalCallInput, PresentationOverlay, RuleOverlay, RuleOverlayEntry, TraitOverlay, type TranslationBinding, type TranslationResult, type TranslationWarning, answerToMutations, answersToMutations, applyFactoryCallPlanMutation, assertNoUnsatisfiableEnum, deriveInputType, diffFactoryCalls, generateQuestions, rehydrateKnobDefs, signatureToParamsSchema, translateOverlaysToParams };
517
+ export { type CallSiteDiff, type DomainQuestion, type DomainQuestionAnswer, type DomainQuestionAnswers, type DomainQuestionInputType, type FactoryCallPlanMutation, type FactoryCallPlanMutationTemplate, type FactoryCallPlanState, FactoryCallSite, FactoryConfigParam, FactoryConfigTier, FactoryParamValue, FactorySignature, FactorySignatureCatalog, JsonSchema, JsonValue, type LoloBehaviorContract, type LoloOrbitalContract, type LoloTraitContract, type NamedOrb, type OrbitalCallInput, type ParamConflict, type ParamConflictKind, type ParamsMerge, PresentationOverlay, RuleOverlay, RuleOverlayEntry, TraitOverlay, type TranslationBinding, type TranslationResult, type TranslationWarning, answerToMutations, answersToMutations, applyFactoryCallPlanMutation, assertNoUnsatisfiableEnum, buildLoloBehaviorContracts, deriveInputType, diffFactoryCalls, generateQuestions, inferConfigType, mergeParams, rehydrateKnobDefs, serializeLoloBehaviorContracts, signatureToParamsSchema, sortKeysDeep, translateOverlaysToParams };