@fayz-ai/core 0.9.0 → 0.11.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 (218) hide show
  1. package/README.md +2 -2
  2. package/dist/access/index.js.map +1 -1
  3. package/dist/chunk-BEGXYHS4.js +566 -0
  4. package/dist/chunk-BEGXYHS4.js.map +1 -0
  5. package/dist/chunk-ED6NBH6U.js +348 -0
  6. package/dist/chunk-ED6NBH6U.js.map +1 -0
  7. package/dist/chunk-EWKX4VUM.js +429 -0
  8. package/dist/chunk-EWKX4VUM.js.map +1 -0
  9. package/dist/chunk-LARZWDHA.js +319 -0
  10. package/dist/chunk-LARZWDHA.js.map +1 -0
  11. package/dist/chunk-OXQGRJZT.js +125 -0
  12. package/dist/chunk-OXQGRJZT.js.map +1 -0
  13. package/dist/chunk-RRYFXUQX.js +1247 -0
  14. package/dist/chunk-RRYFXUQX.js.map +1 -0
  15. package/dist/{chunk-5RJVUC6J.js → chunk-TDI6F6PT.js} +373 -25
  16. package/dist/chunk-TDI6F6PT.js.map +1 -0
  17. package/dist/{chunk-V2MSAUHO.js → chunk-UVKH6RDX.js} +211 -335
  18. package/dist/chunk-UVKH6RDX.js.map +1 -0
  19. package/dist/chunk-V53GR4UT.js +289 -0
  20. package/dist/chunk-V53GR4UT.js.map +1 -0
  21. package/dist/connector-runtime/index.d.ts +15 -0
  22. package/dist/connector-runtime/index.d.ts.map +1 -0
  23. package/dist/connector-runtime/index.js +3 -0
  24. package/dist/connector-runtime/index.js.map +1 -0
  25. package/dist/data/archetype.d.ts.map +1 -1
  26. package/dist/data/backend-env.d.ts +38 -0
  27. package/dist/data/backend-env.d.ts.map +1 -0
  28. package/dist/data/bulk.d.ts +24 -0
  29. package/dist/data/bulk.d.ts.map +1 -1
  30. package/dist/data/cached.d.ts.map +1 -1
  31. package/dist/data/custom-fields.d.ts +5 -0
  32. package/dist/data/custom-fields.d.ts.map +1 -0
  33. package/dist/data/index.d.ts +2 -1
  34. package/dist/data/index.d.ts.map +1 -1
  35. package/dist/data/index.js +3 -1
  36. package/dist/data/mock.d.ts.map +1 -1
  37. package/dist/data/platform-api.d.ts.map +1 -1
  38. package/dist/data/resolve.d.ts.map +1 -1
  39. package/dist/data/supabase.d.ts.map +1 -1
  40. package/dist/data/types.d.ts +8 -0
  41. package/dist/data/types.d.ts.map +1 -1
  42. package/dist/entity/events.d.ts +14 -0
  43. package/dist/entity/events.d.ts.map +1 -0
  44. package/dist/events/envelope.d.ts +31 -0
  45. package/dist/events/envelope.d.ts.map +1 -0
  46. package/dist/events/index.d.ts +4 -0
  47. package/dist/events/index.d.ts.map +1 -1
  48. package/dist/events/log.d.ts +44 -0
  49. package/dist/events/log.d.ts.map +1 -0
  50. package/dist/events/types.d.ts +40 -0
  51. package/dist/events/types.d.ts.map +1 -0
  52. package/dist/fields/store.d.ts +45 -0
  53. package/dist/fields/store.d.ts.map +1 -0
  54. package/dist/i18n/index.d.ts +10 -0
  55. package/dist/i18n/index.d.ts.map +1 -1
  56. package/dist/i18n/index.js +1 -1
  57. package/dist/i18n/shell-translations.en.d.ts.map +1 -1
  58. package/dist/i18n/shell-translations.pt-br.d.ts.map +1 -1
  59. package/dist/index.d.ts +45 -21
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +543 -56
  62. package/dist/index.js.map +1 -1
  63. package/dist/integrations/events.d.ts +7 -0
  64. package/dist/integrations/events.d.ts.map +1 -0
  65. package/dist/integrations/index.d.ts +533 -29
  66. package/dist/integrations/index.d.ts.map +1 -1
  67. package/dist/integrations/index.js +3 -1
  68. package/dist/integrations/permissions.d.ts +132 -0
  69. package/dist/integrations/permissions.d.ts.map +1 -0
  70. package/dist/integrations/request.d.ts +170 -0
  71. package/dist/integrations/request.d.ts.map +1 -0
  72. package/dist/integrations/runtime-token.d.ts +33 -0
  73. package/dist/integrations/runtime-token.d.ts.map +1 -0
  74. package/dist/integrations/runtime.d.ts +398 -0
  75. package/dist/integrations/runtime.d.ts.map +1 -0
  76. package/dist/integrations/settings.d.ts +102 -0
  77. package/dist/integrations/settings.d.ts.map +1 -0
  78. package/dist/integrations/store.d.ts +145 -0
  79. package/dist/integrations/store.d.ts.map +1 -0
  80. package/dist/{address/index.d.ts → lib/address.d.ts} +1 -1
  81. package/dist/{address/index.d.ts.map → lib/address.d.ts.map} +1 -1
  82. package/dist/{phone/index.d.ts → lib/phone.d.ts} +1 -1
  83. package/dist/lib/phone.d.ts.map +1 -0
  84. package/dist/{seo/index.d.ts → lib/seo.d.ts} +18 -1
  85. package/dist/lib/seo.d.ts.map +1 -0
  86. package/dist/{tenant/index.d.ts → lib/tenant.d.ts} +1 -1
  87. package/dist/lib/tenant.d.ts.map +1 -0
  88. package/dist/manifest/index.d.ts +1 -1
  89. package/dist/manifest/index.d.ts.map +1 -1
  90. package/dist/messaging/index.d.ts +3 -0
  91. package/dist/messaging/index.d.ts.map +1 -0
  92. package/dist/messaging/registry.d.ts +35 -0
  93. package/dist/messaging/registry.d.ts.map +1 -0
  94. package/dist/messaging/types.d.ts +67 -0
  95. package/dist/messaging/types.d.ts.map +1 -0
  96. package/dist/plugin/index.js +3 -1
  97. package/dist/plugin/runtime.d.ts +17 -0
  98. package/dist/plugin/runtime.d.ts.map +1 -1
  99. package/dist/registry/block-catalog.d.ts +78 -0
  100. package/dist/registry/block-catalog.d.ts.map +1 -0
  101. package/dist/registry/block-constraints.d.ts +64 -0
  102. package/dist/registry/block-constraints.d.ts.map +1 -0
  103. package/dist/registry/block-schema.d.ts +69 -0
  104. package/dist/registry/block-schema.d.ts.map +1 -0
  105. package/dist/registry/blocks.d.ts +84 -0
  106. package/dist/registry/blocks.d.ts.map +1 -0
  107. package/dist/registry/entities.d.ts +179 -0
  108. package/dist/registry/entities.d.ts.map +1 -0
  109. package/dist/registry/extension-points.d.ts +117 -0
  110. package/dist/registry/extension-points.d.ts.map +1 -0
  111. package/dist/registry/handles.d.ts +41 -0
  112. package/dist/registry/handles.d.ts.map +1 -0
  113. package/dist/registry/index.d.ts +41 -41
  114. package/dist/registry/index.d.ts.map +1 -1
  115. package/dist/registry/loaders.d.ts +55 -0
  116. package/dist/registry/loaders.d.ts.map +1 -0
  117. package/dist/registry/registry-class.d.ts +157 -0
  118. package/dist/registry/registry-class.d.ts.map +1 -0
  119. package/dist/registry/schema-check.d.ts +14 -0
  120. package/dist/registry/schema-check.d.ts.map +1 -0
  121. package/dist/router/index.d.ts +78 -1
  122. package/dist/router/index.d.ts.map +1 -1
  123. package/dist/router/index.js +1 -1
  124. package/dist/{shell-translations.pt-br-2GWRQRRP.js → shell-translations.pt-br-BM5ZFSKJ.js} +72 -3
  125. package/dist/shell-translations.pt-br-BM5ZFSKJ.js.map +1 -0
  126. package/dist/telemetry/errors.d.ts +87 -0
  127. package/dist/telemetry/errors.d.ts.map +1 -0
  128. package/dist/testing/index.js +4 -1
  129. package/dist/{testing/index.d.ts → testing.d.ts} +5 -3
  130. package/dist/testing.d.ts.map +1 -0
  131. package/dist/types/analytics.d.ts +213 -0
  132. package/dist/types/analytics.d.ts.map +1 -0
  133. package/dist/types/crud.d.ts +37 -3
  134. package/dist/types/crud.d.ts.map +1 -1
  135. package/dist/types/plugins.d.ts +138 -1
  136. package/dist/types/plugins.d.ts.map +1 -1
  137. package/package.json +9 -17
  138. package/dist/blocks/index.d.ts +0 -25
  139. package/dist/blocks/index.d.ts.map +0 -1
  140. package/dist/chunk-5RJVUC6J.js.map +0 -1
  141. package/dist/chunk-L4TLMYGC.js +0 -42
  142. package/dist/chunk-L4TLMYGC.js.map +0 -1
  143. package/dist/chunk-V2MSAUHO.js.map +0 -1
  144. package/dist/chunk-X5THHG6T.js +0 -77
  145. package/dist/chunk-X5THHG6T.js.map +0 -1
  146. package/dist/chunk-Y2C2FBQP.js +0 -35
  147. package/dist/chunk-Y2C2FBQP.js.map +0 -1
  148. package/dist/chunk-YH25Y4FW.js +0 -311
  149. package/dist/chunk-YH25Y4FW.js.map +0 -1
  150. package/dist/phone/index.d.ts.map +0 -1
  151. package/dist/seo/index.d.ts.map +0 -1
  152. package/dist/shell-translations.pt-br-2GWRQRRP.js.map +0 -1
  153. package/dist/tenant/index.d.ts.map +0 -1
  154. package/dist/testing/index.d.ts.map +0 -1
  155. package/src/access/denial.ts +0 -33
  156. package/src/access/engine.test.ts +0 -48
  157. package/src/access/engine.ts +0 -136
  158. package/src/access/index.ts +0 -14
  159. package/src/access/limits.ts +0 -18
  160. package/src/address/index.ts +0 -188
  161. package/src/app/render.tsx +0 -69
  162. package/src/blocks/index.tsx +0 -68
  163. package/src/data/archetype.ts +0 -255
  164. package/src/data/bulk.ts +0 -35
  165. package/src/data/cached.ts +0 -55
  166. package/src/data/count.test.ts +0 -152
  167. package/src/data/count.ts +0 -131
  168. package/src/data/filters.test.ts +0 -70
  169. package/src/data/filters.ts +0 -90
  170. package/src/data/index.ts +0 -11
  171. package/src/data/mock.ts +0 -90
  172. package/src/data/platform-api.ts +0 -209
  173. package/src/data/refresh.ts +0 -115
  174. package/src/data/resolve.ts +0 -126
  175. package/src/data/supabase.ts +0 -230
  176. package/src/data/types.ts +0 -50
  177. package/src/entity/index.ts +0 -2
  178. package/src/entity/registry.ts +0 -49
  179. package/src/events/index.tsx +0 -82
  180. package/src/i18n/index.ts +0 -476
  181. package/src/i18n/shell-translations.en.ts +0 -875
  182. package/src/i18n/shell-translations.pt-br.ts +0 -873
  183. package/src/index.ts +0 -217
  184. package/src/integrations/index.ts +0 -237
  185. package/src/lib/cache.ts +0 -118
  186. package/src/lib/csv.ts +0 -54
  187. package/src/lib/format.ts +0 -58
  188. package/src/manifest/app-manifest.schema.json +0 -676
  189. package/src/manifest/index.ts +0 -518
  190. package/src/manifest/serialize.ts +0 -52
  191. package/src/phone/index.ts +0 -85
  192. package/src/plugin/createSafeDataProvider.ts +0 -30
  193. package/src/plugin/index.ts +0 -1
  194. package/src/plugin/runtime.ts +0 -331
  195. package/src/registry/index.ts +0 -163
  196. package/src/router/history.ts +0 -86
  197. package/src/router/index.ts +0 -29
  198. package/src/runtime/index.ts +0 -15
  199. package/src/runtime/oauth.ts +0 -219
  200. package/src/search/engine.ts +0 -559
  201. package/src/search/index.ts +0 -25
  202. package/src/search/text.ts +0 -206
  203. package/src/search/types.ts +0 -75
  204. package/src/seo/index.ts +0 -128
  205. package/src/tenant/index.ts +0 -38
  206. package/src/testing/index.ts +0 -116
  207. package/src/types/auth.ts +0 -41
  208. package/src/types/billing.ts +0 -39
  209. package/src/types/crud.ts +0 -184
  210. package/src/types/entities.ts +0 -142
  211. package/src/types/entitlements.ts +0 -45
  212. package/src/types/i18n.ts +0 -7
  213. package/src/types/index.ts +0 -11
  214. package/src/types/org.ts +0 -137
  215. package/src/types/payment.ts +0 -44
  216. package/src/types/permissions.ts +0 -32
  217. package/src/types/plugins.ts +0 -480
  218. 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,MA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,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,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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
@@ -90,8 +90,38 @@ var shellTranslationsPtBr = {
90
90
  "crud.list.searchPlaceholder": "Buscar {{entities}}...",
91
91
  "crud.list.allFacet": "Todos",
92
92
  "crud.list.addButton": "+ Adicionar {{entity}}",
93
+ "crud.list.rangeCount": "{{from}}\u2013{{to}} de {{total}} {{entities}}",
94
+ "crud.list.pageOf": "{{page}} / {{pages}}",
95
+ "crud.list.prevPage": "P\xE1gina anterior",
96
+ "crud.list.nextPage": "Pr\xF3xima p\xE1gina",
97
+ "crud.list.emptyFiltered": "Nenhum resultado em {{entities}} para esta busca",
98
+ "crud.list.emptyHint": "Os seus {{entities}} aparecem aqui depois de cadastrados.",
99
+ "crud.list.loadFailed": "N\xE3o foi poss\xEDvel carregar os {{entities}}",
100
+ "crud.list.refresh": "Atualizar",
101
+ "crud.list.sort": "Ordenar",
102
+ "crud.list.sortBy": "Ordenar por",
103
+ "crud.list.sortAsc": "Crescente",
104
+ "crud.list.sortDesc": "Decrescente",
105
+ "crud.list.sortCreatedAt": "Criado em",
106
+ "crud.list.sortUpdatedAt": "\xDAltima edi\xE7\xE3o",
107
+ "crud.list.selectRow": "Selecionar linha",
108
+ "crud.list.selectAllRows": "Selecionar todas as linhas",
109
+ "crud.list.selectedOne": "1 selecionado",
110
+ "crud.list.selectedMany": "{{count}} selecionados",
111
+ "crud.list.selectAllCount": "Selecionar todos os {{total}}",
112
+ "crud.list.deselectAll": "Limpar sele\xE7\xE3o",
113
+ "crud.list.bulkActions": "A\xE7\xF5es para a sele\xE7\xE3o",
114
+ "crud.list.moreActions": "Mais a\xE7\xF5es",
115
+ "crud.list.bulkDelete": "Excluir",
116
+ "crud.list.bulkDeleteTitle": "Excluir {{count}} {{entities}}?",
117
+ "crud.list.bulkDeleteConfirm": "Os {{count}} registros selecionados ser\xE3o exclu\xEDdos. Esta a\xE7\xE3o n\xE3o pode ser desfeita.",
118
+ "crud.list.bulkDeleteDone": "{{count}} exclu\xEDdos",
119
+ "crud.list.bulkDeleteFailed": "{{count}} n\xE3o puderam ser exclu\xEDdos",
93
120
  "crud.detail.notFound": "{{entity}} n\xE3o encontrado(a).",
94
121
  "crud.detail.backTo": "Voltar para {{entities}}",
122
+ "crud.detail.createdAt": "Criado em {{date}}",
123
+ "crud.detail.createdBy": "por {{user}}",
124
+ "crud.detail.updatedAt": "\xDAltima edi\xE7\xE3o {{date}}",
95
125
  "crud.form.addTitle": "Adicionar {{entity}}",
96
126
  "crud.form.editTitle": "Editar {{entity}}",
97
127
  "crud.form.createSubtitle": "Criar um(a) novo(a) {{entity}}.",
@@ -100,6 +130,8 @@ var shellTranslationsPtBr = {
100
130
  "crud.form.selectPlaceholder": "Selecione {{label}}...",
101
131
  "crud.form.saveError": "Falha ao salvar {{entity}}",
102
132
  "crud.form.saving": "Salvando...",
133
+ "crud.form.changeImage": "Trocar imagem",
134
+ "crud.form.imageAfterSave": "Foto depois de salvar",
103
135
  "crud.delete.title": "Excluir {{entity}}?",
104
136
  "crud.delete.confirmNamed": 'Tem certeza que deseja excluir "{{displayValue}}"? Esta a\xE7\xE3o n\xE3o pode ser desfeita.',
105
137
  "crud.delete.confirmGeneric": "Tem certeza que deseja excluir este(a) {{entity}}? Esta a\xE7\xE3o n\xE3o pode ser desfeita.",
@@ -320,6 +352,12 @@ var shellTranslationsPtBr = {
320
352
  "app.accessDenied.message": "Voc\xEA n\xE3o tem permiss\xE3o para acessar esta p\xE1gina.",
321
353
  "shell.accessDenied.title": "Acesso restrito",
322
354
  "shell.accessDenied.message": "Voc\xEA n\xE3o tem permiss\xE3o para acessar esta p\xE1gina.",
355
+ "shell.error.title": "N\xE3o foi poss\xEDvel carregar esta tela",
356
+ "shell.error.message": "Algo deu errado do nosso lado. O resto do sistema continua funcionando \u2014 voc\xEA pode voltar e tentar de novo.",
357
+ "shell.error.retry": "Tentar de novo",
358
+ "shell.error.copy": "Copiar detalhes do erro",
359
+ "shell.error.copied": "Copiado",
360
+ "shell.error.reference": "Informe este c\xF3digo ao falar com o suporte",
323
361
  "organization.workspaces": "\xC1reas de trabalho",
324
362
  "organization.onlyWorkspace": "Esta \xE9 a sua \xFAnica \xE1rea de trabalho.",
325
363
  "crud.form.requiredIndicator": "*",
@@ -455,6 +493,9 @@ var shellTranslationsPtBr = {
455
493
  "common.more": "Mais",
456
494
  "common.noContent": "Nenhum conte\xFAdo ainda",
457
495
  "chat.defaultTitle": "Assistente",
496
+ "assistant.invite.placeholder": "Pergunte sobre o seu neg\xF3cio...",
497
+ "assistant.invite.dismiss": "Agora n\xE3o",
498
+ "assistant.invite.suggested": "Sugest\xF5es",
458
499
  "chat.tryAsking": "Experimente perguntar",
459
500
  "chat.fab.tryIt": "Experimente",
460
501
  "chat.fab.dismiss": "N\xE3o mostrar sugest\xF5es aqui",
@@ -867,9 +908,37 @@ var shellTranslationsPtBr = {
867
908
  "org.connectionError.title": "Falha na conex\xE3o",
868
909
  "org.connectionError.description": "N\xE3o foi poss\xEDvel conectar ao servidor. Verifique sua conex\xE3o com a internet e tente novamente.",
869
910
  "org.connectionError.retry": "Tentar novamente",
870
- "app.mockMode.banner": "Voc\xEA est\xE1 no modo offline. Os dados exibidos podem n\xE3o estar atualizados."
911
+ "app.mockMode.banner": "Voc\xEA est\xE1 no modo offline. Os dados exibidos podem n\xE3o estar atualizados.",
912
+ // Barra de controles das Análises — período, comparação e filtros.
913
+ "analytics.range.today": "Hoje",
914
+ "analytics.range.yesterday": "Ontem",
915
+ "analytics.range.last_7_days": "\xDAltimos 7 dias",
916
+ "analytics.range.last_30_days": "\xDAltimos 30 dias",
917
+ "analytics.range.last_90_days": "\xDAltimos 90 dias",
918
+ "analytics.range.this_month": "Este m\xEAs",
919
+ "analytics.range.last_month": "M\xEAs passado",
920
+ "analytics.range.this_quarter": "Este trimestre",
921
+ "analytics.range.this_year": "Este ano",
922
+ "analytics.range.custom": "Per\xEDodo personalizado",
923
+ "analytics.range.label": "Per\xEDodo",
924
+ "analytics.range.from": "De",
925
+ "analytics.range.to": "At\xE9",
926
+ "analytics.compare.previous_period": "Per\xEDodo anterior",
927
+ "analytics.compare.previous_year": "Ano anterior",
928
+ "analytics.compare.none": "Sem compara\xE7\xE3o",
929
+ "analytics.compare.label": "Comparar",
930
+ "analytics.filters": "Filtros",
931
+ "analytics.filters.search": "Buscar filtros",
932
+ "analytics.filters.none": "Nenhum filtro encontrado",
933
+ "analytics.filters.noOptions": "Nenhuma op\xE7\xE3o dispon\xEDvel",
934
+ "analytics.filters.apply": "Aplicar",
935
+ "analytics.filters.clear": "Limpar",
936
+ "analytics.filters.general": "Geral",
937
+ "analytics.filters.selected": "{{count}} selecionados",
938
+ "analytics.filters.remove": "Remover filtro",
939
+ "analytics.refresh": "Atualizar"
871
940
  };
872
941
 
873
942
  export { shellTranslationsPtBr };
874
- //# sourceMappingURL=shell-translations.pt-br-2GWRQRRP.js.map
875
- //# sourceMappingURL=shell-translations.pt-br-2GWRQRRP.js.map
943
+ //# sourceMappingURL=shell-translations.pt-br-BM5ZFSKJ.js.map
944
+ //# sourceMappingURL=shell-translations.pt-br-BM5ZFSKJ.js.map