@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.
- package/CHANGELOG.md +30 -0
- package/dist/agent/index.cjs +2561 -2815
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +766 -786
- package/dist/agent/index.d.ts +766 -786
- package/dist/agent/index.js +2553 -2790
- package/dist/agent/index.js.map +1 -1
- package/dist/chunk-3Oi_Zrtm.js +9 -0
- package/dist/chunk-3Oi_Zrtm.js.map +1 -0
- package/dist/chunk-B18OPIu_.js +6 -0
- package/dist/chunk-B18OPIu_.js.map +1 -0
- package/dist/chunk-B5Uz3Qct.cjs +15 -0
- package/dist/chunk-B5Uz3Qct.cjs.map +1 -0
- package/dist/chunk-BBEJwkd3.d.cts +839 -0
- package/dist/chunk-BIEc_SkR.cjs +29 -0
- package/dist/chunk-BIEc_SkR.cjs.map +1 -0
- package/dist/chunk-BKMFOe-N.js +171 -0
- package/dist/chunk-BKMFOe-N.js.map +1 -0
- package/dist/chunk-BP4uy7E1.d.ts +11583 -0
- package/dist/chunk-BSHTsFiB.js +1403 -0
- package/dist/chunk-BSHTsFiB.js.map +1 -0
- package/dist/chunk-BTUUABGI.js +17 -0
- package/dist/chunk-BTUUABGI.js.map +1 -0
- package/dist/chunk-BaPiaz5X.cjs +115 -0
- package/dist/chunk-BaPiaz5X.cjs.map +1 -0
- package/dist/chunk-BeCVpkYr.cjs +542 -0
- package/dist/chunk-BeCVpkYr.cjs.map +1 -0
- package/dist/chunk-BgngsvK8.cjs +6202 -0
- package/dist/chunk-BgngsvK8.cjs.map +1 -0
- package/dist/chunk-BhInd7CJ.d.cts +253 -0
- package/dist/chunk-Bn6ZbxkS.cjs +27 -0
- package/dist/chunk-By9ZnkVI.js +60 -0
- package/dist/chunk-By9ZnkVI.js.map +1 -0
- package/dist/chunk-BzqPhxsz.cjs +367 -0
- package/dist/chunk-BzqPhxsz.cjs.map +1 -0
- package/dist/chunk-C2mMX81q.d.ts +443 -0
- package/dist/chunk-C2rr9Q0V.cjs +1402 -0
- package/dist/chunk-C2rr9Q0V.cjs.map +1 -0
- package/dist/{directorThreads-CqmvsV8b.d.cts → chunk-CDJCbwIQ.d.cts} +20 -22
- package/dist/chunk-CLGvBOVH.d.cts +1654 -0
- package/dist/chunk-COdw1dc6.d.ts +525 -0
- package/dist/chunk-CQCJnT2i.d.ts +511 -0
- package/dist/chunk-CSyHY67q.cjs +353 -0
- package/dist/chunk-CSyHY67q.cjs.map +1 -0
- package/dist/chunk-CiK1Iqrv.js +950 -0
- package/dist/chunk-CiK1Iqrv.js.map +1 -0
- package/dist/chunk-CmJBgSwZ.cjs +24 -0
- package/dist/chunk-CmJBgSwZ.cjs.map +1 -0
- package/dist/chunk-CnrsRK2u.cjs +83 -0
- package/dist/chunk-CnrsRK2u.cjs.map +1 -0
- package/dist/chunk-Co782_9r.js +326 -0
- package/dist/chunk-Co782_9r.js.map +1 -0
- package/dist/chunk-Csr3KDpZ.cjs +32 -0
- package/dist/chunk-Csr3KDpZ.cjs.map +1 -0
- package/dist/chunk-CwkmccXv.js +89 -0
- package/dist/chunk-CwkmccXv.js.map +1 -0
- package/dist/chunk-D0Q4iL9B.cjs +255 -0
- package/dist/chunk-D0Q4iL9B.cjs.map +1 -0
- package/dist/chunk-DFwiSzUS.cjs +72 -0
- package/dist/chunk-DFwiSzUS.cjs.map +1 -0
- package/dist/chunk-DIFayl2P.d.cts +443 -0
- package/dist/chunk-DIGF58ux.d.cts +525 -0
- package/dist/chunk-DKuuuld5.js +101 -0
- package/dist/chunk-DKuuuld5.js.map +1 -0
- package/dist/chunk-DMePkFEo.js +5054 -0
- package/dist/chunk-DMePkFEo.js.map +1 -0
- package/dist/chunk-DO5SIBgu.js +305 -0
- package/dist/chunk-DO5SIBgu.js.map +1 -0
- package/dist/chunk-DOQ_7eE5.d.ts +6662 -0
- package/dist/{tabs-B2nRO4p_.d.ts → chunk-DThaaNeb.d.cts} +2 -2
- package/dist/{tabs-B2nRO4p_.d.cts → chunk-DThaaNeb.d.ts} +2 -2
- package/dist/{directorThreads-CqmvsV8b.d.ts → chunk-DUQzjUJy.d.ts} +20 -22
- package/dist/chunk-DX37IPhV.cjs +1903 -0
- package/dist/chunk-DX37IPhV.cjs.map +1 -0
- package/dist/chunk-Damps5Tk.cjs +155 -0
- package/dist/chunk-Damps5Tk.cjs.map +1 -0
- package/dist/chunk-DbK5PhpJ.d.ts +1654 -0
- package/dist/chunk-De0vAASv.d.ts +253 -0
- package/dist/chunk-DhSZ7YZt.d.cts +6662 -0
- package/dist/chunk-DjEvqvPA.cjs +43 -0
- package/dist/chunk-DjEvqvPA.cjs.map +1 -0
- package/dist/{saveFile-j-1kkApx.d.cts → chunk-DkwDzwvu.d.cts} +7 -9
- package/dist/{saveFile-j-1kkApx.d.ts → chunk-DkwDzwvu.d.ts} +7 -9
- package/dist/chunk-Dmszv9If.js +71 -0
- package/dist/chunk-Dmszv9If.js.map +1 -0
- package/dist/chunk-Dp_ftNWY.d.cts +511 -0
- package/dist/chunk-DsHQySz0.js +31 -0
- package/dist/chunk-DsHQySz0.js.map +1 -0
- package/dist/chunk-DwoUyHHh.js +281 -0
- package/dist/chunk-DwoUyHHh.js.map +1 -0
- package/dist/chunk-IaIDQflj.d.cts +2315 -0
- package/dist/chunk-IaIDQflj.d.ts +2315 -0
- package/dist/chunk-cVXLsZfL.d.ts +839 -0
- package/dist/chunk-mIaCX9EJ.d.cts +11583 -0
- package/dist/chunk-nJQxbOwQ.cjs +8962 -0
- package/dist/chunk-nJQxbOwQ.cjs.map +1 -0
- package/dist/chunk-o9jaxhCO.js +8852 -0
- package/dist/chunk-o9jaxhCO.js.map +1 -0
- package/dist/chunk-p-Tt_Lwz.js +14 -0
- package/dist/chunk-p-Tt_Lwz.js.map +1 -0
- package/dist/engines/index.cjs +2046 -3401
- package/dist/engines/index.cjs.map +1 -1
- package/dist/engines/index.d.cts +1510 -1550
- package/dist/engines/index.d.ts +1510 -1550
- package/dist/engines/index.js +2039 -3380
- package/dist/engines/index.js.map +1 -1
- package/dist/handlers/index.cjs +47 -93
- package/dist/handlers/index.cjs.map +1 -1
- package/dist/handlers/index.d.cts +61 -103
- package/dist/handlers/index.d.ts +61 -103
- package/dist/handlers/index.js +27 -36
- package/dist/handlers/index.js.map +1 -1
- package/dist/index.cjs +3347 -4398
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7297
- package/dist/index.d.ts +8 -7297
- package/dist/index.js +2997 -3187
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.cjs +482 -949
- package/dist/plugins/index.cjs.map +1 -1
- package/dist/plugins/index.d.cts +44 -61
- package/dist/plugins/index.d.ts +44 -61
- package/dist/plugins/index.js +471 -915
- package/dist/plugins/index.js.map +1 -1
- package/dist/seams/index.cjs +77 -140
- package/dist/seams/index.cjs.map +1 -1
- package/dist/seams/index.d.cts +125 -158
- package/dist/seams/index.d.ts +125 -158
- package/dist/seams/index.js +41 -71
- package/dist/seams/index.js.map +1 -1
- package/dist/strings/fr/index.cjs +2130 -2116
- package/dist/strings/fr/index.cjs.map +1 -1
- package/dist/strings/fr/index.d.cts +3 -5
- package/dist/strings/fr/index.d.ts +3 -5
- package/dist/strings/fr/index.js +2125 -2114
- package/dist/strings/fr/index.js.map +1 -1
- package/dist/strings/index.cjs +2331 -2625
- package/dist/strings/index.cjs.map +1 -1
- package/dist/strings/index.d.cts +3 -731
- package/dist/strings/index.d.ts +3 -731
- package/dist/strings/index.js +2324 -2615
- package/dist/strings/index.js.map +1 -1
- package/dist/testing/index.cjs +214 -276
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +61 -121
- package/dist/testing/index.d.ts +61 -121
- package/dist/testing/index.js +208 -273
- package/dist/testing/index.js.map +1 -1
- package/dist/time/index.cjs +23 -23
- package/dist/time/index.cjs.map +1 -1
- package/dist/time/index.d.cts +5 -7
- package/dist/time/index.d.ts +5 -7
- package/dist/time/index.js +18 -21
- package/dist/time/index.js.map +1 -1
- package/package.json +14 -15
- package/src/agent/rules/stateDelta.ts +1 -0
- package/src/agent/stores/agentThreads.ts +1 -4
- package/src/bus/rules/bus.ts +1 -2
- package/src/bus/rules/defineRegistry.ts +3 -5
- package/src/bus/rules/types.ts +6 -7
- package/src/chrome/stores/uiStore.ts +4 -2
- package/src/embed/rules/fieldDependencies.ts +2 -0
- package/src/embed/rules/safetyRules.ts +2 -0
- package/src/embed/rules/tableCode.ts +4 -3
- package/src/index.ts +6 -27
- package/src/itinerary/rules/import.ts +6 -8
- package/src/plugins/contracts/plugin.ts +4 -2
- package/src/seams/rules/formatters.ts +5 -3
- package/src/testing/index.ts +1 -5
- package/src/viewer/rules/platformViewer.ts +1 -0
- package/dist/bus-BwiNiXdH.d.ts +0 -514
- package/dist/bus-DzmhPwdK.d.cts +0 -514
- package/dist/chainModel-B23pEP_1.d.cts +0 -127
- package/dist/chainModel-B23pEP_1.d.ts +0 -127
- package/dist/chunk-2HFY7ETU.js +0 -5721
- package/dist/chunk-2HFY7ETU.js.map +0 -1
- package/dist/chunk-355TOXSB.js +0 -72
- package/dist/chunk-355TOXSB.js.map +0 -1
- package/dist/chunk-4ZCUZVSV.js +0 -10275
- package/dist/chunk-4ZCUZVSV.js.map +0 -1
- package/dist/chunk-6HEKY3NF.js +0 -95
- package/dist/chunk-6HEKY3NF.js.map +0 -1
- package/dist/chunk-7GFLGGBX.cjs +0 -8
- package/dist/chunk-7GFLGGBX.cjs.map +0 -1
- package/dist/chunk-7NBRCENN.cjs +0 -19
- package/dist/chunk-7NBRCENN.cjs.map +0 -1
- package/dist/chunk-AF5GCXE3.js +0 -8
- package/dist/chunk-AF5GCXE3.js.map +0 -1
- package/dist/chunk-CJDIFRGZ.cjs +0 -2005
- package/dist/chunk-CJDIFRGZ.cjs.map +0 -1
- package/dist/chunk-CNPZY7N3.js +0 -349
- package/dist/chunk-CNPZY7N3.js.map +0 -1
- package/dist/chunk-DZJHTWSF.cjs +0 -45
- package/dist/chunk-DZJHTWSF.cjs.map +0 -1
- package/dist/chunk-EABIHHWA.js +0 -42
- package/dist/chunk-EABIHHWA.js.map +0 -1
- package/dist/chunk-EKZWV6RS.cjs +0 -415
- package/dist/chunk-EKZWV6RS.cjs.map +0 -1
- package/dist/chunk-EOKRXXAC.cjs +0 -24
- package/dist/chunk-EOKRXXAC.cjs.map +0 -1
- package/dist/chunk-F73W2ZTJ.js +0 -1126
- package/dist/chunk-F73W2ZTJ.js.map +0 -1
- package/dist/chunk-H4DVOZ5O.js +0 -1897
- package/dist/chunk-H4DVOZ5O.js.map +0 -1
- package/dist/chunk-HI52PBFT.cjs +0 -10314
- package/dist/chunk-HI52PBFT.cjs.map +0 -1
- package/dist/chunk-IDBXFBLG.cjs +0 -1225
- package/dist/chunk-IDBXFBLG.cjs.map +0 -1
- package/dist/chunk-LBWTJZUJ.js +0 -297
- package/dist/chunk-LBWTJZUJ.js.map +0 -1
- package/dist/chunk-NCLA6DKD.cjs +0 -310
- package/dist/chunk-NCLA6DKD.cjs.map +0 -1
- package/dist/chunk-O4MC5DPD.js +0 -19
- package/dist/chunk-O4MC5DPD.js.map +0 -1
- package/dist/chunk-OP37FKW6.cjs +0 -98
- package/dist/chunk-OP37FKW6.cjs.map +0 -1
- package/dist/chunk-OQSYFH3Z.cjs +0 -5945
- package/dist/chunk-OQSYFH3Z.cjs.map +0 -1
- package/dist/chunk-PACIO4NS.cjs +0 -26
- package/dist/chunk-PACIO4NS.cjs.map +0 -1
- package/dist/chunk-PSZ2R3TC.cjs +0 -75
- package/dist/chunk-PSZ2R3TC.cjs.map +0 -1
- package/dist/chunk-QFO5CZG2.cjs +0 -136
- package/dist/chunk-QFO5CZG2.cjs.map +0 -1
- package/dist/chunk-QL63MUEW.cjs +0 -140
- package/dist/chunk-QL63MUEW.cjs.map +0 -1
- package/dist/chunk-RFUPPVZO.js +0 -17
- package/dist/chunk-RFUPPVZO.js.map +0 -1
- package/dist/chunk-RPG2LWMP.js +0 -23
- package/dist/chunk-RPG2LWMP.js.map +0 -1
- package/dist/chunk-TIBXK6B7.cjs +0 -12
- package/dist/chunk-TIBXK6B7.cjs.map +0 -1
- package/dist/chunk-UU65VNEV.js +0 -381
- package/dist/chunk-UU65VNEV.js.map +0 -1
- package/dist/chunk-VGX6TR2I.js +0 -209
- package/dist/chunk-VGX6TR2I.js.map +0 -1
- package/dist/chunk-WUTDDBVP.js +0 -130
- package/dist/chunk-WUTDDBVP.js.map +0 -1
- package/dist/chunk-WVQQLKCI.cjs +0 -224
- package/dist/chunk-WVQQLKCI.cjs.map +0 -1
- package/dist/chunk-WZYXG3SE.js +0 -111
- package/dist/chunk-WZYXG3SE.js.map +0 -1
- package/dist/chunk-XDI2X3KE.js +0 -6
- package/dist/chunk-XDI2X3KE.js.map +0 -1
- package/dist/chunk-XKHLRIC7.cjs +0 -381
- package/dist/chunk-XKHLRIC7.cjs.map +0 -1
- package/dist/context-DNtd2WUv.d.cts +0 -11666
- package/dist/context-DgB72Bur.d.ts +0 -11666
- package/dist/en-Bu4Ti9Ev.d.cts +0 -2315
- package/dist/en-Bu4Ti9Ev.d.ts +0 -2315
- package/dist/shareLink-B6hlt942.d.ts +0 -144
- package/dist/shareLink-C7rIMb7x.d.ts +0 -527
- package/dist/shareLink-CnTxxXjp.d.cts +0 -144
- package/dist/shareLink-DyZVYH2V.d.cts +0 -527
- package/dist/studioPlugin-C3C7VjMy.d.ts +0 -847
- package/dist/studioPlugin-Cf3OBNUv.d.cts +0 -847
- package/dist/types-BzJRV6UI.d.cts +0 -845
- package/dist/types-BzJRV6UI.d.ts +0 -845
- package/dist/zoneForm-CdYNtnnA.d.cts +0 -320
- package/dist/zoneForm-mG85yt5e.d.ts +0 -320
package/dist/time/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { LngLat } from
|
|
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
|
-
|
|
20
|
-
|
|
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
|
package/dist/time/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { LngLat } from
|
|
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
|
-
|
|
20
|
-
|
|
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
|
package/dist/time/index.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
22
|
+
|
|
26
23
|
//# sourceMappingURL=index.js.map
|
package/dist/time/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/time/rules/sun.ts"],"
|
|
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.
|
|
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'
|
|
188
|
-
"dev": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096'
|
|
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": "
|
|
194
|
-
"test:watch": "
|
|
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.
|
|
199
|
+
"suncalc": "2.1.4",
|
|
200
200
|
"zod": "^4.6.7",
|
|
201
|
-
"zustand": "5.0
|
|
201
|
+
"zustand": "5.1.0"
|
|
202
202
|
},
|
|
203
203
|
"peerDependencies": {
|
|
204
|
-
"@mountaya/client": "0.
|
|
205
|
-
"@mountaya/elements": "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.
|
|
215
|
-
"@mountaya/elements": "0.
|
|
216
|
-
"@types/node": "26.6.
|
|
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.
|
|
222
|
-
"
|
|
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
|
|
package/src/bus/rules/bus.ts
CHANGED
|
@@ -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
|
-
|
|
24
|
-
|
|
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;
|
package/src/bus/rules/types.ts
CHANGED
|
@@ -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
|
-
//
|
|
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
|
-
//
|
|
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
|
-
|
|
440
|
-
|
|
441
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
`
|
|
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
|
-
(
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
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<
|
|
131
|
-
extends
|
|
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
|
|
61
|
-
*
|
|
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
|
-
|
|
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),
|
package/src/testing/index.ts
CHANGED
|
@@ -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
|
|