@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,5 +1,4 @@
1
- import { LngLat } from '@mountaya/elements/geo';
2
-
1
+ import { t as LngLat } from "../chunk-BhInd7CJ.cjs";
3
2
  /**
4
3
  * SolarPosition is where the sun stands, seen from a point on the ground at an instant.
5
4
  *
@@ -16,8 +15,8 @@ import { LngLat } from '@mountaya/elements/geo';
16
15
  * airless angle its definition names.
17
16
  */
18
17
  interface SolarPosition {
19
- altitude: number;
20
- azimuth: number;
18
+ altitude: number;
19
+ azimuth: number;
21
20
  }
22
21
  /**
23
22
  * solarPosition answers where the sun is, for a point and an instant.
@@ -37,7 +36,6 @@ interface SolarPosition {
37
36
  * @example
38
37
  * const { altitude, azimuth } = solarPosition(new Date("2026-06-21T11:30:00Z"), [6.87, 45.92]);
39
38
  */
40
- declare const solarPosition: (at: Date, [lng, lat]: LngLat) => SolarPosition;
41
-
42
- export { solarPosition };
39
+ export declare const solarPosition: (at: Date, [lng, lat]: LngLat) => SolarPosition;
43
40
  export type { SolarPosition };
41
+ //# sourceMappingURL=index.d.cts.map
@@ -1,5 +1,4 @@
1
- import { LngLat } from '@mountaya/elements/geo';
2
-
1
+ import { t as LngLat } from "../chunk-De0vAASv.js";
3
2
  /**
4
3
  * SolarPosition is where the sun stands, seen from a point on the ground at an instant.
5
4
  *
@@ -16,8 +15,8 @@ import { LngLat } from '@mountaya/elements/geo';
16
15
  * airless angle its definition names.
17
16
  */
18
17
  interface SolarPosition {
19
- altitude: number;
20
- azimuth: number;
18
+ altitude: number;
19
+ azimuth: number;
21
20
  }
22
21
  /**
23
22
  * solarPosition answers where the sun is, for a point and an instant.
@@ -37,7 +36,6 @@ interface SolarPosition {
37
36
  * @example
38
37
  * const { altitude, azimuth } = solarPosition(new Date("2026-06-21T11:30:00Z"), [6.87, 45.92]);
39
38
  */
40
- declare const solarPosition: (at: Date, [lng, lat]: LngLat) => SolarPosition;
41
-
42
- export { solarPosition };
39
+ export declare const solarPosition: (at: Date, [lng, lat]: LngLat) => SolarPosition;
43
40
  export type { SolarPosition };
41
+ //# sourceMappingURL=index.d.ts.map
@@ -1,26 +1,23 @@
1
- import { getPosition } from 'suncalc';
2
- import { RADIANS_TO_DEGREES, DEGREES_TO_RADIANS } from '@mountaya/elements/units';
3
-
4
- // src/time/rules/sun.ts
5
- var libraryRefraction = (h) => {
6
- const held = Math.max(h, 0);
7
- return 2967e-7 / Math.tan(held + 312536e-8 / (held + 0.08901179));
1
+ import { DEGREES_TO_RADIANS, RADIANS_TO_DEGREES } from "@mountaya/elements/units";
2
+ import { getPosition } from "suncalc";
3
+ const libraryRefraction = (h) => {
4
+ const held = Math.max(h, 0);
5
+ return 2967e-7 / Math.tan(held + .00312536 / (held + .08901179));
8
6
  };
9
- var airlessOf = (apparent) => {
10
- const atHorizon = libraryRefraction(0);
11
- if (!(apparent >= atHorizon)) return apparent - atHorizon;
12
- let airless = apparent - libraryRefraction(apparent);
13
- for (let step = 0; step < 8; step += 1) airless = apparent - libraryRefraction(airless);
14
- return airless;
7
+ const airlessOf = (apparent) => {
8
+ const atHorizon = libraryRefraction(0);
9
+ if (!(apparent >= atHorizon)) return apparent - atHorizon;
10
+ let airless = apparent - libraryRefraction(apparent);
11
+ for (let step = 0; step < 8; step += 1) airless = apparent - libraryRefraction(airless);
12
+ return airless;
15
13
  };
16
- var solarPosition = (at, [lng, lat]) => {
17
- const { altitude, azimuth } = getPosition(at, lat, lng);
18
- return {
19
- altitude: airlessOf(altitude * DEGREES_TO_RADIANS) * RADIANS_TO_DEGREES,
20
- azimuth
21
- };
14
+ const solarPosition = (at, [lng, lat]) => {
15
+ const { altitude, azimuth } = getPosition(at, lat, lng);
16
+ return {
17
+ altitude: airlessOf(altitude * DEGREES_TO_RADIANS) * RADIANS_TO_DEGREES,
18
+ azimuth
19
+ };
22
20
  };
23
-
24
21
  export { solarPosition };
25
- //# sourceMappingURL=index.js.map
22
+
26
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/time/rules/sun.ts"],"names":[],"mappings":";;;;AA2BA,IAAM,iBAAA,GAAoB,CAAC,CAAA,KAAsB;AAC/C,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,CAAC,CAAA;AAE1B,EAAA,OAAO,UAAU,IAAA,CAAK,GAAA,CAAI,IAAA,GAAO,SAAA,IAAc,OAAO,UAAA,CAAW,CAAA;AACnE,CAAA;AAUA,IAAM,SAAA,GAAY,CAAC,QAAA,KAA6B;AAC9C,EAAA,MAAM,SAAA,GAAY,kBAAkB,CAAC,CAAA;AAErC,EAAA,IAAI,EAAE,QAAA,IAAY,SAAA,CAAA,EAAY,OAAO,QAAA,GAAW,SAAA;AAEhD,EAAA,IAAI,OAAA,GAAU,QAAA,GAAW,iBAAA,CAAkB,QAAQ,CAAA;AACnD,EAAA,KAAA,IAAS,IAAA,GAAO,GAAG,IAAA,GAAO,CAAA,EAAG,QAAQ,CAAA,EAAG,OAAA,GAAU,QAAA,GAAW,iBAAA,CAAkB,OAAO,CAAA;AAEtF,EAAA,OAAO,OAAA;AACT,CAAA;AAoBO,IAAM,gBAAgB,CAAC,EAAA,EAAU,CAAC,GAAA,EAAK,GAAG,CAAA,KAA6B;AAC5E,EAAA,MAAM,EAAE,QAAA,EAAU,OAAA,KAAY,WAAA,CAAY,EAAA,EAAI,KAAK,GAAG,CAAA;AAEtD,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,SAAA,CAAU,QAAA,GAAW,kBAAkB,CAAA,GAAI,kBAAA;AAAA,IACrD;AAAA,GACF;AACF","file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/time/rules/sun.ts"],"mappings":";;AA2BA,MAAM,qBAAqB,MAAsB;CAC/C,MAAM,OAAO,KAAK,IAAI,GAAG,CAAC;CAE1B,OAAO,UAAU,KAAK,IAAI,OAAO,aAAc,OAAO,UAAW;AACnE;AAUA,MAAM,aAAa,aAA6B;CAC9C,MAAM,YAAY,kBAAkB,CAAC;CAErC,IAAI,EAAE,YAAY,YAAY,OAAO,WAAW;CAEhD,IAAI,UAAU,WAAW,kBAAkB,QAAQ;CACnD,KAAK,IAAI,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,WAAW,kBAAkB,OAAO;CAEtF,OAAO;AACT;AAoBA,MAAa,iBAAiB,IAAU,CAAC,KAAK,SAAgC;CAC5E,MAAM,EAAE,UAAU,YAAY,YAAY,IAAI,KAAK,GAAG;CAEtD,OAAO;EACL,UAAU,UAAU,WAAW,kBAAkB,IAAI;EACrD;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mountaya/studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "The Mountaya map studio's rules, contracts and stores: renderer-free, framework-free, never calls fetch.",
5
5
  "keywords": [
6
6
  "mountaya",
@@ -184,25 +184,25 @@
184
184
  ],
185
185
  "scripts": {
186
186
  "attw": "attw --pack .",
187
- "build": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' tsup",
188
- "dev": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' tsup --watch",
187
+ "build": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' vp pack",
188
+ "dev": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' vp pack --watch",
189
189
  "generate:readme": "node ../../scripts/generate-readme-exports.mjs && node ../../scripts/generate-readme-props.mjs",
190
190
  "lint": "npm run typecheck && node ../../scripts/generate-readme-exports.mjs --check && node ../../scripts/generate-readme-props.mjs --check && node ../../scripts/check-readme-snippets.mjs",
191
191
  "prepublishOnly": "npm run build && npm run publint && npm run attw",
192
192
  "publint": "publint",
193
- "test": "vitest run",
194
- "test:watch": "vitest",
193
+ "test": "vp test run",
194
+ "test:watch": "vp test watch",
195
195
  "typecheck": "node ../../scripts/typecheck.mjs"
196
196
  },
197
197
  "dependencies": {
198
198
  "@types/geojson": "7946.0.16",
199
- "suncalc": "2.1.1",
199
+ "suncalc": "2.1.4",
200
200
  "zod": "^4.6.7",
201
- "zustand": "5.0.15"
201
+ "zustand": "5.1.0"
202
202
  },
203
203
  "peerDependencies": {
204
- "@mountaya/client": "0.1.0",
205
- "@mountaya/elements": "0.1.0"
204
+ "@mountaya/client": "0.2.0",
205
+ "@mountaya/elements": "0.2.0"
206
206
  },
207
207
  "peerDependenciesMeta": {
208
208
  "@mountaya/client": {
@@ -211,15 +211,14 @@
211
211
  },
212
212
  "devDependencies": {
213
213
  "@arethetypeswrong/cli": "0.18.5",
214
- "@mountaya/client": "0.1.0",
215
- "@mountaya/elements": "0.1.0",
216
- "@types/node": "26.6.5",
214
+ "@mountaya/client": "0.2.0",
215
+ "@mountaya/elements": "0.2.0",
216
+ "@types/node": "26.6.11",
217
217
  "@typescript/typescript6": "6.0.2",
218
218
  "publint": "0.3.25",
219
- "tsup": "9.0.0",
220
219
  "typescript": "7.0.2",
221
- "vite": "8.3.4",
222
- "vitest": "5.0.5"
220
+ "vite": "npm:@voidzero-dev/vite-plus-core@8.3.8001",
221
+ "vite-plus": "1.8.0"
223
222
  },
224
223
  "publishConfig": {
225
224
  "access": "public"
@@ -6,6 +6,7 @@ import {
6
6
  type StudioStateFingerprint,
7
7
  } from "../../chrome/handlers/stateDelta.js";
8
8
  import type { StudioToolContext } from "../../viewer/rules/context.js";
9
+ // oxlint-disable-next-line no-unused-vars -- named by a {@link} below, which an editor follows.
9
10
  import type { AgentThreadsEngine } from "../engines/agentThreads.js";
10
11
 
11
12
  /**
@@ -27,10 +27,7 @@ import { SEARCH_TAB_ID } from "../../chrome/rules/tabs.js";
27
27
  // The role-structured entry shapes live in the shared agentChat conversation core
28
28
  // (the director store carries the identical turns), re-exported here so the
29
29
  // store's consumers keep one import site.
30
- export type {
31
- MessageEntry,
32
- TranscriptEntry,
33
- } from "@mountaya/elements/agent";
30
+ export type { MessageEntry, TranscriptEntry } from "@mountaya/elements/agent";
34
31
 
35
32
  export { SEARCH_TAB_ID };
36
33
 
@@ -351,8 +351,7 @@ export class ToolBus<
351
351
  TCtx extends ToolBusContext,
352
352
  TInputs extends object = ToolDispatchRegistry,
353
353
  TOutputs extends object = ToolOutputRegistry,
354
- > implements ToolBusDispatch<TCtx, TInputs, TOutputs>
355
- {
354
+ > implements ToolBusDispatch<TCtx, TInputs, TOutputs> {
356
355
  private readonly observers = new Set<ToolDispatchObserver>();
357
356
  private readonly tools = new Map<string, Tool<TCtx>>();
358
357
 
@@ -19,8 +19,6 @@
19
19
  * a registry module already imports every tool module: defining it beside either one would
20
20
  * close a dependency cycle.
21
21
  */
22
- export const defineRegistry = <T extends Record<string, { name: string }>>(
23
- registry: {
24
- [K in keyof T]: T[K] & { name: K };
25
- },
26
- ): T => registry;
22
+ export const defineRegistry = <T extends Record<string, { name: string }>>(registry: {
23
+ [K in keyof T]: T[K] & { name: K };
24
+ }): T => registry;
@@ -321,7 +321,7 @@ export interface ToolBusContext {
321
321
  * and the typed `dispatch` of a {@link ToolBusDispatch} left at this default takes no name, so
322
322
  * `dispatchUnsafe` is the entry point until the registry is augmented or the inputs are named.
323
323
  */
324
- // biome-ignore lint/suspicious/noEmptyInterface: the empty body is the augmentation seam: a host fills it via declaration merging, and an interface (not a type alias) is what `declare module` can merge into.
324
+ // oxlint-disable-next-line typescript/no-empty-interface -- the empty body is the augmentation seam: a host fills it via declaration merging, and an interface (not a type alias) is what `declare module` can merge into.
325
325
  export interface ToolDispatchRegistry {}
326
326
 
327
327
  /**
@@ -345,7 +345,7 @@ export type KnownToolInput<TName> = TName extends keyof ToolDispatchRegistry
345
345
  * answer's `data` as `unknown`, which is what a dispatch answers wherever this map does not hold
346
346
  * the name.
347
347
  */
348
- // biome-ignore lint/suspicious/noEmptyInterface: the empty body is the augmentation seam. A host fills it by declaration merging, and an interface (not a type alias) is what `declare module` can merge into.
348
+ // oxlint-disable-next-line typescript/no-empty-interface -- the empty body is the augmentation seam. A host fills it by declaration merging, and an interface (not a type alias) is what `declare module` can merge into.
349
349
  export interface ToolOutputRegistry {}
350
350
 
351
351
  /**
@@ -435,11 +435,10 @@ export type ToolResultOf<TOutputs, TName> = [TName] extends [never]
435
435
  ? ToolResult
436
436
  : string extends TName
437
437
  ? ToolResult
438
- :
439
- | ToolFailure
440
- | ToolSuccessByName<TOutputs>[[TName] extends [keyof TOutputs]
441
- ? TName & keyof TOutputs
442
- : typeof unstated];
438
+ : | ToolFailure
439
+ | ToolSuccessByName<TOutputs>[[TName] extends [keyof TOutputs]
440
+ ? TName & keyof TOutputs
441
+ : typeof unstated];
443
442
 
444
443
  /**
445
444
  * ToolBusDispatch is the structural slice of the bus a chained handler reaches for: the
@@ -167,7 +167,8 @@ import {
167
167
  * trustful, so {@link selectActiveEditEngine} is the one "an edit engine is running" predicate.
168
168
  */
169
169
  export interface UiState
170
- extends ChromeSliceState,
170
+ extends
171
+ ChromeSliceState,
171
172
  CollabSliceState,
172
173
  CollectionsSliceState,
173
174
  DirectionsSliceState,
@@ -199,7 +200,8 @@ export interface UiState
199
200
  * importing this store directly (the one-mutation-surface invariant).
200
201
  */
201
202
  export interface UiActions
202
- extends ActiveDraftSliceActions,
203
+ extends
204
+ ActiveDraftSliceActions,
203
205
  ChromeSliceActions,
204
206
  CollabSliceActions,
205
207
  CollectionsSliceActions,
@@ -76,12 +76,14 @@ export const fieldDependenciesUnmet = (
76
76
  * box that silently rechecks itself is a worse surprise than one the publisher sets again.
77
77
  */
78
78
  export const clampConfigToFieldDependencies = (config: EmbedConfig): EmbedConfig => {
79
+ /* oxlint-disable oxc/no-accumulating-spread -- a handful of keys, and each step answers a new config. */
79
80
  let next = config;
80
81
  for (const key of Object.keys(embedFieldDependencies).filter(isDependentFieldKey)) {
81
82
  if (next[key] && fieldDependenciesUnmet(key, next).length > 0) {
82
83
  next = { ...next, [key]: false };
83
84
  }
84
85
  }
86
+ /* oxlint-enable oxc/no-accumulating-spread */
85
87
 
86
88
  return next;
87
89
  };
@@ -202,12 +202,14 @@ export const clampConfigToSafetyRules = (
202
202
  return config;
203
203
  }
204
204
 
205
+ /* oxlint-disable oxc/no-accumulating-spread -- a handful of keys, and each step answers a new config. */
205
206
  let next = config;
206
207
  for (const key of Object.keys(gatedBooleanRules).filter(isGatedBooleanKey)) {
207
208
  if (isFieldRestricted(key, safetyRules) && next[key]) {
208
209
  next = { ...next, [key]: false };
209
210
  }
210
211
  }
212
+ /* oxlint-enable oxc/no-accumulating-spread */
211
213
 
212
214
  return next;
213
215
  };
@@ -174,6 +174,7 @@ export const buildEmbedTableCode = (input: BuildEmbedTableCodeInput): string =>
174
174
  const imports = [
175
175
  ...(filtered ? ['import { useState } from "react";', ""] : []),
176
176
  `import { Mountaya${requireSessionToken ? ", SessionTokenEngine" : ""} } from "@mountaya/client/browser";`,
177
+ ...(formatsInstants ? ['import { formatDate } from "@mountaya/elements/i18n";'] : []),
177
178
  ...(french ? ['import { frElementsStrings } from "@mountaya/elements/i18n/fr";'] : []),
178
179
  ...(imperial
179
180
  ? ['import { defaultUnits, type UnitFormatOptions } from "@mountaya/elements/profile";']
@@ -197,10 +198,10 @@ export const buildEmbedTableCode = (input: BuildEmbedTableCodeInput): string =>
197
198
 
198
199
  const formatter = formatsInstants
199
200
  ? [
200
- "// A cut-off is written in the visitor's own time zone: state `timeZone` to write it in",
201
- "// your event's instead.",
201
+ "// A cut-off is written in the visitor's own time zone, as the elements write their own",
202
+ "// dates: state `timeZone` to write it in your event's instead.",
202
203
  "const formatCutoffAt = (instant: Date): string =>",
203
- ` new Intl.DateTimeFormat(${codeString(input.language)}, { dateStyle: "medium", timeStyle: "short" }).format(instant);`,
204
+ ` formatDate(${codeString(input.language)}, instant, { dateStyle: "medium", timeStyle: "short" }) ?? "";`,
204
205
  "",
205
206
  ]
206
207
  : [];
package/src/index.ts CHANGED
@@ -410,11 +410,7 @@ export {
410
410
  buildEmbedTableCode,
411
411
  EMBED_TABLE_INSTALL_COMMAND,
412
412
  } from "./embed/rules/tableCode.js";
413
- export {
414
- type EmbedSliceActions,
415
- type EmbedSliceState,
416
- selectEmbed,
417
- } from "./embed/stores/embed.js";
413
+ export { type EmbedSliceActions, type EmbedSliceState, selectEmbed } from "./embed/stores/embed.js";
418
414
  export {
419
415
  type EmbedContent,
420
416
  type EmbedContentSliceActions,
@@ -560,10 +556,7 @@ export {
560
556
  type ZoneClickTarget,
561
557
  zoneClickTarget,
562
558
  } from "./map/rules/clickTargets.js";
563
- export type {
564
- StudioCameraConstraints,
565
- StudioConstraintResolver,
566
- } from "./map/rules/constraints.js";
559
+ export type { StudioCameraConstraints, StudioConstraintResolver } from "./map/rules/constraints.js";
567
560
  export {
568
561
  type ContextMenuReadoutKey,
569
562
  type ContextMenuReadoutRow,
@@ -589,10 +582,7 @@ export {
589
582
  ZONE_TIME_REFERENCE_INTERVAL_MS,
590
583
  zoneTimeReferenceSeconds,
591
584
  } from "./map/rules/mapProjection.js";
592
- export {
593
- type OverlaySampleResult,
594
- overlaySampleResultSchema,
595
- } from "./map/rules/terrainReading.js";
585
+ export { type OverlaySampleResult, overlaySampleResultSchema } from "./map/rules/terrainReading.js";
596
586
  export type {
597
587
  Activity,
598
588
  ActivityCapabilities,
@@ -821,11 +811,7 @@ export {
821
811
  type SocialShareTargetId,
822
812
  } from "./share/rules/targets.js";
823
813
  export { buildShareViewConfig } from "./share/rules/viewConfig.js";
824
- export {
825
- type ShareSliceActions,
826
- type ShareSliceState,
827
- selectShare,
828
- } from "./share/stores/share.js";
814
+ export { type ShareSliceActions, type ShareSliceState, selectShare } from "./share/stores/share.js";
829
815
  export {
830
816
  cameraBearingModeSchema,
831
817
  cameraFpsSchema,
@@ -939,11 +925,7 @@ export {
939
925
  type StudioWriteRefusal,
940
926
  type StudioWriteResource,
941
927
  } from "./viewer/rules/scope.js";
942
- export {
943
- inertStudioUrlSeam,
944
- type MirroredSearch,
945
- type StudioUrlSeam,
946
- } from "./viewer/rules/url.js";
928
+ export { inertStudioUrlSeam, type MirroredSearch, type StudioUrlSeam } from "./viewer/rules/url.js";
947
929
  export {
948
930
  createMemoryViewer,
949
931
  createStaticViewer,
@@ -976,10 +958,7 @@ export {
976
958
  patchFromDraft,
977
959
  type WaypointDetailsDraft,
978
960
  } from "./waypoints/rules/detailsDraft.js";
979
- export {
980
- previewWaypoint,
981
- type WaypointPreviewFields,
982
- } from "./waypoints/rules/detailsPreview.js";
961
+ export { previewWaypoint, type WaypointPreviewFields } from "./waypoints/rules/detailsPreview.js";
983
962
  export {
984
963
  type WaypointDetailsForm,
985
964
  type WaypointDetailsRefusal,
@@ -744,14 +744,12 @@ export const freehandCandidateOfRoute = (routed: ImportCandidate): ImportCandida
744
744
  return { ...routed, geojson: buildGeometryCollection(lines), mode: "linestring" };
745
745
  }
746
746
 
747
- const fitted = lines.map(
748
- (line, at): LineString => ({
749
- coordinates: (kept[at] ?? [])
750
- .map((index) => line.coordinates[index])
751
- .filter((position): position is Position => position !== undefined),
752
- type: "LineString",
753
- }),
754
- );
747
+ const fitted = lines.map((line, at): LineString => ({
748
+ coordinates: (kept[at] ?? [])
749
+ .map((index) => line.coordinates[index])
750
+ .filter((position): position is Position => position !== undefined),
751
+ type: "LineString",
752
+ }));
755
753
 
756
754
  return {
757
755
  ...routed,
@@ -127,8 +127,10 @@ export type StudioPluginContribution<TView = never> = {
127
127
  * on it, so two plugins picking the same number render in the order they were installed and in
128
128
  * that order every time.
129
129
  */
130
- export interface StudioSlotEntry<TSlot extends StudioPluginSlot, TView = never>
131
- extends StudioSlotContribution<TSlot, TView> {
130
+ export interface StudioSlotEntry<
131
+ TSlot extends StudioPluginSlot,
132
+ TView = never,
133
+ > extends StudioSlotContribution<TSlot, TView> {
132
134
  readonly pluginId: string;
133
135
  readonly qualifiedId: string;
134
136
  readonly sequence: number;
@@ -21,6 +21,7 @@
21
21
  * decimal mark beside the comma that parts two coordinates is ambiguous.
22
22
  */
23
23
 
24
+ import { formatDate } from "@mountaya/elements/i18n";
24
25
  import { dateTimeFormat, numberFormat, relativeTimeFormat } from "@mountaya/elements/profile";
25
26
  import { MILLISECONDS_PER_SECOND, SECONDS_PER_MINUTE } from "@mountaya/elements/units";
26
27
 
@@ -57,8 +58,9 @@ export interface StudioFormatters {
57
58
  readonly formatClock: (durationMs: number) => string;
58
59
  /**
59
60
  * An instant, as a date and a time, in the Gregorian calendar whatever calendar the locale
60
- * keeps. A `Date` that holds no instant, and options naming a time zone the runtime's zone data
61
- * does not hold, read as the empty string.
61
+ * keeps, and in the language's typography: in French, the first of a month is "1er" and the
62
+ * date never breaks across two lines. A `Date` that holds no instant, and options naming a time
63
+ * zone the runtime's zone data does not hold, read as the empty string.
62
64
  *
63
65
  * @default options `{ dateStyle: "medium", timeStyle: "short" }`
64
66
  */
@@ -200,7 +202,7 @@ export const createIntlFormatters = (locale: string): StudioFormatters => ({
200
202
  ).format(seconds)}`;
201
203
  },
202
204
  formatDateTime: (value, options = { dateStyle: "medium", timeStyle: "short" }) =>
203
- Number.isNaN(value.getTime()) ? "" : (dateTimeFormat(locale, options)?.format(value) ?? ""),
205
+ formatDate(locale, value, options) ?? "",
204
206
  formatNumber: (value, options = {}) => numberFormat(locale, options).format(value),
205
207
  formatPercent: (value, options = percentOptions) =>
206
208
  numberFormat(locale, { ...options, style: "percent" }).format(value),
@@ -17,11 +17,7 @@
17
17
  * dependency graph.
18
18
  */
19
19
 
20
- export {
21
- type FakeStudioToolSink,
22
- fakeStudioToolContext,
23
- fakeStudioToolSink,
24
- } from "./plugins.js";
20
+ export { type FakeStudioToolSink, fakeStudioToolContext, fakeStudioToolSink } from "./plugins.js";
25
21
  export {
26
22
  emptyStudioToolBus,
27
23
  type FakeStudioBus,
@@ -9,6 +9,7 @@
9
9
  * number the answer states.
10
10
  */
11
11
 
12
+ // oxlint-disable-next-line no-unused-vars -- named by a {@link} below, which an editor follows.
12
13
  import { defaultStudioScope, type StudioScopeSeam } from "./scope.js";
13
14
  import type { StudioEntitlement, StudioViewer } from "./viewer.js";
14
15