@mountaya/studio 0.1.0 → 0.2.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 (260) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/agent/index.cjs +2561 -2815
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +766 -786
  5. package/dist/agent/index.d.ts +766 -786
  6. package/dist/agent/index.js +2553 -2790
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/chunk-3Oi_Zrtm.js +9 -0
  9. package/dist/chunk-3Oi_Zrtm.js.map +1 -0
  10. package/dist/chunk-B18OPIu_.js +6 -0
  11. package/dist/chunk-B18OPIu_.js.map +1 -0
  12. package/dist/chunk-B5Uz3Qct.cjs +15 -0
  13. package/dist/chunk-B5Uz3Qct.cjs.map +1 -0
  14. package/dist/chunk-BBEJwkd3.d.cts +839 -0
  15. package/dist/chunk-BIEc_SkR.cjs +29 -0
  16. package/dist/chunk-BIEc_SkR.cjs.map +1 -0
  17. package/dist/chunk-BKMFOe-N.js +171 -0
  18. package/dist/chunk-BKMFOe-N.js.map +1 -0
  19. package/dist/chunk-BP4uy7E1.d.ts +11583 -0
  20. package/dist/chunk-BSHTsFiB.js +1403 -0
  21. package/dist/chunk-BSHTsFiB.js.map +1 -0
  22. package/dist/chunk-BTUUABGI.js +17 -0
  23. package/dist/chunk-BTUUABGI.js.map +1 -0
  24. package/dist/chunk-BaPiaz5X.cjs +115 -0
  25. package/dist/chunk-BaPiaz5X.cjs.map +1 -0
  26. package/dist/chunk-BeCVpkYr.cjs +542 -0
  27. package/dist/chunk-BeCVpkYr.cjs.map +1 -0
  28. package/dist/chunk-BgngsvK8.cjs +6202 -0
  29. package/dist/chunk-BgngsvK8.cjs.map +1 -0
  30. package/dist/chunk-BhInd7CJ.d.cts +253 -0
  31. package/dist/chunk-Bn6ZbxkS.cjs +27 -0
  32. package/dist/chunk-By9ZnkVI.js +60 -0
  33. package/dist/chunk-By9ZnkVI.js.map +1 -0
  34. package/dist/chunk-BzqPhxsz.cjs +367 -0
  35. package/dist/chunk-BzqPhxsz.cjs.map +1 -0
  36. package/dist/chunk-C2mMX81q.d.ts +443 -0
  37. package/dist/chunk-C2rr9Q0V.cjs +1402 -0
  38. package/dist/chunk-C2rr9Q0V.cjs.map +1 -0
  39. package/dist/{directorThreads-CqmvsV8b.d.cts → chunk-CDJCbwIQ.d.cts} +20 -22
  40. package/dist/chunk-CLGvBOVH.d.cts +1654 -0
  41. package/dist/chunk-COdw1dc6.d.ts +525 -0
  42. package/dist/chunk-CQCJnT2i.d.ts +511 -0
  43. package/dist/chunk-CSyHY67q.cjs +353 -0
  44. package/dist/chunk-CSyHY67q.cjs.map +1 -0
  45. package/dist/chunk-CiK1Iqrv.js +950 -0
  46. package/dist/chunk-CiK1Iqrv.js.map +1 -0
  47. package/dist/chunk-CmJBgSwZ.cjs +24 -0
  48. package/dist/chunk-CmJBgSwZ.cjs.map +1 -0
  49. package/dist/chunk-CnrsRK2u.cjs +83 -0
  50. package/dist/chunk-CnrsRK2u.cjs.map +1 -0
  51. package/dist/chunk-Co782_9r.js +326 -0
  52. package/dist/chunk-Co782_9r.js.map +1 -0
  53. package/dist/chunk-Csr3KDpZ.cjs +32 -0
  54. package/dist/chunk-Csr3KDpZ.cjs.map +1 -0
  55. package/dist/chunk-CwkmccXv.js +89 -0
  56. package/dist/chunk-CwkmccXv.js.map +1 -0
  57. package/dist/chunk-D0Q4iL9B.cjs +255 -0
  58. package/dist/chunk-D0Q4iL9B.cjs.map +1 -0
  59. package/dist/chunk-DFwiSzUS.cjs +72 -0
  60. package/dist/chunk-DFwiSzUS.cjs.map +1 -0
  61. package/dist/chunk-DIFayl2P.d.cts +443 -0
  62. package/dist/chunk-DIGF58ux.d.cts +525 -0
  63. package/dist/chunk-DKuuuld5.js +101 -0
  64. package/dist/chunk-DKuuuld5.js.map +1 -0
  65. package/dist/chunk-DMePkFEo.js +5054 -0
  66. package/dist/chunk-DMePkFEo.js.map +1 -0
  67. package/dist/chunk-DO5SIBgu.js +305 -0
  68. package/dist/chunk-DO5SIBgu.js.map +1 -0
  69. package/dist/chunk-DOQ_7eE5.d.ts +6662 -0
  70. package/dist/{tabs-B2nRO4p_.d.ts → chunk-DThaaNeb.d.cts} +2 -2
  71. package/dist/{tabs-B2nRO4p_.d.cts → chunk-DThaaNeb.d.ts} +2 -2
  72. package/dist/{directorThreads-CqmvsV8b.d.ts → chunk-DUQzjUJy.d.ts} +20 -22
  73. package/dist/chunk-DX37IPhV.cjs +1903 -0
  74. package/dist/chunk-DX37IPhV.cjs.map +1 -0
  75. package/dist/chunk-Damps5Tk.cjs +155 -0
  76. package/dist/chunk-Damps5Tk.cjs.map +1 -0
  77. package/dist/chunk-DbK5PhpJ.d.ts +1654 -0
  78. package/dist/chunk-De0vAASv.d.ts +253 -0
  79. package/dist/chunk-DhSZ7YZt.d.cts +6662 -0
  80. package/dist/chunk-DjEvqvPA.cjs +43 -0
  81. package/dist/chunk-DjEvqvPA.cjs.map +1 -0
  82. package/dist/{saveFile-j-1kkApx.d.cts → chunk-DkwDzwvu.d.cts} +7 -9
  83. package/dist/{saveFile-j-1kkApx.d.ts → chunk-DkwDzwvu.d.ts} +7 -9
  84. package/dist/chunk-Dmszv9If.js +71 -0
  85. package/dist/chunk-Dmszv9If.js.map +1 -0
  86. package/dist/chunk-Dp_ftNWY.d.cts +511 -0
  87. package/dist/chunk-DsHQySz0.js +31 -0
  88. package/dist/chunk-DsHQySz0.js.map +1 -0
  89. package/dist/chunk-DwoUyHHh.js +281 -0
  90. package/dist/chunk-DwoUyHHh.js.map +1 -0
  91. package/dist/chunk-IaIDQflj.d.cts +2315 -0
  92. package/dist/chunk-IaIDQflj.d.ts +2315 -0
  93. package/dist/chunk-cVXLsZfL.d.ts +839 -0
  94. package/dist/chunk-mIaCX9EJ.d.cts +11583 -0
  95. package/dist/chunk-nJQxbOwQ.cjs +8962 -0
  96. package/dist/chunk-nJQxbOwQ.cjs.map +1 -0
  97. package/dist/chunk-o9jaxhCO.js +8852 -0
  98. package/dist/chunk-o9jaxhCO.js.map +1 -0
  99. package/dist/chunk-p-Tt_Lwz.js +14 -0
  100. package/dist/chunk-p-Tt_Lwz.js.map +1 -0
  101. package/dist/engines/index.cjs +2046 -3401
  102. package/dist/engines/index.cjs.map +1 -1
  103. package/dist/engines/index.d.cts +1510 -1550
  104. package/dist/engines/index.d.ts +1510 -1550
  105. package/dist/engines/index.js +2039 -3380
  106. package/dist/engines/index.js.map +1 -1
  107. package/dist/handlers/index.cjs +47 -93
  108. package/dist/handlers/index.cjs.map +1 -1
  109. package/dist/handlers/index.d.cts +61 -103
  110. package/dist/handlers/index.d.ts +61 -103
  111. package/dist/handlers/index.js +27 -36
  112. package/dist/handlers/index.js.map +1 -1
  113. package/dist/index.cjs +3347 -4398
  114. package/dist/index.cjs.map +1 -1
  115. package/dist/index.d.cts +8 -7297
  116. package/dist/index.d.ts +8 -7297
  117. package/dist/index.js +2997 -3187
  118. package/dist/index.js.map +1 -1
  119. package/dist/plugins/index.cjs +482 -949
  120. package/dist/plugins/index.cjs.map +1 -1
  121. package/dist/plugins/index.d.cts +44 -61
  122. package/dist/plugins/index.d.ts +44 -61
  123. package/dist/plugins/index.js +471 -915
  124. package/dist/plugins/index.js.map +1 -1
  125. package/dist/seams/index.cjs +77 -140
  126. package/dist/seams/index.cjs.map +1 -1
  127. package/dist/seams/index.d.cts +125 -158
  128. package/dist/seams/index.d.ts +125 -158
  129. package/dist/seams/index.js +41 -71
  130. package/dist/seams/index.js.map +1 -1
  131. package/dist/strings/fr/index.cjs +2130 -2116
  132. package/dist/strings/fr/index.cjs.map +1 -1
  133. package/dist/strings/fr/index.d.cts +3 -5
  134. package/dist/strings/fr/index.d.ts +3 -5
  135. package/dist/strings/fr/index.js +2125 -2114
  136. package/dist/strings/fr/index.js.map +1 -1
  137. package/dist/strings/index.cjs +2331 -2625
  138. package/dist/strings/index.cjs.map +1 -1
  139. package/dist/strings/index.d.cts +3 -731
  140. package/dist/strings/index.d.ts +3 -731
  141. package/dist/strings/index.js +2324 -2615
  142. package/dist/strings/index.js.map +1 -1
  143. package/dist/testing/index.cjs +214 -276
  144. package/dist/testing/index.cjs.map +1 -1
  145. package/dist/testing/index.d.cts +61 -121
  146. package/dist/testing/index.d.ts +61 -121
  147. package/dist/testing/index.js +208 -273
  148. package/dist/testing/index.js.map +1 -1
  149. package/dist/time/index.cjs +23 -23
  150. package/dist/time/index.cjs.map +1 -1
  151. package/dist/time/index.d.cts +5 -7
  152. package/dist/time/index.d.ts +5 -7
  153. package/dist/time/index.js +18 -21
  154. package/dist/time/index.js.map +1 -1
  155. package/package.json +14 -15
  156. package/src/agent/rules/stateDelta.ts +1 -0
  157. package/src/agent/stores/agentThreads.ts +1 -4
  158. package/src/bus/rules/bus.ts +1 -2
  159. package/src/bus/rules/defineRegistry.ts +3 -5
  160. package/src/bus/rules/types.ts +6 -7
  161. package/src/chrome/stores/uiStore.ts +4 -2
  162. package/src/embed/rules/fieldDependencies.ts +2 -0
  163. package/src/embed/rules/safetyRules.ts +2 -0
  164. package/src/embed/rules/tableCode.ts +4 -3
  165. package/src/index.ts +6 -27
  166. package/src/itinerary/rules/import.ts +6 -8
  167. package/src/plugins/contracts/plugin.ts +4 -2
  168. package/src/seams/rules/formatters.ts +5 -3
  169. package/src/testing/index.ts +1 -5
  170. package/src/viewer/rules/platformViewer.ts +1 -0
  171. package/dist/bus-BwiNiXdH.d.ts +0 -514
  172. package/dist/bus-DzmhPwdK.d.cts +0 -514
  173. package/dist/chainModel-B23pEP_1.d.cts +0 -127
  174. package/dist/chainModel-B23pEP_1.d.ts +0 -127
  175. package/dist/chunk-2HFY7ETU.js +0 -5721
  176. package/dist/chunk-2HFY7ETU.js.map +0 -1
  177. package/dist/chunk-355TOXSB.js +0 -72
  178. package/dist/chunk-355TOXSB.js.map +0 -1
  179. package/dist/chunk-4ZCUZVSV.js +0 -10275
  180. package/dist/chunk-4ZCUZVSV.js.map +0 -1
  181. package/dist/chunk-6HEKY3NF.js +0 -95
  182. package/dist/chunk-6HEKY3NF.js.map +0 -1
  183. package/dist/chunk-7GFLGGBX.cjs +0 -8
  184. package/dist/chunk-7GFLGGBX.cjs.map +0 -1
  185. package/dist/chunk-7NBRCENN.cjs +0 -19
  186. package/dist/chunk-7NBRCENN.cjs.map +0 -1
  187. package/dist/chunk-AF5GCXE3.js +0 -8
  188. package/dist/chunk-AF5GCXE3.js.map +0 -1
  189. package/dist/chunk-CJDIFRGZ.cjs +0 -2005
  190. package/dist/chunk-CJDIFRGZ.cjs.map +0 -1
  191. package/dist/chunk-CNPZY7N3.js +0 -349
  192. package/dist/chunk-CNPZY7N3.js.map +0 -1
  193. package/dist/chunk-DZJHTWSF.cjs +0 -45
  194. package/dist/chunk-DZJHTWSF.cjs.map +0 -1
  195. package/dist/chunk-EABIHHWA.js +0 -42
  196. package/dist/chunk-EABIHHWA.js.map +0 -1
  197. package/dist/chunk-EKZWV6RS.cjs +0 -415
  198. package/dist/chunk-EKZWV6RS.cjs.map +0 -1
  199. package/dist/chunk-EOKRXXAC.cjs +0 -24
  200. package/dist/chunk-EOKRXXAC.cjs.map +0 -1
  201. package/dist/chunk-F73W2ZTJ.js +0 -1126
  202. package/dist/chunk-F73W2ZTJ.js.map +0 -1
  203. package/dist/chunk-H4DVOZ5O.js +0 -1897
  204. package/dist/chunk-H4DVOZ5O.js.map +0 -1
  205. package/dist/chunk-HI52PBFT.cjs +0 -10314
  206. package/dist/chunk-HI52PBFT.cjs.map +0 -1
  207. package/dist/chunk-IDBXFBLG.cjs +0 -1225
  208. package/dist/chunk-IDBXFBLG.cjs.map +0 -1
  209. package/dist/chunk-LBWTJZUJ.js +0 -297
  210. package/dist/chunk-LBWTJZUJ.js.map +0 -1
  211. package/dist/chunk-NCLA6DKD.cjs +0 -310
  212. package/dist/chunk-NCLA6DKD.cjs.map +0 -1
  213. package/dist/chunk-O4MC5DPD.js +0 -19
  214. package/dist/chunk-O4MC5DPD.js.map +0 -1
  215. package/dist/chunk-OP37FKW6.cjs +0 -98
  216. package/dist/chunk-OP37FKW6.cjs.map +0 -1
  217. package/dist/chunk-OQSYFH3Z.cjs +0 -5945
  218. package/dist/chunk-OQSYFH3Z.cjs.map +0 -1
  219. package/dist/chunk-PACIO4NS.cjs +0 -26
  220. package/dist/chunk-PACIO4NS.cjs.map +0 -1
  221. package/dist/chunk-PSZ2R3TC.cjs +0 -75
  222. package/dist/chunk-PSZ2R3TC.cjs.map +0 -1
  223. package/dist/chunk-QFO5CZG2.cjs +0 -136
  224. package/dist/chunk-QFO5CZG2.cjs.map +0 -1
  225. package/dist/chunk-QL63MUEW.cjs +0 -140
  226. package/dist/chunk-QL63MUEW.cjs.map +0 -1
  227. package/dist/chunk-RFUPPVZO.js +0 -17
  228. package/dist/chunk-RFUPPVZO.js.map +0 -1
  229. package/dist/chunk-RPG2LWMP.js +0 -23
  230. package/dist/chunk-RPG2LWMP.js.map +0 -1
  231. package/dist/chunk-TIBXK6B7.cjs +0 -12
  232. package/dist/chunk-TIBXK6B7.cjs.map +0 -1
  233. package/dist/chunk-UU65VNEV.js +0 -381
  234. package/dist/chunk-UU65VNEV.js.map +0 -1
  235. package/dist/chunk-VGX6TR2I.js +0 -209
  236. package/dist/chunk-VGX6TR2I.js.map +0 -1
  237. package/dist/chunk-WUTDDBVP.js +0 -130
  238. package/dist/chunk-WUTDDBVP.js.map +0 -1
  239. package/dist/chunk-WVQQLKCI.cjs +0 -224
  240. package/dist/chunk-WVQQLKCI.cjs.map +0 -1
  241. package/dist/chunk-WZYXG3SE.js +0 -111
  242. package/dist/chunk-WZYXG3SE.js.map +0 -1
  243. package/dist/chunk-XDI2X3KE.js +0 -6
  244. package/dist/chunk-XDI2X3KE.js.map +0 -1
  245. package/dist/chunk-XKHLRIC7.cjs +0 -381
  246. package/dist/chunk-XKHLRIC7.cjs.map +0 -1
  247. package/dist/context-DNtd2WUv.d.cts +0 -11666
  248. package/dist/context-DgB72Bur.d.ts +0 -11666
  249. package/dist/en-Bu4Ti9Ev.d.cts +0 -2315
  250. package/dist/en-Bu4Ti9Ev.d.ts +0 -2315
  251. package/dist/shareLink-B6hlt942.d.ts +0 -144
  252. package/dist/shareLink-C7rIMb7x.d.ts +0 -527
  253. package/dist/shareLink-CnTxxXjp.d.cts +0 -144
  254. package/dist/shareLink-DyZVYH2V.d.cts +0 -527
  255. package/dist/studioPlugin-C3C7VjMy.d.ts +0 -847
  256. package/dist/studioPlugin-Cf3OBNUv.d.cts +0 -847
  257. package/dist/types-BzJRV6UI.d.cts +0 -845
  258. package/dist/types-BzJRV6UI.d.ts +0 -845
  259. package/dist/zoneForm-CdYNtnnA.d.cts +0 -320
  260. package/dist/zoneForm-mG85yt5e.d.ts +0 -320
@@ -1,34 +1,7 @@
1
- import { StudioPluginToolSink } from '../plugins/index.cjs';
2
- import { StudioToolContext, StudioToolOutputs, StudioCache, StudioViewer, StudioEntitlement, StudioUrlSeam, MirroredSearch } from '../index.cjs';
3
- import { ResourceRef } from '@mountaya/client';
4
- import { ToolBus } from '../index.cjs';
5
- import 'zod';
6
- import '@mountaya/elements/camera';
7
- import '@mountaya/elements/map-client';
8
- import '@mountaya/elements/seams';
9
- import 'geojson';
10
- import '../types-BzJRV6UI.cjs';
11
- import 'zustand/vanilla';
12
- import '@mountaya/elements/data';
13
- import '../en-Bu4Ti9Ev.cjs';
14
- import '@mountaya/elements/errors';
15
- import '../saveFile-j-1kkApx.cjs';
16
-
17
- /**
18
- * The two doubles a plugin's own suite needs, and neither one is a plugin.
19
- *
20
- * A consumer writing a plugin has two things worth testing that they cannot reach with the
21
- * published API alone: whether their gate opens under the grants they expect, and whether their
22
- * tools land on a bus and come back off it. The first needs a {@link StudioToolContext}, whose
23
- * required members include two whole subsystems, and the second needs something that records
24
- * what a registry did to it.
25
- *
26
- * Here rather than under `@mountaya/studio/plugins`, because an `index.ts` is legal only where
27
- * `package.json#exports` names one: a `plugins/testing/` barrel would either be unreachable or
28
- * would put doubles on a production consumer's import path. The fixtures entry is where doubles
29
- * live, and it is already off every other barrel.
30
- */
31
-
1
+ import { s as StudioPluginToolSink } from "../chunk-BBEJwkd3.cjs";
2
+ import { a as StudioToolContext, c as StudioEntitlement, l as StudioViewer, m as StudioUrlSeam, oo as StudioToolOutputs, p as MirroredSearch, z as StudioCache } from "../chunk-mIaCX9EJ.cjs";
3
+ import { t as ToolBus } from "../chunk-Dp_ftNWY.cjs";
4
+ import { ResourceRef } from "@mountaya/client";
32
5
  /**
33
6
  * FakeStudioToolSink is a recording {@link StudioPluginToolSink}: it holds the tools a registry
34
7
  * registered, remembers every name taken back off it, and can be made to refuse one.
@@ -42,15 +15,15 @@ import '../saveFile-j-1kkApx.cjs';
42
15
  * one tool twice fails over this sink as it fails over a bus. A name taken back is free again.
43
16
  */
44
17
  interface FakeStudioToolSink extends StudioPluginToolSink {
45
- /** Refuses the named tool at `register`, throwing. Pass null to refuse nothing. */
46
- failOn: (name: string | null) => void;
47
- /** Every name `register` accepted, in order, minus the ones taken back. */
48
- readonly names: () => readonly string[];
49
- /** Every name `unregister` was called with, in order, whether or not it was there. */
50
- readonly unregistered: string[];
18
+ /** Refuses the named tool at `register`, throwing. Pass null to refuse nothing. */
19
+ failOn: (name: string | null) => void;
20
+ /** Every name `register` accepted, in order, minus the ones taken back. */
21
+ readonly names: () => readonly string[];
22
+ /** Every name `unregister` was called with, in order, whether or not it was there. */
23
+ readonly unregistered: string[];
51
24
  }
52
25
  /** fakeStudioToolSink builds a recording sink holding no tools. */
53
- declare const fakeStudioToolSink: () => FakeStudioToolSink;
26
+ export declare const fakeStudioToolSink: () => FakeStudioToolSink;
54
27
  /**
55
28
  * fakeStudioToolContext builds the minimal context a gate is evaluated against and a `run` is
56
29
  * handed.
@@ -69,25 +42,7 @@ declare const fakeStudioToolSink: () => FakeStudioToolSink;
69
42
  * the PERSON holds, and the second one answering "nothing" is what an unhydrated session looks
70
43
  * like. Use `fakeViewer` next door when the entitlements have to move during the test.
71
44
  */
72
- declare const fakeStudioToolContext: (overrides?: Partial<StudioToolContext>) => StudioToolContext;
73
-
74
- /**
75
- * The fixtures the studio handlers' own suites are built over.
76
- *
77
- * Every dispatch takes a {@link StudioToolContext}, and three of its seams have no honest
78
- * default: a viewer is a session, a cache is a host's query layer, and a bus is the thing under
79
- * test. This module supplies one double for each, so a suite arranges a context in a line
80
- * rather than hand-rolling a partial literal that drifts from the seam it stands for.
81
- *
82
- * Published from `@mountaya/studio/testing`, which is what the entry is for: a consumer writing a
83
- * test against a surface that takes a `StudioViewer` builds one in a line rather than out of the
84
- * interface by hand.
85
- *
86
- * Nothing here names a test runner. A fixture inside a published tarball may not import
87
- * `vitest`: the manifest cannot declare it, and the failure would be `publint` and `attw`
88
- * reporting an unresolvable specifier rather than a red suite.
89
- */
90
-
45
+ export declare const fakeStudioToolContext: (overrides?: Partial<StudioToolContext>) => StudioToolContext;
91
46
  /**
92
47
  * The recording {@link StudioCache} every handler suite runs against.
93
48
  *
@@ -105,29 +60,29 @@ declare const fakeStudioToolContext: (overrides?: Partial<StudioToolContext>) =>
105
60
  * against a double that lacks it.
106
61
  */
107
62
  interface FakeStudioCache extends StudioCache {
108
- /**
109
- * Removes the entry seeded or written under the resource, and records the resource in
110
- * {@link evicted}. Stated as required here, where the seam leaves it optional, so a suite calls
111
- * it with no guard.
112
- */
113
- evict: (key: ResourceRef) => void;
114
- /** Every resource `evict` was named with, in order. */
115
- readonly evicted: ResourceRef[];
116
- /**
117
- * Every resource `invalidate` was named with, flattened across calls, in order.
118
- *
119
- * A recorded LIST rather than a spy, because the assertion a suite wants to write is "this
120
- * dispatch made exactly these resources stale": one `toEqual` naming them, where a spy makes
121
- * it one `toHaveBeenCalledWith` per call plus a count nobody remembers to assert.
122
- */
123
- readonly invalidated: ResourceRef[];
124
- /** Every `(resource, value)` pair `set` was called with, in order. */
125
- readonly written: {
126
- key: ResourceRef;
127
- value: unknown;
128
- }[];
129
- /** Put a value where `get` will find it. */
130
- seed: (key: ResourceRef, value: unknown) => void;
63
+ /**
64
+ * Removes the entry seeded or written under the resource, and records the resource in
65
+ * {@link evicted}. Stated as required here, where the seam leaves it optional, so a suite calls
66
+ * it with no guard.
67
+ */
68
+ evict: (key: ResourceRef) => void;
69
+ /** Every resource `evict` was named with, in order. */
70
+ readonly evicted: ResourceRef[];
71
+ /**
72
+ * Every resource `invalidate` was named with, flattened across calls, in order.
73
+ *
74
+ * A recorded LIST rather than a spy, because the assertion a suite wants to write is "this
75
+ * dispatch made exactly these resources stale": one `toEqual` naming them, where a spy makes
76
+ * it one `toHaveBeenCalledWith` per call plus a count nobody remembers to assert.
77
+ */
78
+ readonly invalidated: ResourceRef[];
79
+ /** Every `(resource, value)` pair `set` was called with, in order. */
80
+ readonly written: {
81
+ key: ResourceRef;
82
+ value: unknown;
83
+ }[];
84
+ /** Put a value where `get` will find it. */
85
+ seed: (key: ResourceRef, value: unknown) => void;
131
86
  }
132
87
  /**
133
88
  * fakeStudioCache builds an empty recording {@link FakeStudioCache}.
@@ -144,7 +99,7 @@ interface FakeStudioCache extends StudioCache {
144
99
  * console.log(cache.invalidated);
145
100
  * ```
146
101
  */
147
- declare const fakeStudioCache: () => FakeStudioCache;
102
+ export declare const fakeStudioCache: () => FakeStudioCache;
148
103
  /**
149
104
  * FakeViewer is a {@link StudioViewer} a suite can move.
150
105
  *
@@ -158,12 +113,12 @@ declare const fakeStudioCache: () => FakeStudioCache;
158
113
  * surface reads, whatever a host derives it from.
159
114
  */
160
115
  interface FakeViewer extends StudioViewer {
161
- /** Replaces the held set, so `setEntitlements()` with nothing revokes everything. */
162
- setEntitlements: (...held: readonly StudioEntitlement[]) => void;
163
- /** Sets what `getItineraryLimit` answers in every scope; null states no limit. */
164
- setItineraryLimit: (limit: number | null) => void;
165
- /** Sets what `getUserId` answers; null is a viewer who is not signed in. */
166
- setUserId: (userId: string | null) => void;
116
+ /** Replaces the held set, so `setEntitlements()` with nothing revokes everything. */
117
+ setEntitlements: (...held: readonly StudioEntitlement[]) => void;
118
+ /** Sets what `getItineraryLimit` answers in every scope; null states no limit. */
119
+ setItineraryLimit: (limit: number | null) => void;
120
+ /** Sets what `getUserId` answers; null is a viewer who is not signed in. */
121
+ setUserId: (userId: string | null) => void;
167
122
  }
168
123
  /**
169
124
  * fakeViewer builds the viewer an unhydrated session presents: no user, no entitlement, no
@@ -176,7 +131,7 @@ interface FakeViewer extends StudioViewer {
176
131
  * Preferences MERGE rather than replace, matching the seam's contract: a partial write carries
177
132
  * only the fields it names, and the first one turns `getPreferences` from null into a record.
178
133
  */
179
- declare const fakeViewer: () => FakeViewer;
134
+ export declare const fakeViewer: () => FakeViewer;
180
135
  /**
181
136
  * FakeStudioBus is the bus a suite dispatches through, LOOSE in its tool set by default.
182
137
  *
@@ -216,7 +171,7 @@ type FakeStudioBus<TInputs extends object = Record<string, unknown>, TOutputs ex
216
171
  * is not checked, and a tool of your own registered on this bus is held to the `output` it
217
172
  * states.
218
173
  */
219
- declare const studioToolBus: () => FakeStudioBus;
174
+ export declare const studioToolBus: () => FakeStudioBus;
220
175
  /**
221
176
  * emptyStudioToolBus is the same bus with NOTHING registered, for a suite that wants the
222
177
  * smallest tool surface its subject needs.
@@ -228,21 +183,7 @@ declare const studioToolBus: () => FakeStudioBus;
228
183
  * It holds every answer to its tool's `output` schema, as {@link studioToolBus} does and for
229
184
  * the reason given there.
230
185
  */
231
- declare const emptyStudioToolBus: () => FakeStudioBus;
232
-
233
- /**
234
- * The URL seam a suite runs against: the mirrored slice held in memory, as a host's router holds
235
- * it in an address bar.
236
- *
237
- * A handler writes a patch and a surface reads the slice back, so a suite asserts both halves:
238
- * what was written, and what the URL holds once it was. A seam written out by hand at each site
239
- * states every member of {@link StudioUrlSeam} again, and a member added to the seam is then an
240
- * edit of every one of them.
241
- *
242
- * It names no test runner, for the reason the fixtures next door give: a module inside a
243
- * published tarball may not import one.
244
- */
245
-
186
+ export declare const emptyStudioToolBus: () => FakeStudioBus;
246
187
  /**
247
188
  * FakeStudioUrlSeam is a {@link StudioUrlSeam} that keeps the mirrored slice in memory and
248
189
  * records every write.
@@ -255,20 +196,20 @@ declare const emptyStudioToolBus: () => FakeStudioBus;
255
196
  * the fault of one that throws leaves no `write` and is surfaced on a microtask.
256
197
  */
257
198
  interface FakeStudioUrlSeam extends StudioUrlSeam {
258
- /**
259
- * The hash the last write carried, or `undefined` when it carried none and before any write.
260
- *
261
- * A write that carries no hash drops the one before it, as a router that does not observe the
262
- * map's own `#view` writes does.
263
- */
264
- readonly hash: () => string | undefined;
265
- /**
266
- * Every patch `write` was handed, in order and as handed, a key stated as `undefined` included.
267
- *
268
- * A recorded list and not a spy, so a suite states the writes of a dispatch in one `toEqual`
269
- * and an empty list says that nothing was mirrored.
270
- */
271
- readonly written: MirroredSearch[];
199
+ /**
200
+ * The hash the last write carried, or `undefined` when it carried none and before any write.
201
+ *
202
+ * A write that carries no hash drops the one before it, as a router that does not observe the
203
+ * map's own `#view` writes does.
204
+ */
205
+ readonly hash: () => string | undefined;
206
+ /**
207
+ * Every patch `write` was handed, in order and as handed, a key stated as `undefined` included.
208
+ *
209
+ * A recorded list and not a spy, so a suite states the writes of a dispatch in one `toEqual`
210
+ * and an empty list says that nothing was mirrored.
211
+ */
212
+ readonly written: MirroredSearch[];
272
213
  }
273
214
  /**
274
215
  * fakeStudioUrlSeam builds a recording URL seam over a slice held in memory.
@@ -300,7 +241,6 @@ interface FakeStudioUrlSeam extends StudioUrlSeam {
300
241
  * url.read(); // { creating: true }
301
242
  * ```
302
243
  */
303
- declare const fakeStudioUrlSeam: (initial?: MirroredSearch) => FakeStudioUrlSeam;
304
-
305
- export { emptyStudioToolBus, fakeStudioCache, fakeStudioToolContext, fakeStudioToolSink, fakeStudioUrlSeam, fakeViewer, studioToolBus };
244
+ export declare const fakeStudioUrlSeam: (initial?: MirroredSearch) => FakeStudioUrlSeam;
306
245
  export type { FakeStudioBus, FakeStudioCache, FakeStudioToolSink, FakeStudioUrlSeam, FakeViewer };
246
+ //# sourceMappingURL=index.d.cts.map
@@ -1,34 +1,7 @@
1
- import { StudioPluginToolSink } from '../plugins/index.js';
2
- import { StudioToolContext, StudioToolOutputs, StudioCache, StudioViewer, StudioEntitlement, StudioUrlSeam, MirroredSearch } from '../index.js';
3
- import { ResourceRef } from '@mountaya/client';
4
- import { ToolBus } from '../index.js';
5
- import 'zod';
6
- import '@mountaya/elements/camera';
7
- import '@mountaya/elements/map-client';
8
- import '@mountaya/elements/seams';
9
- import 'geojson';
10
- import '../types-BzJRV6UI.js';
11
- import 'zustand/vanilla';
12
- import '@mountaya/elements/data';
13
- import '../en-Bu4Ti9Ev.js';
14
- import '@mountaya/elements/errors';
15
- import '../saveFile-j-1kkApx.js';
16
-
17
- /**
18
- * The two doubles a plugin's own suite needs, and neither one is a plugin.
19
- *
20
- * A consumer writing a plugin has two things worth testing that they cannot reach with the
21
- * published API alone: whether their gate opens under the grants they expect, and whether their
22
- * tools land on a bus and come back off it. The first needs a {@link StudioToolContext}, whose
23
- * required members include two whole subsystems, and the second needs something that records
24
- * what a registry did to it.
25
- *
26
- * Here rather than under `@mountaya/studio/plugins`, because an `index.ts` is legal only where
27
- * `package.json#exports` names one: a `plugins/testing/` barrel would either be unreachable or
28
- * would put doubles on a production consumer's import path. The fixtures entry is where doubles
29
- * live, and it is already off every other barrel.
30
- */
31
-
1
+ import { s as StudioPluginToolSink } from "../chunk-cVXLsZfL.js";
2
+ import { a as StudioToolContext, c as StudioEntitlement, l as StudioViewer, m as StudioUrlSeam, oo as StudioToolOutputs, p as MirroredSearch, z as StudioCache } from "../chunk-BP4uy7E1.js";
3
+ import { t as ToolBus } from "../chunk-CQCJnT2i.js";
4
+ import { ResourceRef } from "@mountaya/client";
32
5
  /**
33
6
  * FakeStudioToolSink is a recording {@link StudioPluginToolSink}: it holds the tools a registry
34
7
  * registered, remembers every name taken back off it, and can be made to refuse one.
@@ -42,15 +15,15 @@ import '../saveFile-j-1kkApx.js';
42
15
  * one tool twice fails over this sink as it fails over a bus. A name taken back is free again.
43
16
  */
44
17
  interface FakeStudioToolSink extends StudioPluginToolSink {
45
- /** Refuses the named tool at `register`, throwing. Pass null to refuse nothing. */
46
- failOn: (name: string | null) => void;
47
- /** Every name `register` accepted, in order, minus the ones taken back. */
48
- readonly names: () => readonly string[];
49
- /** Every name `unregister` was called with, in order, whether or not it was there. */
50
- readonly unregistered: string[];
18
+ /** Refuses the named tool at `register`, throwing. Pass null to refuse nothing. */
19
+ failOn: (name: string | null) => void;
20
+ /** Every name `register` accepted, in order, minus the ones taken back. */
21
+ readonly names: () => readonly string[];
22
+ /** Every name `unregister` was called with, in order, whether or not it was there. */
23
+ readonly unregistered: string[];
51
24
  }
52
25
  /** fakeStudioToolSink builds a recording sink holding no tools. */
53
- declare const fakeStudioToolSink: () => FakeStudioToolSink;
26
+ export declare const fakeStudioToolSink: () => FakeStudioToolSink;
54
27
  /**
55
28
  * fakeStudioToolContext builds the minimal context a gate is evaluated against and a `run` is
56
29
  * handed.
@@ -69,25 +42,7 @@ declare const fakeStudioToolSink: () => FakeStudioToolSink;
69
42
  * the PERSON holds, and the second one answering "nothing" is what an unhydrated session looks
70
43
  * like. Use `fakeViewer` next door when the entitlements have to move during the test.
71
44
  */
72
- declare const fakeStudioToolContext: (overrides?: Partial<StudioToolContext>) => StudioToolContext;
73
-
74
- /**
75
- * The fixtures the studio handlers' own suites are built over.
76
- *
77
- * Every dispatch takes a {@link StudioToolContext}, and three of its seams have no honest
78
- * default: a viewer is a session, a cache is a host's query layer, and a bus is the thing under
79
- * test. This module supplies one double for each, so a suite arranges a context in a line
80
- * rather than hand-rolling a partial literal that drifts from the seam it stands for.
81
- *
82
- * Published from `@mountaya/studio/testing`, which is what the entry is for: a consumer writing a
83
- * test against a surface that takes a `StudioViewer` builds one in a line rather than out of the
84
- * interface by hand.
85
- *
86
- * Nothing here names a test runner. A fixture inside a published tarball may not import
87
- * `vitest`: the manifest cannot declare it, and the failure would be `publint` and `attw`
88
- * reporting an unresolvable specifier rather than a red suite.
89
- */
90
-
45
+ export declare const fakeStudioToolContext: (overrides?: Partial<StudioToolContext>) => StudioToolContext;
91
46
  /**
92
47
  * The recording {@link StudioCache} every handler suite runs against.
93
48
  *
@@ -105,29 +60,29 @@ declare const fakeStudioToolContext: (overrides?: Partial<StudioToolContext>) =>
105
60
  * against a double that lacks it.
106
61
  */
107
62
  interface FakeStudioCache extends StudioCache {
108
- /**
109
- * Removes the entry seeded or written under the resource, and records the resource in
110
- * {@link evicted}. Stated as required here, where the seam leaves it optional, so a suite calls
111
- * it with no guard.
112
- */
113
- evict: (key: ResourceRef) => void;
114
- /** Every resource `evict` was named with, in order. */
115
- readonly evicted: ResourceRef[];
116
- /**
117
- * Every resource `invalidate` was named with, flattened across calls, in order.
118
- *
119
- * A recorded LIST rather than a spy, because the assertion a suite wants to write is "this
120
- * dispatch made exactly these resources stale": one `toEqual` naming them, where a spy makes
121
- * it one `toHaveBeenCalledWith` per call plus a count nobody remembers to assert.
122
- */
123
- readonly invalidated: ResourceRef[];
124
- /** Every `(resource, value)` pair `set` was called with, in order. */
125
- readonly written: {
126
- key: ResourceRef;
127
- value: unknown;
128
- }[];
129
- /** Put a value where `get` will find it. */
130
- seed: (key: ResourceRef, value: unknown) => void;
63
+ /**
64
+ * Removes the entry seeded or written under the resource, and records the resource in
65
+ * {@link evicted}. Stated as required here, where the seam leaves it optional, so a suite calls
66
+ * it with no guard.
67
+ */
68
+ evict: (key: ResourceRef) => void;
69
+ /** Every resource `evict` was named with, in order. */
70
+ readonly evicted: ResourceRef[];
71
+ /**
72
+ * Every resource `invalidate` was named with, flattened across calls, in order.
73
+ *
74
+ * A recorded LIST rather than a spy, because the assertion a suite wants to write is "this
75
+ * dispatch made exactly these resources stale": one `toEqual` naming them, where a spy makes
76
+ * it one `toHaveBeenCalledWith` per call plus a count nobody remembers to assert.
77
+ */
78
+ readonly invalidated: ResourceRef[];
79
+ /** Every `(resource, value)` pair `set` was called with, in order. */
80
+ readonly written: {
81
+ key: ResourceRef;
82
+ value: unknown;
83
+ }[];
84
+ /** Put a value where `get` will find it. */
85
+ seed: (key: ResourceRef, value: unknown) => void;
131
86
  }
132
87
  /**
133
88
  * fakeStudioCache builds an empty recording {@link FakeStudioCache}.
@@ -144,7 +99,7 @@ interface FakeStudioCache extends StudioCache {
144
99
  * console.log(cache.invalidated);
145
100
  * ```
146
101
  */
147
- declare const fakeStudioCache: () => FakeStudioCache;
102
+ export declare const fakeStudioCache: () => FakeStudioCache;
148
103
  /**
149
104
  * FakeViewer is a {@link StudioViewer} a suite can move.
150
105
  *
@@ -158,12 +113,12 @@ declare const fakeStudioCache: () => FakeStudioCache;
158
113
  * surface reads, whatever a host derives it from.
159
114
  */
160
115
  interface FakeViewer extends StudioViewer {
161
- /** Replaces the held set, so `setEntitlements()` with nothing revokes everything. */
162
- setEntitlements: (...held: readonly StudioEntitlement[]) => void;
163
- /** Sets what `getItineraryLimit` answers in every scope; null states no limit. */
164
- setItineraryLimit: (limit: number | null) => void;
165
- /** Sets what `getUserId` answers; null is a viewer who is not signed in. */
166
- setUserId: (userId: string | null) => void;
116
+ /** Replaces the held set, so `setEntitlements()` with nothing revokes everything. */
117
+ setEntitlements: (...held: readonly StudioEntitlement[]) => void;
118
+ /** Sets what `getItineraryLimit` answers in every scope; null states no limit. */
119
+ setItineraryLimit: (limit: number | null) => void;
120
+ /** Sets what `getUserId` answers; null is a viewer who is not signed in. */
121
+ setUserId: (userId: string | null) => void;
167
122
  }
168
123
  /**
169
124
  * fakeViewer builds the viewer an unhydrated session presents: no user, no entitlement, no
@@ -176,7 +131,7 @@ interface FakeViewer extends StudioViewer {
176
131
  * Preferences MERGE rather than replace, matching the seam's contract: a partial write carries
177
132
  * only the fields it names, and the first one turns `getPreferences` from null into a record.
178
133
  */
179
- declare const fakeViewer: () => FakeViewer;
134
+ export declare const fakeViewer: () => FakeViewer;
180
135
  /**
181
136
  * FakeStudioBus is the bus a suite dispatches through, LOOSE in its tool set by default.
182
137
  *
@@ -216,7 +171,7 @@ type FakeStudioBus<TInputs extends object = Record<string, unknown>, TOutputs ex
216
171
  * is not checked, and a tool of your own registered on this bus is held to the `output` it
217
172
  * states.
218
173
  */
219
- declare const studioToolBus: () => FakeStudioBus;
174
+ export declare const studioToolBus: () => FakeStudioBus;
220
175
  /**
221
176
  * emptyStudioToolBus is the same bus with NOTHING registered, for a suite that wants the
222
177
  * smallest tool surface its subject needs.
@@ -228,21 +183,7 @@ declare const studioToolBus: () => FakeStudioBus;
228
183
  * It holds every answer to its tool's `output` schema, as {@link studioToolBus} does and for
229
184
  * the reason given there.
230
185
  */
231
- declare const emptyStudioToolBus: () => FakeStudioBus;
232
-
233
- /**
234
- * The URL seam a suite runs against: the mirrored slice held in memory, as a host's router holds
235
- * it in an address bar.
236
- *
237
- * A handler writes a patch and a surface reads the slice back, so a suite asserts both halves:
238
- * what was written, and what the URL holds once it was. A seam written out by hand at each site
239
- * states every member of {@link StudioUrlSeam} again, and a member added to the seam is then an
240
- * edit of every one of them.
241
- *
242
- * It names no test runner, for the reason the fixtures next door give: a module inside a
243
- * published tarball may not import one.
244
- */
245
-
186
+ export declare const emptyStudioToolBus: () => FakeStudioBus;
246
187
  /**
247
188
  * FakeStudioUrlSeam is a {@link StudioUrlSeam} that keeps the mirrored slice in memory and
248
189
  * records every write.
@@ -255,20 +196,20 @@ declare const emptyStudioToolBus: () => FakeStudioBus;
255
196
  * the fault of one that throws leaves no `write` and is surfaced on a microtask.
256
197
  */
257
198
  interface FakeStudioUrlSeam extends StudioUrlSeam {
258
- /**
259
- * The hash the last write carried, or `undefined` when it carried none and before any write.
260
- *
261
- * A write that carries no hash drops the one before it, as a router that does not observe the
262
- * map's own `#view` writes does.
263
- */
264
- readonly hash: () => string | undefined;
265
- /**
266
- * Every patch `write` was handed, in order and as handed, a key stated as `undefined` included.
267
- *
268
- * A recorded list and not a spy, so a suite states the writes of a dispatch in one `toEqual`
269
- * and an empty list says that nothing was mirrored.
270
- */
271
- readonly written: MirroredSearch[];
199
+ /**
200
+ * The hash the last write carried, or `undefined` when it carried none and before any write.
201
+ *
202
+ * A write that carries no hash drops the one before it, as a router that does not observe the
203
+ * map's own `#view` writes does.
204
+ */
205
+ readonly hash: () => string | undefined;
206
+ /**
207
+ * Every patch `write` was handed, in order and as handed, a key stated as `undefined` included.
208
+ *
209
+ * A recorded list and not a spy, so a suite states the writes of a dispatch in one `toEqual`
210
+ * and an empty list says that nothing was mirrored.
211
+ */
212
+ readonly written: MirroredSearch[];
272
213
  }
273
214
  /**
274
215
  * fakeStudioUrlSeam builds a recording URL seam over a slice held in memory.
@@ -300,7 +241,6 @@ interface FakeStudioUrlSeam extends StudioUrlSeam {
300
241
  * url.read(); // { creating: true }
301
242
  * ```
302
243
  */
303
- declare const fakeStudioUrlSeam: (initial?: MirroredSearch) => FakeStudioUrlSeam;
304
-
305
- export { emptyStudioToolBus, fakeStudioCache, fakeStudioToolContext, fakeStudioToolSink, fakeStudioUrlSeam, fakeViewer, studioToolBus };
244
+ export declare const fakeStudioUrlSeam: (initial?: MirroredSearch) => FakeStudioUrlSeam;
306
245
  export type { FakeStudioBus, FakeStudioCache, FakeStudioToolSink, FakeStudioUrlSeam, FakeViewer };
246
+ //# sourceMappingURL=index.d.ts.map