@arkitektio/bsx 5.0.0 → 6.1.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 (230) hide show
  1. package/README.md +2 -2
  2. package/dist/bsx/analyze.d.ts +6 -5
  3. package/dist/bsx/analyze.d.ts.map +1 -1
  4. package/dist/bsx/analyze.js +12 -10
  5. package/dist/bsx/analyze.js.map +1 -1
  6. package/dist/bsx/declared.d.ts +111 -0
  7. package/dist/bsx/declared.d.ts.map +1 -0
  8. package/dist/bsx/declared.js +311 -0
  9. package/dist/bsx/declared.js.map +1 -0
  10. package/dist/bsx/index.d.ts +1 -0
  11. package/dist/bsx/index.d.ts.map +1 -1
  12. package/dist/bsx/index.js +1 -0
  13. package/dist/bsx/index.js.map +1 -1
  14. package/dist/bsx/infer.d.ts +40 -17
  15. package/dist/bsx/infer.d.ts.map +1 -1
  16. package/dist/bsx/infer.js +105 -49
  17. package/dist/bsx/infer.js.map +1 -1
  18. package/dist/bsx/language.d.ts +6 -2
  19. package/dist/bsx/language.d.ts.map +1 -1
  20. package/dist/bsx/language.js +65 -21
  21. package/dist/bsx/language.js.map +1 -1
  22. package/dist/bsx/parse.d.ts +6 -1
  23. package/dist/bsx/parse.d.ts.map +1 -1
  24. package/dist/bsx/parse.js +32 -3
  25. package/dist/bsx/parse.js.map +1 -1
  26. package/dist/bsx/print.d.ts.map +1 -1
  27. package/dist/bsx/print.js +3 -0
  28. package/dist/bsx/print.js.map +1 -1
  29. package/dist/bsx/references.d.ts +45 -51
  30. package/dist/bsx/references.d.ts.map +1 -1
  31. package/dist/bsx/references.js +265 -138
  32. package/dist/bsx/references.js.map +1 -1
  33. package/dist/catalogs/html.d.ts +2 -2
  34. package/dist/catalogs/index.d.ts +49 -71
  35. package/dist/catalogs/index.d.ts.map +1 -1
  36. package/dist/catalogs/index.js +1 -1
  37. package/dist/catalogs/logo.d.ts +14 -28
  38. package/dist/catalogs/logo.d.ts.map +1 -1
  39. package/dist/catalogs/logo.js +1 -2
  40. package/dist/catalogs/logo.js.map +1 -1
  41. package/dist/catalogs/parts/data.d.ts +1 -1
  42. package/dist/catalogs/parts/feedback.d.ts +3 -3
  43. package/dist/catalogs/parts/forms.d.ts +4 -4
  44. package/dist/catalogs/parts/html.d.ts +2 -2
  45. package/dist/catalogs/parts/icons.d.ts +2 -2
  46. package/dist/catalogs/parts/index.d.ts +35 -57
  47. package/dist/catalogs/parts/index.d.ts.map +1 -1
  48. package/dist/catalogs/parts/logo.d.ts +10 -25
  49. package/dist/catalogs/parts/logo.d.ts.map +1 -1
  50. package/dist/catalogs/parts/logo.js +12 -14
  51. package/dist/catalogs/parts/logo.js.map +1 -1
  52. package/dist/catalogs/parts/navigation.d.ts +4 -4
  53. package/dist/catalogs/parts/overlays.d.ts +11 -11
  54. package/dist/catalogs/parts/run.d.ts +2 -10
  55. package/dist/catalogs/parts/run.d.ts.map +1 -1
  56. package/dist/catalogs/parts/scene.d.ts +7 -15
  57. package/dist/catalogs/parts/scene.d.ts.map +1 -1
  58. package/dist/catalogs/parts/scene.js +1 -5
  59. package/dist/catalogs/parts/scene.js.map +1 -1
  60. package/dist/catalogs/parts/typography.d.ts +3 -3
  61. package/dist/catalogs/props.d.ts +2 -2
  62. package/dist/catalogs/scene.d.ts +5 -13
  63. package/dist/catalogs/scene.d.ts.map +1 -1
  64. package/dist/catalogs/shadcn.d.ts +11 -11
  65. package/dist/catalogs/ui.d.ts +16 -16
  66. package/dist/logo/actionLogoSource.d.ts +3 -3
  67. package/dist/logo/actionLogoSource.d.ts.map +1 -1
  68. package/dist/logo/actionLogoSource.js +4 -4
  69. package/dist/logo/actionLogoSource.js.map +1 -1
  70. package/dist/renderer/BlokRenderer.d.ts +16 -6
  71. package/dist/renderer/BlokRenderer.d.ts.map +1 -1
  72. package/dist/renderer/BlokRenderer.js +32 -13
  73. package/dist/renderer/BlokRenderer.js.map +1 -1
  74. package/dist/renderer/baseCatalog.d.ts +3 -3
  75. package/dist/renderer/baseCatalog.js +2 -2
  76. package/dist/renderer/bloks/control.d.ts +18 -2
  77. package/dist/renderer/bloks/control.d.ts.map +1 -1
  78. package/dist/renderer/bloks/control.js +85 -14
  79. package/dist/renderer/bloks/control.js.map +1 -1
  80. package/dist/renderer/bloks/data.d.ts +1 -1
  81. package/dist/renderer/bloks/feedback.d.ts +3 -3
  82. package/dist/renderer/bloks/forms.d.ts +4 -4
  83. package/dist/renderer/bloks/html.d.ts +2 -2
  84. package/dist/renderer/bloks/icons.d.ts +1 -1
  85. package/dist/renderer/bloks/index.d.ts +30 -37
  86. package/dist/renderer/bloks/index.d.ts.map +1 -1
  87. package/dist/renderer/bloks/logo/index.d.ts +1 -8
  88. package/dist/renderer/bloks/logo/index.d.ts.map +1 -1
  89. package/dist/renderer/bloks/logo/index.js +1 -2
  90. package/dist/renderer/bloks/logo/index.js.map +1 -1
  91. package/dist/renderer/bloks/logo/logo.fixture.json +266 -250
  92. package/dist/renderer/bloks/navigation.d.ts +4 -4
  93. package/dist/renderer/bloks/overlays.d.ts +11 -11
  94. package/dist/renderer/bloks/run/components.d.ts +1 -5
  95. package/dist/renderer/bloks/run/components.d.ts.map +1 -1
  96. package/dist/renderer/bloks/scene/Scene.d.ts.map +1 -1
  97. package/dist/renderer/bloks/scene/Scene.js +4 -2
  98. package/dist/renderer/bloks/scene/Scene.js.map +1 -1
  99. package/dist/renderer/bloks/scene/host.d.ts +2 -0
  100. package/dist/renderer/bloks/scene/host.d.ts.map +1 -1
  101. package/dist/renderer/bloks/scene/host.js +8 -0
  102. package/dist/renderer/bloks/scene/host.js.map +1 -1
  103. package/dist/renderer/bloks/scene/index.d.ts +4 -8
  104. package/dist/renderer/bloks/scene/index.d.ts.map +1 -1
  105. package/dist/renderer/bloks/scene/interaction.d.ts.map +1 -1
  106. package/dist/renderer/bloks/scene/interaction.js +3 -2
  107. package/dist/renderer/bloks/scene/interaction.js.map +1 -1
  108. package/dist/renderer/bloks/shared/props.d.ts +2 -2
  109. package/dist/renderer/bloks/typography.d.ts +3 -3
  110. package/dist/renderer/declarations.d.ts +40 -33
  111. package/dist/renderer/declarations.d.ts.map +1 -1
  112. package/dist/renderer/declarations.js +41 -56
  113. package/dist/renderer/declarations.js.map +1 -1
  114. package/dist/renderer/declare.js +4 -4
  115. package/dist/renderer/declare.js.map +1 -1
  116. package/dist/renderer/persist.d.ts +22 -13
  117. package/dist/renderer/persist.d.ts.map +1 -1
  118. package/dist/renderer/persist.js +40 -21
  119. package/dist/renderer/persist.js.map +1 -1
  120. package/dist/renderer/runtime/catalog.d.ts +4 -4
  121. package/dist/renderer/runtime/catalog.js +3 -3
  122. package/dist/renderer/runtime/components.d.ts +4 -4
  123. package/dist/renderer/runtime/components.d.ts.map +1 -1
  124. package/dist/renderer/runtime/components.js +5 -5
  125. package/dist/renderer/runtime/components.js.map +1 -1
  126. package/dist/renderer/runtime/context.d.ts +5 -5
  127. package/dist/renderer/runtime/context.d.ts.map +1 -1
  128. package/dist/renderer/runtime/context.js +11 -5
  129. package/dist/renderer/runtime/context.js.map +1 -1
  130. package/dist/renderer/runtime/describe.d.ts +3 -3
  131. package/dist/renderer/runtime/describe.d.ts.map +1 -1
  132. package/dist/renderer/runtime/describe.js +2 -2
  133. package/dist/renderer/runtime/describe.js.map +1 -1
  134. package/dist/renderer/runtime/hooks.d.ts.map +1 -1
  135. package/dist/renderer/runtime/hooks.js +8 -4
  136. package/dist/renderer/runtime/hooks.js.map +1 -1
  137. package/dist/renderer/runtime/index.d.ts +1 -0
  138. package/dist/renderer/runtime/index.d.ts.map +1 -1
  139. package/dist/renderer/runtime/index.js +1 -0
  140. package/dist/renderer/runtime/index.js.map +1 -1
  141. package/dist/renderer/runtime/locals.d.ts +57 -0
  142. package/dist/renderer/runtime/locals.d.ts.map +1 -0
  143. package/dist/renderer/runtime/locals.js +87 -0
  144. package/dist/renderer/runtime/locals.js.map +1 -0
  145. package/dist/renderer/runtime/scope.d.ts +14 -0
  146. package/dist/renderer/runtime/scope.d.ts.map +1 -1
  147. package/dist/renderer/runtime/scope.js +25 -3
  148. package/dist/renderer/runtime/scope.js.map +1 -1
  149. package/dist/renderer/runtime/tree.d.ts.map +1 -1
  150. package/dist/renderer/runtime/tree.js +7 -1
  151. package/dist/renderer/runtime/tree.js.map +1 -1
  152. package/dist/renderer/runtime/types.d.ts +8 -3
  153. package/dist/renderer/runtime/types.d.ts.map +1 -1
  154. package/dist/shadcn.d.ts +36 -43
  155. package/dist/shadcn.d.ts.map +1 -1
  156. package/dist/shadcn.js +1 -2
  157. package/dist/shadcn.js.map +1 -1
  158. package/dist/spec/bsx_v2.json +11067 -6321
  159. package/dist/spec/catalogs/{base@3.json → base@4.json} +434 -288
  160. package/dist/spec/catalogs/{base@3.json.js → base@4.json.js} +434 -288
  161. package/dist/spec/catalogs/orkestrator@1.json +10 -10
  162. package/dist/spec/catalogs/orkestrator@1.json.js +10 -10
  163. package/dist/spec/catalogs.d.ts +4 -4
  164. package/dist/spec/catalogs.d.ts.map +1 -1
  165. package/dist/spec/catalogs.js +7 -7
  166. package/dist/spec/catalogs.js.map +1 -1
  167. package/dist/spec/vocabulary.d.ts +25 -4
  168. package/dist/spec/vocabulary.d.ts.map +1 -1
  169. package/dist/spec/vocabulary.js +50 -5
  170. package/dist/spec/vocabulary.js.map +1 -1
  171. package/dist/spec/vocabulary.json +58 -32
  172. package/dist/spec/vocabulary.json.js +58 -32
  173. package/package.json +1 -1
  174. package/src/bsx/analyze.ts +14 -12
  175. package/src/bsx/bsx.test.ts +4 -4
  176. package/src/bsx/declared.ts +346 -0
  177. package/src/bsx/index.ts +1 -0
  178. package/src/bsx/infer.test.ts +42 -32
  179. package/src/bsx/infer.ts +128 -71
  180. package/src/bsx/language.test.ts +37 -25
  181. package/src/bsx/language.ts +72 -25
  182. package/src/bsx/parse.ts +34 -3
  183. package/src/bsx/print.ts +3 -0
  184. package/src/bsx/references.test.ts +82 -81
  185. package/src/bsx/references.ts +313 -178
  186. package/src/catalogs/catalogs.test.ts +3 -2
  187. package/src/catalogs/index.ts +1 -1
  188. package/src/catalogs/logo.ts +1 -2
  189. package/src/catalogs/parts/logo.ts +13 -17
  190. package/src/catalogs/parts/scene.ts +1 -7
  191. package/src/logo/actionLogoSource.ts +4 -4
  192. package/src/renderer/BlokComponentHost.test.tsx +5 -5
  193. package/src/renderer/BlokRenderer.test.tsx +22 -0
  194. package/src/renderer/BlokRenderer.tsx +70 -20
  195. package/src/renderer/addBlokComponents.test.tsx +1 -1
  196. package/src/renderer/baseCatalog.ts +2 -2
  197. package/src/renderer/bloks/control.tsx +119 -16
  198. package/src/renderer/bloks/logo/index.tsx +2 -3
  199. package/src/renderer/bloks/logo/logo.fixture.json +266 -250
  200. package/src/renderer/bloks/logo/logo.test.tsx +18 -7
  201. package/src/renderer/bloks/run/space.test.tsx +12 -4
  202. package/src/renderer/bloks/scene/Scene.tsx +4 -2
  203. package/src/renderer/bloks/scene/host.tsx +11 -0
  204. package/src/renderer/bloks/scene/interaction.tsx +11 -6
  205. package/src/renderer/bloks/scene/transform.test.ts +8 -7
  206. package/src/renderer/declarations.test.ts +38 -51
  207. package/src/renderer/declarations.ts +67 -88
  208. package/src/renderer/declare.test.ts +4 -4
  209. package/src/renderer/declare.ts +4 -4
  210. package/src/renderer/persist.test.ts +70 -49
  211. package/src/renderer/persist.ts +57 -34
  212. package/src/renderer/runtime/catalog.test.ts +2 -2
  213. package/src/renderer/runtime/catalog.ts +4 -4
  214. package/src/renderer/runtime/components.tsx +8 -8
  215. package/src/renderer/runtime/context.tsx +17 -10
  216. package/src/renderer/runtime/describe.ts +5 -5
  217. package/src/renderer/runtime/hooks.ts +6 -4
  218. package/src/renderer/runtime/index.ts +1 -0
  219. package/src/renderer/runtime/locals.tsx +105 -0
  220. package/src/renderer/runtime/scope.tsx +31 -3
  221. package/src/renderer/runtime/tree.tsx +16 -4
  222. package/src/renderer/runtime/types.ts +8 -3
  223. package/src/shadcn.ts +1 -2
  224. package/src/spec/bsx_v2.json +11067 -6321
  225. package/src/spec/catalogs/{base@3.json → base@4.json} +434 -288
  226. package/src/spec/catalogs/orkestrator@1.json +10 -10
  227. package/src/spec/catalogs.ts +8 -8
  228. package/src/spec/spec.test.ts +19 -16
  229. package/src/spec/vocabulary.json +58 -32
  230. package/src/spec/vocabulary.ts +69 -10
@@ -1,10 +1,9 @@
1
- import { type BlokScopeLocal } from '../bsx/references';
2
1
  import type { BlokLocal, BlokLocalChoice } from './persist';
3
- import { type BlokComponentNode, type BlokQuery, type BlokSourceStatus, type BlokSubscription, type BlokTaskRecord } from './runtime';
2
+ import { type BlokQuery, type BlokSourceStatus, type BlokSubscription, type BlokTaskRecord } from './runtime';
4
3
  /**
5
- * What a v2 blok declares beside its tree, as a host gets it from the server
6
- * (`Blok`/`BlokRevision`: `vocab`, `resolvedLocals`, `demo`, `queries`,
7
- * `subscriptions`), and the data model a renderer starts from.
4
+ * What a host gets of a v2 blok beside its tree (`Blok`/`BlokRevision`:
5
+ * `vocab`, `resolvedLocals`, `demo`), what its tree declares (its `<query>`
6
+ * and `<subscription>` children), and the data model a renderer starts from.
8
7
  *
9
8
  * The roots a blok reads (vocabulary `roots.data`) are laid out as:
10
9
  *
@@ -13,18 +12,22 @@ import { type BlokComponentNode, type BlokQuery, type BlokSourceStatus, type Blo
13
12
  * args: {...}, task: TaskRecord, viewer: {...}, then: null | "...",
14
13
  * queries: {<name>: {status, value, error, refetching, fetching_more}},
15
14
  * subscriptions: {<name>: {status, value, error}},
16
- * <local>: value, <into name>: TaskRecord,
15
+ * <into name>: TaskRecord,
16
+ * $locals: {<local's runtime id, encoded>: value},
17
17
  * }
18
18
  *
19
- * `self` reads `deps.self`.
19
+ * `self` reads `deps.self`; a `<local>` is read by its name through its
20
+ * parent's scope (`runtime/locals`).
20
21
  */
21
22
  /**
22
23
  * A local as its tree resolves it (`resolvedLocals`): an arg port (`ArgPort`
23
24
  * fields) plus `persist`, its kind always said (inferred where the blok left
24
- * it out, ANY when nothing tells). A renderer never types a local with the
25
- * as-written `locals`, whose kind may be missing.
25
+ * it out, ANY when nothing tells), and `node`, the id of the `<local>` that
26
+ * declares it. A renderer types a local's values (a kept one too) by its node.
26
27
  */
27
28
  export type BlokDeclaredLocal = {
29
+ /** The id of the `<local>` node that declares it. */
30
+ node: string;
28
31
  key: string;
29
32
  kind: string;
30
33
  identifier?: string | null;
@@ -37,7 +40,7 @@ export type BlokDeclaredLocal = {
37
40
  persist?: boolean | null;
38
41
  };
39
42
  /** A child port of a local (a list's item, a dict's or model's fields). */
40
- export type BlokDeclaredLocalPort = Omit<BlokDeclaredLocal, 'persist'>;
43
+ export type BlokDeclaredLocalPort = Omit<BlokDeclaredLocal, 'persist' | 'node'>;
41
44
  export type BlokDeclaredRead = {
42
45
  key: string;
43
46
  service: string;
@@ -50,53 +53,57 @@ export type BlokDeclaredRead = {
50
53
  keep?: number | null;
51
54
  history?: string | null;
52
55
  };
56
+ /**
57
+ * What a host gets of a blok beside its tree (`Blok`/`BlokRevision`: `vocab`,
58
+ * `resolvedLocals`, `demo`). Its locals, queries and subscriptions are nodes
59
+ * of the tree; `resolvedLocals` is how the server typed the locals.
60
+ */
53
61
  export type BlokDeclarations = {
54
62
  vocab?: number | null;
55
- /** The locals as the tree resolves them: what the renderer types them with. */
63
+ /** The `<local>` nodes as the tree resolves them, each with its `node`: what the renderer types them with. */
56
64
  resolvedLocals: readonly BlokDeclaredLocal[];
57
65
  demo?: unknown;
58
- queries?: readonly BlokDeclaredRead[] | null;
59
- subscriptions?: readonly BlokDeclaredRead[] | null;
60
66
  };
61
67
  export declare const declaredLocals: (declarations: BlokDeclarations) => BlokLocal[];
62
- export declare const declaredQueries: (declarations: BlokDeclarations) => BlokQuery[];
63
- export declare const declaredSubscriptions: (declarations: BlokDeclarations) => BlokSubscription[];
64
- /** Each declared local at its default. */
65
- export declare const localsModel: (locals: readonly BlokLocal[]) => Record<string, unknown>;
68
+ /** The reads a blok declares: its `<Blok>`'s `<query>` children. */
69
+ export declare const treeQueries: (roots: ReadonlyArray<unknown> | unknown) => BlokQuery[];
70
+ /** The streams a blok declares: its `<Blok>`'s `<subscription>` children. */
71
+ export declare const treeSubscriptions: (roots: ReadonlyArray<unknown> | unknown) => BlokSubscription[];
66
72
  /** The names `into` gives a task call's record, in the tree. */
67
73
  export declare const intoNames: (roots: ReadonlyArray<unknown>) => string[];
68
74
  /** Every `into` record before its call ran: idle. */
69
75
  export declare const intoModel: (roots: ReadonlyArray<unknown>) => Record<string, BlokTaskRecord>;
70
- /** What a renderer shows live before anything synced: locals, idle `into` records, pending reads. */
71
- export declare const liveModel: (roots: ReadonlyArray<unknown>, declarations: BlokDeclarations) => {
76
+ /**
77
+ * What a renderer shows live before anything synced: idle `into` records and
78
+ * pending reads. Locals read their defaults until written (`runtime/locals`).
79
+ */
80
+ export declare const liveModel: (roots: ReadonlyArray<unknown>) => {
72
81
  data: Record<string, unknown>;
73
82
  statuses: Record<string, BlokSourceStatus>;
74
83
  };
75
84
  /**
76
85
  * What a preview renders: the blok's `demo`, mirroring the roots
77
- * (`{deps, args, task, queries, subscriptions}`), with every declared read
78
- * answered by its demo value. Nothing is pending in a preview.
86
+ * (`{deps, args, task, queries, subscriptions}`), with every read the tree
87
+ * declares answered by its demo value. Nothing is pending in a preview.
79
88
  */
80
- export declare const demoModel: (roots: ReadonlyArray<unknown>, declarations: BlokDeclarations) => Record<string, unknown>;
89
+ export declare const demoModel: (roots: ReadonlyArray<unknown>, declarations: Pick<BlokDeclarations, "demo">) => Record<string, unknown>;
81
90
  /**
82
- * What a service serves of a blok's declarations as JSON (kabinet's `locals`,
83
- * `queries`, ...: snake_case values). Its `locals` are as the app wrote them
84
- * (a kind may be left out), so they are resolved here against its tree.
91
+ * What a service serves of a blok as JSON (snake_case values): its tree, and
92
+ * the locals as it resolved them (`resolved_locals`, each with its `node`),
93
+ * when it did.
85
94
  */
86
95
  export type BlokDeclarationsJson = {
87
96
  vocab?: number | null;
88
97
  componentTree?: unknown;
89
- locals?: unknown;
98
+ resolvedLocals?: unknown;
90
99
  demo?: unknown;
91
- queries?: unknown;
92
- subscriptions?: unknown;
93
100
  };
94
101
  /**
95
- * Locals as written, resolved against the tree the way the spec and the
96
- * server resolve them (`resolveBlokScope`: default, task argument, bind, else
97
- * ANY); a given kind is kept.
102
+ * The `<local>` nodes of a tree resolved the way the spec and the server
103
+ * resolve them (default, task argument, bind, else ANY), checked unmounted:
104
+ * what a host uses when the server sent no `resolvedLocals`.
98
105
  */
99
- export declare const resolveWrittenLocals: (roots: readonly BlokComponentNode[], locals: readonly BlokScopeLocal[]) => BlokDeclaredLocal[];
100
- /** A blok's declarations from JSON a service serves, keeping only well-formed entries. */
106
+ export declare const resolveTreeLocals: (roots: ReadonlyArray<unknown> | unknown) => BlokDeclaredLocal[];
107
+ /** A blok's declarations from JSON a service serves: its resolved locals as served, or resolved from its tree. */
101
108
  export declare const parseBlokDeclarations: (raw: BlokDeclarationsJson) => BlokDeclarations;
102
109
  //# sourceMappingURL=declarations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"declarations.d.ts","sourceRoot":"","sources":["../../src/renderer/declarations.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAGtE,OAAO,KAAK,EAAC,SAAS,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AACzE,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAErB,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB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c,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAyB7H,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAqCF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,KAAG,iBAAiB,EAI5F,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,qBAAqB,GAAI,KAAK,oBAAoB,KAAG,gBAIhE,CAAC"}
@@ -1,7 +1,6 @@
1
- import { resolveBlokScope } from '../bsx/infer.js';
2
- import { emptyBlokScope } from '../bsx/references.js';
3
- import { defaultBlokView } from '../spec/catalogs.js';
4
- import { LOCAL_ANY_KIND } from '../spec/vocabulary.js';
1
+ import { declaredQueries as queriesOfTree, declaredSubscriptions as subscriptionsOfTree } from '../bsx/declared.js';
2
+ import { resolveLocals } from '../bsx/infer.js';
3
+ import { viewForTree } from '../bsx/references.js';
5
4
  import { idleTaskRecord, normalizeBlokArgument, pendingReads, } from './runtime/index.js';
6
5
  const isRecord = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
7
6
  const variablesOf = (raw) => (Array.isArray(raw) ? raw : []).map(argument => normalizeBlokArgument(argument));
@@ -16,8 +15,15 @@ const localPort = (port) => ({
16
15
  label: port.label ?? null,
17
16
  description: port.description ?? null,
18
17
  });
19
- export const declaredLocals = (declarations) => declarations.resolvedLocals.map(local => ({ ...localPort(local), persist: local.persist === true }));
20
- export const declaredQueries = (declarations) => (declarations.queries ?? []).map(query => ({
18
+ export const declaredLocals = (declarations) => declarations.resolvedLocals.map(local => ({ ...localPort(local), node: local.node, persist: local.persist === true }));
19
+ /** The one root of a tree as the wire spells it (a list of roots, or one), or null. */
20
+ const rootOf = (roots) => {
21
+ const list = Array.isArray(roots) ? roots : [roots];
22
+ const [root] = list;
23
+ return list.length === 1 && isRecord(root) && typeof root.component === 'string' ? root : null;
24
+ };
25
+ /** The reads a blok declares: its `<Blok>`'s `<query>` children. */
26
+ export const treeQueries = (roots) => queriesOfTree(rootOf(roots)).map(query => ({
21
27
  key: query.key,
22
28
  service: query.service,
23
29
  document: query.document,
@@ -25,7 +31,8 @@ export const declaredQueries = (declarations) => (declarations.queries ?? []).ma
25
31
  poll: query.poll ?? null,
26
32
  more: query.more ?? null,
27
33
  }));
28
- export const declaredSubscriptions = (declarations) => (declarations.subscriptions ?? []).map(subscription => ({
34
+ /** The streams a blok declares: its `<Blok>`'s `<subscription>` children. */
35
+ export const treeSubscriptions = (roots) => subscriptionsOfTree(rootOf(roots)).map(subscription => ({
29
36
  key: subscription.key,
30
37
  service: subscription.service,
31
38
  document: subscription.document,
@@ -33,8 +40,6 @@ export const declaredSubscriptions = (declarations) => (declarations.subscriptio
33
40
  keep: subscription.keep ?? null,
34
41
  history: subscription.history ?? null,
35
42
  }));
36
- /** Each declared local at its default. */
37
- export const localsModel = (locals) => Object.fromEntries(locals.map(local => [local.key, local.default ?? null]));
38
43
  /** The names `into` gives a task call's record, in the tree. */
39
44
  export const intoNames = (roots) => {
40
45
  const names = new Set();
@@ -53,34 +58,36 @@ export const intoNames = (roots) => {
53
58
  };
54
59
  /** Every `into` record before its call ran: idle. */
55
60
  export const intoModel = (roots) => Object.fromEntries(intoNames(roots).map(name => [name, idleTaskRecord()]));
56
- /** What a renderer shows live before anything synced: locals, idle `into` records, pending reads. */
57
- export const liveModel = (roots, declarations) => {
58
- const reads = pendingReads(declaredQueries(declarations), declaredSubscriptions(declarations));
61
+ /**
62
+ * What a renderer shows live before anything synced: idle `into` records and
63
+ * pending reads. Locals read their defaults until written (`runtime/locals`).
64
+ */
65
+ export const liveModel = (roots) => {
66
+ const reads = pendingReads(treeQueries(roots), treeSubscriptions(roots));
59
67
  return {
60
- data: { ...localsModel(declaredLocals(declarations)), ...intoModel(roots), ...reads.data },
68
+ data: { ...intoModel(roots), ...reads.data },
61
69
  statuses: reads.statuses,
62
70
  };
63
71
  };
64
72
  /**
65
73
  * What a preview renders: the blok's `demo`, mirroring the roots
66
- * (`{deps, args, task, queries, subscriptions}`), with every declared read
67
- * answered by its demo value. Nothing is pending in a preview.
74
+ * (`{deps, args, task, queries, subscriptions}`), with every read the tree
75
+ * declares answered by its demo value. Nothing is pending in a preview.
68
76
  */
69
77
  export const demoModel = (roots, declarations) => {
70
78
  const demo = isRecord(declarations.demo) ? declarations.demo : {};
71
79
  const demoQueries = isRecord(demo.queries) ? demo.queries : {};
72
80
  const demoSubscriptions = isRecord(demo.subscriptions) ? demo.subscriptions : {};
73
- const queries = Object.fromEntries(declaredQueries(declarations).map(query => [
81
+ const queries = Object.fromEntries(treeQueries(roots).map(query => [
74
82
  query.key,
75
83
  { status: 'ready', value: demoQueries[query.key] ?? null, error: null, refetching: false, fetching_more: false },
76
84
  ]));
77
- const subscriptions = Object.fromEntries(declaredSubscriptions(declarations).map(subscription => [
85
+ const subscriptions = Object.fromEntries(treeSubscriptions(roots).map(subscription => [
78
86
  subscription.key,
79
87
  { status: 'ready', value: demoSubscriptions[subscription.key] ?? null, error: null },
80
88
  ]));
81
89
  const task = isRecord(demo.task) ? { ...idleTaskRecord(), ...demo.task } : undefined;
82
90
  return {
83
- ...localsModel(declaredLocals(declarations)),
84
91
  ...intoModel(roots),
85
92
  deps: isRecord(demo.deps) ? demo.deps : {},
86
93
  args: isRecord(demo.args) ? demo.args : {},
@@ -89,18 +96,15 @@ export const demoModel = (roots, declarations) => {
89
96
  ...(Object.keys(subscriptions).length ? { subscriptions } : {}),
90
97
  };
91
98
  };
92
- const optionalNumber = (value) => (typeof value === 'number' ? value : null);
93
99
  const optionalString = (value) => (typeof value === 'string' ? value : null);
94
100
  const jsonChoices = (raw) => Array.isArray(raw)
95
101
  ? raw.filter(isRecord).map(choice => ({ value: choice.value ?? null, label: optionalString(choice.label), description: optionalString(choice.description) }))
96
102
  : null;
97
- /** A port from JSON; a child without a key or kind is dropped. */
98
- const jsonLocalPort = (port) => typeof port.kind === 'string' ? jsonLocalWritten(port, port.kind) : null;
99
- /** A port from JSON with `kind` as given; null without a key. */
100
- const jsonLocalWritten = (port, kind) => typeof port.key === 'string'
103
+ /** A port from JSON; one without a key or kind is dropped. */
104
+ const jsonLocalPort = (port) => typeof port.key === 'string' && typeof port.kind === 'string'
101
105
  ? {
102
106
  key: port.key,
103
- kind,
107
+ kind: port.kind,
104
108
  identifier: optionalString(port.identifier),
105
109
  nullable: port.nullable === true,
106
110
  default: port.default ?? null,
@@ -115,45 +119,26 @@ const jsonLocalWritten = (port, kind) => typeof port.key === 'string'
115
119
  description: optionalString(port.description),
116
120
  }
117
121
  : null;
118
- /** Locals from JSON as written (snake_case port fields plus `persist`, a kind maybe left out); one without a key is dropped. */
119
- const jsonLocals = (raw) => (Array.isArray(raw) ? raw : []).filter(isRecord).flatMap(local => {
120
- const port = jsonLocalWritten(local, typeof local.kind === 'string' ? local.kind : null);
121
- return port ? [{ ...port, persist: local.persist === true }] : [];
122
+ /** Resolved locals from JSON; one without a node, a key or a kind is dropped. */
123
+ const jsonResolvedLocals = (raw) => (Array.isArray(raw) ? raw : []).filter(isRecord).flatMap(local => {
124
+ const port = jsonLocalPort(local);
125
+ return port && typeof local.node === 'string' ? [{ ...port, node: local.node, persist: local.persist === true }] : [];
122
126
  });
123
- const jsonRoots = (raw) => (Array.isArray(raw) ? raw : [raw]).filter((node) => isRecord(node) && typeof node.component === 'string');
124
127
  /**
125
- * Locals as written, resolved against the tree the way the spec and the
126
- * server resolve them (`resolveBlokScope`: default, task argument, bind, else
127
- * ANY); a given kind is kept.
128
+ * The `<local>` nodes of a tree resolved the way the spec and the server
129
+ * resolve them (default, task argument, bind, else ANY), checked unmounted:
130
+ * what a host uses when the server sent no `resolvedLocals`.
128
131
  */
129
- export const resolveWrittenLocals = (roots, locals) => {
130
- if (!locals.length)
132
+ export const resolveTreeLocals = (roots) => {
133
+ const root = rootOf(roots);
134
+ if (!root)
131
135
  return [];
132
- const [root] = roots;
133
- if (!root || roots.length !== 1)
134
- return locals.map(local => ({ ...local, kind: local.kind ?? LOCAL_ANY_KIND }));
135
- return resolveBlokScope(root, { ...emptyBlokScope(), locals }, defaultBlokView()).locals.map(local => ({ ...local }));
136
+ return [...resolveLocals(root, null, viewForTree(root))].map(([node, { local }]) => ({ ...local, node }));
136
137
  };
137
- const jsonReads = (raw) => (Array.isArray(raw) ? raw : []).filter(isRecord).flatMap(read => typeof read.key === 'string' && typeof read.service === 'string' && typeof read.document === 'string'
138
- ? [
139
- {
140
- key: read.key,
141
- service: read.service,
142
- document: read.document,
143
- variables: read.variables,
144
- poll: optionalNumber(read.poll),
145
- more: optionalString(read.more),
146
- keep: optionalNumber(read.keep),
147
- history: optionalString(read.history),
148
- },
149
- ]
150
- : []);
151
- /** A blok's declarations from JSON a service serves, keeping only well-formed entries. */
138
+ /** A blok's declarations from JSON a service serves: its resolved locals as served, or resolved from its tree. */
152
139
  export const parseBlokDeclarations = (raw) => ({
153
140
  vocab: raw.vocab ?? null,
154
- resolvedLocals: resolveWrittenLocals(jsonRoots(raw.componentTree), jsonLocals(raw.locals)),
141
+ resolvedLocals: raw.resolvedLocals !== undefined && raw.resolvedLocals !== null ? jsonResolvedLocals(raw.resolvedLocals) : resolveTreeLocals(raw.componentTree),
155
142
  demo: raw.demo ?? null,
156
- queries: jsonReads(raw.queries),
157
- subscriptions: jsonReads(raw.subscriptions),
158
143
  });
159
144
  //# sourceMappingURL=declarations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../src/renderer/declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAsB,MAAM,mB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AE,OAAO,EAAE,KAAK,CAAC,OAAO,KAAK,IAAI,EAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtH,CAAC,CAAC,CAAC;AAEL;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAuC,EAAuB,EAAE;IAChG,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAC,KAAK,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,KAAK,EAAE,IAAI,EAAC,CAAsB,CAAC,CAAC;AAC7H,CAAC,CAAC;AAEF,kHAAkH;AAClH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAyB,EAAoB,EAAE,CAAC,CAAC;IACrF,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI;IACxB,cAAc,EAAE,GAAG,CAAC,cAAc,KAAK,SAAS,IAAI,GAAG,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC;IAC/J,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,IAAI;CACvB,CAAC,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { baseBlokCatalog } from './baseCatalog.js';
2
2
  import { BASE_CATALOG_ADDRESS, BASE_CATALOG_REF, catalogRef, describeBlokComponent, extendBlokCatalog, } from './runtime/index.js';
3
3
  import { baseCatalog } from '../spec/catalogs.js';
4
- const CONTEXTS = ['HTML', 'SCENE', 'LOGO'];
4
+ const CONTEXTS = ['PANEL', 'SCENE', 'LOGO'];
5
5
  /**
6
6
  * The context a base component counts towards: its own, and for one that
7
- * bridges html and another context (`Scene` opens a scene inside html), the
8
- * other one: a renderer that draws no 3D still draws html whole.
7
+ * bridges a panel and another context (`Scene` opens a scene inside a panel),
8
+ * the other one: a renderer that draws no 3D still draws panels whole.
9
9
  */
10
- const contextOf = (component) => component.context !== 'HTML' ? component.context : (component.childrenContext ?? 'HTML');
10
+ const contextOf = (component) => component.context !== 'PANEL' ? component.context : (component.childrenContext ?? 'PANEL');
11
11
  /** The contexts in which `catalog` draws every component of the base catalog. */
12
12
  export const baseContextsOf = (catalog) => {
13
13
  const components = baseCatalog().components;
@@ -1 +1 @@
1
- {"version":3,"file":"declare.js","sourceRoot":"","sources":["../../src/renderer/declare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,GAKlB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AA0B7C,MAAM,QAAQ,GAA+B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAEvE;;;;GAIG;AACH,MAAM,SAAS,GAAG,CAAC,SAA8E,EAAmB,EAAE,CACpH,SAAS,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,IAAI,MAAM,CAAC,CAAC;AAE3F,iFAAiF;AACjF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAqB,EAAE;IACxE,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,UAAU,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,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AG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzF,CAAC,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import type { KeyedStore } from '../cache/keyedStore';
3
- import type { BlokRuntimeStore } from './runtime';
3
+ import { type BlokRuntimeStore } from './runtime';
4
4
  /**
5
5
  * What a blok keeps between openings, on this device only (blok language v2):
6
6
  *
7
- * - **form inputs**: a local declared `Local(default, persist=True)` (a port
8
- * plus `persist`) remembers the viewer's last input;
7
+ * - **form inputs**: a local declared `<local name="x" default={...} persist />`
8
+ * remembers the viewer's last input, by its runtime id: the `<local>`'s node
9
+ * id, plus `@<item key>` per enclosing foreach (one value per item). An
10
+ * explicit `id=` on the `<local>` keeps it across edits of the tree;
9
11
  * - **component state**: a component that offers it as its own BOOL prop
10
12
  * (`<Scene id="main" persist>`, `<Transform id="arm-pose" persist>`) keeps
11
13
  * its interaction state (the camera, the pose) by its id. The language
@@ -13,10 +15,10 @@ import type { BlokRuntimeStore } from './runtime';
13
15
  *
14
16
  * Nothing reaches a server, so keeping cannot become a channel between
15
17
  * clients. Values live in IndexedDB keyed by (hub, user, materialized blok)
16
- * for the locals and (hub, user, materialized blok, component id) for each
17
- * component, and are written a moment after the last change. A local the
18
- * blok no longer persists, or a value that no longer fits its port, is
19
- * dropped when the blok opens.
18
+ * for the locals (one record, values by runtime id) and (hub, user,
19
+ * materialized blok, component id) for each component, and are written a
20
+ * moment after the last change. A local the blok no longer persists, or a
21
+ * value that no longer fits its port, is dropped when the blok opens.
20
22
  */
21
23
  /** A choice a local's port offers (`ChoiceInput`). */
22
24
  export type BlokLocalChoice = {
@@ -41,11 +43,16 @@ export type BlokLocalPort = {
41
43
  label?: string | null;
42
44
  description?: string | null;
43
45
  };
44
- /** A local (vocabulary `locals`): an arg port plus `persist`, remembering the last input on this device. */
46
+ /**
47
+ * A `<local>` (vocabulary `locals`): an arg port plus `persist`, remembering
48
+ * the last input on this device, and `node`, the id of the `<local>` node
49
+ * that declares it.
50
+ */
45
51
  export type BlokLocal = BlokLocalPort & {
52
+ node: string;
46
53
  persist?: boolean | null;
47
54
  };
48
- /** What is kept for one materialization's locals: values by local key. */
55
+ /** What is kept for one materialization's locals: values by the local's runtime id (`runtimeIdOf`). */
49
56
  export type KeptLocals = Record<string, unknown>;
50
57
  /** Whose a kept record is: the hub and user it was set under, and the materialization. */
51
58
  export type BlokPersistScope = {
@@ -53,6 +60,7 @@ export type BlokPersistScope = {
53
60
  user: string;
54
61
  materializedBlok: string;
55
62
  };
63
+ /** Version 2: kept values by runtime id (version 1 kept them by top-level key, and is dropped). */
56
64
  export declare const keptLocalsStore: KeyedStore<KeptLocals>;
57
65
  /** One component's kept state, wrapped so any JSON value fits the store. */
58
66
  export type KeptComponentState = {
@@ -63,6 +71,7 @@ export declare const keptLocalsId: (scope: BlokPersistScope) => string;
63
71
  export declare const keptComponentId: (scope: BlokPersistScope, componentId: string) => string;
64
72
  /** Whether a kept value can stand for a local: it fits the local's port (a kept value that no longer does is dropped). */
65
73
  export declare const fitsLocal: (kept: unknown, local: BlokLocal) => boolean;
74
+ /** What of `record` still stands: the values of persisted locals (by their node) that still fit their port. */
66
75
  export declare const keptValuesOf: (record: KeptLocals | null, locals: readonly BlokLocal[]) => {
67
76
  values: KeptLocals;
68
77
  dropped: boolean;
@@ -72,9 +81,9 @@ export declare const keptValuesOf: (record: KeptLocals | null, locals: readonly
72
81
  * seed the renderer with, and what writes changes back.
73
82
  */
74
83
  export type BlokPersistence = {
75
- /** The locals kept on this device (those declared with `persist`). */
76
- keys: ReadonlySet<string>;
77
- /** The kept locals to seed the runtime with, before the first render. */
84
+ /** The `<local>` node ids kept on this device (those declared with `persist`): `BlokRenderer`'s `keptLocals`. */
85
+ locals: ReadonlySet<string>;
86
+ /** The kept values to seed the runtime with, before the first render, by runtime id: `BlokRenderer`'s `keptValues`. */
78
87
  initial: KeptLocals;
79
88
  /** Follows `store`: a change of a kept local is written after `delay`. Returns the detach, which flushes. */
80
89
  attach: (store: BlokRuntimeStore) => () => void;
@@ -95,7 +104,7 @@ export type BlokComponentStateStore = {
95
104
  export declare const componentStateStore: (scope: BlokPersistScope, store?: KeyedStore<KeptComponentState>, delay?: number) => BlokComponentStateStore;
96
105
  export declare const openBlokPersistence: (options: {
97
106
  scope: BlokPersistScope;
98
- /** The blok's declared locals; those with `persist` are kept. */
107
+ /** The blok's resolved locals (by node); those with `persist` are kept. */
99
108
  locals: readonly BlokLocal[];
100
109
  store?: KeyedStore<KeptLocals>;
101
110
  componentStore?: KeyedStore<KeptComponentState>;
@@ -1 +1 @@
1
- {"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../src/renderer/persist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,UAAU,EAAoB,MAAM,qBAAqB,CAAC;AAIvE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAEhD;;;;;;;;;;;;;;;;GAgBG;AAEH,sDAAsD;AACtD,MAAM,MAAM,eAAe,GAAG;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAC,CAAC;AAEnG;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,a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