@wix/web5-core 1.56.0 → 1.57.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 (197) hide show
  1. package/dist/cjs/client/wixAuthFetch.js +2 -2
  2. package/dist/cjs/client/wixAuthFetch.js.map +1 -1
  3. package/dist/cjs/component/componentDefinitions/HeroEntitySectionDefinition.js +20 -15
  4. package/dist/cjs/component/componentDefinitions/HeroEntitySectionDefinition.js.map +1 -1
  5. package/dist/cjs/component/componentDefinitions/HeroSectionDefinition.js +12 -4
  6. package/dist/cjs/component/componentDefinitions/HeroSectionDefinition.js.map +1 -1
  7. package/dist/cjs/component/componentDefinitions/listItemsSectionDefinition.js +24 -29
  8. package/dist/cjs/component/componentDefinitions/listItemsSectionDefinition.js.map +1 -1
  9. package/dist/cjs/component/componentParser.js +8 -1
  10. package/dist/cjs/component/componentParser.js.map +1 -1
  11. package/dist/cjs/component/types.js.map +1 -1
  12. package/dist/cjs/components/placement/PlacementResponseRenderer.css +0 -4
  13. package/dist/cjs/components/placement/PlacementResponseRenderer.js +11 -33
  14. package/dist/cjs/components/placement/PlacementResponseRenderer.js.map +1 -1
  15. package/dist/cjs/components/placement/buildPlacementDependencies.js.map +1 -1
  16. package/dist/cjs/components/ui/OptimizedImage.js +59 -14
  17. package/dist/cjs/components/ui/OptimizedImage.js.map +1 -1
  18. package/dist/cjs/components/ui/SectionSkeleton.css +19 -0
  19. package/dist/cjs/components/ui/SectionSkeleton.js +8 -4
  20. package/dist/cjs/components/ui/SectionSkeleton.js.map +1 -1
  21. package/dist/cjs/components/ui/UserQuery.css +72 -0
  22. package/dist/cjs/components/ui/UserQuery.js +131 -37
  23. package/dist/cjs/components/ui/UserQuery.js.map +1 -1
  24. package/dist/cjs/context/UserQueryContext.js +34 -0
  25. package/dist/cjs/context/UserQueryContext.js.map +1 -0
  26. package/dist/cjs/entity/defaultExtractor.js +9 -2
  27. package/dist/cjs/entity/defaultExtractor.js.map +1 -1
  28. package/dist/cjs/entity/fetchEntityListData.js +13 -26
  29. package/dist/cjs/entity/fetchEntityListData.js.map +1 -1
  30. package/dist/cjs/entity/index.js +5 -1
  31. package/dist/cjs/entity/index.js.map +1 -1
  32. package/dist/cjs/entity/listEntityItems.js +90 -0
  33. package/dist/cjs/entity/listEntityItems.js.map +1 -0
  34. package/dist/cjs/hostScope.js +63 -0
  35. package/dist/cjs/hostScope.js.map +1 -0
  36. package/dist/cjs/index.js +38 -13
  37. package/dist/cjs/index.js.map +1 -1
  38. package/dist/cjs/patternValidator/validator.test.js +61 -61
  39. package/dist/cjs/patternValidator/validator.test.js.map +1 -1
  40. package/dist/cjs/registry/ComponentRegistry.js +22 -2
  41. package/dist/cjs/registry/ComponentRegistry.js.map +1 -1
  42. package/dist/cjs/registry/index.js +1 -3
  43. package/dist/cjs/registry/index.js.map +1 -1
  44. package/dist/cjs/registry/types.js.map +1 -1
  45. package/dist/cjs/styles/base-utilities.css +35 -0
  46. package/dist/cjs/styles/components.css +1 -0
  47. package/dist/cjs/styles/host-reset.css +81 -0
  48. package/dist/cjs/styles/tailwind-theme.css +6 -6
  49. package/dist/cjs/utils/backendEnvironment.js +78 -0
  50. package/dist/cjs/utils/backendEnvironment.js.map +1 -0
  51. package/dist/cjs/utils/entityLinkParser.js +3 -1
  52. package/dist/cjs/utils/entityLinkParser.js.map +1 -1
  53. package/dist/cjs/utils/imageBackdrop.js +269 -0
  54. package/dist/cjs/utils/imageBackdrop.js.map +1 -0
  55. package/dist/cjs/utils/intentExtractor.js +20 -9
  56. package/dist/cjs/utils/intentExtractor.js.map +1 -1
  57. package/dist/cjs/utils/productBackHandoff.js +106 -0
  58. package/dist/cjs/utils/productBackHandoff.js.map +1 -0
  59. package/dist/cjs/utils/refreshPrompts.js +72 -0
  60. package/dist/cjs/utils/refreshPrompts.js.map +1 -0
  61. package/dist/esm/client/wixAuthFetch.js +2 -2
  62. package/dist/esm/client/wixAuthFetch.js.map +1 -1
  63. package/dist/esm/component/componentDefinitions/HeroEntitySectionDefinition.js +20 -15
  64. package/dist/esm/component/componentDefinitions/HeroEntitySectionDefinition.js.map +1 -1
  65. package/dist/esm/component/componentDefinitions/HeroSectionDefinition.js +12 -4
  66. package/dist/esm/component/componentDefinitions/HeroSectionDefinition.js.map +1 -1
  67. package/dist/esm/component/componentDefinitions/listItemsSectionDefinition.js +25 -30
  68. package/dist/esm/component/componentDefinitions/listItemsSectionDefinition.js.map +1 -1
  69. package/dist/esm/component/componentParser.js +8 -1
  70. package/dist/esm/component/componentParser.js.map +1 -1
  71. package/dist/esm/component/types.js.map +1 -1
  72. package/dist/esm/components/placement/PlacementResponseRenderer.css +0 -4
  73. package/dist/esm/components/placement/PlacementResponseRenderer.js +1 -16
  74. package/dist/esm/components/placement/PlacementResponseRenderer.js.map +1 -1
  75. package/dist/esm/components/placement/buildPlacementDependencies.js.map +1 -1
  76. package/dist/esm/components/ui/OptimizedImage.js +50 -5
  77. package/dist/esm/components/ui/OptimizedImage.js.map +1 -1
  78. package/dist/esm/components/ui/SectionSkeleton.css +19 -0
  79. package/dist/esm/components/ui/SectionSkeleton.js +5 -1
  80. package/dist/esm/components/ui/SectionSkeleton.js.map +1 -1
  81. package/dist/esm/components/ui/UserQuery.css +72 -0
  82. package/dist/esm/components/ui/UserQuery.js +52 -6
  83. package/dist/esm/components/ui/UserQuery.js.map +1 -1
  84. package/dist/esm/context/UserQueryContext.js +21 -0
  85. package/dist/esm/context/UserQueryContext.js.map +1 -0
  86. package/dist/esm/entity/defaultExtractor.js +9 -2
  87. package/dist/esm/entity/defaultExtractor.js.map +1 -1
  88. package/dist/esm/entity/fetchEntityListData.js +14 -26
  89. package/dist/esm/entity/fetchEntityListData.js.map +1 -1
  90. package/dist/esm/entity/index.js +1 -0
  91. package/dist/esm/entity/index.js.map +1 -1
  92. package/dist/esm/entity/listEntityItems.js +85 -0
  93. package/dist/esm/entity/listEntityItems.js.map +1 -0
  94. package/dist/esm/hostScope.js +59 -0
  95. package/dist/esm/hostScope.js.map +1 -0
  96. package/dist/esm/index.js +13 -4
  97. package/dist/esm/index.js.map +1 -1
  98. package/dist/esm/patternValidator/validator.test.js +61 -61
  99. package/dist/esm/patternValidator/validator.test.js.map +1 -1
  100. package/dist/esm/registry/ComponentRegistry.js +22 -2
  101. package/dist/esm/registry/ComponentRegistry.js.map +1 -1
  102. package/dist/esm/registry/index.js +0 -1
  103. package/dist/esm/registry/index.js.map +1 -1
  104. package/dist/esm/registry/types.js.map +1 -1
  105. package/dist/esm/styles/base-utilities.css +35 -0
  106. package/dist/esm/styles/components.css +1 -0
  107. package/dist/esm/styles/host-reset.css +81 -0
  108. package/dist/esm/styles/tailwind-theme.css +6 -6
  109. package/dist/esm/utils/backendEnvironment.js +71 -0
  110. package/dist/esm/utils/backendEnvironment.js.map +1 -0
  111. package/dist/esm/utils/entityLinkParser.js +3 -1
  112. package/dist/esm/utils/entityLinkParser.js.map +1 -1
  113. package/dist/esm/utils/imageBackdrop.js +262 -0
  114. package/dist/esm/utils/imageBackdrop.js.map +1 -0
  115. package/dist/esm/utils/intentExtractor.js +21 -12
  116. package/dist/esm/utils/intentExtractor.js.map +1 -1
  117. package/dist/esm/utils/productBackHandoff.js +100 -0
  118. package/dist/esm/utils/productBackHandoff.js.map +1 -0
  119. package/dist/esm/utils/refreshPrompts.js +67 -0
  120. package/dist/esm/utils/refreshPrompts.js.map +1 -0
  121. package/dist/types/component/componentDefinitions/HeroEntitySectionDefinition.d.ts.map +1 -1
  122. package/dist/types/component/componentDefinitions/HeroSectionDefinition.d.ts.map +1 -1
  123. package/dist/types/component/componentDefinitions/listItemsSectionDefinition.d.ts +2 -2
  124. package/dist/types/component/componentDefinitions/listItemsSectionDefinition.d.ts.map +1 -1
  125. package/dist/types/component/componentParser.d.ts.map +1 -1
  126. package/dist/types/component/types.d.ts +1 -5
  127. package/dist/types/component/types.d.ts.map +1 -1
  128. package/dist/types/components/placement/PlacementResponseRenderer.d.ts +1 -1
  129. package/dist/types/components/placement/PlacementResponseRenderer.d.ts.map +1 -1
  130. package/dist/types/components/placement/buildPlacementDependencies.d.ts +1 -2
  131. package/dist/types/components/placement/buildPlacementDependencies.d.ts.map +1 -1
  132. package/dist/types/components/ui/OptimizedImage.d.ts +9 -0
  133. package/dist/types/components/ui/OptimizedImage.d.ts.map +1 -1
  134. package/dist/types/components/ui/SectionSkeleton.d.ts.map +1 -1
  135. package/dist/types/components/ui/UserQuery.d.ts +21 -0
  136. package/dist/types/components/ui/UserQuery.d.ts.map +1 -1
  137. package/dist/types/context/UserQueryContext.d.ts +12 -0
  138. package/dist/types/context/UserQueryContext.d.ts.map +1 -0
  139. package/dist/types/entity/defaultExtractor.d.ts.map +1 -1
  140. package/dist/types/entity/fetchEntityListData.d.ts +0 -2
  141. package/dist/types/entity/fetchEntityListData.d.ts.map +1 -1
  142. package/dist/types/entity/index.d.ts +1 -0
  143. package/dist/types/entity/index.d.ts.map +1 -1
  144. package/dist/types/entity/listEntityItems.d.ts +40 -0
  145. package/dist/types/entity/listEntityItems.d.ts.map +1 -0
  146. package/dist/types/hostScope.d.ts +83 -0
  147. package/dist/types/hostScope.d.ts.map +1 -0
  148. package/dist/types/index.d.ts +11 -7
  149. package/dist/types/index.d.ts.map +1 -1
  150. package/dist/types/registry/ComponentRegistry.d.ts +8 -0
  151. package/dist/types/registry/ComponentRegistry.d.ts.map +1 -1
  152. package/dist/types/registry/index.d.ts +0 -1
  153. package/dist/types/registry/index.d.ts.map +1 -1
  154. package/dist/types/registry/types.d.ts +5 -6
  155. package/dist/types/registry/types.d.ts.map +1 -1
  156. package/dist/types/utils/backendEnvironment.d.ts +30 -0
  157. package/dist/types/utils/backendEnvironment.d.ts.map +1 -0
  158. package/dist/types/utils/entityLinkParser.d.ts.map +1 -1
  159. package/dist/types/utils/imageBackdrop.d.ts +102 -0
  160. package/dist/types/utils/imageBackdrop.d.ts.map +1 -0
  161. package/dist/types/utils/intentExtractor.d.ts +21 -4
  162. package/dist/types/utils/intentExtractor.d.ts.map +1 -1
  163. package/dist/types/utils/productBackHandoff.d.ts +43 -0
  164. package/dist/types/utils/productBackHandoff.d.ts.map +1 -0
  165. package/dist/types/utils/refreshPrompts.d.ts +32 -0
  166. package/dist/types/utils/refreshPrompts.d.ts.map +1 -0
  167. package/package.json +4 -3
  168. package/src/components/placement/PlacementResponseRenderer.css +265 -0
  169. package/src/components/ui/Disclaimer.css +35 -0
  170. package/src/components/ui/FeedbackBar.css +267 -0
  171. package/src/components/ui/PlacementLoader.css +101 -0
  172. package/src/components/ui/PromptEntryEmptyState.css +172 -0
  173. package/src/components/ui/SearchSection.css +538 -0
  174. package/src/components/ui/SectionSkeleton.css +128 -0
  175. package/src/components/ui/UserQuery.css +72 -0
  176. package/src/styles/base-utilities.css +35 -0
  177. package/src/styles/components.css +1 -0
  178. package/src/styles/host-reset.css +81 -0
  179. package/src/styles/tailwind-theme.css +6 -6
  180. package/dist/cjs/registry/Intent.js +0 -19
  181. package/dist/cjs/registry/Intent.js.map +0 -1
  182. package/dist/cjs/utils/conversationApi.js +0 -52
  183. package/dist/cjs/utils/conversationApi.js.map +0 -1
  184. package/dist/cjs/utils/conversationMode.js +0 -23
  185. package/dist/cjs/utils/conversationMode.js.map +0 -1
  186. package/dist/esm/registry/Intent.js +0 -15
  187. package/dist/esm/registry/Intent.js.map +0 -1
  188. package/dist/esm/utils/conversationApi.js +0 -45
  189. package/dist/esm/utils/conversationApi.js.map +0 -1
  190. package/dist/esm/utils/conversationMode.js +0 -18
  191. package/dist/esm/utils/conversationMode.js.map +0 -1
  192. package/dist/types/registry/Intent.d.ts +0 -12
  193. package/dist/types/registry/Intent.d.ts.map +0 -1
  194. package/dist/types/utils/conversationApi.d.ts +0 -26
  195. package/dist/types/utils/conversationApi.d.ts.map +0 -1
  196. package/dist/types/utils/conversationMode.d.ts +0 -16
  197. package/dist/types/utils/conversationMode.d.ts.map +0 -1
@@ -0,0 +1,72 @@
1
+ /* Product-page back badge (DL #114) — self-contained CSS so the badge renders
2
+ styled even where the consumer doesn't compile Tailwind from web5-core/src.
3
+ Mounted inside the shared `UserQuery` header; clients can re-skin via the
4
+ `--web5-product-back-*` custom properties, or replace the whole header via
5
+ the `UserQueryComponent` UI slot. */
6
+
7
+ /* Left column: the badge row stacked above the user's query, with the row→query
8
+ gap. Used whether or not a badge is present (harmless with a single child). */
9
+ .web5-user-query__left {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: var(--web5-user-query-row-gap, 11px);
13
+ min-width: 0;
14
+ }
15
+
16
+ /* Badge row: back arrow + thumbnail + product name. */
17
+ .web5-user-query__product-back {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: var(--web5-product-back-gap, 11px);
21
+ min-width: 0;
22
+ max-width: var(--web5-product-back-max-width, 440px);
23
+ margin: 0;
24
+ padding: 0;
25
+ background: transparent;
26
+ border: 0;
27
+ text-align: left;
28
+ color: inherit;
29
+ cursor: pointer;
30
+ transition: color 0.15s ease;
31
+ }
32
+
33
+ /* Non-clickable variant (no validated backUrl). */
34
+ .web5-user-query__product-back--static {
35
+ cursor: default;
36
+ }
37
+
38
+ .web5-user-query__product-back-icon {
39
+ flex: none;
40
+ }
41
+
42
+ .web5-user-query__product-back-thumb {
43
+ flex: none;
44
+ width: var(--web5-product-thumb-size, 34px);
45
+ height: var(--web5-product-thumb-size, 34px);
46
+ border-radius: var(--web5-product-thumb-radius, 3px);
47
+ border: 1px solid var(--web5-product-thumb-border, #f1f0ee);
48
+ overflow: hidden;
49
+ background: #fff;
50
+ }
51
+
52
+ .web5-user-query__product-back-thumb img {
53
+ display: block;
54
+ width: 100%;
55
+ height: 100%;
56
+ object-fit: cover;
57
+ }
58
+
59
+ .web5-user-query__product-back-title {
60
+ min-width: 0;
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ white-space: nowrap;
64
+ font-size: var(--web5-product-back-title-size, 16px);
65
+ line-height: var(--web5-product-back-title-line-height, 20px);
66
+ font-weight: var(--web5-product-back-title-weight, 500);
67
+ color: var(--web5-product-back-title-color, var(--body-text-color, #2b2b2b));
68
+ }
69
+
70
+ .web5-user-query__product-back:hover .web5-user-query__product-back-title {
71
+ text-decoration: underline;
72
+ }
@@ -378,6 +378,41 @@
378
378
  100% { background-position: 200% 0; }
379
379
  }
380
380
 
381
+ /* Section content reveal (DL #114 C) — a one-shot fade/slide-in applied the first
382
+ time a streamed section swaps from its skeleton to real content, so it appears
383
+ smoothly instead of popping in. Motion is suppressed under reduced-motion. */
384
+ @keyframes w5-section-in {
385
+ from { opacity: 0; transform: translateY(16px); }
386
+ to { opacity: 1; transform: none; }
387
+ }
388
+ .w5-section-enter {
389
+ animation: w5-section-in 360ms ease-out both;
390
+ }
391
+ @media (prefers-reduced-motion: reduce) {
392
+ .w5-section-enter {
393
+ animation: none;
394
+ }
395
+ }
396
+
397
+ /* Section skeleton entrance (DL #114 C) — when a section's skeleton first shows
398
+ up it unfolds from the top (scaleY) so it grows into place instead of popping
399
+ in at full height. Transform-based, so it doesn't shift the sections below
400
+ (their space is already reserved). Shared by every client skeleton (core
401
+ default + per-client overrides) via `w5-skeleton-expand`. Reduced-motion off. */
402
+ @keyframes w5-skeleton-expand {
403
+ from { opacity: 0; transform: scaleY(0); }
404
+ to { opacity: 1; transform: scaleY(1); }
405
+ }
406
+ .w5-skeleton-expand {
407
+ transform-origin: top center;
408
+ animation: w5-skeleton-expand 320ms ease-out both;
409
+ }
410
+ @media (prefers-reduced-motion: reduce) {
411
+ .w5-skeleton-expand {
412
+ animation: none;
413
+ }
414
+ }
415
+
381
416
  /* Global accessible focus indicator — only visible on keyboard navigation */
382
417
  :focus-visible {
383
418
  outline: 2px solid rgba(128, 0, 177, 0.5);
@@ -2,5 +2,6 @@
2
2
  @import '../components/ui/PromptEntryEmptyState.css';
3
3
  @import '../components/ui/FeedbackBar.css';
4
4
  @import '../components/ui/Disclaimer.css';
5
+ @import '../components/ui/UserQuery.css';
5
6
  @import '../components/ui/PlacementLoader.css';
6
7
  @import '../components/placement/PlacementResponseRenderer.css';
@@ -0,0 +1,81 @@
1
+ /*
2
+ * host-reset.css — re-establishes the Web5 typographic baseline inside the
3
+ * mount root.
4
+ *
5
+ * Tailwind's preflight already neutralises most of what a host theme imposes
6
+ * (margins, list markers, heading font-size/weight, link decoration), and the
7
+ * build scopes it to the root, so inside Web5 it outranks the theme. What
8
+ * preflight does NOT cover is everything it expects to inherit from `html`:
9
+ * font-family, line-height, letter-spacing, text-transform and colour. A theme
10
+ * that sets those on its rich-text wrapper — `.rte p { line-height: 1.4 }`,
11
+ * `.rte h1 { font-family: … }` — still wins there, because inheritance loses to
12
+ * any matching rule.
13
+ *
14
+ * So each of those properties is re-asserted here at element specificity. After
15
+ * scoping these become `(1,0,1)`: above a theme's `(0,1,1)` descendant rules,
16
+ * below our own `(1,1,0)` utilities. That ordering is the whole point — the
17
+ * theme is overridden, atoms still win.
18
+ *
19
+ * Wrapped in `@layer base` so Storybook (which compiles this file without the
20
+ * scoping pass) keeps the same relationship to utilities as the shipped bundle.
21
+ *
22
+ * `#root` is rewritten to the scope selector by `config/scope-css.ts`.
23
+ */
24
+
25
+ @layer base {
26
+ /*
27
+ * The baseline every descendant inherits. Without it the root inherits the
28
+ * theme's body type — 14px/1.4 on the reference store — and every element we
29
+ * do not explicitly size comes out wrong.
30
+ *
31
+ * `--w5-root-font-size` is the escape hatch for themes that rescale the root
32
+ * (`html { font-size: 62.5% }` is a common pattern): a client sets it in
33
+ * `users/<msid>/theme.css` to bring our rem-based scale back to intent.
34
+ */
35
+ #root {
36
+ font-family: var(--font-sans);
37
+ font-size: var(--w5-root-font-size, 1rem);
38
+ font-style: normal;
39
+ font-weight: 400;
40
+ line-height: 1.5;
41
+ letter-spacing: normal;
42
+ text-align: start;
43
+ text-transform: none;
44
+ color: hsl(var(--foreground));
45
+ }
46
+
47
+ /* Headings take the display face regardless of what the theme sets on its
48
+ * rich-text headings. Sizes and weights come from the Heading atom. */
49
+ :is(h1, h2, h3, h4, h5, h6) {
50
+ font-family: var(--font-display);
51
+ letter-spacing: inherit;
52
+ text-transform: none;
53
+ color: inherit;
54
+ }
55
+
56
+ /* Everything that carries body copy inherits our baseline rather than the
57
+ * theme's rich-text rules. */
58
+ :is(p, li, dd, dt, blockquote, figcaption, label, td, th, address, small) {
59
+ font-family: inherit;
60
+ font-size: inherit;
61
+ line-height: inherit;
62
+ letter-spacing: inherit;
63
+ text-transform: none;
64
+ color: inherit;
65
+ }
66
+
67
+ /* Links: preflight already inherits colour and decoration; themes also set
68
+ * the face and casing on them. */
69
+ a {
70
+ font-family: inherit;
71
+ letter-spacing: inherit;
72
+ text-transform: none;
73
+ }
74
+
75
+ /* Form controls inherit the face from preflight but not the rest, and the
76
+ * conversation input is a form control. */
77
+ :is(button, input, optgroup, select, textarea) {
78
+ letter-spacing: inherit;
79
+ text-transform: none;
80
+ }
81
+ }
@@ -117,12 +117,12 @@
117
117
  --leading-body-sm: var(--body-small-text-line-height);
118
118
  --leading-callout: 36px;
119
119
 
120
- /* Placement card body copy — short framing / conversation answers.
121
- Figma 128:5257 (Web5_Proto): 20/30, medium weight body with bold
122
- leading-phrase emphasis. Used by `PlacementGeneralTextSection` (the
123
- placement variant of the fallback section). */
124
- --text-placement-body: 20px;
125
- --leading-placement-body: 30px;
120
+ /* Placement card body copy — short framing / conversation answers and the
121
+ search-overview lead block. Medium weight body with bold leading-phrase
122
+ emphasis. Used by `PlacementGeneralTextSection` (the placement variant of
123
+ the fallback section) and `SearchOverviewSection`. */
124
+ --text-placement-body: 16px;
125
+ --leading-placement-body: 24px;
126
126
  }
127
127
 
128
128
  /* Font tokens use @theme inline so utilities emit `font-family: var(--font-*)`
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.Intent = void 0;
5
- let Intent = exports.Intent = /*#__PURE__*/function (Intent) {
6
- // New intent taxonomy
7
- Intent["COMPARISON"] = "COMPARISON";
8
- Intent["DECISION"] = "DECISION";
9
- Intent["VALIDATION"] = "VALIDATION";
10
- Intent["STRATEGY"] = "STRATEGY";
11
- Intent["EXPLORATION"] = "EXPLORATION";
12
- Intent["INQUIRY"] = "INQUIRY";
13
- // Legacy intents (still used in hero registrations and intentExtractor)
14
- Intent["DISCOVERY"] = "DISCOVERY";
15
- Intent["LEARN"] = "LEARN";
16
- Intent["EVALUATE"] = "EVALUATE";
17
- return Intent;
18
- }({});
19
- //# sourceMappingURL=Intent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Intent","exports"],"sources":["../../../src/registry/Intent.ts"],"sourcesContent":["export enum Intent {\n // New intent taxonomy\n COMPARISON = 'COMPARISON',\n DECISION = 'DECISION',\n VALIDATION = 'VALIDATION',\n STRATEGY = 'STRATEGY',\n EXPLORATION = 'EXPLORATION',\n INQUIRY = 'INQUIRY',\n // Legacy intents (still used in hero registrations and intentExtractor)\n DISCOVERY = 'DISCOVERY',\n LEARN = 'LEARN',\n EVALUATE = 'EVALUATE',\n}\n"],"mappings":";;;;IAAYA,MAAM,GAAAC,OAAA,CAAAD,MAAA,0BAANA,MAAM;EAChB;EADUA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAQhB;EARUA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.usesTurnApi = exports.setConversationApi = exports.getConversationApi = exports.DEFAULT_CONVERSATION_API = exports.CONVERSATION_API_KEY = void 0;
5
- /**
6
- * Conversation API selection (debug-only).
7
- *
8
- * Switches the conversation between the default `Conversation` RPC
9
- * (`POST /v1/conversation`) and the parallel-safe `Turn` RPC
10
- * (`POST /v1/turn`, DL #110). Persisted in
11
- * `localStorage["web5_conversation_api"]`, read at request time. Default
12
- * `conversation` (Turn is opt-in via the debug toggle for now).
13
- *
14
- * `Turn` returns a flat markdown stream (no sectioned page frames), so the
15
- * sectioned-stream consumption path only runs on the `Conversation` API. Lives
16
- * in web5-core so any surface can honor the same toggle.
17
- */
18
-
19
- const CONVERSATION_API_KEY = exports.CONVERSATION_API_KEY = 'web5_conversation_api';
20
- const DEFAULT_CONVERSATION_API = exports.DEFAULT_CONVERSATION_API = 'conversation';
21
-
22
- /**
23
- * Read the selected conversation API from localStorage. Falls back to the
24
- * default (`conversation`) when unset, invalid, or storage is unavailable.
25
- */
26
- const getConversationApi = () => {
27
- try {
28
- const value = localStorage.getItem(CONVERSATION_API_KEY);
29
- if (value === 'turn' || value === 'conversation') {
30
- return value;
31
- }
32
- } catch {
33
- // localStorage can throw in privacy mode / non-DOM environments.
34
- }
35
- return DEFAULT_CONVERSATION_API;
36
- };
37
-
38
- /** Persist the selected conversation API to localStorage. */
39
- exports.getConversationApi = getConversationApi;
40
- const setConversationApi = api => {
41
- try {
42
- localStorage.setItem(CONVERSATION_API_KEY, api);
43
- } catch {
44
- // Ignore — selection simply won't persist across reloads.
45
- }
46
- };
47
-
48
- /** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */
49
- exports.setConversationApi = setConversationApi;
50
- const usesTurnApi = () => getConversationApi() === 'turn';
51
- exports.usesTurnApi = usesTurnApi;
52
- //# sourceMappingURL=conversationApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CONVERSATION_API_KEY","exports","DEFAULT_CONVERSATION_API","getConversationApi","value","localStorage","getItem","setConversationApi","api","setItem","usesTurnApi"],"sources":["../../../src/utils/conversationApi.ts"],"sourcesContent":["/**\n * Conversation API selection (debug-only).\n *\n * Switches the conversation between the default `Conversation` RPC\n * (`POST /v1/conversation`) and the parallel-safe `Turn` RPC\n * (`POST /v1/turn`, DL #110). Persisted in\n * `localStorage[\"web5_conversation_api\"]`, read at request time. Default\n * `conversation` (Turn is opt-in via the debug toggle for now).\n *\n * `Turn` returns a flat markdown stream (no sectioned page frames), so the\n * sectioned-stream consumption path only runs on the `Conversation` API. Lives\n * in web5-core so any surface can honor the same toggle.\n */\n\nexport type ConversationApiKind = 'turn' | 'conversation';\n\nexport const CONVERSATION_API_KEY = 'web5_conversation_api';\n\nexport const DEFAULT_CONVERSATION_API: ConversationApiKind = 'conversation';\n\n/**\n * Read the selected conversation API from localStorage. Falls back to the\n * default (`conversation`) when unset, invalid, or storage is unavailable.\n */\nexport const getConversationApi = (): ConversationApiKind => {\n try {\n const value = localStorage.getItem(CONVERSATION_API_KEY);\n if (value === 'turn' || value === 'conversation') {\n return value;\n }\n } catch {\n // localStorage can throw in privacy mode / non-DOM environments.\n }\n return DEFAULT_CONVERSATION_API;\n};\n\n/** Persist the selected conversation API to localStorage. */\nexport const setConversationApi = (api: ConversationApiKind): void => {\n try {\n localStorage.setItem(CONVERSATION_API_KEY, api);\n } catch {\n // Ignore — selection simply won't persist across reloads.\n }\n};\n\n/** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */\nexport const usesTurnApi = (): boolean => getConversationApi() === 'turn';\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,uBAAuB;AAEpD,MAAME,wBAA6C,GAAAD,OAAA,CAAAC,wBAAA,GAAG,cAAc;;AAE3E;AACA;AACA;AACA;AACO,MAAMC,kBAAkB,GAAGA,CAAA,KAA2B;EAC3D,IAAI;IACF,MAAMC,KAAK,GAAGC,YAAY,CAACC,OAAO,CAACN,oBAAoB,CAAC;IACxD,IAAII,KAAK,KAAK,MAAM,IAAIA,KAAK,KAAK,cAAc,EAAE;MAChD,OAAOA,KAAK;IACd;EACF,CAAC,CAAC,MAAM;IACN;EAAA;EAEF,OAAOF,wBAAwB;AACjC,CAAC;;AAED;AAAAD,OAAA,CAAAE,kBAAA,GAAAA,kBAAA;AACO,MAAMI,kBAAkB,GAAIC,GAAwB,IAAW;EACpE,IAAI;IACFH,YAAY,CAACI,OAAO,CAACT,oBAAoB,EAAEQ,GAAG,CAAC;EACjD,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ,CAAC;;AAED;AAAAP,OAAA,CAAAM,kBAAA,GAAAA,kBAAA;AACO,MAAMG,WAAW,GAAGA,CAAA,KAAeP,kBAAkB,CAAC,CAAC,KAAK,MAAM;AAACF,OAAA,CAAAS,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.resolveConversationMode = exports.CONVERSATION_MODE = void 0;
5
- /**
6
- * Conversation wire mode.
7
- *
8
- * There is a single conversation engine: the page streams section-by-section
9
- * (each markdown frame tagged with a numeric section `id` + `status`). The
10
- * `additionalData.mode` sent on every `/conversation` request is fixed.
11
- *
12
- * A `?mode=` query param, when present, overrides this value and is sent to the
13
- * backend verbatim (callers read the param themselves); the frontend always
14
- * uses the sectioned-stream consumption path regardless.
15
- */
16
-
17
- /** `additionalData.mode` sent on a `/conversation` request. */
18
- const CONVERSATION_MODE = exports.CONVERSATION_MODE = 'markdown_history_v3';
19
-
20
- /** Resolve the `additionalData.mode` to send on a `/conversation` request. */
21
- const resolveConversationMode = () => CONVERSATION_MODE;
22
- exports.resolveConversationMode = resolveConversationMode;
23
- //# sourceMappingURL=conversationMode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CONVERSATION_MODE","exports","resolveConversationMode"],"sources":["../../../src/utils/conversationMode.ts"],"sourcesContent":["/**\n * Conversation wire mode.\n *\n * There is a single conversation engine: the page streams section-by-section\n * (each markdown frame tagged with a numeric section `id` + `status`). The\n * `additionalData.mode` sent on every `/conversation` request is fixed.\n *\n * A `?mode=` query param, when present, overrides this value and is sent to the\n * backend verbatim (callers read the param themselves); the frontend always\n * uses the sectioned-stream consumption path regardless.\n */\n\n/** `additionalData.mode` sent on a `/conversation` request. */\nexport const CONVERSATION_MODE = 'markdown_history_v3';\n\n/** Resolve the `additionalData.mode` to send on a `/conversation` request. */\nexport const resolveConversationMode = (): string => CONVERSATION_MODE;\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,qBAAqB;;AAEtD;AACO,MAAME,uBAAuB,GAAGA,CAAA,KAAcF,iBAAiB;AAACC,OAAA,CAAAC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- export let Intent = /*#__PURE__*/function (Intent) {
2
- // New intent taxonomy
3
- Intent["COMPARISON"] = "COMPARISON";
4
- Intent["DECISION"] = "DECISION";
5
- Intent["VALIDATION"] = "VALIDATION";
6
- Intent["STRATEGY"] = "STRATEGY";
7
- Intent["EXPLORATION"] = "EXPLORATION";
8
- Intent["INQUIRY"] = "INQUIRY";
9
- // Legacy intents (still used in hero registrations and intentExtractor)
10
- Intent["DISCOVERY"] = "DISCOVERY";
11
- Intent["LEARN"] = "LEARN";
12
- Intent["EVALUATE"] = "EVALUATE";
13
- return Intent;
14
- }({});
15
- //# sourceMappingURL=Intent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Intent"],"sources":["../../../src/registry/Intent.ts"],"sourcesContent":["export enum Intent {\n // New intent taxonomy\n COMPARISON = 'COMPARISON',\n DECISION = 'DECISION',\n VALIDATION = 'VALIDATION',\n STRATEGY = 'STRATEGY',\n EXPLORATION = 'EXPLORATION',\n INQUIRY = 'INQUIRY',\n // Legacy intents (still used in hero registrations and intentExtractor)\n DISCOVERY = 'DISCOVERY',\n LEARN = 'LEARN',\n EVALUATE = 'EVALUATE',\n}\n"],"mappings":"AAAA,WAAYA,MAAM,0BAANA,MAAM;EAChB;EADUA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAQhB;EARUA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
@@ -1,45 +0,0 @@
1
- /**
2
- * Conversation API selection (debug-only).
3
- *
4
- * Switches the conversation between the default `Conversation` RPC
5
- * (`POST /v1/conversation`) and the parallel-safe `Turn` RPC
6
- * (`POST /v1/turn`, DL #110). Persisted in
7
- * `localStorage["web5_conversation_api"]`, read at request time. Default
8
- * `conversation` (Turn is opt-in via the debug toggle for now).
9
- *
10
- * `Turn` returns a flat markdown stream (no sectioned page frames), so the
11
- * sectioned-stream consumption path only runs on the `Conversation` API. Lives
12
- * in web5-core so any surface can honor the same toggle.
13
- */
14
-
15
- export const CONVERSATION_API_KEY = 'web5_conversation_api';
16
- export const DEFAULT_CONVERSATION_API = 'conversation';
17
-
18
- /**
19
- * Read the selected conversation API from localStorage. Falls back to the
20
- * default (`conversation`) when unset, invalid, or storage is unavailable.
21
- */
22
- export const getConversationApi = () => {
23
- try {
24
- const value = localStorage.getItem(CONVERSATION_API_KEY);
25
- if (value === 'turn' || value === 'conversation') {
26
- return value;
27
- }
28
- } catch {
29
- // localStorage can throw in privacy mode / non-DOM environments.
30
- }
31
- return DEFAULT_CONVERSATION_API;
32
- };
33
-
34
- /** Persist the selected conversation API to localStorage. */
35
- export const setConversationApi = api => {
36
- try {
37
- localStorage.setItem(CONVERSATION_API_KEY, api);
38
- } catch {
39
- // Ignore — selection simply won't persist across reloads.
40
- }
41
- };
42
-
43
- /** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */
44
- export const usesTurnApi = () => getConversationApi() === 'turn';
45
- //# sourceMappingURL=conversationApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CONVERSATION_API_KEY","DEFAULT_CONVERSATION_API","getConversationApi","value","localStorage","getItem","setConversationApi","api","setItem","usesTurnApi"],"sources":["../../../src/utils/conversationApi.ts"],"sourcesContent":["/**\n * Conversation API selection (debug-only).\n *\n * Switches the conversation between the default `Conversation` RPC\n * (`POST /v1/conversation`) and the parallel-safe `Turn` RPC\n * (`POST /v1/turn`, DL #110). Persisted in\n * `localStorage[\"web5_conversation_api\"]`, read at request time. Default\n * `conversation` (Turn is opt-in via the debug toggle for now).\n *\n * `Turn` returns a flat markdown stream (no sectioned page frames), so the\n * sectioned-stream consumption path only runs on the `Conversation` API. Lives\n * in web5-core so any surface can honor the same toggle.\n */\n\nexport type ConversationApiKind = 'turn' | 'conversation';\n\nexport const CONVERSATION_API_KEY = 'web5_conversation_api';\n\nexport const DEFAULT_CONVERSATION_API: ConversationApiKind = 'conversation';\n\n/**\n * Read the selected conversation API from localStorage. Falls back to the\n * default (`conversation`) when unset, invalid, or storage is unavailable.\n */\nexport const getConversationApi = (): ConversationApiKind => {\n try {\n const value = localStorage.getItem(CONVERSATION_API_KEY);\n if (value === 'turn' || value === 'conversation') {\n return value;\n }\n } catch {\n // localStorage can throw in privacy mode / non-DOM environments.\n }\n return DEFAULT_CONVERSATION_API;\n};\n\n/** Persist the selected conversation API to localStorage. */\nexport const setConversationApi = (api: ConversationApiKind): void => {\n try {\n localStorage.setItem(CONVERSATION_API_KEY, api);\n } catch {\n // Ignore — selection simply won't persist across reloads.\n }\n};\n\n/** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */\nexport const usesTurnApi = (): boolean => getConversationApi() === 'turn';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,oBAAoB,GAAG,uBAAuB;AAE3D,OAAO,MAAMC,wBAA6C,GAAG,cAAc;;AAE3E;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAA2B;EAC3D,IAAI;IACF,MAAMC,KAAK,GAAGC,YAAY,CAACC,OAAO,CAACL,oBAAoB,CAAC;IACxD,IAAIG,KAAK,KAAK,MAAM,IAAIA,KAAK,KAAK,cAAc,EAAE;MAChD,OAAOA,KAAK;IACd;EACF,CAAC,CAAC,MAAM;IACN;EAAA;EAEF,OAAOF,wBAAwB;AACjC,CAAC;;AAED;AACA,OAAO,MAAMK,kBAAkB,GAAIC,GAAwB,IAAW;EACpE,IAAI;IACFH,YAAY,CAACI,OAAO,CAACR,oBAAoB,EAAEO,GAAG,CAAC;EACjD,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ,CAAC;;AAED;AACA,OAAO,MAAME,WAAW,GAAGA,CAAA,KAAeP,kBAAkB,CAAC,CAAC,KAAK,MAAM","ignoreList":[]}
@@ -1,18 +0,0 @@
1
- /**
2
- * Conversation wire mode.
3
- *
4
- * There is a single conversation engine: the page streams section-by-section
5
- * (each markdown frame tagged with a numeric section `id` + `status`). The
6
- * `additionalData.mode` sent on every `/conversation` request is fixed.
7
- *
8
- * A `?mode=` query param, when present, overrides this value and is sent to the
9
- * backend verbatim (callers read the param themselves); the frontend always
10
- * uses the sectioned-stream consumption path regardless.
11
- */
12
-
13
- /** `additionalData.mode` sent on a `/conversation` request. */
14
- export const CONVERSATION_MODE = 'markdown_history_v3';
15
-
16
- /** Resolve the `additionalData.mode` to send on a `/conversation` request. */
17
- export const resolveConversationMode = () => CONVERSATION_MODE;
18
- //# sourceMappingURL=conversationMode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CONVERSATION_MODE","resolveConversationMode"],"sources":["../../../src/utils/conversationMode.ts"],"sourcesContent":["/**\n * Conversation wire mode.\n *\n * There is a single conversation engine: the page streams section-by-section\n * (each markdown frame tagged with a numeric section `id` + `status`). The\n * `additionalData.mode` sent on every `/conversation` request is fixed.\n *\n * A `?mode=` query param, when present, overrides this value and is sent to the\n * backend verbatim (callers read the param themselves); the frontend always\n * uses the sectioned-stream consumption path regardless.\n */\n\n/** `additionalData.mode` sent on a `/conversation` request. */\nexport const CONVERSATION_MODE = 'markdown_history_v3';\n\n/** Resolve the `additionalData.mode` to send on a `/conversation` request. */\nexport const resolveConversationMode = (): string => CONVERSATION_MODE;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,iBAAiB,GAAG,qBAAqB;;AAEtD;AACA,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAcD,iBAAiB","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- export declare enum Intent {
2
- COMPARISON = "COMPARISON",
3
- DECISION = "DECISION",
4
- VALIDATION = "VALIDATION",
5
- STRATEGY = "STRATEGY",
6
- EXPLORATION = "EXPLORATION",
7
- INQUIRY = "INQUIRY",
8
- DISCOVERY = "DISCOVERY",
9
- LEARN = "LEARN",
10
- EVALUATE = "EVALUATE"
11
- }
12
- //# sourceMappingURL=Intent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Intent.d.ts","sourceRoot":"","sources":["../../../src/registry/Intent.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAEhB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IAEnB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Conversation API selection (debug-only).
3
- *
4
- * Switches the conversation between the default `Conversation` RPC
5
- * (`POST /v1/conversation`) and the parallel-safe `Turn` RPC
6
- * (`POST /v1/turn`, DL #110). Persisted in
7
- * `localStorage["web5_conversation_api"]`, read at request time. Default
8
- * `conversation` (Turn is opt-in via the debug toggle for now).
9
- *
10
- * `Turn` returns a flat markdown stream (no sectioned page frames), so the
11
- * sectioned-stream consumption path only runs on the `Conversation` API. Lives
12
- * in web5-core so any surface can honor the same toggle.
13
- */
14
- export type ConversationApiKind = 'turn' | 'conversation';
15
- export declare const CONVERSATION_API_KEY = "web5_conversation_api";
16
- export declare const DEFAULT_CONVERSATION_API: ConversationApiKind;
17
- /**
18
- * Read the selected conversation API from localStorage. Falls back to the
19
- * default (`conversation`) when unset, invalid, or storage is unavailable.
20
- */
21
- export declare const getConversationApi: () => ConversationApiKind;
22
- /** Persist the selected conversation API to localStorage. */
23
- export declare const setConversationApi: (api: ConversationApiKind) => void;
24
- /** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */
25
- export declare const usesTurnApi: () => boolean;
26
- //# sourceMappingURL=conversationApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversationApi.d.ts","sourceRoot":"","sources":["../../../src/utils/conversationApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,cAAc,CAAC;AAE1D,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,eAAO,MAAM,wBAAwB,EAAE,mBAAoC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAO,mBAUrC,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,QAAS,mBAAmB,KAAG,IAM7D,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,WAAW,QAAO,OAA0C,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Conversation wire mode.
3
- *
4
- * There is a single conversation engine: the page streams section-by-section
5
- * (each markdown frame tagged with a numeric section `id` + `status`). The
6
- * `additionalData.mode` sent on every `/conversation` request is fixed.
7
- *
8
- * A `?mode=` query param, when present, overrides this value and is sent to the
9
- * backend verbatim (callers read the param themselves); the frontend always
10
- * uses the sectioned-stream consumption path regardless.
11
- */
12
- /** `additionalData.mode` sent on a `/conversation` request. */
13
- export declare const CONVERSATION_MODE = "markdown_history_v3";
14
- /** Resolve the `additionalData.mode` to send on a `/conversation` request. */
15
- export declare const resolveConversationMode: () => string;
16
- //# sourceMappingURL=conversationMode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversationMode.d.ts","sourceRoot":"","sources":["../../../src/utils/conversationMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,QAAO,MAA2B,CAAC"}