@exponential-at/ui 0.0.0-stage → 0.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 (251) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +54 -0
  3. package/README.md +360 -2
  4. package/catalog/a11y.json +668 -0
  5. package/catalog/basic-map.json +104 -0
  6. package/catalog/code.json +58 -0
  7. package/catalog/core.catalog.json +4752 -0
  8. package/catalog/core.schema.json +22667 -0
  9. package/catalog/host.json +64 -0
  10. package/catalog/layout.json +20 -0
  11. package/catalog/limits.json +9 -0
  12. package/catalog/locale.json +48 -0
  13. package/catalog/macros.json +3417 -0
  14. package/catalog/recipes.json +61 -0
  15. package/catalog/strings.json +72 -0
  16. package/catalog/style.json +128 -0
  17. package/catalog/theme.schema.json +42543 -0
  18. package/catalog/tokens.json +47 -0
  19. package/conformance/README.md +217 -0
  20. package/conformance/baseline.ts +101 -0
  21. package/conformance/browser-page.ts +146 -0
  22. package/conformance/browser-suites.ts +683 -0
  23. package/conformance/compare.ts +201 -0
  24. package/conformance/dom.ts +96 -0
  25. package/conformance/dump.ts +163 -0
  26. package/conformance/fonts.json +154 -0
  27. package/conformance/manifest.json +224 -0
  28. package/conformance/parity-compare.ts +191 -0
  29. package/conformance/parity-report.schema.json +73 -0
  30. package/conformance/parity.ts +412 -0
  31. package/conformance/pixel.ts +177 -0
  32. package/conformance/primitives-page.ts +49 -0
  33. package/conformance/report.schema.json +66 -0
  34. package/conformance/run.ts +118 -0
  35. package/dist/chunks/index-98npjvsd.js +3940 -0
  36. package/dist/chunks/index-98npjvsd.js.map +27 -0
  37. package/dist/chunks/index-gwkt14w3.js +7314 -0
  38. package/dist/chunks/index-gwkt14w3.js.map +10 -0
  39. package/dist/chunks/index-njt7yzzm.js +134 -0
  40. package/dist/chunks/index-njt7yzzm.js.map +9 -0
  41. package/dist/chunks/index-we7va6v6.js +7984 -0
  42. package/dist/chunks/index-we7va6v6.js.map +15 -0
  43. package/dist/chunks/index-xrm6f7wc.js +2563 -0
  44. package/dist/chunks/index-xrm6f7wc.js.map +10 -0
  45. package/dist/conformance.js +182749 -0
  46. package/dist/conformance.js.map +10 -0
  47. package/dist/entries/prompt.js +251 -0
  48. package/dist/entries/prompt.js.map +11 -0
  49. package/dist/entries/schema.js +1725 -0
  50. package/dist/entries/schema.js.map +11 -0
  51. package/dist/host/index.js +122 -0
  52. package/dist/host/index.js.map +9 -0
  53. package/dist/index.js +3213 -0
  54. package/dist/index.js.map +27 -0
  55. package/dist/types/src/a11y.d.ts +21 -0
  56. package/dist/types/src/animation.d.ts +76 -0
  57. package/dist/types/src/basic-map.d.ts +38 -0
  58. package/dist/types/src/builder.d.ts +50 -0
  59. package/dist/types/src/catalog.d.ts +54 -0
  60. package/dist/types/src/catalog.described.d.ts +33 -0
  61. package/dist/types/src/catalog.generated.d.ts +829 -0
  62. package/dist/types/src/chart.d.ts +46 -0
  63. package/dist/types/src/code.d.ts +44 -0
  64. package/dist/types/src/color.d.ts +20 -0
  65. package/dist/types/src/conformance.d.ts +39 -0
  66. package/dist/types/src/connector/app.d.ts +14 -0
  67. package/dist/types/src/connector/connector.d.ts +77 -0
  68. package/dist/types/src/connector/index.d.ts +4 -0
  69. package/dist/types/src/css.d.ts +29 -0
  70. package/dist/types/src/define.d.ts +66 -0
  71. package/dist/types/src/direction.d.ts +16 -0
  72. package/dist/types/src/dynamic.d.ts +159 -0
  73. package/dist/types/src/entries/prompt.d.ts +11 -0
  74. package/dist/types/src/entries/schema.d.ts +8 -0
  75. package/dist/types/src/expr.d.ts +71 -0
  76. package/dist/types/src/extension.d.ts +4 -0
  77. package/dist/types/src/format.d.ts +112 -0
  78. package/dist/types/src/geometry.d.ts +40 -0
  79. package/dist/types/src/host/contract.d.ts +188 -0
  80. package/dist/types/src/host/decoders.d.ts +61 -0
  81. package/dist/types/src/host/index.d.ts +11 -0
  82. package/dist/types/src/host/package.d.ts +58 -0
  83. package/dist/types/src/host/policy.d.ts +105 -0
  84. package/dist/types/src/host/router.d.ts +34 -0
  85. package/dist/types/src/host/runtime.d.ts +205 -0
  86. package/dist/types/src/host/sources.d.ts +15 -0
  87. package/dist/types/src/host/transports.d.ts +109 -0
  88. package/dist/types/src/index.d.ts +63 -0
  89. package/dist/types/src/layout.d.ts +20 -0
  90. package/dist/types/src/limits.d.ts +21 -0
  91. package/dist/types/src/list.d.ts +133 -0
  92. package/dist/types/src/locale.d.ts +22 -0
  93. package/dist/types/src/macros.d.ts +29 -0
  94. package/dist/types/src/overlay.d.ts +27 -0
  95. package/dist/types/src/prompt.d.ts +44 -0
  96. package/dist/types/src/recipes.d.ts +17 -0
  97. package/dist/types/src/reducer.d.ts +41 -0
  98. package/dist/types/src/resizable.d.ts +38 -0
  99. package/dist/types/src/schema.d.ts +7 -0
  100. package/dist/types/src/strings.d.ts +13 -0
  101. package/dist/types/src/style.d.ts +201 -0
  102. package/dist/types/src/test-preload.d.ts +1 -0
  103. package/dist/types/src/text-shimmer.d.ts +24 -0
  104. package/dist/types/src/theme-types.d.ts +162 -0
  105. package/dist/types/src/theme.d.ts +73 -0
  106. package/dist/types/src/themes.d.ts +22 -0
  107. package/dist/types/src/tree-guides.d.ts +17 -0
  108. package/dist/types/src/types.d.ts +314 -0
  109. package/dist/types/src/validate.d.ts +31 -0
  110. package/dist/types/src/web/base-css.d.ts +1 -0
  111. package/dist/types/src/web/box-css.d.ts +55 -0
  112. package/dist/types/src/web/coerce.d.ts +32 -0
  113. package/dist/types/src/web/data.d.ts +105 -0
  114. package/dist/types/src/web/dates.d.ts +12 -0
  115. package/dist/types/src/web/form.d.ts +44 -0
  116. package/dist/types/src/web/host-types.d.ts +119 -0
  117. package/dist/types/src/web/index.d.ts +28 -0
  118. package/dist/types/src/web/inputs.d.ts +55 -0
  119. package/dist/types/src/web/list.d.ts +13 -0
  120. package/dist/types/src/web/listbox.d.ts +14 -0
  121. package/dist/types/src/web/markdown.d.ts +96 -0
  122. package/dist/types/src/web/media.d.ts +62 -0
  123. package/dist/types/src/web/parts.d.ts +4 -0
  124. package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
  125. package/dist/types/src/web/primitives/alert.d.ts +9 -0
  126. package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
  127. package/dist/types/src/web/primitives/avatar.d.ts +13 -0
  128. package/dist/types/src/web/primitives/badge.d.ts +10 -0
  129. package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
  130. package/dist/types/src/web/primitives/button.d.ts +6 -0
  131. package/dist/types/src/web/primitives/calendar.d.ts +43 -0
  132. package/dist/types/src/web/primitives/card.d.ts +9 -0
  133. package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
  134. package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
  135. package/dist/types/src/web/primitives/cn.d.ts +3 -0
  136. package/dist/types/src/web/primitives/code-block.d.ts +24 -0
  137. package/dist/types/src/web/primitives/command.d.ts +134 -0
  138. package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
  139. package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
  140. package/dist/types/src/web/primitives/dialog.d.ts +24 -0
  141. package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
  142. package/dist/types/src/web/primitives/dock.d.ts +42 -0
  143. package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
  144. package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
  145. package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
  146. package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
  147. package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
  148. package/dist/types/src/web/primitives/index.d.ts +48 -0
  149. package/dist/types/src/web/primitives/input.d.ts +5 -0
  150. package/dist/types/src/web/primitives/kbd.d.ts +4 -0
  151. package/dist/types/src/web/primitives/label.d.ts +3 -0
  152. package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
  153. package/dist/types/src/web/primitives/meter.d.ts +21 -0
  154. package/dist/types/src/web/primitives/popover.d.ts +3 -0
  155. package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
  156. package/dist/types/src/web/primitives/progress.d.ts +8 -0
  157. package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
  158. package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
  159. package/dist/types/src/web/primitives/select.d.ts +47 -0
  160. package/dist/types/src/web/primitives/separator.d.ts +3 -0
  161. package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
  162. package/dist/types/src/web/primitives/sheet.d.ts +20 -0
  163. package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
  164. package/dist/types/src/web/primitives/spinner.d.ts +3 -0
  165. package/dist/types/src/web/primitives/switch.d.ts +4 -0
  166. package/dist/types/src/web/primitives/table.d.ts +11 -0
  167. package/dist/types/src/web/primitives/tabs.d.ts +13 -0
  168. package/dist/types/src/web/primitives/textarea.d.ts +3 -0
  169. package/dist/types/src/web/primitives/toast.d.ts +163 -0
  170. package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
  171. package/dist/types/src/web/primitives/truncate.d.ts +7 -0
  172. package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
  173. package/dist/types/src/web/share.d.ts +6 -0
  174. package/dist/types/src/web/table.d.ts +20 -0
  175. package/dist/types/src/web/theme-css.d.ts +69 -0
  176. package/dist/types/src/web/urls.d.ts +21 -0
  177. package/dist/web/index.js +2303 -0
  178. package/dist/web/index.js.map +26 -0
  179. package/dist/web/primitives/index.js +1450 -0
  180. package/dist/web/primitives/index.js.map +57 -0
  181. package/docs/components.generated.json +6238 -0
  182. package/docs/round-1-contract.md +679 -0
  183. package/docs/round-2-contract.md +476 -0
  184. package/docs/round-3-contract.md +174 -0
  185. package/docs/themes.generated.json +3503 -0
  186. package/fixtures/animations.json +2890 -0
  187. package/fixtures/bench-list.json +58 -0
  188. package/fixtures/bind-time.json +30664 -0
  189. package/fixtures/catalog-basic-map.json +1692 -0
  190. package/fixtures/catalog-components.json +9323 -0
  191. package/fixtures/catalog-extension.json +620 -0
  192. package/fixtures/catalog-macros.json +36370 -0
  193. package/fixtures/code-tokens.json +1993 -0
  194. package/fixtures/conformance-baseline.json +55544 -0
  195. package/fixtures/conformance-cases.json +49 -0
  196. package/fixtures/conformance-known.json +2123 -0
  197. package/fixtures/control-geometry.json +4200 -0
  198. package/fixtures/dashboard.data.json +74 -0
  199. package/fixtures/dashboard.json +752 -0
  200. package/fixtures/demo-surface.json +47 -0
  201. package/fixtures/format.json +870 -0
  202. package/fixtures/host-policy.json +1067 -0
  203. package/fixtures/host-router.json +1152 -0
  204. package/fixtures/host-transport.json +590 -0
  205. package/fixtures/interactions-round1.json +773 -0
  206. package/fixtures/kitchen-sink.expanded.json +10844 -0
  207. package/fixtures/kitchen-sink.json +3049 -0
  208. package/fixtures/layout-geometry-round1.json +7278 -0
  209. package/fixtures/layout-geometry.json +2072 -0
  210. package/fixtures/overlay-geometry.json +272 -0
  211. package/fixtures/primitive-specimens.json +58 -0
  212. package/fixtures/prompt-budget.json +33 -0
  213. package/fixtures/resizable.json +714 -0
  214. package/fixtures/round4-contract.json +2985 -0
  215. package/fixtures/specimens.json +9832 -0
  216. package/fixtures/style-conditions.json +336 -0
  217. package/fixtures/template-items.json +2215 -0
  218. package/fixtures/text-direction.json +309 -0
  219. package/fixtures/text-shimmer.json +96 -0
  220. package/fixtures/theme-extends.json +573 -0
  221. package/fixtures/theme-invalid.json +1296 -0
  222. package/fixtures/theme-recipes.json +58600 -0
  223. package/fixtures/theme-resolved.json +23949 -0
  224. package/fixtures/toast-stack.json +215 -0
  225. package/fixtures/tree-guides.json +224 -0
  226. package/fixtures/virtual-list.json +733 -0
  227. package/generated/ExponentialUICatalog.generated.kt +67 -0
  228. package/generated/ExponentialUICatalog.generated.swift +67 -0
  229. package/generated/ExponentialUIThemes.generated.kt +23 -0
  230. package/generated/ExponentialUIThemes.generated.swift +23 -0
  231. package/generated/catalog.descriptions.generated.rs +6 -0
  232. package/generated/catalog.generated.rs +80 -0
  233. package/generated/catalog.themes.generated.rs +34 -0
  234. package/generated/core.descriptions.json +2505 -0
  235. package/generated/core.runtime.json +3609 -0
  236. package/package.json +87 -4
  237. package/themes/exponential.recipes.json +49 -0
  238. package/themes/exponential.theme.json +755 -0
  239. package/themes/neutral.theme.json +5676 -0
  240. package/themes/orange.theme.json +43 -0
  241. package/themes/playful.theme.json +219 -0
  242. package/vendor/a2ui/LICENSE.txt +203 -0
  243. package/vendor/a2ui/README.md +27 -0
  244. package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
  245. package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
  246. package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
  247. package/vendor/a2ui/v0_9/client_to_server.json +104 -0
  248. package/vendor/a2ui/v0_9/common_types.json +315 -0
  249. package/vendor/a2ui/v0_9/server_to_client.json +132 -0
  250. package/vendor/json-render/LICENSE.txt +201 -0
  251. package/vendor/json-render/README.md +13 -0
@@ -0,0 +1,251 @@
1
+ import {
2
+ coreCatalog2,
3
+ CORE_CATALOG_ID2,
4
+ CORE_LITE_CATALOG_ID2,
5
+ catalogView2,
6
+ isOffered2
7
+ } from "../chunks/index-gwkt14w3.js";
8
+ import {
9
+ describeCatalog2
10
+ } from "../chunks/index-xrm6f7wc.js";
11
+
12
+ // packages/exponential-ui/src/prompt.ts
13
+ var PROMPT_SECTIONS = [`rules`, `components`, `index`, `shapes`, `functions`, `style`, `extensions`];
14
+ var DEFAULT_SECTIONS = [`rules`, `components`, `shapes`, `functions`, `style`, `extensions`];
15
+ var PROMPT_RULES = [
16
+ `Reply with A2UI v0.9 messages: createSurface{surfaceId, catalogId}, then updateComponents{surfaceId, components:[…]} (one has id "root"; resend an id to change it) and updateDataModel{surfaceId, path, value} (writes the JSON pointer; no value removes it). Keep data in the model and bind to it.`,
17
+ `A component = {id, component, …props, children?: [ids] | {componentId, path, key?}, slots?: {name: id}, on?: {event: action}, style?, visible?}. Children are ids, never inline; {componentId, path} repeats per item, key = the item field naming it.`,
18
+ `Include every required prop. A ~ prop may be a binding {path: "/json/pointer"} or a call {call, args} (live). visible: false (or a binding) hides any component.`,
19
+ `An action (on: {event: action}) = {event: {name, context?}} (sent to you; context values may be bindings, read AFTER the component's own write) and/or {functionCall: {call, args}} (runs on the client: a function below, or a namespaced host function like app.toast).`,
20
+ `Lay out with Page, Stack, Grid, Card, SplitView, Sidebar and List (anything longer than a screen); a row of controls is a Toolbar, fields side by side a FieldGroup, the Cancel/submit row FormActions; Box + style only for the rest. Wrap fields in Form; a valid submit closes the Dialog or Drawer around it.`,
21
+ `Responsive: a ^ prop also takes {base, sm?, md?, lg?, xl?} (from that breakpoint up). Style conditions, one level, narrow first: "@media (min-width: $breakpoint.md)": {…} (also max-width, min-height, max-height in px or $breakpoint.sm|md|lg|xl; orientation: portrait|landscape; hover: hover|none; prefers-reduced-motion: reduce), then ":hover", ":focus-visible", ":pressed". display: "none" hides.`,
22
+ `Prefer catalog components over Markdown (feature lists = List + Row, not bullets), labels and tones over colours; a colour is a $color.* token, never #hex (light and dark both apply). Built-in copy (Cancel, Search…) is localized: leave it unset.`,
23
+ `One default Button per screen (the FormActions submit or the main action); the rest outline, secondary or ghost.`
24
+ ];
25
+ var COMMON_PROPS = {
26
+ name: `form key`,
27
+ label: ``,
28
+ placeholder: ``,
29
+ disabled: ``,
30
+ checks: `validation; every failure shows`,
31
+ validateOn: ``,
32
+ style: `extra Box style`,
33
+ icon: ``,
34
+ size: ``,
35
+ tone: ``,
36
+ open: `bind it`,
37
+ side: ``,
38
+ emptyText: ``,
39
+ dismissible: ``,
40
+ busy: ``,
41
+ loading: ``,
42
+ lines: `truncate`,
43
+ width: `px`,
44
+ height: `px`,
45
+ value: `bind it for two-way state`,
46
+ title: ``,
47
+ subtitle: ``,
48
+ description: ``,
49
+ meta: ``,
50
+ count: ``,
51
+ min: ``,
52
+ max: ``,
53
+ step: ``,
54
+ src: ``,
55
+ alt: ``,
56
+ multiple: ``,
57
+ pressable: `fires press`,
58
+ durationMs: `known length`,
59
+ firstDayOfWeek: `0 = Sunday; else the locale's`,
60
+ direction: ``,
61
+ orientation: ``,
62
+ gap: ``,
63
+ aspectRatio: `width/height`,
64
+ text: ``
65
+ };
66
+ function typeOf(schema, enums) {
67
+ switch (schema.type) {
68
+ case `enum`:
69
+ return (schema.values ?? enums[schema.enum ?? ``] ?? []).join(`|`);
70
+ case `array`:
71
+ return schema.items ? `[${schema.items.type === `object` ? schema.items.shape ?? `object` : typeOf(schema.items, enums)}]` : `[]`;
72
+ case `object`:
73
+ return schema.shape ?? `object`;
74
+ default:
75
+ return schema.type;
76
+ }
77
+ }
78
+ function marksOf(schema) {
79
+ return `${schema.required ? `*` : ``}${schema.bindable ? `~` : ``}${schema.responsive ? `^` : ``}`;
80
+ }
81
+ function defaultOf(schema, enums) {
82
+ if (schema.default === undefined)
83
+ return ``;
84
+ if (schema.type === `boolean` && schema.default === false)
85
+ return ``;
86
+ if (schema.type === `enum` && (schema.values ?? enums[schema.enum ?? ``] ?? [])[0] === schema.default)
87
+ return ``;
88
+ return `=${JSON.stringify(schema.default)}`;
89
+ }
90
+ function propLine(name, schema, enums) {
91
+ const def = defaultOf(schema, enums);
92
+ const head = `${name}${marksOf(schema)}: ${typeOf(schema, enums)}${def}`;
93
+ return name in COMMON_PROPS ? head : `${head} — ${schema.description}`;
94
+ }
95
+ function componentBlock(name, def, enums, terse) {
96
+ const head = `${name}${def.kind === `macro` ? `` : ``}: ${def.description}`;
97
+ const meta = [];
98
+ if (def.children !== `none`)
99
+ meta.push(def.children === `one` ? `one child` : `children`);
100
+ if (def.slots?.length)
101
+ meta.push(`slots: ${def.slots.join(`, `)}`);
102
+ if (def.events?.length)
103
+ meta.push(`on: ${def.events.join(`, `)}`);
104
+ const props = Object.entries(def.props);
105
+ const body = terse ? [` props: ${props.map(([p, s]) => `${p}${marksOf(s)}:${typeOf(s, enums)}`).join(`, `)}`] : props.map(([p, s]) => ` ${propLine(p, s, enums)}`);
106
+ return [head, ...meta.length ? [` ${meta.join(`; `)}`] : [], ...body].join(`
107
+ `);
108
+ }
109
+ function usedShapes(components, defs) {
110
+ const used = new Set;
111
+ const visit = (schema) => {
112
+ if (!schema)
113
+ return;
114
+ if (schema.type === `array`)
115
+ return visit(schema.items);
116
+ if (schema.type === `object` && schema.shape && !used.has(schema.shape) && defs[schema.shape]) {
117
+ used.add(schema.shape);
118
+ for (const p of Object.values(defs[schema.shape].properties))
119
+ visit(p);
120
+ }
121
+ };
122
+ for (const def of components)
123
+ for (const p of Object.values(def.props))
124
+ visit(p);
125
+ return used;
126
+ }
127
+ function defsBlock(defs, enums, only) {
128
+ return Object.entries(defs).filter(([name]) => !only || only.has(name)).map(([name, def]) => `${name} = {${Object.entries(def.properties).map(([p, s]) => `${p}${s.required ? `*` : ``}: ${typeOf(s, enums)}`).join(`, `)}}`);
129
+ }
130
+ var SHORT_TYPES = { string: `str`, number: `num`, boolean: `bool`, object: `obj` };
131
+ function functionSignatures() {
132
+ const { names, core, basic } = coreCatalog2.functions;
133
+ return names.map((name) => {
134
+ const sig = core[name] ?? basic[name];
135
+ if (!sig)
136
+ return name;
137
+ return `${name}(${Object.entries(sig.args).map(([a, t]) => `${a}:${SHORT_TYPES[t] ?? t}`).join(`,`)})→${SHORT_TYPES[sig.returns] ?? sig.returns}`;
138
+ });
139
+ }
140
+ function componentPrompt(name, options = {}) {
141
+ const extensions = options.extensions ?? [];
142
+ const view = catalogView2(extensions);
143
+ const def = view.components[name];
144
+ if (!def || def.hidden)
145
+ return ``;
146
+ const defs = { ...coreCatalog2.defs, ...Object.fromEntries(extensions.flatMap((e) => Object.entries(e.defs ?? {}))) };
147
+ const lines = [componentBlock(name, def, view.enums, options.terse ?? false)];
148
+ const shapes = defsBlock(defs, view.enums, usedShapes([def], defs));
149
+ if (shapes.length)
150
+ lines.push(`Shapes: ${shapes.join(`; `)}`);
151
+ return lines.join(`
152
+ `);
153
+ }
154
+ function catalogIndex(options = {}) {
155
+ const groups = new Map;
156
+ const add = (name, def) => {
157
+ const list = groups.get(def.group) ?? [];
158
+ list.push(`${name}${def.children === `none` ? `` : def.children === `one` ? ` (one child)` : ` (children)`}: ${def.description}`);
159
+ groups.set(def.group, list);
160
+ };
161
+ for (const [name, def] of Object.entries(coreCatalog2.components)) {
162
+ if (!isOffered2(def))
163
+ continue;
164
+ if (options.lite && !def.lite)
165
+ continue;
166
+ add(name, def);
167
+ }
168
+ for (const ext of options.extensions ?? [])
169
+ for (const [name, def] of Object.entries(ext.components))
170
+ add(name, def);
171
+ return [...groups.entries()].map(([group, items]) => `${group}: ${items.join(` · `)}`);
172
+ }
173
+ function catalogPrompt(options = {}) {
174
+ const extensions = options.extensions ?? [];
175
+ const view = catalogView2(extensions);
176
+ const wanted = new Set(options.sections ?? DEFAULT_SECTIONS);
177
+ const has = (s) => wanted.has(s);
178
+ const only = options.only ? new Set(options.only) : undefined;
179
+ const lines = [];
180
+ const id = options.lite ? CORE_LITE_CATALOG_ID2 : CORE_CATALOG_ID2;
181
+ lines.push(`Catalog ${id}${extensions.length ? ` with extensions ${extensions.map((e) => e.id).join(`, `)}` : ``}.`);
182
+ if (has(`rules`)) {
183
+ lines.push(`Rules:`);
184
+ for (const rule of PROMPT_RULES)
185
+ lines.push(`- ${rule}`);
186
+ }
187
+ const offered = Object.entries(coreCatalog2.components).filter(([, def]) => isOffered2(def) && (!options.lite || def.lite));
188
+ const listed = offered.filter(([name]) => !only || only.has(name));
189
+ if (has(`components`)) {
190
+ lines.push(`Components (props marked * are required, ~ accept a binding, ^ are responsive; =x is the default, else an enum defaults to its first value and a boolean to false${only ? `; ask for any other component by name` : ``}):`);
191
+ if (!options.terse)
192
+ lines.push(`Common props (no description below): ${Object.entries(COMMON_PROPS).map(([k, v]) => v ? `${k} (${v})` : k).join(`, `)}.`);
193
+ for (const [name, def] of listed)
194
+ lines.push(componentBlock(name, def, view.enums, options.terse ?? false));
195
+ }
196
+ if (has(`index`)) {
197
+ lines.push(`Index (every component; ask for one by name to get its props):`);
198
+ for (const line of catalogIndex({ extensions, lite: options.lite }))
199
+ lines.push(`- ${line}`);
200
+ }
201
+ if (has(`shapes`) && has(`components`))
202
+ lines.push(`Shapes: ${defsBlock(coreCatalog2.defs, view.enums, usedShapes(listed.map(([, def]) => def), coreCatalog2.defs)).join(`; `)}`);
203
+ if (has(`functions`))
204
+ lines.push(`Functions ({call, args}; name(arg:type)→result): ${functionSignatures().join(`, `)}. filter: where = {field: value} (an empty value matches all), query = a case-insensitive substring of fields; bind a List or Table to it.`);
205
+ if (has(`style`))
206
+ lines.push(`Style keys (Box): display, flex*, justifyContent, align*, gap, width, height, min/max sizes, aspectRatio, position (relative|absolute|sticky), top/right/bottom/left, inset*, padding*/margin* (+Horizontal/Vertical/InlineStart/End), grid*, overflow(X/Y), direction, backgroundColor, backgroundGradient {angle, stops}, backdropBlur $blur.*, color, border*, opacity, boxShadow, font*, letterSpacing, text*, transition $motion.*, transform (translate/scale/rotate, paint only), animation (pulse|spin|fade-in|slide-in-up/down/left/right|shimmer), visibility, pointerEvents, userSelect, cursor. Values: px, "N%", "auto", or tokens $spacing.md, $color.primary, $radius.lg, $control.row.`);
207
+ if (has(`extensions`) && has(`components`)) {
208
+ for (const ext of extensions) {
209
+ lines.push(`Extension ${ext.id} (${ext.name}):`);
210
+ for (const [name, def] of Object.entries(ext.components))
211
+ lines.push(componentBlock(name, def, view.enums, options.terse ?? false));
212
+ if (ext.defs && Object.keys(ext.defs).length)
213
+ lines.push(`Shapes: ${defsBlock(ext.defs, view.enums).join(`; `)}`);
214
+ }
215
+ }
216
+ return lines.join(`
217
+ `);
218
+ }
219
+ var CHARS_PER_TOKEN = 4;
220
+ function estimateTokens(text) {
221
+ return Math.ceil(text.length / CHARS_PER_TOKEN);
222
+ }
223
+
224
+ // packages/exponential-ui/src/entries/prompt.ts
225
+ function catalogPrompt2(options = {}) {
226
+ describeCatalog2();
227
+ return catalogPrompt(options);
228
+ }
229
+ function componentPrompt2(name, options = {}) {
230
+ describeCatalog2();
231
+ return componentPrompt(name, options);
232
+ }
233
+ function catalogIndex2(options = {}) {
234
+ describeCatalog2();
235
+ return catalogIndex(options);
236
+ }
237
+ export {
238
+ CHARS_PER_TOKEN,
239
+ COMMON_PROPS,
240
+ DEFAULT_SECTIONS,
241
+ PROMPT_RULES,
242
+ PROMPT_SECTIONS,
243
+ catalogIndex2 as catalogIndex,
244
+ catalogPrompt2 as catalogPrompt,
245
+ componentPrompt2 as componentPrompt,
246
+ describeCatalog2 as describeCatalog,
247
+ estimateTokens
248
+ };
249
+
250
+ //# debugId=077C2E498EB260FA64756E2164756E21
251
+ //# sourceMappingURL=prompt.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/prompt.ts", "../src/entries/prompt.ts"],
4
+ "sourcesContent": [
5
+ "// VAPP-85: the model-facing catalog prompt. One compact block: the catalog\n// id, the authoring rules, one line per component (description, then props\n// with type and one-sentence meaning), the functions, then any registered\n// extensions in the same shape. fixtures/prompt-budget.json records the size\n// of the full core prompt; prompt.test.ts fails when it grows past the\n// budget — cut descriptions before cutting components.\n// VAPP-108: the prompt is SECTIONED (`sections`): a host serves the rules +\n// the index first and `componentPrompt(name)` on demand, or `only` the\n// components a task needs; eval/ measures what each variant costs.\n\nimport { CORE_CATALOG_ID, CORE_LITE_CATALOG_ID, catalogView, coreCatalog, isOffered } from \"./catalog\"\nimport type { ComponentDef, ExtensionDef, PropSchema } from \"./types\"\n\n/** The sections of the prompt, in print order (VAPP-108): an agent (or the\n * host serving it) asks for the ones it needs. `index` = one line per\n * component (name, group, description) instead of the full `components`\n * blocks: the agent reads the index, then asks for `componentPrompt(name)`\n * of the ones it will use. */\nexport type PromptSection = `rules` | `components` | `index` | `shapes` | `functions` | `style` | `extensions`\nexport const PROMPT_SECTIONS: readonly PromptSection[] = [`rules`, `components`, `index`, `shapes`, `functions`, `style`, `extensions`]\n/** What `catalogPrompt()` prints without `sections`. */\nexport const DEFAULT_SECTIONS: readonly PromptSection[] = [`rules`, `components`, `shapes`, `functions`, `style`, `extensions`]\n\nexport interface PromptOptions {\n extensions?: readonly ExtensionDef[]\n /** The core-lite subset (the app-shaped vocabulary: no overlays, media, Chart, data tables or the rarer controls). */\n lite?: boolean\n /** Omit the per-prop lines (names + types only). */\n terse?: boolean\n /** VAPP-108: which sections to print (default `DEFAULT_SECTIONS`, in that order whatever the order given). */\n sections?: readonly PromptSection[]\n /** VAPP-108: print only these components (full blocks) and the shapes they reach; `index` still lists every one. */\n only?: readonly string[]\n}\n\n/** The rules every surface author (a model) must follow, shared by the core\n * and the basic catalog. Kept to a few lines on purpose. */\nexport const PROMPT_RULES: readonly string[] = [\n `Reply with A2UI v0.9 messages: createSurface{surfaceId, catalogId}, then updateComponents{surfaceId, components:[…]} (one has id \"root\"; resend an id to change it) and updateDataModel{surfaceId, path, value} (writes the JSON pointer; no value removes it). Keep data in the model and bind to it.`,\n `A component = {id, component, …props, children?: [ids] | {componentId, path, key?}, slots?: {name: id}, on?: {event: action}, style?, visible?}. Children are ids, never inline; {componentId, path} repeats per item, key = the item field naming it.`,\n `Include every required prop. A ~ prop may be a binding {path: \"/json/pointer\"} or a call {call, args} (live). visible: false (or a binding) hides any component.`,\n `An action (on: {event: action}) = {event: {name, context?}} (sent to you; context values may be bindings, read AFTER the component's own write) and/or {functionCall: {call, args}} (runs on the client: a function below, or a namespaced host function like app.toast).`,\n `Lay out with Page, Stack, Grid, Card, SplitView, Sidebar and List (anything longer than a screen); a row of controls is a Toolbar, fields side by side a FieldGroup, the Cancel/submit row FormActions; Box + style only for the rest. Wrap fields in Form; a valid submit closes the Dialog or Drawer around it.`,\n `Responsive: a ^ prop also takes {base, sm?, md?, lg?, xl?} (from that breakpoint up). Style conditions, one level, narrow first: \"@media (min-width: $breakpoint.md)\": {…} (also max-width, min-height, max-height in px or $breakpoint.sm|md|lg|xl; orientation: portrait|landscape; hover: hover|none; prefers-reduced-motion: reduce), then \":hover\", \":focus-visible\", \":pressed\". display: \"none\" hides.`,\n `Prefer catalog components over Markdown (feature lists = List + Row, not bullets), labels and tones over colours; a colour is a $color.* token, never #hex (light and dark both apply). Built-in copy (Cancel, Search…) is localized: leave it unset.`,\n `One default Button per screen (the FormActions submit or the main action); the rest outline, secondary or ghost.`,\n]\n\n/** Props whose meaning is the same everywhere: described ONCE in the full\n * prompt (the per-prop line then carries only name, marks and type). The\n * catalog keeps every per-component description for the docs. */\nexport const COMMON_PROPS: Readonly<Record<string, string>> = {\n name: `form key`,\n label: ``,\n placeholder: ``,\n disabled: ``,\n checks: `validation; every failure shows`,\n validateOn: ``,\n style: `extra Box style`,\n icon: ``,\n size: ``,\n tone: ``,\n open: `bind it`,\n side: ``,\n emptyText: ``,\n dismissible: ``,\n busy: ``,\n loading: ``,\n lines: `truncate`,\n width: `px`,\n height: `px`,\n value: `bind it for two-way state`,\n title: ``,\n subtitle: ``,\n description: ``,\n meta: ``,\n count: ``,\n min: ``,\n max: ``,\n step: ``,\n src: ``,\n alt: ``,\n multiple: ``,\n pressable: `fires press`,\n durationMs: `known length`,\n firstDayOfWeek: `0 = Sunday; else the locale's`,\n direction: ``,\n orientation: ``,\n gap: ``,\n aspectRatio: `width/height`,\n text: ``,\n}\n\nfunction typeOf(schema: PropSchema, enums: Record<string, readonly string[]>): string {\n switch (schema.type) {\n case `enum`:\n return (schema.values ?? enums[schema.enum ?? ``] ?? []).join(`|`)\n case `array`:\n return schema.items ? `[${schema.items.type === `object` ? (schema.items.shape ?? `object`) : typeOf(schema.items, enums)}]` : `[]`\n case `object`:\n return schema.shape ?? `object`\n default:\n return schema.type\n }\n}\n\nfunction marksOf(schema: PropSchema): string {\n return `${schema.required ? `*` : ``}${schema.bindable ? `~` : ``}${schema.responsive ? `^` : ``}`\n}\n\n/** The default worth printing: an enum's FIRST value and a boolean's\n * `false` are implied (the components line says so once). */\nfunction defaultOf(schema: PropSchema, enums: Record<string, readonly string[]>): string {\n if (schema.default === undefined) return ``\n if (schema.type === `boolean` && schema.default === false) return ``\n if (schema.type === `enum` && (schema.values ?? enums[schema.enum ?? ``] ?? [])[0] === schema.default) return ``\n return `=${JSON.stringify(schema.default)}`\n}\n\nfunction propLine(name: string, schema: PropSchema, enums: Record<string, readonly string[]>): string {\n const def = defaultOf(schema, enums)\n const head = `${name}${marksOf(schema)}: ${typeOf(schema, enums)}${def}`\n return name in COMMON_PROPS ? head : `${head} — ${schema.description}`\n}\n\nexport function componentBlock(name: string, def: ComponentDef, enums: Record<string, readonly string[]>, terse: boolean): string {\n const head = `${name}${def.kind === `macro` ? `` : ``}: ${def.description}`\n const meta: string[] = []\n if (def.children !== `none`) meta.push(def.children === `one` ? `one child` : `children`)\n if (def.slots?.length) meta.push(`slots: ${def.slots.join(`, `)}`)\n if (def.events?.length) meta.push(`on: ${def.events.join(`, `)}`)\n const props = Object.entries(def.props)\n const body = terse\n ? [` props: ${props.map(([p, s]) => `${p}${marksOf(s)}:${typeOf(s, enums)}`).join(`, `)}`]\n : props.map(([p, s]) => ` ${propLine(p, s, enums)}`)\n return [head, ...(meta.length ? [` ${meta.join(`; `)}`] : []), ...body].join(`\\n`)\n}\n\n/** The shapes a prompt needs: every def a listed component's props reach\n * (directly, through arrays or through another def). */\nfunction usedShapes(components: Iterable<ComponentDef>, defs: Record<string, { properties: Record<string, PropSchema> }>): Set<string> {\n const used = new Set<string>()\n const visit = (schema: PropSchema | undefined) => {\n if (!schema) return\n if (schema.type === `array`) return visit(schema.items)\n if (schema.type === `object` && schema.shape && !used.has(schema.shape) && defs[schema.shape]) {\n used.add(schema.shape)\n for (const p of Object.values(defs[schema.shape].properties)) visit(p)\n }\n }\n for (const def of components) for (const p of Object.values(def.props)) visit(p)\n return used\n}\n\nfunction defsBlock(defs: Record<string, { description: string; properties: Record<string, PropSchema> }>, enums: Record<string, readonly string[]>, only?: Set<string>): string[] {\n return Object.entries(defs).filter(([name]) => !only || only.has(name)).map(\n ([name, def]) => `${name} = {${Object.entries(def.properties).map(([p, s]) => `${p}${s.required ? `*` : ``}: ${typeOf(s, enums)}`).join(`, `)}}`\n )\n}\n\nconst SHORT_TYPES: Readonly<Record<string, string>> = { string: `str`, number: `num`, boolean: `bool`, object: `obj` }\n\n/** Every catalog function as `name(arg:type,…)→returns` (round 4: the\n * model sees the argument names, not just the function names). */\nexport function functionSignatures(): string[] {\n const { names, core, basic } = coreCatalog.functions\n return names.map((name) => {\n const sig = core[name] ?? basic[name]\n if (!sig) return name\n return `${name}(${Object.entries(sig.args).map(([a, t]) => `${a}:${SHORT_TYPES[t] ?? t}`).join(`,`)})→${SHORT_TYPES[sig.returns] ?? sig.returns}`\n })\n}\n\n/** VAPP-108: one component's full block on demand (the per-component\n * section an agent requests after reading the index), with the shapes its\n * props reach. Unknown or hidden names give an empty string. */\nexport function componentPrompt(name: string, options: Pick<PromptOptions, `extensions` | `terse`> = {}): string {\n const extensions = options.extensions ?? []\n const view = catalogView(extensions)\n const def = view.components[name]\n if (!def || def.hidden) return ``\n const defs = { ...coreCatalog.defs, ...Object.fromEntries(extensions.flatMap((e) => Object.entries(e.defs ?? {}))) }\n const lines = [componentBlock(name, def, view.enums, options.terse ?? false)]\n const shapes = defsBlock(defs, view.enums, usedShapes([def], defs))\n if (shapes.length) lines.push(`Shapes: ${shapes.join(`; `)}`)\n return lines.join(`\\n`)\n}\n\n/** VAPP-108: the index — every offered component on one line (name, group, kind, its sentence), grouped. */\nexport function catalogIndex(options: Pick<PromptOptions, `extensions` | `lite`> = {}): string[] {\n const groups = new Map<string, string[]>()\n const add = (name: string, def: ComponentDef) => {\n const list = groups.get(def.group) ?? []\n list.push(`${name}${def.children === `none` ? `` : def.children === `one` ? ` (one child)` : ` (children)`}: ${def.description}`)\n groups.set(def.group, list)\n }\n for (const [name, def] of Object.entries(coreCatalog.components)) {\n if (!isOffered(def)) continue\n if (options.lite && !def.lite) continue\n add(name, def)\n }\n for (const ext of options.extensions ?? []) for (const [name, def] of Object.entries(ext.components)) add(name, def)\n return [...groups.entries()].map(([group, items]) => `${group}: ${items.join(` · `)}`)\n}\n\n/** The system prompt for a surface author. */\nexport function catalogPrompt(options: PromptOptions = {}): string {\n const extensions = options.extensions ?? []\n const view = catalogView(extensions)\n const wanted = new Set(options.sections ?? DEFAULT_SECTIONS)\n const has = (s: PromptSection) => wanted.has(s)\n const only = options.only ? new Set(options.only) : undefined\n const lines: string[] = []\n const id = options.lite ? CORE_LITE_CATALOG_ID : CORE_CATALOG_ID\n lines.push(`Catalog ${id}${extensions.length ? ` with extensions ${extensions.map((e) => e.id).join(`, `)}` : ``}.`)\n if (has(`rules`)) {\n lines.push(`Rules:`)\n for (const rule of PROMPT_RULES) lines.push(`- ${rule}`)\n }\n const offered = Object.entries(coreCatalog.components).filter(([, def]) => isOffered(def) && (!options.lite || def.lite))\n const listed = offered.filter(([name]) => !only || only.has(name))\n if (has(`components`)) {\n lines.push(`Components (props marked * are required, ~ accept a binding, ^ are responsive; =x is the default, else an enum defaults to its first value and a boolean to false${only ? `; ask for any other component by name` : ``}):`)\n if (!options.terse) lines.push(`Common props (no description below): ${Object.entries(COMMON_PROPS).map(([k, v]) => (v ? `${k} (${v})` : k)).join(`, `)}.`)\n for (const [name, def] of listed) lines.push(componentBlock(name, def, view.enums, options.terse ?? false))\n }\n if (has(`index`)) {\n lines.push(`Index (every component; ask for one by name to get its props):`)\n for (const line of catalogIndex({ extensions, lite: options.lite })) lines.push(`- ${line}`)\n }\n if (has(`shapes`) && has(`components`)) lines.push(`Shapes: ${defsBlock(coreCatalog.defs, view.enums, usedShapes(listed.map(([, def]) => def), coreCatalog.defs)).join(`; `)}`)\n if (has(`functions`)) lines.push(`Functions ({call, args}; name(arg:type)→result): ${functionSignatures().join(`, `)}. filter: where = {field: value} (an empty value matches all), query = a case-insensitive substring of fields; bind a List or Table to it.`)\n if (has(`style`)) lines.push(`Style keys (Box): display, flex*, justifyContent, align*, gap, width, height, min/max sizes, aspectRatio, position (relative|absolute|sticky), top/right/bottom/left, inset*, padding*/margin* (+Horizontal/Vertical/InlineStart/End), grid*, overflow(X/Y), direction, backgroundColor, backgroundGradient {angle, stops}, backdropBlur $blur.*, color, border*, opacity, boxShadow, font*, letterSpacing, text*, transition $motion.*, transform (translate/scale/rotate, paint only), animation (pulse|spin|fade-in|slide-in-up/down/left/right|shimmer), visibility, pointerEvents, userSelect, cursor. Values: px, \"N%\", \"auto\", or tokens $spacing.md, $color.primary, $radius.lg, $control.row.`)\n if (has(`extensions`) && has(`components`)) {\n for (const ext of extensions) {\n lines.push(`Extension ${ext.id} (${ext.name}):`)\n for (const [name, def] of Object.entries(ext.components)) lines.push(componentBlock(name, def, view.enums, options.terse ?? false))\n if (ext.defs && Object.keys(ext.defs).length) lines.push(`Shapes: ${defsBlock(ext.defs, view.enums).join(`; `)}`)\n }\n }\n return lines.join(`\\n`)\n}\n\n/** Characters per token the budget assumes (the same rule as the context\n * layout's `charsPerToken`): an estimate, not a tokenizer. */\nexport const CHARS_PER_TOKEN = 4\n\nexport function estimateTokens(text: string): number {\n return Math.ceil(text.length / CHARS_PER_TOKEN)\n}\n",
6
+ "// VAPP-106: `@exponential-at/ui/prompt`, the model-facing prompt as its own\n// entry. The root entry ships the catalog WITHOUT its descriptions (a browser\n// that renders never needs them); this entry attaches them\n// (`describeCatalog`) before the prompt reads them. The prompt itself is\n// src/prompt.ts, which this file leaves alone.\n\nimport { describeCatalog } from \"../catalog.described\"\nimport { CHARS_PER_TOKEN, COMMON_PROPS, DEFAULT_SECTIONS, PROMPT_RULES, PROMPT_SECTIONS, catalogIndex as bareCatalogIndex, catalogPrompt as bareCatalogPrompt, componentPrompt as bareComponentPrompt, estimateTokens } from \"../prompt\"\nimport type { PromptOptions, PromptSection } from \"../prompt\"\n\nexport { CHARS_PER_TOKEN, COMMON_PROPS, DEFAULT_SECTIONS, PROMPT_RULES, PROMPT_SECTIONS, describeCatalog, estimateTokens }\nexport type { PromptOptions, PromptSection }\n\n/** The catalog prompt (src/prompt.ts `catalogPrompt`) over the described catalog. */\nexport function catalogPrompt(options: PromptOptions = {}): string {\n describeCatalog()\n return bareCatalogPrompt(options)\n}\n\n/** One component's prompt section (VAPP-108, the on-demand per-component prompt) over the described catalog. */\nexport function componentPrompt(name: string, options: Parameters<typeof bareComponentPrompt>[1] = {}): string {\n describeCatalog()\n return bareComponentPrompt(name, options)\n}\n\n/** The one-line-per-component index (VAPP-108) over the described catalog. */\nexport function catalogIndex(options: Parameters<typeof bareCatalogIndex>[0] = {}): string[] {\n describeCatalog()\n return bareCatalogIndex(options)\n}\n"
7
+ ],
8
+ "mappings": ";;;;;;;;;;;;AAmBO,IAAM,kBAA4C,CAAC,SAAS,cAAc,SAAS,UAAU,aAAa,SAAS,YAAY;AAE/H,IAAM,mBAA6C,CAAC,SAAS,cAAc,UAAU,aAAa,SAAS,YAAY;AAgBvH,IAAM,eAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKO,IAAM,eAAiD;AAAA,EAC5D,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AAAA,EACN,KAAK;AAAA,EACL,KAAK;AAAA,EACL,UAAU;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,KAAK;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