@happyvertical/smrt-svelte 0.53.0 → 0.53.2

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 (254) hide show
  1. package/package.json +15 -15
  2. package/dist/__tests__/app-state.test.js +0 -156
  3. package/dist/__tests__/data-surface-bridge.test.js +0 -351
  4. package/dist/__tests__/provider-mode-harness.svelte +0 -14
  5. package/dist/__tests__/provider-mode-harness.svelte.d.ts +0 -11
  6. package/dist/__tests__/provider-mode-harness.svelte.d.ts.map +0 -1
  7. package/dist/__tests__/provider-mode-probe.svelte +0 -13
  8. package/dist/__tests__/provider-mode-probe.svelte.d.ts +0 -8
  9. package/dist/__tests__/provider-mode-probe.svelte.d.ts.map +0 -1
  10. package/dist/__tests__/provider-webmcp-harness.svelte +0 -14
  11. package/dist/__tests__/provider-webmcp-harness.svelte.d.ts +0 -8
  12. package/dist/__tests__/provider-webmcp-harness.svelte.d.ts.map +0 -1
  13. package/dist/__tests__/success-never-text.test.js +0 -100
  14. package/dist/__tests__/warm-clients.test.js +0 -186
  15. package/dist/browser-ai/adapters/llm/bitgpu-inference-backend.test.js +0 -464
  16. package/dist/browser-ai/adapters/llm/webllm-inference-backend.test.js +0 -646
  17. package/dist/browser-ai/adapters/stt/browser-speech.test.js +0 -113
  18. package/dist/browser-ai/adapters/stt/dictation-source.test.js +0 -52
  19. package/dist/browser-ai/svelte/components/__tests__/ModelStatusControl.test.js +0 -172
  20. package/dist/components/board/__tests__/Board.test.js +0 -498
  21. package/dist/components/board/__tests__/BoardSsrHarness.svelte +0 -30
  22. package/dist/components/board/__tests__/BoardSsrHarness.svelte.d.ts +0 -19
  23. package/dist/components/board/__tests__/BoardSsrHarness.svelte.d.ts.map +0 -1
  24. package/dist/components/forms/__tests__/AddressInput.behavior.test.js +0 -216
  25. package/dist/components/forms/__tests__/CheckboxInput.test.js +0 -92
  26. package/dist/components/forms/__tests__/DateRangeInput.behavior.test.js +0 -135
  27. package/dist/components/forms/__tests__/DateTimeInput.behavior.test.js +0 -113
  28. package/dist/components/forms/__tests__/FileUpload.error-alert.test.js +0 -37
  29. package/dist/components/forms/__tests__/FileUpload.native-form.test.js +0 -249
  30. package/dist/components/forms/__tests__/FileUpload.test.js +0 -90
  31. package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte +0 -24
  32. package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte.d.ts +0 -10
  33. package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte.d.ts.map +0 -1
  34. package/dist/components/forms/__tests__/Form.behavior.test.js +0 -137
  35. package/dist/components/forms/__tests__/Form.extraction.test.js +0 -68
  36. package/dist/components/forms/__tests__/Form.stt-error.test.js +0 -57
  37. package/dist/components/forms/__tests__/Form.test.js +0 -86
  38. package/dist/components/forms/__tests__/Form.ui-controls.test.js +0 -119
  39. package/dist/components/forms/__tests__/Form.webmcp.test.js +0 -2336
  40. package/dist/components/forms/__tests__/FormMicButton.test.js +0 -92
  41. package/dist/components/forms/__tests__/FormScope.test.js +0 -39
  42. package/dist/components/forms/__tests__/MeasurementInput.behavior.test.js +0 -129
  43. package/dist/components/forms/__tests__/MoneyInput.behavior.test.js +0 -124
  44. package/dist/components/forms/__tests__/NumberInput.behavior.test.js +0 -151
  45. package/dist/components/forms/__tests__/PhoneInput.behavior.test.js +0 -96
  46. package/dist/components/forms/__tests__/SearchInput.test.js +0 -79
  47. package/dist/components/forms/__tests__/SelectInput.behavior.test.js +0 -132
  48. package/dist/components/forms/__tests__/TextInput.behavior.test.js +0 -131
  49. package/dist/components/forms/__tests__/TextareaInput.behavior.test.js +0 -96
  50. package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte +0 -30
  51. package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte.d.ts +0 -7
  52. package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte.d.ts.map +0 -1
  53. package/dist/components/forms/__tests__/async-validation-form.fixture.svelte +0 -19
  54. package/dist/components/forms/__tests__/async-validation-form.fixture.svelte.d.ts +0 -9
  55. package/dist/components/forms/__tests__/async-validation-form.fixture.svelte.d.ts.map +0 -1
  56. package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte +0 -21
  57. package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte.d.ts +0 -8
  58. package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte.d.ts.map +0 -1
  59. package/dist/components/forms/__tests__/composite-inputs-a11y.test.js +0 -69
  60. package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte +0 -27
  61. package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte.d.ts +0 -9
  62. package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte.d.ts.map +0 -1
  63. package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte +0 -48
  64. package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte.d.ts +0 -10
  65. package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte.d.ts.map +0 -1
  66. package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte +0 -26
  67. package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte.d.ts +0 -13
  68. package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte.d.ts.map +0 -1
  69. package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte +0 -52
  70. package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.d.ts +0 -16
  71. package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.d.ts.map +0 -1
  72. package/dist/components/forms/__tests__/form-scope.fixture.svelte +0 -30
  73. package/dist/components/forms/__tests__/form-scope.fixture.svelte.d.ts +0 -10
  74. package/dist/components/forms/__tests__/form-scope.fixture.svelte.d.ts.map +0 -1
  75. package/dist/components/forms/__tests__/form-with-fields.fixture.svelte +0 -158
  76. package/dist/components/forms/__tests__/form-with-fields.fixture.svelte.d.ts +0 -51
  77. package/dist/components/forms/__tests__/form-with-fields.fixture.svelte.d.ts.map +0 -1
  78. package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte +0 -24
  79. package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte.d.ts +0 -11
  80. package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte.d.ts.map +0 -1
  81. package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte +0 -105
  82. package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte.d.ts +0 -42
  83. package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte.d.ts.map +0 -1
  84. package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte +0 -84
  85. package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte.d.ts +0 -14
  86. package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte.d.ts.map +0 -1
  87. package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte +0 -44
  88. package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte.d.ts +0 -9
  89. package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte.d.ts.map +0 -1
  90. package/dist/components/forms/__tests__/mic-keyboard-a11y.test.js +0 -74
  91. package/dist/components/forms/__tests__/policy-field.fixture.svelte +0 -35
  92. package/dist/components/forms/__tests__/policy-field.fixture.svelte.d.ts +0 -8
  93. package/dist/components/forms/__tests__/policy-field.fixture.svelte.d.ts.map +0 -1
  94. package/dist/components/forms/__tests__/rich-inputs-a11y.test.js +0 -87
  95. package/dist/components/settings/__tests__/SettingsCatalog.test.js +0 -69
  96. package/dist/components/settings/__tests__/catalog.test.js +0 -46
  97. package/dist/components/workspace/__tests__/AdminShell.responsive.test.js +0 -597
  98. package/dist/components/workspace/__tests__/AdminShell.test.js +0 -572
  99. package/dist/components/workspace/__tests__/RoleShell.test.js +0 -772
  100. package/dist/components/workspace/__tests__/TenantNav.test.js +0 -208
  101. package/dist/components/workspace/__tests__/WorkspaceAccountMenu.test.js +0 -79
  102. package/dist/components/workspace/__tests__/WorkspaceShell.test.js +0 -630
  103. package/dist/components/workspace/__tests__/admin-shell-header-overflow.test.js +0 -25
  104. package/dist/components/workspace/__tests__/admin-shell-hotkeys.test.js +0 -34
  105. package/dist/components/workspace/__tests__/admin-shell-mobile.test.js +0 -217
  106. package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte +0 -52
  107. package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte.d.ts +0 -23
  108. package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte.d.ts.map +0 -1
  109. package/dist/components/workspace/__tests__/admin-shell-page-contracts.test.js +0 -30
  110. package/dist/components/workspace/__tests__/admin-shell-responsive-state.test.js +0 -184
  111. package/dist/components/workspace/__tests__/admin-shell-settings.test.js +0 -25
  112. package/dist/components/workspace/__tests__/admin-shell-state.test.js +0 -286
  113. package/dist/components/workspace/__tests__/admin-shell-theme-hooks.test.js +0 -36
  114. package/dist/components/workspace/__tests__/breadcrumbs-helpers.test.js +0 -141
  115. package/dist/components/workspace/__tests__/context-forwarding-harness.svelte +0 -45
  116. package/dist/components/workspace/__tests__/context-forwarding-harness.svelte.d.ts +0 -21
  117. package/dist/components/workspace/__tests__/context-forwarding-harness.svelte.d.ts.map +0 -1
  118. package/dist/components/workspace/__tests__/define-tools-dock.test.js +0 -1188
  119. package/dist/components/workspace/__tests__/harness.svelte +0 -25
  120. package/dist/components/workspace/__tests__/harness.svelte.d.ts +0 -14
  121. package/dist/components/workspace/__tests__/harness.svelte.d.ts.map +0 -1
  122. package/dist/components/workspace/__tests__/index.test.js +0 -28
  123. package/dist/components/workspace/__tests__/legacy-index.test.js +0 -9
  124. package/dist/components/workspace/__tests__/manifest-nav-helpers.test.js +0 -24
  125. package/dist/components/workspace/__tests__/manifest-nav.test.js +0 -599
  126. package/dist/components/workspace/__tests__/nav-helpers.test.js +0 -95
  127. package/dist/components/workspace/__tests__/render-harness.svelte +0 -66
  128. package/dist/components/workspace/__tests__/render-harness.svelte.d.ts +0 -32
  129. package/dist/components/workspace/__tests__/render-harness.svelte.d.ts.map +0 -1
  130. package/dist/components/workspace/__tests__/render-tools-dock.test.js +0 -260
  131. package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte +0 -58
  132. package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte.d.ts +0 -16
  133. package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte.d.ts.map +0 -1
  134. package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte +0 -41
  135. package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte.d.ts +0 -13
  136. package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte.d.ts.map +0 -1
  137. package/dist/components/workspace/__tests__/shell-chrome-components.test.js +0 -108
  138. package/dist/components/workspace/__tests__/system-feed.test.js +0 -327
  139. package/dist/components/workspace/__tests__/test-icon.svelte +0 -17
  140. package/dist/components/workspace/__tests__/test-icon.svelte.d.ts +0 -19
  141. package/dist/components/workspace/__tests__/test-icon.svelte.d.ts.map +0 -1
  142. package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte +0 -38
  143. package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte.d.ts +0 -22
  144. package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte.d.ts.map +0 -1
  145. package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.d.ts +0 -66
  146. package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.d.ts.map +0 -1
  147. package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.js +0 -115
  148. package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.d.ts +0 -15
  149. package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.d.ts.map +0 -1
  150. package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.js +0 -7
  151. package/dist/components/workspace/__tests__/typed-tool-fixture.test.js +0 -115
  152. package/dist/components/workspace/__tests__/use-harness-orphan.svelte +0 -9
  153. package/dist/components/workspace/__tests__/use-harness-orphan.svelte.d.ts +0 -19
  154. package/dist/components/workspace/__tests__/use-harness-orphan.svelte.d.ts.map +0 -1
  155. package/dist/components/workspace/__tests__/use-harness.svelte +0 -23
  156. package/dist/components/workspace/__tests__/use-harness.svelte.d.ts +0 -8
  157. package/dist/components/workspace/__tests__/use-harness.svelte.d.ts.map +0 -1
  158. package/dist/components/workspace/__tests__/use-tools-dock.test.js +0 -33
  159. package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte +0 -43
  160. package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte.d.ts +0 -11
  161. package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte.d.ts.map +0 -1
  162. package/dist/components/workspace/server/__tests__/compose-availability.test.js +0 -383
  163. package/dist/components/workspace/server/__tests__/typed-context-fixture.d.ts +0 -78
  164. package/dist/components/workspace/server/__tests__/typed-context-fixture.d.ts.map +0 -1
  165. package/dist/components/workspace/server/__tests__/typed-context-fixture.js +0 -104
  166. package/dist/hooks/__tests__/stt-consumer.fixture.svelte +0 -25
  167. package/dist/hooks/__tests__/stt-consumer.fixture.svelte.d.ts +0 -15
  168. package/dist/hooks/__tests__/stt-consumer.fixture.svelte.d.ts.map +0 -1
  169. package/dist/hooks/__tests__/stt-ownership-harness.svelte +0 -42
  170. package/dist/hooks/__tests__/stt-ownership-harness.svelte.d.ts +0 -20
  171. package/dist/hooks/__tests__/stt-ownership-harness.svelte.d.ts.map +0 -1
  172. package/dist/hooks/__tests__/useSTT-ownership.test.js +0 -102
  173. package/dist/i18n/__tests__/server.spec.js +0 -57
  174. package/dist/internal/logger.test.js +0 -54
  175. package/dist/provider-mode.test.js +0 -86
  176. package/dist/provider-webmcp.test.js +0 -244
  177. package/dist/state/__tests__/app-state-ai-lifecycle.test.js +0 -240
  178. package/dist/state/__tests__/warm-clients.test.js +0 -40
  179. package/dist/web/__tests__/activity-feed-harness.svelte +0 -32
  180. package/dist/web/__tests__/activity-feed-harness.svelte.d.ts +0 -18
  181. package/dist/web/__tests__/activity-feed-harness.svelte.d.ts.map +0 -1
  182. package/dist/web/__tests__/activity-feed.integration.svelte.test.js +0 -190
  183. package/dist/web/__tests__/activity-feed.svelte.test.js +0 -235
  184. package/dist/web/__tests__/assistant-dock.integration.svelte.test.js +0 -204
  185. package/dist/web/__tests__/data-surface-conformance.integration.svelte.test.js +0 -1392
  186. package/dist/web/__tests__/harness.svelte +0 -25
  187. package/dist/web/__tests__/harness.svelte.d.ts +0 -15
  188. package/dist/web/__tests__/harness.svelte.d.ts.map +0 -1
  189. package/dist/web/__tests__/list-data-surface.fixture.svelte +0 -59
  190. package/dist/web/__tests__/list-data-surface.fixture.svelte.d.ts +0 -14
  191. package/dist/web/__tests__/list-data-surface.fixture.svelte.d.ts.map +0 -1
  192. package/dist/web/__tests__/list-data-surface.svelte.test.js +0 -106
  193. package/dist/web/__tests__/list-data-surface.test.js +0 -651
  194. package/dist/web/__tests__/list-sort-surface.fixture.svelte +0 -41
  195. package/dist/web/__tests__/list-sort-surface.fixture.svelte.d.ts +0 -15
  196. package/dist/web/__tests__/list-sort-surface.fixture.svelte.d.ts.map +0 -1
  197. package/dist/web/__tests__/list-sort-surface.svelte.test.js +0 -59
  198. package/dist/web/__tests__/live-collection.svelte.test.js +0 -185
  199. package/dist/web/__tests__/provider-ui-registry.fixture.svelte +0 -43
  200. package/dist/web/__tests__/provider-ui-registry.fixture.svelte.d.ts +0 -13
  201. package/dist/web/__tests__/provider-ui-registry.fixture.svelte.d.ts.map +0 -1
  202. package/dist/web/__tests__/provider-ui-registry.test.js +0 -235
  203. package/dist/web/__tests__/remote-query-harness.svelte +0 -27
  204. package/dist/web/__tests__/remote-query-harness.svelte.d.ts +0 -11
  205. package/dist/web/__tests__/remote-query-harness.svelte.d.ts.map +0 -1
  206. package/dist/web/__tests__/remote-query.svelte.test.js +0 -101
  207. package/dist/web/__tests__/surfaces.child.fixture.svelte +0 -69
  208. package/dist/web/__tests__/surfaces.child.fixture.svelte.d.ts +0 -16
  209. package/dist/web/__tests__/surfaces.child.fixture.svelte.d.ts.map +0 -1
  210. package/dist/web/__tests__/surfaces.fixture.svelte +0 -26
  211. package/dist/web/__tests__/surfaces.fixture.svelte.d.ts +0 -18
  212. package/dist/web/__tests__/surfaces.fixture.svelte.d.ts.map +0 -1
  213. package/dist/web/__tests__/surfaces.svelte.test.js +0 -140
  214. package/dist/web/__tests__/update-available-harness.svelte +0 -46
  215. package/dist/web/__tests__/update-available-harness.svelte.d.ts +0 -22
  216. package/dist/web/__tests__/update-available-harness.svelte.d.ts.map +0 -1
  217. package/dist/web/__tests__/update-available.svelte.test.js +0 -137
  218. package/dist/web/__tests__/view-intent-provider.fixture.svelte +0 -28
  219. package/dist/web/__tests__/view-intent-provider.fixture.svelte.d.ts +0 -13
  220. package/dist/web/__tests__/view-intent-provider.fixture.svelte.d.ts.map +0 -1
  221. package/dist/web/__tests__/view-intent.fixture.svelte +0 -33
  222. package/dist/web/__tests__/view-intent.fixture.svelte.d.ts +0 -15
  223. package/dist/web/__tests__/view-intent.fixture.svelte.d.ts.map +0 -1
  224. package/dist/web/__tests__/view-intent.intents.d.ts +0 -14
  225. package/dist/web/__tests__/view-intent.intents.d.ts.map +0 -1
  226. package/dist/web/__tests__/view-intent.intents.js +0 -38
  227. package/dist/web/__tests__/view-intent.svelte.test.js +0 -244
  228. package/dist/web/__tests__/webmcp-composed.child.fixture.svelte +0 -73
  229. package/dist/web/__tests__/webmcp-composed.child.fixture.svelte.d.ts +0 -8
  230. package/dist/web/__tests__/webmcp-composed.child.fixture.svelte.d.ts.map +0 -1
  231. package/dist/web/__tests__/webmcp-composed.fixture.svelte +0 -52
  232. package/dist/web/__tests__/webmcp-composed.fixture.svelte.d.ts +0 -12
  233. package/dist/web/__tests__/webmcp-composed.fixture.svelte.d.ts.map +0 -1
  234. package/dist/web/__tests__/webmcp-composed.integration.svelte.test.js +0 -251
  235. package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte +0 -16
  236. package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte.d.ts +0 -19
  237. package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte.d.ts.map +0 -1
  238. package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte +0 -11
  239. package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte.d.ts +0 -8
  240. package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte.d.ts.map +0 -1
  241. package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte +0 -20
  242. package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte.d.ts +0 -7
  243. package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte.d.ts.map +0 -1
  244. package/dist/web/__tests__/webmcp-harness-unannotated.svelte +0 -14
  245. package/dist/web/__tests__/webmcp-harness-unannotated.svelte.d.ts +0 -19
  246. package/dist/web/__tests__/webmcp-harness-unannotated.svelte.d.ts.map +0 -1
  247. package/dist/web/__tests__/webmcp-harness.svelte +0 -18
  248. package/dist/web/__tests__/webmcp-harness.svelte.d.ts +0 -7
  249. package/dist/web/__tests__/webmcp-harness.svelte.d.ts.map +0 -1
  250. package/dist/web/__tests__/webmcp-ssr.fixture.svelte +0 -13
  251. package/dist/web/__tests__/webmcp-ssr.fixture.svelte.d.ts +0 -19
  252. package/dist/web/__tests__/webmcp-ssr.fixture.svelte.d.ts.map +0 -1
  253. package/dist/web/__tests__/webmcp-ui.test.js +0 -723
  254. package/dist/web/__tests__/webmcp.test.js +0 -234
@@ -1,115 +0,0 @@
1
- /**
2
- * Registration site for the typed-tool fixture. This file is the contract
3
- * the workspace ergonomics PR (#1239) is restoring:
4
- *
5
- * - `TypedTool.svelte` declares its own typed `context` prop of shape
6
- * `ToolsDockContext<MyData, MyActions> | null`.
7
- * - It must be assignable to `ToolDef.component` without a registration-
8
- * site cast — but this assertion is only meaningful under
9
- * `svelte-check`. Under `tsc --noEmit`, `.svelte` imports resolve to
10
- * `Component<any>` via the ambient `declare module '*.svelte'`
11
- * declaration, so the assignment compiles regardless of what
12
- * `ToolDef.component` is typed as. CI runs both `typecheck` and `check`
13
- * (which invokes `svelte-check`) for this reason — see the JSDoc on
14
- * `../typed-tool-fixture.test.ts` for the full split.
15
- * - `defineToolsDock<MyData, MyActions>(...)` must accept an interface
16
- * `MyActions` (no string index signature) under the factory generic.
17
- * - `dock.setContext({ actions: { triggerSave } })` must still compile
18
- * with no generic arguments (back-compat for the untyped pattern).
19
- * - The factory's `<TData, TActions>` generics must flow through to the
20
- * returned `ToolsDockInstance<TData, TActions>` — see
21
- * `_assertTypedDockFlow` below for the load-bearing assertion.
22
- *
23
- * If TypeScript ever rejects this file under strict checks, the regression
24
- * from review thread #1239/PRRT_kwDOQDruXs6CbBcK has returned.
25
- */
26
- import { defineToolsDock, } from '../../tools-dock/define-tools-dock.svelte.js';
27
- import TypedTool from './TypedTool.svelte';
28
- /** Type-only export: a tool registry that uses the typed component. */
29
- export const typedTool = {
30
- id: 'typed',
31
- label: 'Typed',
32
- // ↳ TypedTool's `context` prop is narrower than the base
33
- // `ToolsDockContext | null`. Under strict prop variance this would be
34
- // rejected if `ToolDef.component` were typed as
35
- // `Component<{ context: ToolsDockContext | null; dock: ToolsDockApi }>`.
36
- component: TypedTool,
37
- };
38
- /** Type-only export: options that pass the typed action map through. */
39
- export const typedOptions = {
40
- tools: [typedTool],
41
- };
42
- /**
43
- * Type-only export: a typed context literal. This must compile under the
44
- * relaxed `TActions extends { [K in keyof TActions]: (...args: any[]) => any }`
45
- * constraint — `MyActions` is an interface (no string index signature) and
46
- * would fail a `Record<string, ...>` constraint.
47
- */
48
- export const typedContext = {
49
- type: 'route',
50
- data: { siteSlug: 'demo', contentId: 'demo-1' },
51
- actions: {
52
- triggerSave: () => undefined,
53
- triggerReview: (_kind) => undefined,
54
- },
55
- };
56
- /**
57
- * Type-only export: the untyped (back-compat) setContext shape — passing
58
- * `actions` with no factory generic. This caught a previous regression
59
- * where `TActions = Record<string, never>` defaulted the action map to
60
- * "no keys", rejecting `{ triggerSave }` outright.
61
- */
62
- export const untypedContext = {
63
- type: 'route',
64
- actions: {
65
- triggerSave: () => undefined,
66
- },
67
- };
68
- /**
69
- * Type-only fixture: exercises the end-to-end generic flow on the public
70
- * surface returned by `defineToolsDock<TData, TActions>(...)`. This is the
71
- * regression Codex flagged in PR #1239 round-2 — the factory accepts the
72
- * generics but erases them on the return type, so `dock.setContext(...)` and
73
- * `dock.context?.data` fall back to the default-typed shape.
74
- *
75
- * The function below is never called at runtime. Its body has to compile,
76
- * which is the load-bearing assertion: if `ToolsDockApi` / `ToolsDockInstance`
77
- * ever stop parameterizing their `context` / `setContext` signatures, the
78
- * lines marked TYPED below would fail to assign `MyData` / `MyActions` into
79
- * the default-typed shape (no string index signature).
80
- *
81
- * Lives inline rather than at module scope because `defineToolsDock` calls
82
- * `setContext`, which is only legal inside a component init scope.
83
- */
84
- export function _assertTypedDockFlow() {
85
- const typedDock = defineToolsDock({
86
- tools: [typedTool],
87
- fetchAvailability: async (ctx) => {
88
- // TYPED: `ctx?.data?.siteSlug` must be `string | undefined`, not
89
- // `unknown`. If the factory dropped its generics on the callback
90
- // signature, the next line would only compile as `unknown`.
91
- const _siteSlug = ctx?.data?.siteSlug;
92
- const _save = ctx?.actions?.triggerSave;
93
- return [];
94
- },
95
- });
96
- // TYPED: `setContext` accepts the narrowed context with no manual cast.
97
- // Pre-fix this assignment failed because `ToolsDockApi.setContext` was
98
- // typed to receive only the default-generic `ToolsDockContext`, whose
99
- // `actions` slot expected `Record<string, (...args: any[]) => unknown>` —
100
- // `MyActions` (an interface, no string index signature) was rejected.
101
- typedDock.setContext({
102
- type: 'route',
103
- data: { siteSlug: 'demo', contentId: 'demo-1' },
104
- actions: {
105
- triggerSave: () => undefined,
106
- triggerReview: (_kind) => undefined,
107
- },
108
- });
109
- // TYPED: reading typed properties off the public `context` surface must
110
- // resolve to the consumer's shapes, not `Record<string, unknown>` /
111
- // `Record<string, (...args: any[]) => unknown>`.
112
- const _slug = typedDock.context?.data?.siteSlug;
113
- const _action = typedDock.context?.actions?.triggerSave;
114
- return typedDock;
115
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * Type-only fixtures for the typed tool-component pattern. Lives in a
3
- * `.ts` file (not `.svelte`) so the types can be imported cleanly from
4
- * both the component and the registration site without relying on
5
- * Svelte's `<script context="module">` re-export semantics.
6
- */
7
- export interface MyData {
8
- siteSlug: string;
9
- contentId: string;
10
- }
11
- export interface MyActions {
12
- triggerSave(): void;
13
- triggerReview(kind: string): void;
14
- }
15
- //# sourceMappingURL=typed-tool-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typed-tool-types.d.ts","sourceRoot":"","sources":["../../../../../src/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,IAAI,IAAI,CAAC;IACpB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Type-only fixtures for the typed tool-component pattern. Lives in a
3
- * `.ts` file (not `.svelte`) so the types can be imported cleanly from
4
- * both the component and the registration site without relying on
5
- * Svelte's `<script context="module">` re-export semantics.
6
- */
7
- export {};
@@ -1,115 +0,0 @@
1
- /**
2
- * Regression tests for the typed-tool component pattern documented on
3
- * `ToolDef.component` and `ToolsDockContext`.
4
- *
5
- * The static type checks live in `typed-tool-fixture/register-typed-tool.ts`
6
- * and `typed-tool-fixture/TypedTool.svelte`. They split across two checkers:
7
- *
8
- * - `tsc --noEmit` (the package's `typecheck` script, run in CI via
9
- * `pnpm turbo run typecheck`) catches the regressions that live in the
10
- * `.ts` files:
11
- * * The factory `<TData, TActions>` generics flow into
12
- * `ToolsDockApi.setContext` / `ToolsDockApi.context`. If they ever
13
- * erase back to the default shape, the `_assertTypedDockFlow`
14
- * function in `register-typed-tool.ts` fails to compile.
15
- * * The `TActions` constraint accepts interface-style action maps
16
- * (no string index signature). If it ever tightens back to
17
- * `Record<string, ...>`, the `typedContext` / `untypedContext`
18
- * literals fail to compile.
19
- *
20
- * - `svelte-check` (the package's `check` script, run in CI via
21
- * `pnpm turbo run check`) catches the regression that lives in the
22
- * `.svelte` file:
23
- * * `ToolDef.component` is typed `Component<any>` so a tool component
24
- * declaring a narrower `context` prop is assignable at registration.
25
- * Under `tsc --noEmit` alone, `.svelte` imports resolve to
26
- * `Component<any>` via the ambient `declare module '*.svelte'`
27
- * declaration — so the registration-site assertion in
28
- * `register-typed-tool.ts` would compile regardless of what
29
- * `ToolDef.component` actually demands. Only `svelte-check` actually
30
- * resolves `TypedTool.svelte`'s real prop shape and exercises the
31
- * contravariant assignment, which is why the `check` script is part
32
- * of CI alongside `typecheck`.
33
- *
34
- * The runtime test below guards against accidental regressions in the
35
- * `ToolDef` storage shape itself (e.g. registering a component that ends
36
- * up unreachable because of a runtime type assertion) and exercises the
37
- * round-trip of typed / untyped context shapes through `dock.setContext`.
38
- */
39
- import { flushSync, mount, unmount } from 'svelte';
40
- import { afterEach, beforeEach, describe, expect, it } from 'vitest';
41
- import HostHarness from './harness.svelte';
42
- import { typedContext, typedOptions, untypedContext, } from './typed-tool-fixture/register-typed-tool.js';
43
- function mountTypedDock() {
44
- const target = document.createElement('div');
45
- document.body.appendChild(target);
46
- const exposed = {
47
- dock: undefined,
48
- };
49
- const component = mount(HostHarness, {
50
- target,
51
- props: {
52
- options: typedOptions,
53
- onReady: (dock) => {
54
- exposed.dock = dock;
55
- },
56
- },
57
- });
58
- return {
59
- dock: exposed.dock,
60
- teardown: () => {
61
- unmount(component);
62
- target.remove();
63
- },
64
- };
65
- }
66
- describe('typed-tool fixture (regression guard for PR #1239 review)', () => {
67
- let cleanup = [];
68
- beforeEach(() => {
69
- cleanup = [];
70
- });
71
- afterEach(() => {
72
- for (const fn of cleanup.splice(0))
73
- fn();
74
- });
75
- it('accepts a tool component with a narrowed context prop type', () => {
76
- const { dock, teardown } = mountTypedDock();
77
- cleanup.push(teardown);
78
- // The fixture registered TypedTool, whose `context` prop is
79
- // `ToolsDockContext<MyData, MyActions> | null`. If ToolDef.component's
80
- // type contravariantly required the wider base context, this
81
- // registration would not have compiled — which `pnpm typecheck` catches
82
- // first. At runtime, we just need to confirm the tool is registered
83
- // and reachable.
84
- expect(dock.availableTools.map((t) => t.id)).toEqual(['typed']);
85
- dock.open('typed');
86
- flushSync();
87
- expect(dock.isOpen).toBe(true);
88
- expect(dock.activeTool).toBe('typed');
89
- });
90
- it('accepts the typed context shape via setContext()', () => {
91
- const { dock, teardown } = mountTypedDock();
92
- cleanup.push(teardown);
93
- dock.setContext(typedContext);
94
- flushSync();
95
- // The context round-trips with the typed action shape intact at runtime
96
- // (the dock erases the generic but does not mutate the value).
97
- expect(dock.context?.data).toEqual({
98
- siteSlug: 'demo',
99
- contentId: 'demo-1',
100
- });
101
- // The action is callable — the runtime keeps reference identity.
102
- expect(typeof dock.context?.actions?.triggerSave).toBe('function');
103
- });
104
- it('accepts the untyped (back-compat) context shape via setContext()', () => {
105
- const { dock, teardown } = mountTypedDock();
106
- cleanup.push(teardown);
107
- // `untypedContext` uses the default `ToolsDockContext` (no generic
108
- // arguments). If the default `TActions` were the prior
109
- // `Record<string, never>`, this `actions: { triggerSave }` would have
110
- // been rejected at typecheck time — the regression Copilot flagged.
111
- dock.setContext(untypedContext);
112
- flushSync();
113
- expect(typeof dock.context?.actions?.triggerSave).toBe('function');
114
- });
115
- });
@@ -1,9 +0,0 @@
1
- <script lang="ts">
2
- /**
3
- * Orphan consumer — calls useToolsDock with no provider in the ancestor
4
- * chain. Expected to throw at construction time.
5
- */
6
- import { useToolsDock } from '../tools-dock/use-tools-dock.js';
7
-
8
- useToolsDock();
9
- </script>
@@ -1,19 +0,0 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const UseHarnessOrphan: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type UseHarnessOrphan = InstanceType<typeof UseHarnessOrphan>;
18
- export default UseHarnessOrphan;
19
- //# sourceMappingURL=use-harness-orphan.svelte.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-harness-orphan.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/__tests__/use-harness-orphan.svelte.ts"],"names":[],"mappings":"AAkBA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,gBAAgB;;kBAA+E,CAAC;AACpF,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,eAAe,gBAAgB,CAAC"}
@@ -1,23 +0,0 @@
1
- <script lang="ts">
2
- /**
3
- * Provider + consumer in one component. The factory call sets context on
4
- * this component; an immediate-child snippet then reads it via useToolsDock.
5
- */
6
- import { defineToolsDock } from '../tools-dock/define-tools-dock.svelte.js';
7
- import { useToolsDock } from '../tools-dock/use-tools-dock.js';
8
- import type { ToolsDockApi } from '../types.js';
9
-
10
- interface Props {
11
- onReady: (api: ToolsDockApi) => void;
12
- }
13
-
14
- const { onReady }: Props = $props();
15
- defineToolsDock({
16
- tools: [{ id: 'demo', label: 'Demo', component: (() => null) as never }],
17
- });
18
- // useToolsDock reads from the same component init scope's context tree.
19
- const api = useToolsDock();
20
- // This harness intentionally snapshots the callback during setup.
21
- // svelte-ignore state_referenced_locally
22
- onReady(api);
23
- </script>
@@ -1,8 +0,0 @@
1
- import type { ToolsDockApi } from '../types.js';
2
- interface Props {
3
- onReady: (api: ToolsDockApi) => void;
4
- }
5
- declare const UseHarness: import("svelte").Component<Props, {}, "">;
6
- type UseHarness = ReturnType<typeof UseHarness>;
7
- export default UseHarness;
8
- //# sourceMappingURL=use-harness.svelte.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-harness.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/__tests__/use-harness.svelte.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,UAAU,KAAK;IACb,OAAO,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;CACtC;AAqBD,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * Tests for useToolsDock.
3
- */
4
- import { mount, unmount } from 'svelte';
5
- import { describe, expect, it } from 'vitest';
6
- import UseHarness from './use-harness.svelte';
7
- import OrphanHarness from './use-harness-orphan.svelte';
8
- describe('useToolsDock', () => {
9
- it('returns the dock when called inside a <ToolsDock> provider', () => {
10
- const target = document.createElement('div');
11
- document.body.appendChild(target);
12
- let observed = null;
13
- const component = mount(UseHarness, {
14
- target,
15
- props: {
16
- onReady: (api) => {
17
- observed = { isOpen: api.isOpen, activeTool: api.activeTool };
18
- },
19
- },
20
- });
21
- expect(observed).not.toBeNull();
22
- expect(observed?.isOpen).toBe(false);
23
- expect(observed?.activeTool).toBeNull();
24
- unmount(component);
25
- target.remove();
26
- });
27
- it('throws a clear error when called outside a provider', () => {
28
- const target = document.createElement('div');
29
- document.body.appendChild(target);
30
- expect(() => mount(OrphanHarness, { target })).toThrow(/ToolsDock/);
31
- target.remove();
32
- });
33
- });
@@ -1,43 +0,0 @@
1
- <script lang="ts">
2
- /**
3
- * Test harness for `bind:mobileNavOpen` on `WorkspaceShell`.
4
- *
5
- * Exposes the bindable drawer state on the outer `state` object so tests
6
- * can observe the consumer-visible value after every interaction. The
7
- * `onReady` callback hands back a setter the test can use to drive the
8
- * value externally — verifying the two-way binding really is two-way.
9
- */
10
- import { createRawSnippet } from 'svelte';
11
- import WorkspaceShell from '../WorkspaceShell.svelte';
12
-
13
- interface Props {
14
- initial?: boolean;
15
- onReady?: (controls: {
16
- setMobileNavOpen: (next: boolean) => void;
17
- getMobileNavOpen: () => boolean;
18
- }) => void;
19
- }
20
-
21
- const { initial = false, onReady }: Props = $props();
22
-
23
- // This harness intentionally snapshots the initial bindable value.
24
- // svelte-ignore state_referenced_locally
25
- let mobileNavOpen = $state(initial);
26
-
27
- const content = createRawSnippet(() => ({
28
- render: () => '<span>content</span>',
29
- }));
30
-
31
- // This harness intentionally snapshots the callback during setup.
32
- // svelte-ignore state_referenced_locally
33
- onReady?.({
34
- setMobileNavOpen: (next: boolean) => {
35
- mobileNavOpen = next;
36
- },
37
- getMobileNavOpen: () => mobileNavOpen,
38
- });
39
- </script>
40
-
41
- <WorkspaceShell bind:mobileNavOpen>
42
- {@render content()}
43
- </WorkspaceShell>
@@ -1,11 +0,0 @@
1
- interface Props {
2
- initial?: boolean;
3
- onReady?: (controls: {
4
- setMobileNavOpen: (next: boolean) => void;
5
- getMobileNavOpen: () => boolean;
6
- }) => void;
7
- }
8
- declare const WorkspaceShellBindHarness: import("svelte").Component<Props, {}, "">;
9
- type WorkspaceShellBindHarness = ReturnType<typeof WorkspaceShellBindHarness>;
10
- export default WorkspaceShellBindHarness;
11
- //# sourceMappingURL=workspace-shell-bind-harness.svelte.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-shell-bind-harness.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/__tests__/workspace-shell-bind-harness.svelte.ts"],"names":[],"mappings":"AAeA,UAAU,KAAK;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE;QACnB,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;QAC1C,gBAAgB,EAAE,MAAM,OAAO,CAAC;KACjC,KAAK,IAAI,CAAC;CACZ;AAiCD,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}