@almadar/core 10.101.0 → 10.103.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 (45) hide show
  1. package/dist/builders.d.ts +5 -5
  2. package/dist/builders.js +6 -2
  3. package/dist/builders.js.map +1 -1
  4. package/dist/{bus-B8evi8AZ.d.ts → bus-BGojNDOE.d.ts} +52 -7
  5. package/dist/{domain-Ds_7wZIL.d.ts → domain-OgMkN3WN.d.ts} +13 -1
  6. package/dist/{effect-Hm_QDaSI.d.ts → effect-Xn3LIyL7.d.ts} +1 -1
  7. package/dist/{entityAccess-DdcKps16.d.ts → entityAccess-z5HA0P7P.d.ts} +3 -3
  8. package/dist/{expression-DRwzVnMu.d.ts → expression-CfeHdS-f.d.ts} +10 -1
  9. package/dist/factory/index.d.ts +5 -5
  10. package/dist/factory/index.js.map +1 -1
  11. package/dist/factory-runtime/index.d.ts +5 -5
  12. package/dist/factory-runtime/index.js +42 -8
  13. package/dist/factory-runtime/index.js.map +1 -1
  14. package/dist/fixtures.d.ts +3 -3
  15. package/dist/fixtures.js +27 -2
  16. package/dist/fixtures.js.map +1 -1
  17. package/dist/i18n/index.js +27 -6
  18. package/dist/i18n/index.js.map +1 -1
  19. package/dist/{index-1b2JJVYl.d.ts → index-CVYZ3GcI.d.ts} +122 -23
  20. package/dist/index.d.ts +74 -17
  21. package/dist/index.js +417 -72
  22. package/dist/index.js.map +1 -1
  23. package/dist/lolo-document/index.d.ts +166 -0
  24. package/dist/lolo-document/index.js +615 -0
  25. package/dist/lolo-document/index.js.map +1 -0
  26. package/dist/mock/index.d.ts +6 -6
  27. package/dist/mock/index.js +12 -1
  28. package/dist/mock/index.js.map +1 -1
  29. package/dist/patterns/index.d.ts +22 -4
  30. package/dist/patterns/index.js +41 -1
  31. package/dist/patterns/index.js.map +1 -1
  32. package/dist/{schema-TqLV2wlK.d.ts → schema-sHVqe8Kb.d.ts} +1307 -4
  33. package/dist/state-machine/index.d.ts +1 -1
  34. package/dist/themes/index.d.ts +1 -1
  35. package/dist/themes/index.js +2 -1
  36. package/dist/themes/index.js.map +1 -1
  37. package/dist/{trait-YlNXc4H3.d.ts → trait-BSe6oDBd.d.ts} +79 -3
  38. package/dist/types/index.d.ts +8 -8
  39. package/dist/types/index.js +227 -12
  40. package/dist/types/index.js.map +1 -1
  41. package/dist/{types-Ug92oza4.d.ts → types-DK29MMOQ.d.ts} +2 -2
  42. package/fixtures/events-wire/client-effects-provenance/request.json +5 -0
  43. package/fixtures/events-wire/client-effects-provenance/response.json +57 -0
  44. package/package.json +6 -1
  45. package/src/types/bindings.ts +28 -3
@@ -1,5 +1,5 @@
1
- import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './effect-Hm_QDaSI.js';
2
- import { T as TraitEventListener, a as TraitReference } from './trait-YlNXc4H3.js';
1
+ import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './effect-Xn3LIyL7.js';
2
+ import { T as TraitEventListener, a as TraitReference } from './trait-BSe6oDBd.js';
3
3
  import { J as JsonValue } from './json-D8gmyK3l.js';
4
4
 
5
5
  /**
@@ -0,0 +1,5 @@
1
+ {
2
+ "clientId": "tab-1",
3
+ "event": "SAVE",
4
+ "targetTrait": "NoteForm"
5
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "clientEffects": [
3
+ [
4
+ "render-ui",
5
+ "main",
6
+ {
7
+ "message": "Saved",
8
+ "type": "alert"
9
+ }
10
+ ],
11
+ [
12
+ "render-ui",
13
+ "sidebar",
14
+ {
15
+ "entity": "Note",
16
+ "type": "data-list"
17
+ }
18
+ ]
19
+ ],
20
+ "clientEffectsByTrait": [
21
+ {
22
+ "effect": [
23
+ "render-ui",
24
+ "main",
25
+ {
26
+ "message": "Saved",
27
+ "type": "alert"
28
+ }
29
+ ],
30
+ "event": "SAVE",
31
+ "fromState": "editing",
32
+ "traitName": "NoteForm"
33
+ },
34
+ {
35
+ "effect": [
36
+ "render-ui",
37
+ "sidebar",
38
+ {
39
+ "entity": "Note",
40
+ "type": "data-list"
41
+ }
42
+ ],
43
+ "event": "REFRESH",
44
+ "fromState": "idle",
45
+ "traitName": "NoteCatalog"
46
+ }
47
+ ],
48
+ "emittedEvents": [],
49
+ "states": {
50
+ "InlineButtonRender3": "idle",
51
+ "NoteCatalog": "browsing",
52
+ "NoteForm": "saved",
53
+ "NotePersistor": "idle"
54
+ },
55
+ "success": true,
56
+ "transitioned": true
57
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/core",
3
- "version": "10.101.0",
3
+ "version": "10.103.0",
4
4
  "description": "Core schema types and definitions for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,6 +27,11 @@
27
27
  "import": "./dist/factory-runtime/index.js",
28
28
  "require": "./dist/factory-runtime/index.js"
29
29
  },
30
+ "./lolo-document": {
31
+ "types": "./dist/lolo-document/index.d.ts",
32
+ "import": "./dist/lolo-document/index.js",
33
+ "require": "./dist/lolo-document/index.js"
34
+ },
30
35
  "./state-machine": {
31
36
  "types": "./dist/state-machine/index.d.ts",
32
37
  "import": "./dist/state-machine/index.js",
@@ -118,6 +118,31 @@ export const BINDING_DOCS = {
118
118
  examples: ['@currentTheme'],
119
119
  requiresPath: false,
120
120
  },
121
+ event: {
122
+ description: 'The delivery being processed: { event, payload, source } — for a listens delivery the source emit, with its BusEventSource envelope (Runtime Spec Clause 5.5)',
123
+ examples: ['@event.event', '@event.payload.n', '@event.source.trait', '@event.source.tick'],
124
+ requiresPath: false,
125
+ },
126
+ prevEvents: {
127
+ description: 'The deliveries this trait already received in this dispatch, in order, each shaped like @event',
128
+ examples: ['@prevEvents'],
129
+ requiresPath: false,
130
+ },
131
+ prevStates: {
132
+ description: 'The states this trait left in this dispatch, in order',
133
+ examples: ['@prevStates'],
134
+ requiresPath: false,
135
+ },
136
+ fromState: {
137
+ description: "The transition's source state",
138
+ examples: ['@fromState'],
139
+ requiresPath: false,
140
+ },
141
+ toState: {
142
+ description: "The transition's target state (null in a listens `when`, where no transition is chosen yet)",
143
+ examples: ['@toState'],
144
+ requiresPath: false,
145
+ },
121
146
  } as const;
122
147
 
123
148
  /**
@@ -125,12 +150,12 @@ export const BINDING_DOCS = {
125
150
  */
126
151
  export const BINDING_CONTEXT_RULES = {
127
152
  guard: {
128
- allowed: ['entity', 'payload', 'state', 'now', 'config', 'user'] as const,
153
+ allowed: ['entity', 'payload', 'state', 'now', 'config', 'user', 'event', 'prevEvents', 'prevStates', 'fromState', 'toState'] as const,
129
154
  description:
130
- 'Guards can access entity fields, event payload, current state, time, the call-site trait config (@config.X), and the authenticated user context (@user.id, @user.role) for ownership / role gates. Config access lets atoms write mode-aware guards — e.g. std-modal\'s OPEN can require @payload.row only when @config.mode equals "edit", letting create-mode legitimately fire OPEN with no row. Like effects, @config.X is substituted at molecule/organism inline time with the literal call-site value; at atom-scope validate, @config is allowed-but-unresolved.',
155
+ 'Guards can read the delivery being processed and this dispatch\'s log (@event, @prevEvents, @prevStates) and the transition\'s ends (@fromState, @toState; Runtime Spec Clause 5.5). Guards can access entity fields, event payload, current state, time, the call-site trait config (@config.X), and the authenticated user context (@user.id, @user.role) for ownership / role gates. Config access lets atoms write mode-aware guards — e.g. std-modal\'s OPEN can require @payload.row only when @config.mode equals "edit", letting create-mode legitimately fire OPEN with no row. Like effects, @config.X is substituted at molecule/organism inline time with the literal call-site value; at atom-scope validate, @config is allowed-but-unresolved.',
131
156
  },
132
157
  effect: {
133
- allowed: ['entity', 'payload', 'state', 'now', 'trait', 'config', 'user', 'callsitePayload', 'pages', 'currentTheme'] as const,
158
+ allowed: ['entity', 'payload', 'state', 'now', 'trait', 'config', 'user', 'callsitePayload', 'pages', 'currentTheme', 'event', 'prevEvents', 'prevStates', 'fromState', 'toState'] as const,
134
159
  description:
135
160
  'Effects can access and modify entity fields, use payload data, embed another trait\'s live frame via @trait.X inside render-ui children, read trait config values (@config.X) for atoms parameterized by their call-site, and read the authenticated user context (@user.id, @user.role). At molecule/organism inline time, @config.X is substituted with the literal value from the call-site config block; at atom-scope validate, @config is allowed-but-unresolved. @callsitePayload.X is the call-site-captured event payload emitted by the compiler\'s inline-trait hoisting (a hoisted render block that captured @payload); it is resolved at the composing effect by the runtime BindingResolver.',
136
161
  },