@fayz-ai/core 0.9.0 → 0.10.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 (170) hide show
  1. package/README.md +2 -2
  2. package/dist/access/index.js.map +1 -1
  3. package/dist/{chunk-L4TLMYGC.js → chunk-6RBW2Y5K.js} +3 -3
  4. package/dist/chunk-6RBW2Y5K.js.map +1 -0
  5. package/dist/chunk-732GZEUI.js +1592 -0
  6. package/dist/chunk-732GZEUI.js.map +1 -0
  7. package/dist/{chunk-X5THHG6T.js → chunk-CPMHCTX3.js} +3 -3
  8. package/dist/chunk-CPMHCTX3.js.map +1 -0
  9. package/dist/{chunk-V2MSAUHO.js → chunk-JO7Z2AOE.js} +2 -2
  10. package/dist/chunk-JO7Z2AOE.js.map +1 -0
  11. package/dist/{chunk-5RJVUC6J.js → chunk-M27JPX3K.js} +12 -3
  12. package/dist/chunk-M27JPX3K.js.map +1 -0
  13. package/dist/chunk-OXQGRJZT.js +125 -0
  14. package/dist/chunk-OXQGRJZT.js.map +1 -0
  15. package/dist/data/backend-env.d.ts +38 -0
  16. package/dist/data/backend-env.d.ts.map +1 -0
  17. package/dist/data/index.js +1 -1
  18. package/dist/entity/events.d.ts +14 -0
  19. package/dist/entity/events.d.ts.map +1 -0
  20. package/dist/events/envelope.d.ts +31 -0
  21. package/dist/events/envelope.d.ts.map +1 -0
  22. package/dist/events/index.d.ts +4 -0
  23. package/dist/events/index.d.ts.map +1 -1
  24. package/dist/events/log.d.ts +44 -0
  25. package/dist/events/log.d.ts.map +1 -0
  26. package/dist/events/types.d.ts +40 -0
  27. package/dist/events/types.d.ts.map +1 -0
  28. package/dist/i18n/index.d.ts +10 -0
  29. package/dist/i18n/index.d.ts.map +1 -1
  30. package/dist/i18n/index.js +1 -1
  31. package/dist/index.d.ts +27 -17
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +388 -52
  34. package/dist/index.js.map +1 -1
  35. package/dist/integrations/index.js +1 -1
  36. package/dist/{integrations/index.d.ts → integrations.d.ts} +2 -2
  37. package/dist/integrations.d.ts.map +1 -0
  38. package/dist/{address/index.d.ts → lib/address.d.ts} +1 -1
  39. package/dist/{address/index.d.ts.map → lib/address.d.ts.map} +1 -1
  40. package/dist/{phone/index.d.ts → lib/phone.d.ts} +1 -1
  41. package/dist/lib/phone.d.ts.map +1 -0
  42. package/dist/{seo/index.d.ts → lib/seo.d.ts} +18 -1
  43. package/dist/lib/seo.d.ts.map +1 -0
  44. package/dist/{tenant/index.d.ts → lib/tenant.d.ts} +1 -1
  45. package/dist/lib/tenant.d.ts.map +1 -0
  46. package/dist/manifest/index.d.ts +1 -1
  47. package/dist/manifest/index.d.ts.map +1 -1
  48. package/dist/messaging/index.d.ts +3 -0
  49. package/dist/messaging/index.d.ts.map +1 -0
  50. package/dist/messaging/registry.d.ts +35 -0
  51. package/dist/messaging/registry.d.ts.map +1 -0
  52. package/dist/messaging/types.d.ts +67 -0
  53. package/dist/messaging/types.d.ts.map +1 -0
  54. package/dist/plugin/index.js +2 -1
  55. package/dist/plugin/runtime.d.ts +17 -0
  56. package/dist/plugin/runtime.d.ts.map +1 -1
  57. package/dist/registry/block-catalog.d.ts +78 -0
  58. package/dist/registry/block-catalog.d.ts.map +1 -0
  59. package/dist/registry/block-constraints.d.ts +64 -0
  60. package/dist/registry/block-constraints.d.ts.map +1 -0
  61. package/dist/registry/block-schema.d.ts +69 -0
  62. package/dist/registry/block-schema.d.ts.map +1 -0
  63. package/dist/registry/blocks.d.ts +84 -0
  64. package/dist/registry/blocks.d.ts.map +1 -0
  65. package/dist/registry/entities.d.ts +153 -0
  66. package/dist/registry/entities.d.ts.map +1 -0
  67. package/dist/registry/extension-points.d.ts +117 -0
  68. package/dist/registry/extension-points.d.ts.map +1 -0
  69. package/dist/registry/handles.d.ts +41 -0
  70. package/dist/registry/handles.d.ts.map +1 -0
  71. package/dist/registry/index.d.ts +41 -41
  72. package/dist/registry/index.d.ts.map +1 -1
  73. package/dist/registry/loaders.d.ts +55 -0
  74. package/dist/registry/loaders.d.ts.map +1 -0
  75. package/dist/registry/registry-class.d.ts +157 -0
  76. package/dist/registry/registry-class.d.ts.map +1 -0
  77. package/dist/registry/schema-check.d.ts +14 -0
  78. package/dist/registry/schema-check.d.ts.map +1 -0
  79. package/dist/router/index.d.ts +78 -1
  80. package/dist/router/index.d.ts.map +1 -1
  81. package/dist/router/index.js +1 -1
  82. package/dist/testing/index.js +1 -1
  83. package/dist/{testing/index.d.ts → testing.d.ts} +3 -3
  84. package/dist/testing.d.ts.map +1 -0
  85. package/dist/types/analytics.d.ts +196 -0
  86. package/dist/types/analytics.d.ts.map +1 -0
  87. package/dist/types/crud.d.ts +22 -2
  88. package/dist/types/crud.d.ts.map +1 -1
  89. package/dist/types/plugins.d.ts +55 -1
  90. package/dist/types/plugins.d.ts.map +1 -1
  91. package/package.json +6 -18
  92. package/dist/blocks/index.d.ts +0 -25
  93. package/dist/blocks/index.d.ts.map +0 -1
  94. package/dist/chunk-5RJVUC6J.js.map +0 -1
  95. package/dist/chunk-L4TLMYGC.js.map +0 -1
  96. package/dist/chunk-V2MSAUHO.js.map +0 -1
  97. package/dist/chunk-X5THHG6T.js.map +0 -1
  98. package/dist/chunk-Y2C2FBQP.js +0 -35
  99. package/dist/chunk-Y2C2FBQP.js.map +0 -1
  100. package/dist/chunk-YH25Y4FW.js +0 -311
  101. package/dist/chunk-YH25Y4FW.js.map +0 -1
  102. package/dist/integrations/index.d.ts.map +0 -1
  103. package/dist/phone/index.d.ts.map +0 -1
  104. package/dist/seo/index.d.ts.map +0 -1
  105. package/dist/tenant/index.d.ts.map +0 -1
  106. package/dist/testing/index.d.ts.map +0 -1
  107. package/src/access/denial.ts +0 -33
  108. package/src/access/engine.test.ts +0 -48
  109. package/src/access/engine.ts +0 -136
  110. package/src/access/index.ts +0 -14
  111. package/src/access/limits.ts +0 -18
  112. package/src/address/index.ts +0 -188
  113. package/src/app/render.tsx +0 -69
  114. package/src/blocks/index.tsx +0 -68
  115. package/src/data/archetype.ts +0 -255
  116. package/src/data/bulk.ts +0 -35
  117. package/src/data/cached.ts +0 -55
  118. package/src/data/count.test.ts +0 -152
  119. package/src/data/count.ts +0 -131
  120. package/src/data/filters.test.ts +0 -70
  121. package/src/data/filters.ts +0 -90
  122. package/src/data/index.ts +0 -11
  123. package/src/data/mock.ts +0 -90
  124. package/src/data/platform-api.ts +0 -209
  125. package/src/data/refresh.ts +0 -115
  126. package/src/data/resolve.ts +0 -126
  127. package/src/data/supabase.ts +0 -230
  128. package/src/data/types.ts +0 -50
  129. package/src/entity/index.ts +0 -2
  130. package/src/entity/registry.ts +0 -49
  131. package/src/events/index.tsx +0 -82
  132. package/src/i18n/index.ts +0 -476
  133. package/src/i18n/shell-translations.en.ts +0 -875
  134. package/src/i18n/shell-translations.pt-br.ts +0 -873
  135. package/src/index.ts +0 -217
  136. package/src/integrations/index.ts +0 -237
  137. package/src/lib/cache.ts +0 -118
  138. package/src/lib/csv.ts +0 -54
  139. package/src/lib/format.ts +0 -58
  140. package/src/manifest/app-manifest.schema.json +0 -676
  141. package/src/manifest/index.ts +0 -518
  142. package/src/manifest/serialize.ts +0 -52
  143. package/src/phone/index.ts +0 -85
  144. package/src/plugin/createSafeDataProvider.ts +0 -30
  145. package/src/plugin/index.ts +0 -1
  146. package/src/plugin/runtime.ts +0 -331
  147. package/src/registry/index.ts +0 -163
  148. package/src/router/history.ts +0 -86
  149. package/src/router/index.ts +0 -29
  150. package/src/runtime/index.ts +0 -15
  151. package/src/runtime/oauth.ts +0 -219
  152. package/src/search/engine.ts +0 -559
  153. package/src/search/index.ts +0 -25
  154. package/src/search/text.ts +0 -206
  155. package/src/search/types.ts +0 -75
  156. package/src/seo/index.ts +0 -128
  157. package/src/tenant/index.ts +0 -38
  158. package/src/testing/index.ts +0 -116
  159. package/src/types/auth.ts +0 -41
  160. package/src/types/billing.ts +0 -39
  161. package/src/types/crud.ts +0 -184
  162. package/src/types/entities.ts +0 -142
  163. package/src/types/entitlements.ts +0 -45
  164. package/src/types/i18n.ts +0 -7
  165. package/src/types/index.ts +0 -11
  166. package/src/types/org.ts +0 -137
  167. package/src/types/payment.ts +0 -44
  168. package/src/types/permissions.ts +0 -32
  169. package/src/types/plugins.ts +0 -480
  170. package/src/types/theme.ts +0 -8
@@ -0,0 +1,157 @@
1
+ import type { BlockPreset, BlockSetting, BlockStability } from './block-schema';
2
+ /** A JSON Schema object (loosely typed; validated by tooling, not at runtime). */
3
+ export type JsonSchema = Record<string, unknown>;
4
+ export type RegistrySource = 'sdk' | 'plugin' | 'app';
5
+ /**
6
+ * A child a block cannot function without — re-inserted at its template index
7
+ * when a generated or edited tree drops it (WooCommerce's `use-forced-layout`).
8
+ * `props` seeds the re-inserted instance; the child's own setting defaults fill
9
+ * whatever `props` leaves unsaid.
10
+ */
11
+ export interface RequiredBlockChild {
12
+ type: string;
13
+ /** Stable id for the re-inserted node. Defaults to `type`. */
14
+ id?: string;
15
+ props?: Record<string, unknown>;
16
+ }
17
+ /** A param value bound to a route param of the page being rendered
18
+ * (`{ category: { $param: 'slug' } }`). */
19
+ export interface LoaderParamRef {
20
+ $param: string;
21
+ }
22
+ /** A param value bound to one of the declaring block instance's own props
23
+ * (`{ limit: { $prop: 'limit' } }`). Setting defaults fill unset props, so the
24
+ * declared need and the rendered block always agree on the value. */
25
+ export interface LoaderPropRef {
26
+ $prop: string;
27
+ }
28
+ /**
29
+ * One named data need: which loader, with which params. A param value is a
30
+ * JSON literal (a document-level constant), a {@link LoaderParamRef} or a
31
+ * {@link LoaderPropRef}.
32
+ */
33
+ export interface BlockDataNeed {
34
+ /** Registered loader id — unknown ids are an I2 hard error. */
35
+ loader: string;
36
+ params?: Record<string, unknown>;
37
+ }
38
+ /** A block's named data needs (`{ products: { loader: 'products.list' } }`). */
39
+ export type BlockDataNeeds = Record<string, BlockDataNeed>;
40
+ export interface RegistryMeta {
41
+ /** Human title — the canonical name of the uniform meta envelope. `label` is
42
+ * the legacy alias; `register()` folds the two so either spelling reads back
43
+ * through both fields. */
44
+ title?: string;
45
+ /** Human label for the platform editor. @see title */
46
+ label?: string;
47
+ description?: string;
48
+ /** Where this artifact came from (for introspection / conflict reporting). */
49
+ source?: RegistrySource;
50
+ /** Owning plugin id, when source is 'plugin'. */
51
+ pluginId?: string;
52
+ /** JSON Schema for this artifact's props/config — drives the visual editor
53
+ * and constrains AI generation. Optional but strongly encouraged.
54
+ *
55
+ * Prefer declaring `settings` and letting `defineBlock` compile this: the two
56
+ * must not be hand-maintained side by side or they drift. */
57
+ propsSchema?: JsonSchema;
58
+ /** Authoring-level prop declaration. Compiles to {@link propsSchema}. */
59
+ settings?: readonly BlockSetting[];
60
+ /** Named starting points offered when the artifact is inserted. */
61
+ presets?: readonly BlockPreset[];
62
+ /**
63
+ * Surfaces this artifact may be placed on. Absent means "anywhere".
64
+ *
65
+ * The vocabulary belongs to the surface, not to core — the storefront uses
66
+ * page kinds (`home`, `catalog`, `product`, …), an admin scaffold uses its
67
+ * own. Core only carries the constraint so tooling can enforce it uniformly.
68
+ */
69
+ enabledOn?: readonly string[];
70
+ /** Contract stability. Absent means `stable`. */
71
+ stability?: BlockStability;
72
+ /** SDK/plugin version this entry first appeared in (semver string). Part of
73
+ * the uniform meta envelope so tooling can say "since 0.9" about any
74
+ * registry entry — blocks today, entities/rules/actions later. */
75
+ since?: string;
76
+ /** One-line description of the value this entry resolves to. Loaders declare
77
+ * it so the agent knows what a data need yields without running it. */
78
+ output?: string;
79
+ /**
80
+ * Named data needs this entry resolves through the page-level resolver
81
+ * (spine M3): `{ products: { loader: 'products.list', params: {...} } }`.
82
+ * Declared on blocks; a document block instance may add or override needs
83
+ * with the same shape. Loaders are the ONLY read path (I11) — a block with a
84
+ * `data` declaration must not fetch for itself.
85
+ */
86
+ data?: BlockDataNeeds;
87
+ /** Block ids this artifact may ONLY be a DIRECT child of (block.json `parent`).
88
+ * A block declaring this cannot sit at a tree root. */
89
+ parent?: readonly string[];
90
+ /** Block ids that must appear somewhere ABOVE this artifact, at any depth
91
+ * (block.json `ancestor`). Weaker than `parent`; both may be declared. */
92
+ ancestor?: readonly string[];
93
+ /** Context keys this artifact reads at runtime (block.json `usesContext`).
94
+ * A placement where no ancestor provides them is reported as advisory —
95
+ * the surface (page, slot) may supply them instead. */
96
+ usesContext?: readonly string[];
97
+ /** Context keys this artifact provides to its descendants
98
+ * (block.json `providesContext`). */
99
+ providesContext?: readonly string[];
100
+ /** May this artifact appear more than once in one tree
101
+ * (block.json `supports.multiple`)? Absent means true. */
102
+ allowMultiple?: boolean;
103
+ /** Children this artifact cannot function without — re-inserted by
104
+ * `repairBlockTree` when missing (use-forced-layout). Order is the template
105
+ * order, which decides the index a missing child is re-inserted at. */
106
+ requiredChildren?: readonly RequiredBlockChild[];
107
+ }
108
+ export interface RegistryEntry<T> {
109
+ id: string;
110
+ value: T;
111
+ meta: RegistryMeta;
112
+ }
113
+ /**
114
+ * The uniform meta envelope, as data. Every registry — blocks today, entities,
115
+ * rules and actions later — describes its entries through this one shape, so a
116
+ * catalog consumer (the editor, the AI, `fayz catalog`) reads N registries with
117
+ * one parser. Richer per-kind descriptors (e.g. `BlockDescriptor` with settings
118
+ * and presets) extend this rather than replacing it.
119
+ */
120
+ export interface RegistryEntryDescriptor {
121
+ id: string;
122
+ /** The owning registry's kind ('block', 'handle', …). */
123
+ kind: string;
124
+ title?: string;
125
+ description?: string;
126
+ /** JSON Schema for the entry's props/config, when declared. */
127
+ schema?: JsonSchema;
128
+ stability: BlockStability;
129
+ since?: string;
130
+ source?: RegistrySource;
131
+ pluginId?: string;
132
+ }
133
+ /** A typed, introspectable id→value map. Last registration wins (so an app's
134
+ * registry.tsx can override an SDK artifact by re-registering its id). */
135
+ export declare class Registry<T> {
136
+ readonly kind: string;
137
+ private readonly entries;
138
+ constructor(kind: string);
139
+ register(id: string, value: T, meta?: RegistryMeta): void;
140
+ get(id: string): T | undefined;
141
+ getEntry(id: string): RegistryEntry<T> | undefined;
142
+ has(id: string): boolean;
143
+ list(): RegistryEntry<T>[];
144
+ ids(): string[];
145
+ /**
146
+ * Every entry reduced to the uniform meta envelope, sorted by id.
147
+ *
148
+ * Sorted for the same reason as `describeBlocks`: this feeds prompts,
149
+ * documents and generated catalogs, and registration order is an
150
+ * implementation detail that would make every diff noisy.
151
+ */
152
+ describe(): RegistryEntryDescriptor[];
153
+ clear(): void;
154
+ }
155
+ /** True for app-local custom artifacts (`custom:*`). */
156
+ export declare function isCustomId(id: string): boolean;
157
+ //# sourceMappingURL=registry-class.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-class.d.ts","sourceRoot":"","sources":["../../src/registry/registry-class.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAY/E,kFAAkF;AAClF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEhD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,CAAA;AAErD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,8DAA8D;IAC9D,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC;AAOD;4CAC4C;AAC5C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;sEAEsE;AACtE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAED,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EA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E,YAAY,CAAA;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,SAAS,EAAE,cAAc,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;2EAC2E;AAC3E,qBAAa,QAAQ,CAAC,CAAC;IAGT,QAAQ,CAAC,IAAI,EAAE,MAAM;IAFjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;gBAEzC,IAAI,EAAE,MAAM;IAEjC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,GAAE,YAAiB,GAAG,IAAI;IAO7D,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAI9B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS;IAIlD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIxB,IAAI,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;IAI1B,GAAG,IAAI,MAAM,EAAE;IAIf;;;;;;OAMG;IACH,QAAQ,IAAI,uBAAuB,EAAE;IAgBrC,KAAK,IAAI,IAAI;CAGd;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE9C"}
@@ -0,0 +1,14 @@
1
+ import type { JsonSchema } from './registry-class';
2
+ export interface SchemaIssue {
3
+ /** Dotted path into the value ('' is the root). */
4
+ path: string;
5
+ message: string;
6
+ }
7
+ /**
8
+ * Check `value` against `schema`, returning issues (empty = valid).
9
+ * Pure and total: never throws, never mutates.
10
+ */
11
+ export declare function checkAgainstSchema(schema: JsonSchema, value: unknown, path?: string): SchemaIssue[];
12
+ /** Render issues as one human/agent-readable line each. */
13
+ export declare function formatSchemaIssues(issues: SchemaIssue[]): string;
14
+ //# sourceMappingURL=schema-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-check.d.ts","sourceRoot":"","sources":["../../src/registry/schema-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAmBlD,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAmBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,SAAK,GAAG,WAAW,EAAE,CA2F/F;AAED,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAEhE"}
@@ -1,8 +1,85 @@
1
1
  export interface RouterAdapter {
2
+ /** Move to `to` ('/product/x'). No-op where navigation is not possible (SSR). */
2
3
  navigate(to: string): void;
4
+ /**
5
+ * Move to `to` without adding a history entry — for state that lives in the
6
+ * URL (catalogue filters, sort) where every keystroke must not become a
7
+ * "back" step. No-op under SSR.
8
+ */
9
+ replace(to: string): void;
10
+ /** Current in-app path, always leading-slash, never including the origin. */
3
11
  getCurrentPath(): string;
12
+ /** Subscribe to path changes. Returns an unsubscribe fn. */
4
13
  onPathChange(cb: (path: string) => void): () => void;
14
+ /**
15
+ * The `href` an anchor to `to` should carry. Hash routing needs the '#'
16
+ * prefix; real-URL routing passes the path through untouched.
17
+ */
18
+ href(to: string): string;
19
+ /**
20
+ * Whether a plain left-click on an in-app anchor must be intercepted and
21
+ * routed in-page. False for hash routing, where the browser already handles
22
+ * fragment navigation natively without a document load.
23
+ */
24
+ readonly interceptsLinkClicks: boolean;
5
25
  }
26
+ /**
27
+ * Fragment addressing (`example.com/#/product/x`). The historical SDK default.
28
+ *
29
+ * Deliberately kept as-is: every shipped app addresses pages this way, and the
30
+ * fragment survives static hosting with no server rewrite rules. Its cost is
31
+ * that the fragment never reaches the server, so a hash-addressed page can be
32
+ * neither server-rendered nor indexed as a distinct URL — use
33
+ * `historyRouterAdapter` when either matters.
34
+ */
6
35
  export declare function hashRouterAdapter(): RouterAdapter;
7
- export declare function windowRouterAdapter(): RouterAdapter;
36
+ /**
37
+ * Real-URL addressing (`example.com/product/x`) over the History API.
38
+ *
39
+ * `history.pushState` does NOT emit `popstate` (HTML spec), so a subscriber
40
+ * list is the only way programmatic navigation can notify renderers — an
41
+ * adapter that only listens for `popstate` silently changes the URL without
42
+ * re-rendering. Back/forward still arrive via `popstate` and are fanned out to
43
+ * the same subscribers.
44
+ *
45
+ * Requires the host to serve the app shell for unknown paths (SPA fallback);
46
+ * without it a deep link 404s before the adapter ever runs.
47
+ */
48
+ export declare function historyRouterAdapter(): RouterAdapter;
49
+ /**
50
+ * A fixed path with no browser behind it — the server half of a render.
51
+ *
52
+ * Every method is total: `navigate` is a no-op and `onPathChange` never fires,
53
+ * so a component that navigates during render degrades to "nothing happened"
54
+ * instead of throwing. Anchors still render real, crawlable hrefs, which is the
55
+ * whole point of rendering server-side.
56
+ */
57
+ export declare function staticRouterAdapter(path: string, options?: {
58
+ /**
59
+ * How to write an anchor's href. Defaults to the path verbatim — real URLs,
60
+ * which is the reason to render statically at all. A caller rendering a
61
+ * store that is *served* as a hash SPA passes that scheme's writer instead,
62
+ * because the addressing scheme is a property of how the store is served,
63
+ * not of whether this particular render happens to be headless.
64
+ */
65
+ href?: (to: string) => string;
66
+ }): RouterAdapter;
67
+ /**
68
+ * Bridge any host router (TanStack Router, React Router, Next) into the SDK.
69
+ * The host stays the single source of truth for history; the SDK only reads.
70
+ */
71
+ export declare function hostRouterAdapter(host: {
72
+ navigate: (to: string) => void;
73
+ /** Falls back to `navigate` when the host draws no push/replace distinction. */
74
+ replace?: (to: string) => void;
75
+ currentPath: () => string;
76
+ subscribe?: (cb: (path: string) => void) => () => void;
77
+ }): RouterAdapter;
78
+ /**
79
+ * The adapter that fits the current environment: static during SSR (no
80
+ * `window`), otherwise the caller's choice of addressing scheme.
81
+ */
82
+ export declare function defaultRouterAdapter(scheme?: 'hash' | 'history', ssrPath?: string): RouterAdapter;
83
+ /** @deprecated Use `historyRouterAdapter()` — this one never notified on push. */
84
+ export declare const windowRouterAdapter: typeof historyRouterAdapter;
8
85
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,cAAc,IAAI,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CACrD;AAED,wBAAgB,iBAAiB,IAAI,aAAa,CAUjD;AAED,wBAAgB,mBAAmB,IAAI,aAAa,CAUnD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/router/index.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,6EAA6E;IAC7E,cAAc,IAAI,MAAM,CAAA;IACxB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;IACpD;;;OAGG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAA;CACvC;AAOD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,CAajD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,CAsCpD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IACP;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;CACzB,GACL,aAAa,CAWf;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,gFAAgF;IAChF,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,WAAW,EAAE,MAAM,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;CACvD,GAAG,aAAa,CAShB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,GAAE,MAAM,GAAG,SAAkB,EACnC,OAAO,SAAM,GACZ,aAAa,CAWf;AAED,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,6BAAuB,CAAA"}
@@ -1,3 +1,3 @@
1
- export { hashRouterAdapter, windowRouterAdapter } from '../chunk-Y2C2FBQP.js';
1
+ export { defaultRouterAdapter, hashRouterAdapter, historyRouterAdapter, hostRouterAdapter, staticRouterAdapter, windowRouterAdapter } from '../chunk-OXQGRJZT.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export { PluginContractError, assertConnectorContract, assertPluginManifestContract } from '../chunk-X5THHG6T.js';
1
+ export { PluginContractError, assertConnectorContract, assertPluginManifestContract } from '../chunk-CPMHCTX3.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import type { PluginManifest } from '../types/plugins';
2
- import type { Connector } from '../integrations';
1
+ import type { PluginManifest } from './types/plugins';
2
+ import type { Connector } from './integrations';
3
3
  export declare class PluginContractError extends Error {
4
4
  constructor(message: string);
5
5
  }
@@ -16,4 +16,4 @@ export declare function assertPluginManifestContract(manifest: PluginManifest):
16
16
  * data-plane (edge function) exists — the TDD anchor for an integration.
17
17
  */
18
18
  export declare function assertConnectorContract(connector: Connector): void;
19
- //# sourceMappingURL=index.d.ts.map
19
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAUD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAsD3E;AAMD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAiBlE"}
@@ -0,0 +1,196 @@
1
+ import type React from 'react';
2
+ import type { PluginPermissionRequirement, ResolvedPluginManifest, VerticalId, DashboardSurface } from './plugins';
3
+ export type AnalyticsFormat = 'number' | 'currency' | 'percent' | 'duration' | 'date' | 'text';
4
+ /**
5
+ * Time bucket applied to a timestamp dimension. 'auto' lets the chosen date
6
+ * range pick — hours for a day, months for a year — because a fixed 'day' grain
7
+ * turns a 12-month range into 365 unreadable ticks.
8
+ */
9
+ export type AnalyticsGrain = 'auto' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
10
+ export type AnalyticsRow = Record<string, unknown>;
11
+ export interface AnalyticsDimension {
12
+ /** Column on the read model to group by. */
13
+ key: string;
14
+ label: string;
15
+ /** Bucket a timestamp column instead of grouping on its raw value. */
16
+ grain?: AnalyticsGrain;
17
+ format?: AnalyticsFormat;
18
+ }
19
+ export type AnalyticsAgg = 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max' | 'ratio';
20
+ export interface AnalyticsMeasure {
21
+ key: string;
22
+ label: string;
23
+ agg: AnalyticsAgg;
24
+ /** Column to aggregate. Defaults to `key`. Ignored by 'count'. */
25
+ column?: string;
26
+ format?: AnalyticsFormat;
27
+ /**
28
+ * For agg 'ratio': [numerator, denominator] measure keys. Computed after
29
+ * aggregation rather than in SQL, so avg-of-ratios never masquerades as
30
+ * ratio-of-sums (AOV = sum(total)/count(*), not avg(total/1)).
31
+ */
32
+ ratioOf?: [string, string];
33
+ /** Multiply the ratio (100 turns a fraction into a percent). */
34
+ scale?: number;
35
+ }
36
+ export type AnalyticsFilterOption = {
37
+ label: string;
38
+ value: string;
39
+ };
40
+ export interface AnalyticsFilterDef {
41
+ key: string;
42
+ label: string;
43
+ type: 'select' | 'multiselect' | 'text' | 'boolean' | 'number';
44
+ /**
45
+ * Category in the filter picker — 'Customers', 'Finance and payments',
46
+ * 'Inventory'. Filters with no group land under 'General'.
47
+ */
48
+ group?: string;
49
+ options?: AnalyticsFilterOption[] | (() => Promise<AnalyticsFilterOption[]>);
50
+ defaultValue?: unknown;
51
+ placeholder?: string;
52
+ }
53
+ export interface AnalyticsRunContext {
54
+ tenantId?: string;
55
+ dateRange: AnalyticsDateRange;
56
+ filters: Record<string, unknown>;
57
+ }
58
+ export interface AnalyticsSource {
59
+ /**
60
+ * 'view' — a tenant-scoped read model queried directly (detail listings).
61
+ * 'rpc' — a server-side aggregate; the generic `analytics_run` takes the
62
+ * dimensions/measures as parameters so a card needs no bespoke SQL.
63
+ * 'fn' — an app-supplied async function, for data that has no read model.
64
+ */
65
+ kind: 'view' | 'rpc' | 'fn';
66
+ /** View or function name. Required for 'view' and 'rpc'. */
67
+ name?: string;
68
+ run?: (ctx: AnalyticsRunContext) => Promise<AnalyticsRow[]>;
69
+ /** Tenant scoping column on the view. Default: 'tenant_id'. */
70
+ tenantColumn?: string;
71
+ schema?: string;
72
+ /** snake_case DB → camelCase JS key overrides. */
73
+ columnMap?: Record<string, string>;
74
+ }
75
+ export interface AnalyticsQuery {
76
+ source: AnalyticsSource;
77
+ /**
78
+ * Column the date range filters on. Default: 'created_at'.
79
+ *
80
+ * `null` means the card is a SNAPSHOT and the range must not apply — stock on
81
+ * hand is what is in the warehouse now, not what was created in the last
82
+ * 30 days, and filtering it by a range silently answers a different question.
83
+ */
84
+ dateColumn?: string | null;
85
+ /** Group-by keys. Empty ⇒ the card is a single scalar (a KPI) or a raw list. */
86
+ dimensions?: AnalyticsDimension[];
87
+ /** Aggregations. Empty ⇒ raw rows, and `columns` drives the table. */
88
+ measures?: AnalyticsMeasure[];
89
+ filters?: AnalyticsFilterDef[];
90
+ defaultSort?: string;
91
+ defaultSortDir?: 'asc' | 'desc';
92
+ /** Row cap applied server-side (top-N breakdowns). */
93
+ limit?: number;
94
+ }
95
+ export type AnalyticsVizType = 'kpi' | 'line' | 'bar' | 'area' | 'donut' | 'table' | 'breakdown' | 'funnel';
96
+ export interface AnalyticsVizDef {
97
+ type: AnalyticsVizType;
98
+ /** Measure keys to render. Defaults to every measure on the query. */
99
+ measures?: string[];
100
+ /** Dimension used for the category axis / row label. Defaults to the first. */
101
+ categoryKey?: string;
102
+ /** kpi: draw a sparkline from the time dimension under the headline. */
103
+ spark?: boolean;
104
+ /** Cap rows ON THE CARD. The full-page viewer always shows everything. */
105
+ limit?: number;
106
+ height?: number;
107
+ }
108
+ export interface AnalyticsColumnDef {
109
+ key: string;
110
+ label: string;
111
+ type: AnalyticsFormat | 'person' | 'select' | 'email' | 'boolean';
112
+ sortable?: boolean;
113
+ currency?: string;
114
+ /** For type 'person': the row key holding the person UUID. */
115
+ idKey?: string;
116
+ renderCell?: (value: unknown, row: AnalyticsRow) => React.ReactNode;
117
+ /** Export-only when false. Default: true. */
118
+ visible?: boolean;
119
+ align?: 'left' | 'center' | 'right';
120
+ aggregate?: 'sum' | 'avg' | 'count' | 'min' | 'max';
121
+ }
122
+ /** Where a card sits on the analytics overview. Absent ⇒ list-only report. */
123
+ export interface AnalyticsPlacement {
124
+ span?: 1 | 2 | 3 | 4;
125
+ order?: number;
126
+ defaultVisible?: boolean;
127
+ surfaces?: DashboardSurface[];
128
+ }
129
+ export interface AnalyticsCardDef {
130
+ id: string;
131
+ name: string;
132
+ description?: string;
133
+ icon?: string;
134
+ /** Drives the list's Category chip and the overview grouping. */
135
+ category: string;
136
+ /** Owning plugin. Defaults to the contributing plugin's id. */
137
+ domain?: string;
138
+ /**
139
+ * The "Created by" column. Pre-built cards carry the product name; a card a
140
+ * user builds later carries the member. Set once per pack, not per card.
141
+ */
142
+ createdBy?: string;
143
+ query: AnalyticsQuery;
144
+ viz: AnalyticsVizDef;
145
+ /** Column set for raw/detail reports (queries with no measures). */
146
+ columns?: AnalyticsColumnDef[];
147
+ dashboard?: AnalyticsPlacement;
148
+ /** Offer "compare to previous period" and fetch the comparison window. */
149
+ compare?: boolean;
150
+ verticalId?: VerticalId;
151
+ permission?: PluginPermissionRequirement;
152
+ /** False renders the "not connected yet" state instead of querying. */
153
+ available?: boolean;
154
+ /** Business grain of a row — the double-counting guard. */
155
+ grain?: 'order' | 'order_item' | 'booking' | 'ledger_movement' | 'session' | 'event' | (string & {});
156
+ /** Canonical data owner for this card's facts, for provenance. */
157
+ canonicalOwner?: string;
158
+ }
159
+ export interface ResolvedAnalyticsCard extends AnalyticsCardDef {
160
+ domain: string;
161
+ order: number;
162
+ plugin: ResolvedPluginManifest;
163
+ }
164
+ export interface AnalyticsDateRange {
165
+ from: string;
166
+ to: string;
167
+ }
168
+ export type AnalyticsCompare = 'none' | 'previous_period' | 'previous_year';
169
+ export interface AnalyticsQueryState {
170
+ dateRange: AnalyticsDateRange;
171
+ compare?: AnalyticsCompare;
172
+ filters: Record<string, unknown>;
173
+ sortBy?: string;
174
+ sortDir?: 'asc' | 'desc';
175
+ page: number;
176
+ pageSize: number;
177
+ search?: string;
178
+ }
179
+ export interface AnalyticsSummary {
180
+ /** Scalar rollup per measure key over the WHOLE range, not just this page. */
181
+ [measureKey: string]: number;
182
+ }
183
+ export interface AnalyticsResult {
184
+ rows: AnalyticsRow[];
185
+ total: number;
186
+ summary?: AnalyticsSummary;
187
+ /** Same shape over the comparison window, when `compare` is active. */
188
+ previous?: {
189
+ rows: AnalyticsRow[];
190
+ summary?: AnalyticsSummary;
191
+ };
192
+ }
193
+ export interface AnalyticsProvider {
194
+ run(card: AnalyticsCardDef, state: AnalyticsQueryState): Promise<AnalyticsResult>;
195
+ }
196
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/types/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAgBlH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AAE9F;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAE5F,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAMlD,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,KAAK,CAAC,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AA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAChE;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;CAClF"}
@@ -74,6 +74,13 @@ export interface FieldGroup {
74
74
  /** Renders an image slot to the left of the group's fields. Functional when
75
75
  * the EntityDef supplies `image`; a plain placeholder otherwise. */
76
76
  imageSlot?: boolean;
77
+ /**
78
+ * Which column this group sits in when the entity opts into `formColumns: 2`.
79
+ * 'side' is the narrow right rail — for the things you SET about a record
80
+ * (status, visibility, tags, private notes) as opposed to the things the
81
+ * record IS. Default 'main'. Ignored in a one-column form.
82
+ */
83
+ column?: 'main' | 'side';
77
84
  }
78
85
  export interface DetailTab {
79
86
  id: string;
@@ -125,6 +132,13 @@ export interface EntityDef<T = Record<string, unknown>> {
125
132
  fieldGroups?: FieldGroup[];
126
133
  /** Wiring for the `imageSlot` of whichever field group declares one. */
127
134
  image?: EntityImageConfig;
135
+ /**
136
+ * Form layout width. 2 puts the groups marked `column: 'side'` into a narrow
137
+ * right rail beside the main column — the shape a record with settings
138
+ * (status, visibility, tags, notes) wants, so those don't push the actual
139
+ * content of the record further down the page. Default 1 (single column).
140
+ */
141
+ formColumns?: 1 | 2;
128
142
  detailTabs?: DetailTab[];
129
143
  data?: {
130
144
  table: string;
@@ -145,11 +159,17 @@ export interface EntityDef<T = Record<string, unknown>> {
145
159
  displayField?: string;
146
160
  subtitleField?: string;
147
161
  imageField?: string;
148
- /** Faceted filters shown as pills below the list search box. Each references a
149
- * field whose `options` supply the pills; an "All" pill clears the filter. */
162
+ /** Faceted filters shown below the list search box. Each references a field
163
+ * whose `options` supply the choices; an "All" choice clears the filter.
164
+ *
165
+ * `display: 'tabs'` promotes the facet out of the body and into the list
166
+ * header, as the tab strip that heads the page (Todos / Ativo / Rascunho …).
167
+ * Only the FIRST such facet is promoted — a header carries one primary view
168
+ * switch; further facets stay as pills. Default is 'pills'. */
150
169
  facets?: {
151
170
  field: string;
152
171
  allLabel?: string;
172
+ display?: 'pills' | 'tabs';
153
173
  }[];
154
174
  /**
155
175
  * Plan quantity-limit key gating creation of this entity (matches a
@@ -1 +1 @@
1
- {"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../src/types/crud.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,MAAM,MAAM,SAAS,GACjB,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAC5C,QAAQ,GAAG,UAAU,GACrB,QAAQ,GAAG,aAAa,GAAG,WAAW,GACtC,UAAU,GACV,MAAM,GAAG,UAAU,GAAG,MAAM,GAC5B,SAAS,GAAG,UAAU,GAAG,UAAU,GACnC,OAAO,GAAG,UAAU,CAAA;AAExB;;;iFAGiF;AACjF,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAA;IACb,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uFAAuF;IACvF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAED,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,uEAAuE;IACvE,IAAI,CAAC,EA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