@synnaxlabs/x 0.36.0 → 0.38.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/.turbo/turbo-build.log +41 -37
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/box-BZ6d2d5A.cjs +1 -0
- package/dist/box-Cto-5Uxu.js +201 -0
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/external-C-dNgNQw.cjs +1 -0
- package/dist/external-Cax-LfQW.cjs +1 -0
- package/dist/external-DqPrWKvU.js +47 -0
- package/dist/external-vFGUdZf6.js +30 -0
- package/dist/index-BG3Scw3G.cjs +1 -0
- package/dist/{index-HQonyH7n.js → index-BVC_8Cg9.js} +1 -1
- package/dist/index-BfDeGfej.js +41 -0
- package/dist/{index-CYxQwEdX.cjs → index-CnclyYpG.cjs} +1 -1
- package/dist/index-D4NCYiQB.js +19 -0
- package/dist/index-Dd8DLyMx.cjs +1 -0
- package/dist/{index-BBa2mWG1.js → index-OHIRoCei.js} +1 -1
- package/dist/index-udOjA9d-.cjs +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +126 -124
- package/dist/kv.cjs +1 -1
- package/dist/kv.js +2 -2
- package/dist/link.cjs +1 -0
- package/dist/link.js +10 -0
- package/dist/{location-DLP2ZS0o.cjs → location-BIet4Mig.cjs} +1 -1
- package/dist/{location-Cn1ByVTZ.js → location-C5Ot4MVG.js} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/position-CvSNZkSD.cjs +1 -0
- package/dist/position-GeF1oEYk.js +85 -0
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{scale-BI4wJF3b.cjs → scale-BTgf0Mr-.cjs} +1 -1
- package/dist/{scale-rZ1YKDFy.js → scale-Dh1UNRoC.js} +3 -3
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-BMhEEJZL.cjs +11 -0
- package/dist/{series-CnEQe1dh.js → series-DxDIugLj.js} +296 -286
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +5 -5
- package/dist/src/breaker/breaker.d.ts +1 -1
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts +12 -6
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/kv/external.d.ts +3 -0
- package/dist/src/kv/external.d.ts.map +1 -0
- package/dist/src/kv/index.d.ts +1 -1
- package/dist/src/kv/index.d.ts.map +1 -1
- package/dist/src/kv/mock.d.ts +24 -0
- package/dist/src/kv/mock.d.ts.map +1 -0
- package/dist/src/kv/mock.spec.d.ts +2 -0
- package/dist/src/kv/mock.spec.d.ts.map +1 -0
- package/dist/src/kv/types.d.ts +18 -18
- package/dist/src/kv/types.d.ts.map +1 -1
- package/dist/src/link/index.d.ts +2 -0
- package/dist/src/link/index.d.ts.map +1 -0
- package/dist/src/link/link.d.ts +2 -0
- package/dist/src/link/link.d.ts.map +1 -0
- package/dist/src/link/link.spec.d.ts +2 -0
- package/dist/src/link/link.spec.d.ts.map +1 -0
- package/dist/src/runtime/os.d.ts +1 -1
- package/dist/src/runtime/os.d.ts.map +1 -1
- package/dist/src/sleep/sleep.d.ts.map +1 -1
- package/dist/src/telem/index.d.ts +1 -1
- package/dist/src/telem/index.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +1 -0
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +2 -0
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/unique/index.d.ts +2 -0
- package/dist/src/unique/index.d.ts.map +1 -0
- package/dist/src/unique/unique.d.ts +42 -0
- package/dist/src/unique/unique.d.ts.map +1 -0
- package/dist/src/unique/unique.spec.d.ts +2 -0
- package/dist/src/unique/unique.spec.d.ts.map +1 -0
- package/dist/src/zodutil/index.d.ts.map +1 -1
- package/dist/src/zodutil/zodutil.d.ts +1 -16
- package/dist/src/zodutil/zodutil.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/unique.cjs +1 -1
- package/dist/unique.js +2 -2
- package/dist/url.cjs +1 -1
- package/dist/url.js +5 -5
- package/dist/{xy-LADI2wVU.cjs → xy-Budz-qz-.cjs} +1 -1
- package/dist/{xy-DQdccWlc.js → xy-DxjPL2DZ.js} +4 -4
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zodutil-BfrF8jE3.js +23 -0
- package/dist/zodutil-DFJyyQd2.cjs +1 -0
- package/dist/zodutil.cjs +1 -1
- package/dist/zodutil.js +1 -1
- package/package.json +8 -10
- package/src/breaker/breaker.spec.ts +3 -4
- package/src/breaker/breaker.ts +3 -2
- package/src/caseconv/caseconv.spec.ts +20 -20
- package/src/caseconv/caseconv.ts +34 -5
- package/src/compare/compare.ts +2 -2
- package/src/deep/path.ts +1 -1
- package/src/index.ts +2 -1
- package/src/{unique.ts → kv/external.ts} +2 -1
- package/src/kv/index.ts +1 -1
- package/src/kv/mock.spec.ts +101 -0
- package/src/kv/mock.ts +58 -0
- package/src/kv/types.ts +22 -28
- package/src/link/index.ts +10 -0
- package/src/link/link.spec.ts +68 -0
- package/src/link/link.ts +21 -0
- package/src/runtime/os.ts +18 -2
- package/src/sleep/sleep.ts +1 -1
- package/src/telem/index.ts +1 -1
- package/src/telem/series.spec.ts +21 -0
- package/src/telem/series.ts +15 -9
- package/src/telem/telem.ts +34 -10
- package/src/unique/index.ts +10 -0
- package/src/unique/unique.spec.ts +192 -0
- package/src/unique/unique.ts +67 -0
- package/src/zodutil/index.ts +1 -1
- package/src/zodutil/zodutil.ts +1 -29
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +6 -8
- package/dist/box-BpSX4si6.cjs +0 -1
- package/dist/box-CYXc9-qp.js +0 -201
- package/dist/external-B3XSLDq5.cjs +0 -1
- package/dist/external-sVtvYJS6.js +0 -23
- package/dist/index-YsO0EMN8.cjs +0 -1
- package/dist/index-eue4dSQX.js +0 -45
- package/dist/index-h-QAL9T1.cjs +0 -1
- package/dist/position-DJXB-pDS.js +0 -85
- package/dist/position-JCN6-sJC.cjs +0 -1
- package/dist/series-BN9CILsQ.cjs +0 -11
- package/dist/src/unique.d.ts +0 -2
- package/dist/src/unique.d.ts.map +0 -1
- package/dist/types-BpAJW2TM.js +0 -11
- package/dist/types-zRwnQ1hc.cjs +0 -1
- package/dist/zodutil-BRjUdYAv.cjs +0 -1
- package/dist/zodutil-DI4gVZkT.js +0 -27
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var x=Object.defineProperty;var _=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var
|
|
1
|
+
"use strict";var x=Object.defineProperty;var _=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var p=(e,t,r)=>_(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index-CnclyYpG.cjs"),u=require("zod"),i=require("./series-BMhEEJZL.cjs"),N=require("./index-Dd8DLyMx.cjs"),L=require("./change-C-YELKx6.cjs"),k=require("./scale-BTgf0Mr-.cjs"),l=require("./index-BG3Scw3G.cjs"),A=require("./debounce.cjs"),P=require("./deep.cjs"),C=require("./identity.cjs"),Z=require("./external-C-dNgNQw.cjs"),D=require("./link.cjs"),w=require("./bounds-8aFLdbEj.cjs"),G=require("./observe.cjs"),$=require("./record.cjs"),V=require("./external-Cax-LfQW.cjs"),W=require("./search.cjs"),H=require("./box-BZ6d2d5A.cjs"),I=require("./dimensions-zMcb9pMk.cjs"),Q=require("./direction-D7qoo_GJ.cjs"),U=require("./location-BIet4Mig.cjs"),B=require("./position-CvSNZkSD.cjs"),F=require("./spatial-BOhaO8xN.cjs"),J=require("./xy-Budz-qz-.cjs"),z=require("./toArray.cjs"),K=require("./index-udOjA9d-.cjs"),j=require("./url.cjs"),E=require("./worker.cjs"),X=require("./zodutil-DFJyyQd2.cjs"),Y=async e=>await new Promise(t=>setTimeout(t,i.TimeSpan.fromMilliseconds(e).milliseconds)),ee=u.z.object({interval:i.TimeSpan.z.optional(),maxRetries:u.z.number().optional(),scale:u.z.number().optional()}),re=(e={})=>{const t=e.sleepFn||Y,r=e.maxRetries??5,o=e.scale??1;let s=0,d=new i.TimeSpan(e.interval??i.TimeSpan.milliseconds(1));return async()=>s>=r?!1:(await t(d),d=d.mult(o),s++,!0)},te=Object.freeze(Object.defineProperty({__proto__:null,breakerConfig:ee,create:re},Symbol.toStringTag,{value:"Module"})),m=class m extends Number{};p(m,"Absolute",255),p(m,"Default",1),p(m,"z",u.z.union([u.z.instanceof(m),u.z.number().int().min(0).max(255).transform(t=>new m(t)),u.z.instanceof(Number).transform(t=>new m(t))]));let h=m;const M=u.z.object({name:u.z.string(),key:u.z.string()}),ne=e=>u.z.object({subject:M,resource:e,authority:h.z}),oe=(...e)=>t=>t.filter(r=>{let o=!1;return r.to!=null&&(o=e.includes(r.to.resource)),r.from!=null&&!o&&(o=e.includes(r.from.resource)),o}),ie=Object.freeze(Object.defineProperty({__proto__:null,Authority:h,filterTransfersByChannelKey:oe,stateZ:ne,subjectZ:M},Symbol.toStringTag,{value:"Module"})),g=class g extends Error{constructor(){super(g.MESSAGE)}matches(t){return typeof t=="string"?t.includes(g.MESSAGE):t instanceof g||t.message.includes(g.MESSAGE)}};p(g,"MESSAGE","canceled");let v=g;const se=new v,ce=Object.freeze(Object.defineProperty({__proto__:null,CANCELED:se},Symbol.toStringTag,{value:"Module"})),ae=e=>e?-1:1,q=u.z.string().regex(/^\d+\.\d+\.\d+$/),S=(e,t,r={})=>{r.checkMajor??(r.checkMajor=!0),r.checkMinor??(r.checkMinor=!0),r.checkPatch??(r.checkPatch=!0);const o=q.parse(e),s=q.parse(t),[d,f,b]=o.split(".").map(Number),[c,n,a]=s.split(".").map(Number);if(r.checkMajor){if(d<c)return l.LESS_THAN;if(d>c)return l.GREATER_THAN}if(r.checkMinor){if(f<n)return l.LESS_THAN;if(f>n)return l.GREATER_THAN}if(r.checkPatch){if(b<a)return l.LESS_THAN;if(b>a)return l.GREATER_THAN}return l.EQUAL},le=(e,t,r={})=>l.isEqualTo(S(e,t,r)),R=(e,t,r={})=>l.isGreaterThan(S(e,t,r)),ue=(e,t,r={})=>l.isLessThan(S(e,t,r)),de=({name:e,migrate:t})=>r=>{try{const o=t(r);return console.log(`${e} migrated: ${r.version} -> ${o.version}`),o}catch(o){throw console.log(`${e} failed to migrate from ${r.version}`),console.error(o),o}},me=({name:e,migrations:t,targetSchema:r,defaultVersion:o,def:s})=>{const d=Object.keys(t).sort(S).pop();if(d==null)return n=>{if(n.version??(n.version=o),n.version!==s.version)return console.log(`${e} version ${n.version} is newer than latest version of ${s.version}.
|
|
2
2
|
Returning default instead.
|
|
3
|
-
`),s;try{return r!=null?r.parse(n):n}catch(a){return console.log(`${e} failed to parse default. Exiting with default`),console.error(a),s}};const f=Object.keys(t).length;let
|
|
3
|
+
`),s;try{return r!=null?r.parse(n):n}catch(a){return console.log(`${e} failed to parse default. Exiting with default`),console.error(a),s}};const f=Object.keys(t).length;let b=!1;const c=n=>{try{if(f===0||R(n.version,d))return console.log(b?`${e} ${n.version} now up to date`:`${e} version ${n.version} is up to date with target version ${s.version}`),n;const a=n.version,y=t[a],T=y(n);return b=!0,c(T)}catch(a){return console.log(`${e} failed to migrate from ${n.version} to ${d}`),console.error(a),s}};return n=>{try{if(n.version==null)if(o!=null)console.log(`${e} version is null. Setting version to default of ${o}`),n.version=o;else return console.log(`${e} version is null and no default version set. Exiting with default`),s;return c(n)}catch(a){return console.log(`${e} failed to parse final result. Exiting with default`),console.error(a),s}}},fe=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:S,createMigration:de,migrator:me,semVerNewer:R,semVerOlder:ue,semVerZ:q,versionsEqual:le},Symbol.toStringTag,{value:"Module"})),ge=e=>{if(e===void 0||typeof e=="string"||typeof e=="number")return e;if(e.toString===void 0)throw new Error("invalid renderer");return e.toString()},be=e=>Array.isArray(e)?[...e]:typeof e=="object"&&e!==null?{...e}:e,pe=(e,t="")=>{const r=e.length;return r===0?t:r===1?e[0]:r===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[r-1]}`},Se=e=>{const t=e.split(" "),r=new Set,o=t.map(c=>c.charAt(0).toLowerCase()).join("");r.add(o),r.add(o.replace(/(.)(.)/g,"$1_$2"));const s=/\d+/g;e.match(s)&&t.forEach((c,n)=>{if(s.test(c)){const a=t.map((y,T)=>T!==n?y.charAt(0).toLowerCase():y).join("");r.add(a),r.add(a.replace(/(.)(.)/g,"$1_$2"))}});const f=t.map(c=>(c.length>3?c.substring(0,3):c).toLowerCase());return r.add(f.join("")),r.add(f.join("_")),Array.from(r).filter(c=>c.length>=2&&c.length<=12)},ye=Object.freeze(Object.defineProperty({__proto__:null,generateShortIdentifiers:Se,naturalLanguageJoin:pe},Symbol.toStringTag,{value:"Module"}));exports.binary=O.encoder;exports.DataType=i.DataType;exports.Density=i.Density;exports.MultiSeries=i.MultiSeries;exports.Rate=i.Rate;exports.Series=i.Series;exports.Size=i.Size;exports.TimeRange=i.TimeRange;exports.TimeSpan=i.TimeSpan;exports.TimeStamp=i.TimeStamp;exports.addSamples=i.addSamples;exports.convertDataType=i.convertDataType;exports.id=i.id;exports.isCrudeSeries=i.isCrudeSeries;exports.isTelemValue=i.isTelemValue;exports.sortTimeRange=i.sortTimeRange;exports.typedArrayZ=i.typedArrayZ;exports.caseconv=N.caseconv;exports.change=L.change;exports.clamp=k.clamp;exports.scale=k.scale;exports.compare=l.compare;exports.isStringer=l.isStringer;exports.primitiveIsZero=l.primitiveIsZero;exports.debounce=A.debounce;exports.throttle=A.throttle;exports.deep=P.deep;exports.isObject=C.isObject;exports.kv=Z.external;exports.link=D.link;exports.bounds=w.bounds;exports.math=w.math;exports.observe=G.observe;exports.getEntries=$.getEntries;exports.mapValues=$.mapValues;exports.unknownRecordZ=$.unknownRecordZ;exports.runtime=V.external;exports.Search=W.Search;exports.box=H.box;exports.dimensions=I.dimensions;exports.direction=Q.direction;exports.location=U.location;exports.position=B.position;exports.spatial=F.spatial;exports.xy=J.xy;exports.nullToArr=z.nullToArr;exports.toArray=z.toArray;exports.unique=K.unique;exports.URL=j.URL;exports.buildQueryString=j.buildQueryString;exports.RoutedWorker=E.RoutedWorker;exports.TypedWorker=E.TypedWorker;exports.createMockWorkers=E.createMockWorkers;exports.zodutil=X.zodutil;exports.breaker=te;exports.control=ie;exports.convertRenderV=ge;exports.errors=ce;exports.invert=ae;exports.migrate=fe;exports.shallowCopy=be;exports.strings=ye;
|
package/dist/index.js
CHANGED
|
@@ -1,37 +1,52 @@
|
|
|
1
1
|
var M = Object.defineProperty;
|
|
2
2
|
var T = (e, t, r) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var p = (e, t, r) => T(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { e as ne } from "./index-
|
|
5
|
-
import { a as ie } from "./index-eue4dSQX.js";
|
|
6
|
-
import { c as ce } from "./change-DLl6DccR.js";
|
|
7
|
-
import { c as ue, s as fe } from "./scale-rZ1YKDFy.js";
|
|
8
|
-
import { L as S, G as v, E as k, i as A, a as _, b as O } from "./index-HQonyH7n.js";
|
|
9
|
-
import { c as de, d as pe, p as ge } from "./index-HQonyH7n.js";
|
|
4
|
+
import { e as ne } from "./index-OHIRoCei.js";
|
|
10
5
|
import { z as c } from "zod";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { b as x } from "./series-DxDIugLj.js";
|
|
7
|
+
import { d as ie, D as ae, M as ce, R as le, S as ue, e as fe, c as me, T as de, a as pe, g as ge, h as be, i as xe, f as he, s as ye, t as Se } from "./series-DxDIugLj.js";
|
|
8
|
+
import { a as ve } from "./index-BfDeGfej.js";
|
|
9
|
+
import { c as je } from "./change-DLl6DccR.js";
|
|
10
|
+
import { c as Me, s as Te } from "./scale-Dh1UNRoC.js";
|
|
11
|
+
import { L as S, G as $, E as k, i as A, a as _, b as O } from "./index-BVC_8Cg9.js";
|
|
12
|
+
import { c as Ae, d as _e, p as Oe } from "./index-BVC_8Cg9.js";
|
|
13
|
+
import { debounce as ze, throttle as Le } from "./debounce.js";
|
|
14
|
+
import { deep as Pe } from "./deep.js";
|
|
15
15
|
import { isObject as Ge } from "./identity.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { d as sr } from "./
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
|
|
16
|
+
import { e as Ze } from "./external-DqPrWKvU.js";
|
|
17
|
+
import { link as Ie } from "./link.js";
|
|
18
|
+
import { b as qe, f as Be } from "./bounds-BtccGJW0.js";
|
|
19
|
+
import { observe as He } from "./observe.js";
|
|
20
|
+
import { getEntries as Ue, mapValues as Je, unknownRecordZ as Ke } from "./record.js";
|
|
21
|
+
import { e as Ye } from "./external-vFGUdZf6.js";
|
|
22
|
+
import { Search as rr } from "./search.js";
|
|
23
|
+
import { b as or } from "./box-Cto-5Uxu.js";
|
|
24
|
+
import { d as sr } from "./dimensions-D-1PnJVI.js";
|
|
25
|
+
import { d as ar } from "./direction-CScbfCdT.js";
|
|
26
|
+
import { l as lr } from "./location-C5Ot4MVG.js";
|
|
27
|
+
import { p as fr } from "./position-GeF1oEYk.js";
|
|
28
|
+
import { s as dr } from "./spatial-DozyssiN.js";
|
|
29
|
+
import { x as gr } from "./xy-DxjPL2DZ.js";
|
|
30
|
+
import { nullToArr as xr, toArray as hr } from "./toArray.js";
|
|
31
|
+
import { u as Sr } from "./index-D4NCYiQB.js";
|
|
32
|
+
import { URL as vr, buildQueryString as Er } from "./url.js";
|
|
33
|
+
import { RoutedWorker as wr, TypedWorker as Mr, createMockWorkers as Tr } from "./worker.js";
|
|
34
|
+
import { z as Ar } from "./zodutil-BfrF8jE3.js";
|
|
35
|
+
const R = async (e) => await new Promise(
|
|
36
|
+
(t) => setTimeout(t, x.fromMilliseconds(e).milliseconds)
|
|
37
|
+
), z = c.object({
|
|
38
|
+
interval: x.z.optional(),
|
|
39
|
+
maxRetries: c.number().optional(),
|
|
40
|
+
scale: c.number().optional()
|
|
41
|
+
}), L = (e = {}) => {
|
|
42
|
+
const t = e.sleepFn || R, r = e.maxRetries ?? 5, n = e.scale ?? 1;
|
|
43
|
+
let s = 0, l = new x(e.interval ?? x.milliseconds(1));
|
|
44
|
+
return async () => s >= r ? !1 : (await t(l), l = l.mult(n), s++, !0);
|
|
45
|
+
}, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
46
|
+
__proto__: null,
|
|
47
|
+
breakerConfig: z,
|
|
48
|
+
create: L
|
|
49
|
+
}, Symbol.toStringTag, { value: "Module" })), u = class u extends Number {
|
|
35
50
|
};
|
|
36
51
|
p(u, "Absolute", 255), p(u, "Default", 1), p(u, "z", c.union([
|
|
37
52
|
c.instanceof(u),
|
|
@@ -42,18 +57,18 @@ let h = u;
|
|
|
42
57
|
const j = c.object({
|
|
43
58
|
name: c.string(),
|
|
44
59
|
key: c.string()
|
|
45
|
-
}),
|
|
60
|
+
}), N = (e) => c.object({
|
|
46
61
|
subject: j,
|
|
47
62
|
resource: e,
|
|
48
63
|
authority: h.z
|
|
49
|
-
}),
|
|
64
|
+
}), P = (...e) => (t) => t.filter((r) => {
|
|
50
65
|
let n = !1;
|
|
51
66
|
return r.to != null && (n = e.includes(r.to.resource)), r.from != null && !n && (n = e.includes(r.from.resource)), n;
|
|
52
|
-
}),
|
|
67
|
+
}), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
53
68
|
__proto__: null,
|
|
54
69
|
Authority: h,
|
|
55
|
-
filterTransfersByChannelKey:
|
|
56
|
-
stateZ:
|
|
70
|
+
filterTransfersByChannelKey: P,
|
|
71
|
+
stateZ: N,
|
|
57
72
|
subjectZ: j
|
|
58
73
|
}, Symbol.toStringTag, { value: "Module" })), m = class m extends Error {
|
|
59
74
|
constructor() {
|
|
@@ -65,27 +80,27 @@ const j = c.object({
|
|
|
65
80
|
}
|
|
66
81
|
};
|
|
67
82
|
p(m, "MESSAGE", "canceled");
|
|
68
|
-
let
|
|
69
|
-
const
|
|
83
|
+
let v = m;
|
|
84
|
+
const C = new v(), J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
70
85
|
__proto__: null,
|
|
71
|
-
CANCELED:
|
|
72
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
86
|
+
CANCELED: C
|
|
87
|
+
}, Symbol.toStringTag, { value: "Module" })), K = (e) => e ? -1 : 1, E = c.string().regex(/^\d+\.\d+\.\d+$/), g = (e, t, r = {}) => {
|
|
73
88
|
r.checkMajor ?? (r.checkMajor = !0), r.checkMinor ?? (r.checkMinor = !0), r.checkPatch ?? (r.checkPatch = !0);
|
|
74
89
|
const n = E.parse(e), s = E.parse(t), [l, f, d] = n.split(".").map(Number), [i, o, a] = s.split(".").map(Number);
|
|
75
90
|
if (r.checkMajor) {
|
|
76
91
|
if (l < i) return S;
|
|
77
|
-
if (l > i) return
|
|
92
|
+
if (l > i) return $;
|
|
78
93
|
}
|
|
79
94
|
if (r.checkMinor) {
|
|
80
95
|
if (f < o) return S;
|
|
81
|
-
if (f > o) return
|
|
96
|
+
if (f > o) return $;
|
|
82
97
|
}
|
|
83
98
|
if (r.checkPatch) {
|
|
84
99
|
if (d < a) return S;
|
|
85
|
-
if (d > a) return
|
|
100
|
+
if (d > a) return $;
|
|
86
101
|
}
|
|
87
102
|
return k;
|
|
88
|
-
},
|
|
103
|
+
}, G = (e, t, r = {}) => A(g(e, t, r)), w = (e, t, r = {}) => _(g(e, t, r)), D = (e, t, r = {}) => O(g(e, t, r)), Z = ({
|
|
89
104
|
name: e,
|
|
90
105
|
migrate: t
|
|
91
106
|
}) => (r) => {
|
|
@@ -95,7 +110,7 @@ const L = new $(), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
95
110
|
} catch (n) {
|
|
96
111
|
throw console.log(`${e} failed to migrate from ${r.version}`), console.error(n), n;
|
|
97
112
|
}
|
|
98
|
-
},
|
|
113
|
+
}, V = ({
|
|
99
114
|
name: e,
|
|
100
115
|
migrations: t,
|
|
101
116
|
targetSchema: r,
|
|
@@ -147,24 +162,24 @@ const L = new $(), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
147
162
|
return console.log(`${e} failed to parse final result. Exiting with default`), console.error(a), s;
|
|
148
163
|
}
|
|
149
164
|
};
|
|
150
|
-
},
|
|
165
|
+
}, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151
166
|
__proto__: null,
|
|
152
167
|
compareSemVer: g,
|
|
153
|
-
createMigration:
|
|
154
|
-
migrator:
|
|
168
|
+
createMigration: Z,
|
|
169
|
+
migrator: V,
|
|
155
170
|
semVerNewer: w,
|
|
156
|
-
semVerOlder:
|
|
171
|
+
semVerOlder: D,
|
|
157
172
|
semVerZ: E,
|
|
158
|
-
versionsEqual:
|
|
159
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
173
|
+
versionsEqual: G
|
|
174
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = (e) => {
|
|
160
175
|
if (e === void 0 || typeof e == "string" || typeof e == "number")
|
|
161
176
|
return e;
|
|
162
177
|
if (e.toString === void 0) throw new Error("invalid renderer");
|
|
163
178
|
return e.toString();
|
|
164
|
-
},
|
|
179
|
+
}, ee = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, I = (e, t = "") => {
|
|
165
180
|
const r = e.length;
|
|
166
181
|
return r === 0 ? t : r === 1 ? e[0] : r === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[r - 1]}`;
|
|
167
|
-
},
|
|
182
|
+
}, W = (e) => {
|
|
168
183
|
const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((i) => i.charAt(0).toLowerCase()).join("");
|
|
169
184
|
r.add(n), r.add(n.replace(/(.)(.)/g, "$1_$2"));
|
|
170
185
|
const s = /\d+/g;
|
|
@@ -180,85 +195,72 @@ const L = new $(), U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
180
195
|
return r.add(f.join("")), r.add(f.join("_")), Array.from(r).filter(
|
|
181
196
|
(i) => i.length >= 2 && i.length <= 12
|
|
182
197
|
);
|
|
183
|
-
}, ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
184
|
-
__proto__: null,
|
|
185
|
-
generateShortIdentifiers: Z,
|
|
186
|
-
naturalLanguageJoin: D
|
|
187
|
-
}, Symbol.toStringTag, { value: "Module" })), V = async (e) => await new Promise(
|
|
188
|
-
(t) => setTimeout(t, x.fromMilliseconds(e).milliseconds)
|
|
189
|
-
), I = c.object({
|
|
190
|
-
interval: x.z.optional(),
|
|
191
|
-
maxRetries: c.number().optional(),
|
|
192
|
-
scale: c.number().optional()
|
|
193
|
-
}), W = (e = {}) => {
|
|
194
|
-
const t = e.sleepFn || V, r = e.maxRetries ?? 5, n = e.scale ?? 1;
|
|
195
|
-
let s = 0, l = new x(e.interval ?? x.milliseconds(1));
|
|
196
|
-
return async () => s >= r ? !1 : (await t(l), l = l.mult(n), s++, !0);
|
|
197
198
|
}, re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
198
199
|
__proto__: null,
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
generateShortIdentifiers: W,
|
|
201
|
+
naturalLanguageJoin: I
|
|
201
202
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
202
203
|
export {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
ie as DataType,
|
|
205
|
+
ae as Density,
|
|
206
|
+
ce as MultiSeries,
|
|
207
|
+
le as Rate,
|
|
208
|
+
wr as RoutedWorker,
|
|
209
|
+
rr as Search,
|
|
210
|
+
ue as Series,
|
|
211
|
+
fe as Size,
|
|
212
|
+
me as TimeRange,
|
|
212
213
|
x as TimeSpan,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
de as TimeStamp,
|
|
215
|
+
Mr as TypedWorker,
|
|
216
|
+
vr as URL,
|
|
217
|
+
pe as addSamples,
|
|
217
218
|
ne as binary,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
219
|
+
qe as bounds,
|
|
220
|
+
or as box,
|
|
221
|
+
Q as breaker,
|
|
222
|
+
Er as buildQueryString,
|
|
223
|
+
ve as caseconv,
|
|
224
|
+
je as change,
|
|
225
|
+
Me as clamp,
|
|
226
|
+
Ae as compare,
|
|
227
|
+
U as control,
|
|
228
|
+
ge as convertDataType,
|
|
229
|
+
Y as convertRenderV,
|
|
230
|
+
Tr as createMockWorkers,
|
|
231
|
+
ze as debounce,
|
|
232
|
+
Pe as deep,
|
|
233
|
+
sr as dimensions,
|
|
234
|
+
ar as direction,
|
|
235
|
+
J as errors,
|
|
236
|
+
Ue as getEntries,
|
|
237
|
+
be as id,
|
|
238
|
+
K as invert,
|
|
239
|
+
xe as isCrudeSeries,
|
|
239
240
|
Ge as isObject,
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
_e as isStringer,
|
|
242
|
+
he as isTelemValue,
|
|
242
243
|
Ze as kv,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
244
|
+
Ie as link,
|
|
245
|
+
lr as location,
|
|
246
|
+
Je as mapValues,
|
|
247
|
+
Be as math,
|
|
248
|
+
X as migrate,
|
|
249
|
+
xr as nullToArr,
|
|
250
|
+
He as observe,
|
|
251
|
+
fr as position,
|
|
252
|
+
Oe as primitiveIsZero,
|
|
253
|
+
Ye as runtime,
|
|
254
|
+
Te as scale,
|
|
255
|
+
ee as shallowCopy,
|
|
256
|
+
ye as sortTimeRange,
|
|
257
|
+
dr as spatial,
|
|
258
|
+
re as strings,
|
|
259
|
+
Le as throttle,
|
|
260
|
+
hr as toArray,
|
|
261
|
+
Se as typedArrayZ,
|
|
262
|
+
Sr as unique,
|
|
263
|
+
Ke as unknownRecordZ,
|
|
264
|
+
gr as xy,
|
|
265
|
+
Ar as zodutil
|
|
264
266
|
};
|
package/dist/kv.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-C-dNgNQw.cjs");exports.kv=e.external;
|
package/dist/kv.js
CHANGED
package/dist/link.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=new RegExp("^(https?:\\/\\/)?((([a-zA-Z0-9][a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,})|localhost|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-zA-Z0-9@:%._\\+~#=]*)*(\\?[;&a-zA-Z0-9%_.,~+=-]*)?(#[-a-zA-Z0-9_]*)?$"),o=e=>t.test(e),l=Object.freeze(Object.defineProperty({__proto__:null,is:o},Symbol.toStringTag,{value:"Module"}));exports.link=l;
|
package/dist/link.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const t = new RegExp(
|
|
2
|
+
"^(https?:\\/\\/)?((([a-zA-Z0-9][a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,})|localhost|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-zA-Z0-9@:%._\\+~#=]*)*(\\?[;&a-zA-Z0-9%_.,~+=-]*)?(#[-a-zA-Z0-9_]*)?$"
|
|
3
|
+
// fragment identifier (optional)
|
|
4
|
+
), o = (e) => t.test(e), a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
|
+
__proto__: null,
|
|
6
|
+
is: o
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
8
|
+
export {
|
|
9
|
+
a as link
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("zod"),I=require("./index-
|
|
1
|
+
"use strict";const u=require("zod"),I=require("./index-Dd8DLyMx.cjs"),o=require("./base-B48bPNx5.cjs"),R=o.xLocation,g=o.yLocation,h=o.centerLocation,d={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},m={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},A=o.crudeLocation,s=t=>t instanceof String||!o.DIRECTIONS.includes(t)?t:t==="x"?"left":"top",_=t=>d[s(t)],M=t=>m[s(t)],i=t=>{const n=s(t);return n==="top"||n==="bottom"?"y":"x"},E=u.z.object({x:o.xLocation.or(o.centerLocation),y:o.yLocation.or(o.centerLocation)}),l=u.z.object({x:o.xLocation,y:o.yLocation}),O=Object.freeze({x:"left",y:"top"}),f=Object.freeze({x:"right",y:"top"}),x=Object.freeze({x:"left",y:"bottom"}),a=Object.freeze({x:"right",y:"bottom"}),T=Object.freeze({x:"center",y:"center"}),b=Object.freeze({x:"center",y:"top"}),L=Object.freeze({x:"center",y:"bottom"}),p=Object.freeze({x:"right",y:"center"}),C=Object.freeze({x:"left",y:"center"}),N=Object.freeze([C,p,b,L,O,f,x,a,T]),j=(t,n)=>t.x===n.x&&t.y===n.y,S=(t,n)=>{if(typeof n=="object"){let e=!0;return"x"in n&&(t.x===n.x||(e=!1)),"y"in n&&(t.y===n.y||(e=!1)),e}return t.x===n||t.y===n},z=t=>[t.x,t.y],y=t=>i(s(t))==="x",P=t=>i(s(t))==="y",X=t=>`${t.x}${I.capitalize(t.y)}`,Y=(t,n)=>{let e,c;if(typeof t=="object"&&"x"in t?(e=t.x,c=t.y):(e=s(t),c=s(n??t)),i(e)===i(c)&&e!=="center"&&c!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${c.toString()}`);const r={...T};return e==="center"?y(c)?[r.x,r.y]=[c,e]:[r.x,r.y]=[e,c]:c==="center"?y(e)?[r.x,r.y]=[e,c]:[r.x,r.y]=[c,e]:y(e)?[r.x,r.y]=[e,c]:[r.x,r.y]=[c,e],r},w=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:L,BOTTOM_LEFT:x,BOTTOM_RIGHT:a,CENTER:T,CENTER_LOCATIONS:o.CENTER_LOCATIONS,LEFT_CENTER:C,RIGHT_CENTER:p,TOP_CENTER:b,TOP_LEFT:O,TOP_RIGHT:f,XY_LOCATIONS:N,X_LOCATIONS:o.X_LOCATIONS,Y_LOCATIONS:o.Y_LOCATIONS,center:h,construct:s,constructXY:Y,corner:l,crude:A,direction:i,isX:y,isY:P,location:o.location,outer:o.outerLocation,rotate90:M,swap:_,x:R,xy:E,xyCouple:z,xyEquals:j,xyMatches:S,xyToString:X,y:g},Symbol.toStringTag,{value:"Module"}));exports.BOTTOM_LEFT=x;exports.BOTTOM_RIGHT=a;exports.CENTER=T;exports.TOP_LEFT=O;exports.TOP_RIGHT=f;exports.XY_LOCATIONS=N;exports.corner=l;exports.location=w;exports.swap=_;exports.xy=E;exports.xyCouple=z;exports.xyEquals=j;exports.xyMatches=S;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as O } from "zod";
|
|
2
|
-
import { c as m } from "./index-
|
|
2
|
+
import { c as m } from "./index-BfDeGfej.js";
|
|
3
3
|
import { e as a, f, y, g, D as C, C as z, X as L, Y as h, l as S, h as d } from "./base-DnZzEvvz.js";
|
|
4
4
|
const N = a, R = y, I = f, X = {
|
|
5
5
|
top: "bottom",
|
package/dist/location.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./location-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./location-BIet4Mig.cjs");exports.location=o.location;
|
package/dist/location.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("./box-BZ6d2d5A.cjs"),T=require("./direction-D7qoo_GJ.cjs"),n=require("./location-BIet4Mig.cjs"),b=require("./base-B48bPNx5.cjs"),P=t=>{if(t==null)return{x:void 0,y:void 0};const r=n.xy.safeParse(t);if(r.success)return r.data;const e=b.location.safeParse(t);return e.success?T.construct(e.data)==="x"?{x:e.data,y:void 0}:{x:void 0,y:e.data}:t},N=({container:t,target:r,dialog:e,initial:u,prefer:a,alignments:f=["start"],disable:x=[]})=>{const i=P(u);let l=n.XY_LOCATIONS;if(a!=null){const o=a.map(s=>P(s));l=l.slice().sort((s,p)=>{const d=o.findIndex(g=>n.xyMatches(s,g)),h=o.findIndex(g=>n.xyMatches(p,g));return d>-1&&h>-1?d-h:d>-1?-1:h>-1?1:0})}const O=l.filter(o=>!n.xyEquals(o,n.CENTER)&&(i.x==null||o.x===i.x)&&(i.y==null||o.y===i.y)&&!x.some(s=>n.xyMatches(o,s))).map(o=>f==null?void 0:f.map(s=>[o,s])).flat(),A=c.construct(t),M=c.construct(r),_=c.construct(e);let E=-1/0;const y={location:n.CENTER,adjustedDialog:_};return O.forEach(([o,s])=>{const[p,d]=I({option:o,alignment:s,container:A,target:M,dialog:_});d>E&&(E=d,y.location=o,y.adjustedDialog=p)}),y},I=({option:t,alignment:r,container:e,target:u,dialog:a})=>{const f=L(t,r),x=c.xyLoc(u,t),i=c.constructWithAlternateRoot(x.x,x.y,c.width(a),c.height(a),f,n.TOP_LEFT),l=c.area(c.intersection(i,e));return[i,l]},j={start:"left",center:"center",end:"right"},q={start:"bottom",center:"center",end:"top"},L=(t,r)=>{const e={x:"center",y:"center"};if(t.y!=="center"){e.y=n.swap(t.y);const u=t.x==="left"?n.swap:a=>a;e.x=u(j[r])}else e.x=n.swap(t.x),e.y=q[r];return e},w=Object.freeze(Object.defineProperty({__proto__:null,dialog:N,getRoot:L,parseLocationOptions:P},Symbol.toStringTag,{value:"Module"}));exports.position=w;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { c as g, x as I, a as M, h as N, w as X, d as j, i as w } from "./box-Cto-5Uxu.js";
|
|
2
|
+
import { c as B } from "./direction-CScbfCdT.js";
|
|
3
|
+
import { x as C, a as h, b as R, C as O, T as S, s as m, X as Y } from "./location-C5Ot4MVG.js";
|
|
4
|
+
import { l as v } from "./base-DnZzEvvz.js";
|
|
5
|
+
const P = (t) => {
|
|
6
|
+
if (t == null) return { x: void 0, y: void 0 };
|
|
7
|
+
const o = C.safeParse(t);
|
|
8
|
+
if (o.success) return o.data;
|
|
9
|
+
const e = v.safeParse(t);
|
|
10
|
+
return e.success ? B(e.data) === "x" ? { x: e.data, y: void 0 } : { x: void 0, y: e.data } : t;
|
|
11
|
+
}, D = ({
|
|
12
|
+
container: t,
|
|
13
|
+
target: o,
|
|
14
|
+
dialog: e,
|
|
15
|
+
initial: c,
|
|
16
|
+
prefer: a,
|
|
17
|
+
alignments: d = ["start"],
|
|
18
|
+
disable: f = []
|
|
19
|
+
}) => {
|
|
20
|
+
const n = P(c);
|
|
21
|
+
let u = Y;
|
|
22
|
+
if (a != null) {
|
|
23
|
+
const s = a.map((r) => P(r));
|
|
24
|
+
u = u.slice().sort((r, x) => {
|
|
25
|
+
const i = s.findIndex((y) => h(r, y)), p = s.findIndex((y) => h(x, y));
|
|
26
|
+
return i > -1 && p > -1 ? i - p : i > -1 ? -1 : p > -1 ? 1 : 0;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const T = u.filter(
|
|
30
|
+
(s) => !R(s, O) && (n.x == null || s.x === n.x) && (n.y == null || s.y === n.y) && !f.some((r) => h(s, r))
|
|
31
|
+
).map((s) => d == null ? void 0 : d.map((r) => [s, r])).flat(), E = g(t), b = g(o), _ = g(e);
|
|
32
|
+
let L = -1 / 0;
|
|
33
|
+
const l = { location: O, adjustedDialog: _ };
|
|
34
|
+
return T.forEach(([s, r]) => {
|
|
35
|
+
const [x, i] = G({
|
|
36
|
+
option: s,
|
|
37
|
+
alignment: r,
|
|
38
|
+
container: E,
|
|
39
|
+
target: b,
|
|
40
|
+
dialog: _
|
|
41
|
+
});
|
|
42
|
+
i > L && (L = i, l.location = s, l.adjustedDialog = x);
|
|
43
|
+
}), l;
|
|
44
|
+
}, G = ({
|
|
45
|
+
option: t,
|
|
46
|
+
alignment: o,
|
|
47
|
+
container: e,
|
|
48
|
+
target: c,
|
|
49
|
+
dialog: a
|
|
50
|
+
}) => {
|
|
51
|
+
const d = A(t, o), f = I(c, t), n = M(
|
|
52
|
+
f.x,
|
|
53
|
+
f.y,
|
|
54
|
+
X(a),
|
|
55
|
+
N(a),
|
|
56
|
+
d,
|
|
57
|
+
S
|
|
58
|
+
), u = j(w(n, e));
|
|
59
|
+
return [n, u];
|
|
60
|
+
}, $ = {
|
|
61
|
+
start: "left",
|
|
62
|
+
center: "center",
|
|
63
|
+
end: "right"
|
|
64
|
+
}, q = {
|
|
65
|
+
start: "bottom",
|
|
66
|
+
center: "center",
|
|
67
|
+
end: "top"
|
|
68
|
+
}, A = (t, o) => {
|
|
69
|
+
const e = { x: "center", y: "center" };
|
|
70
|
+
if (t.y !== "center") {
|
|
71
|
+
e.y = m(t.y);
|
|
72
|
+
const c = t.x === "left" ? m : (a) => a;
|
|
73
|
+
e.x = c($[o]);
|
|
74
|
+
} else
|
|
75
|
+
e.x = m(t.x), e.y = q[o];
|
|
76
|
+
return e;
|
|
77
|
+
}, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
78
|
+
__proto__: null,
|
|
79
|
+
dialog: D,
|
|
80
|
+
getRoot: A,
|
|
81
|
+
parseLocationOptions: P
|
|
82
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
83
|
+
export {
|
|
84
|
+
H as p
|
|
85
|
+
};
|
package/dist/position.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./position-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./position-CvSNZkSD.cjs");exports.position=o.position;
|
package/dist/position.js
CHANGED
package/dist/runtime.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-Cax-LfQW.cjs");exports.runtime=e.external;
|
package/dist/runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=Object.defineProperty;var R=(
|
|
1
|
+
"use strict";var v=Object.defineProperty;var R=(r,t,e)=>t in r?v(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var i=(r,t,e)=>R(r,typeof t!="symbol"?t+"":t,e);const h=require("zod"),x=require("./bounds-8aFLdbEj.cjs"),u=require("./box-BZ6d2d5A.cjs"),T=require("./location-BIet4Mig.cjs"),d=require("./xy-Budz-qz-.cjs"),B=(r,t,e)=>t!==void 0&&r<t?t:e!==void 0&&r>e?e:r,q=h.z.object({offset:d.crudeZ,scale:d.crudeZ}),z=h.z.object({offset:h.z.number(),scale:h.z.number()}),E=r=>(t,e,s,n)=>e==="dimension"?[t,s]:[t,n?s-r:s+r],I=r=>(t,e,s,n)=>[t,n?s/r:s*r],j=r=>(t,e,s)=>{if(t===null)return[r,s];const{lower:n,upper:o}=t,{lower:p,upper:l}=r,w=o-n,m=l-p;if(e==="dimension")return[r,s*(m/w)];const g=(s-n)*(m/w)+p;return[r,g]},Y=r=>(t,e,s)=>[r,s],D=()=>(r,t,e)=>{if(r===null)throw new Error("cannot invert without bounds");if(t==="dimension")return[r,e];const{lower:s,upper:n}=r;return[r,n-(e-s)]},L=r=>(t,e,s)=>{const{lower:n,upper:o}=r;return s=B(s,n,o),[t,s]},a=class a{constructor(){i(this,"ops",[]);i(this,"currBounds",null);i(this,"currType",null);i(this,"reversed",!1);this.ops=[]}static translate(t){return new a().translate(t)}static magnify(t){return new a().magnify(t)}static scale(t,e){return new a().scale(t,e)}translate(t){const e=this.new(),s=E(t);return s.type="translate",e.ops.push(s),e}magnify(t){const e=this.new(),s=I(t);return s.type="magnify",e.ops.push(s),e}scale(t,e){const s=x.construct(t,e),n=this.new(),o=j(s);return o.type="scale",n.ops.push(o),n}clamp(t,e){const s=x.construct(t,e),n=this.new(),o=L(s);return o.type="clamp",n.ops.push(o),n}reBound(t,e){const s=x.construct(t,e),n=this.new(),o=Y(s);return o.type="re-bound",n.ops.push(o),n}invert(){const t=D();t.type="invert";const e=this.new();return e.ops.push(t),e}pos(t){return this.exec("position",t)}dim(t){return this.exec("dimension",t)}new(){const t=new a;return t.ops=this.ops.slice(),t.reversed=this.reversed,t}exec(t,e){return this.currBounds=null,this.ops.reduce(([s,n],o)=>o(s,t,n,this.reversed),[null,e])[1]}reverse(){const t=this.new();t.ops.reverse();const e=[];return t.ops.forEach((s,n)=>{if(s.type==="scale"||e.some(([p,l])=>n>=p&&n<=l))return;const o=t.ops.findIndex((p,l)=>p.type==="scale"&&l>n);o!==-1&&e.push([n,o])}),e.forEach(([s,n])=>{const o=t.ops.slice(s,n);o.unshift(t.ops[n]),t.ops.splice(s,n-s+1,...o)}),t.reversed=!t.reversed,t}get transform(){return{scale:this.dim(1),offset:this.pos(0)}}};i(a,"IDENTITY",new a);let y=a;const c=class c{constructor(t=new y,e=new y,s=null){i(this,"x");i(this,"y");i(this,"currRoot");this.x=t,this.y=e,this.currRoot=s}static translate(t,e){return new c().translate(t,e)}static translateX(t){return new c().translateX(t)}static translateY(t){return new c().translateY(t)}static clamp(t){return new c().clamp(t)}static magnify(t){return new c().magnify(t)}static scale(t){return new c().scale(t)}static reBound(t){return new c().reBound(t)}translate(t,e){const s=d.construct(t,e),n=this.copy();return n.x=this.x.translate(s.x),n.y=this.y.translate(s.y),n}translateX(t){const e=this.copy();return e.x=this.x.translate(t),e}translateY(t){const e=this.copy();return e.y=this.y.translate(t),e}magnify(t){const e=this.copy();return e.x=this.x.magnify(t.x),e.y=this.y.magnify(t.y),e}scale(t){const e=this.copy();if(u.isBox(t)){const s=this.currRoot;return e.currRoot=t.root,s!=null&&!T.xyEquals(s,t.root)&&(s.x!==t.root.x&&(e.x=e.x.invert()),s.y!==t.root.y&&(e.y=e.y.invert())),e.x=e.x.scale(u.xBounds(t)),e.y=e.y.scale(u.yBounds(t)),e}return e.x=e.x.scale(t.width),e.y=e.y.scale(t.height),e}reBound(t){const e=this.copy();return e.x=this.x.reBound(u.xBounds(t)),e.y=this.y.reBound(u.yBounds(t)),e}clamp(t){const e=this.copy();return e.x=this.x.clamp(u.xBounds(t)),e.y=this.y.clamp(u.yBounds(t)),e}copy(){const t=new c;return t.currRoot=this.currRoot,t.x=this.x,t.y=this.y,t}reverse(){const t=this.copy();return t.x=this.x.reverse(),t.y=this.y.reverse(),t}pos(t){return{x:this.x.pos(t.x),y:this.y.pos(t.y)}}dim(t){return{x:this.x.dim(t.x),y:this.y.dim(t.y)}}box(t){return u.construct(this.pos(t.one),this.pos(t.two),0,0,this.currRoot??t.root)}get transform(){return{scale:this.dim({x:1,y:1}),offset:this.pos({x:0,y:0})}}};i(c,"IDENTITY",new c);let f=c;const M=Object.freeze(Object.defineProperty({__proto__:null,Scale:y,XY:f,crudeXYTransform:q,transform:z},Symbol.toStringTag,{value:"Module"}));exports.clamp=B;exports.scale=M;
|
|
@@ -3,9 +3,9 @@ var R = (n, t, e) => t in n ? B(n, t, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var i = (n, t, e) => R(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { z as y } from "zod";
|
|
5
5
|
import { c as h } from "./bounds-BtccGJW0.js";
|
|
6
|
-
import { e as T, f as x, y as f, c as E } from "./box-
|
|
7
|
-
import { b as I } from "./location-
|
|
8
|
-
import { b as g, c as j } from "./xy-
|
|
6
|
+
import { e as T, f as x, y as f, c as E } from "./box-Cto-5Uxu.js";
|
|
7
|
+
import { b as I } from "./location-C5Ot4MVG.js";
|
|
8
|
+
import { b as g, c as j } from "./xy-DxjPL2DZ.js";
|
|
9
9
|
const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n, z = y.object({ offset: g, scale: g }), D = y.object({ offset: y.number(), scale: y.number() }), L = (n) => (t, e, s, r) => e === "dimension" ? [t, s] : [
|
|
10
10
|
t,
|
|
11
11
|
r ? s - n : s + n
|
package/dist/scale.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./scale-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./scale-BTgf0Mr-.cjs");exports.scale=e.scale;
|
package/dist/scale.js
CHANGED