@synnaxlabs/pluto 0.39.1 → 0.40.1
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/dist/{Center-DoAxDY5V.js → Center-CFEPOi_x.js} +2 -2
- package/dist/{Center-BjxFDxgi.cjs → Center-bD2cOjI8.cjs} +1 -1
- package/dist/{ContextMenu-DX6j7Wwi.js → ContextMenu-BXNN2_7t.js} +4 -4
- package/dist/{ContextMenu-BWGS1vXl.cjs → ContextMenu-CNSewKSD.cjs} +1 -1
- package/dist/{DateTime-DUuYjZr8.cjs → DateTime-BfnGq6C2.cjs} +1 -1
- package/dist/{DateTime-sO15tvDD.js → DateTime-Djw6pb3W.js} +3 -3
- package/dist/Divider-CJNDIsD4.cjs +22 -0
- package/dist/{Divider-C5m3c4pv.js → Divider-CMyzWvRC.js} +701 -854
- package/dist/{Dropdown-DurKTABg.cjs → Dropdown-CL7BefC8.cjs} +1 -1
- package/dist/{Dropdown-FSmdakic.js → Dropdown-D-aMufnM.js} +8 -8
- package/dist/{Haul-CoG7Jmz6.cjs → Haul-4OcHX8__.cjs} +1 -1
- package/dist/{Haul-DrdXQaTq.js → Haul-CaLW9ULm.js} +2 -2
- package/dist/{Item-CZAsnOoO.js → Item-CW2A2nuL.js} +6 -6
- package/dist/{Item-Dj7cQJ8t.cjs → Item-CpAZC-dF.cjs} +1 -1
- package/dist/{Keyboard-lwCx7plR.js → Keyboard--YA9DHRz.js} +2 -2
- package/dist/{Keyboard-D4FRdVej.cjs → Keyboard-DHGtnfsf.cjs} +1 -1
- package/dist/{Link-lleSh5eG.js → Link-BT_Kwmlr.js} +2 -2
- package/dist/{Link-BSZ-HrRf.cjs → Link-Bhto2KVL.cjs} +1 -1
- package/dist/{Pack-CzZzxA2R.cjs → Pack-C4NdZWyf.cjs} +1 -1
- package/dist/{Pack-Dlj4dZzQ.js → Pack-UzJJ9OhY.js} +2 -2
- package/dist/{Provider-CCZPt2M5.js → Provider-BH1uv6QX.js} +5 -5
- package/dist/{Provider-YIru1nvE.cjs → Provider-lJARiq5i.cjs} +1 -1
- package/dist/{Space-NNqCWFbg.cjs → Space-BrQoodma.cjs} +1 -1
- package/dist/{Space-DBmhvGQL.js → Space-I_hidXYi.js} +1 -1
- package/dist/{Text-DT2rIwXL.js → Text-B7AC8Z1e.js} +423 -390
- package/dist/{Text-B3pNXYhh.js → Text-C-o1z9sP.js} +7 -7
- package/dist/{Text-DrXyKZwR.cjs → Text-C_j_F67Q.cjs} +1 -1
- package/dist/Text-ClTuQXMF.cjs +4 -0
- package/dist/{Text-D1GKnp9s.cjs → Text-DEbr1cmH.cjs} +1 -1
- package/dist/{Text-g6btwQ6E.js → Text-DVv04lTs.js} +5 -5
- package/dist/{Toggle-BzORI5sE.cjs → Toggle-CYB9Vt6b.cjs} +1 -1
- package/dist/{Toggle-DZMcFiiI.js → Toggle-v77mEVLE.js} +5 -5
- package/dist/{Video-DPIAdJ-g.js → Video-TjJf_tXI.js} +1 -1
- package/dist/{Video-BJudMCoc.cjs → Video-hdvNT3La.cjs} +1 -1
- package/dist/{WithIcon-C6COgbZq.js → WithIcon-BnDZ-Qu7.js} +12 -12
- package/dist/{WithIcon-CJvuPkSy.cjs → WithIcon-tr8ELI3W.cjs} +1 -1
- package/dist/{aggregator-5XpEdQtr.js → aggregator-AgOKLWHz.js} +2 -2
- package/dist/{aggregator-BAdXZfPY.cjs → aggregator-QqWwGnYH.cjs} +1 -1
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/{deep-BjupBYvk.cjs → deep-DsH2ji6Z.cjs} +1 -1
- package/dist/{deep-ChDJVfub.js → deep-T1-57GfG.js} +1 -1
- package/dist/{dimensions-Bt1NqWz6.js → dimensions-C9PXLcE0.js} +1 -1
- package/dist/{dimensions-IEzi7AOM.cjs → dimensions-e5IPRZhn.cjs} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{eraser-CnbMvm7W.cjs → eraser-D2I1qgOg.cjs} +1 -1
- package/dist/{eraser-DKQ5u3sz.js → eraser-Dmishn8h.js} +2 -2
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +8 -8
- package/dist/{external-vVwTqni5.cjs → external-B1ttDWzy.cjs} +1 -1
- package/dist/{external-C710XUvC.js → external-B9nbHICv.js} +5338 -5275
- package/dist/{external-DYUmsMj8.cjs → external-BWb18P9x.cjs} +2 -2
- package/dist/{external-DNC1e6Hi.js → external-BdxbwUpI.js} +9 -9
- package/dist/{external-BQtPGUNg.cjs → external-BpvGU0dZ.cjs} +1 -1
- package/dist/{external-D18IGHXh.js → external-C3e9emVy.js} +5 -5
- package/dist/{external-DYn3iC-U.js → external-C7Hy9XdI.js} +33 -33
- package/dist/{external-C8i1PCpN.js → external-CcIx4j5m.js} +12 -12
- package/dist/{external-Vjn4WKwt.cjs → external-ClyfPgqG.cjs} +35 -35
- package/dist/{external-CNyc2Q9k.cjs → external-CqhOyYDl.cjs} +1 -1
- package/dist/{external-DhX0dZoF.cjs → external-Cs8oKwvw.cjs} +1 -1
- package/dist/{external-Dmr3e50U.js → external-Csg4_wkz.js} +3 -3
- package/dist/{external-BJulb-Hm.cjs → external-CwvJvXL5.cjs} +1 -1
- package/dist/{external-BTGfIw_K.cjs → external-Cztvb3-K.cjs} +1 -1
- package/dist/{external-GUQ0NMxY.js → external-D12g_huj.js} +6 -6
- package/dist/{external-BOOtUi1D.js → external-DCflyFdb.js} +3 -3
- package/dist/{external-DrwngojV.cjs → external-DMEzx_kb.cjs} +1 -1
- package/dist/{external-Bxg2-RDn.js → external-DTjOTICM.js} +2 -2
- package/dist/{external-CL_RlqOT.cjs → external-D_21zZAf.cjs} +1 -1
- package/dist/{external-AOOzgEKd.cjs → external-DkQnAvKo.cjs} +1 -1
- package/dist/{external-DK_wU08V.js → external-JNlv7kxI.js} +2 -2
- package/dist/{external-BhaLdMzY.js → external-_b4lTCfZ.js} +12 -12
- package/dist/{external-CRbERCqd.cjs → external-dLVcM8tt.cjs} +1 -1
- package/dist/{external-CjZqwgDh.js → external-upiAayc4.js} +8 -8
- package/dist/{font-MRTGIokZ.cjs → font-Bas26Jn-.cjs} +1 -1
- package/dist/{font-CD9W5Tsh.js → font-CcRdsA3n.js} +2 -2
- package/dist/{fontString-MM82zgKY.cjs → fontString-C7H8Imxd.cjs} +1 -1
- package/dist/{fontString-p8gMjlA1.js → fontString-DdV9bi9l.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/{hooks-CwSxEEAh.js → hooks-B7ZV7Hz6.js} +4 -4
- package/dist/{hooks-BKLtEDxx.cjs → hooks-CJnV8Pt4.cjs} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +6148 -6053
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/jsx-runtime-CITbqOLs.cjs +22 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/{provider-D3MPSb7n.cjs → provider-BrBEjlx5.cjs} +5 -5
- package/dist/{provider-DfVWtUxZ.js → provider-Dq9t3iAH.js} +40 -27
- package/dist/src/hardware/device/Select.d.ts +6 -2
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/viewport/Mask.d.ts.map +1 -1
- package/dist/src/viewport/SelectMode.d.ts +2 -1
- package/dist/src/viewport/SelectMode.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +3 -3
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/preciseTimeScale.d.ts +102 -0
- package/dist/src/vis/axis/preciseTimeScale.d.ts.map +1 -0
- package/dist/src/vis/axis/preciseTimeScale.spec.d.ts +2 -0
- package/dist/src/vis/axis/preciseTimeScale.spec.d.ts.map +1 -0
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +6 -3
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +3 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Line.d.ts +1 -1
- package/dist/src/vis/lineplot/Line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +1 -0
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/{state-w46WTrh-.js → state-CUPEHHgf.js} +116 -110
- package/dist/{state-BKyv_jWZ.cjs → state-LaBGf4_k.cjs} +4 -4
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{useClickOutside-vpv_GiBw.js → useClickOutside-N6MHxbOe.js} +2 -2
- package/dist/{useClickOutside-EJHWO4Q9.cjs → useClickOutside-PFl3AvPU.cjs} +1 -1
- package/dist/{useDebouncedCallback-DDLuEZa8.js → useDebouncedCallback-D4Ec7whQ.js} +1 -1
- package/dist/{useDebouncedCallback-CVLx7N1s.cjs → useDebouncedCallback-vg2DKTH7.cjs} +1 -1
- package/dist/{useMemoCompare-ONEAVO05.cjs → useMemoCompare-BGEWpAJU.cjs} +1 -1
- package/dist/{useMemoCompare-B-Y9Ft2w.js → useMemoCompare-Cq_C2ddc.js} +2 -2
- package/dist/{useVirtualCursorDragWebKit-DFC-XFfl.js → useVirtualCursorDragWebKit-BBTGd7Xe.js} +11 -11
- package/dist/useVirtualCursorDragWebKit-Rnok8Nft.cjs +1 -0
- package/dist/value-C6JZdCF2.cjs +57 -0
- package/dist/{value-DbcZ1sQB.js → value-Dk2DJbst.js} +1528 -1399
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +7 -7
- package/dist/Divider-MIbyu5ZH.cjs +0 -31
- package/dist/Text-Hnsb1fus.cjs +0 -4
- package/dist/jsx-runtime-CYK1ROHF.js +0 -445
- package/dist/jsx-runtime-UYeBbnYT.cjs +0 -31
- package/dist/useVirtualCursorDragWebKit-BLtwRQY7.cjs +0 -1
- package/dist/value-DQqKhQvt.cjs +0 -57
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as l } from "./jsx-runtime-
|
|
2
|
-
import "./Text-
|
|
1
|
+
import { j as l } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import "./Text-B7AC8Z1e.js";
|
|
3
3
|
import { useRef as b, useState as _ } from "react";
|
|
4
4
|
import "./Pack-D50qN0Vu.js";
|
|
5
|
-
import { S as $ } from "./Space-
|
|
5
|
+
import { S as $ } from "./Space-I_hidXYi.js";
|
|
6
6
|
import { a as g, C as t, c as F } from "./css-rxwBYwM1.js";
|
|
7
|
-
import { P as O } from "./Pack-
|
|
8
|
-
import { C as v } from "./state-
|
|
9
|
-
import { u as C } from "./Divider-
|
|
10
|
-
import { f as w } from "./WithIcon-
|
|
7
|
+
import { P as O } from "./Pack-UzJJ9OhY.js";
|
|
8
|
+
import { C as v } from "./state-CUPEHHgf.js";
|
|
9
|
+
import { u as C } from "./Divider-CMyzWvRC.js";
|
|
10
|
+
import { f as w } from "./WithIcon-BnDZ-Qu7.js";
|
|
11
11
|
const nt = ({
|
|
12
12
|
size: o = "medium",
|
|
13
13
|
ref: k,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("./jsx-runtime-
|
|
1
|
+
"use strict";const u=require("./jsx-runtime-CITbqOLs.cjs");require("./Text-ClTuQXMF.cjs");const a=require("react");require("./Pack-BbwDtaE6.cjs");const Z=require("./Space-BrQoodma.cjs"),e=require("./css-CU7tous7.cjs"),_=require("./Pack-C4NdZWyf.cjs"),N=require("./state-LaBGf4_k.cjs"),$=require("./Divider-CJNDIsD4.cjs"),P=require("./WithIcon-tr8ELI3W.cjs"),g=({size:c="medium",ref:T,value:i,onChange:s,className:h,onFocus:S,selectOnFocus:k=!1,centerPlaceholder:w=!1,placeholder:f,variant:l="outlined",sharp:y=!1,children:D,level:r,onBlur:p,disabled:d,resetOnBlurIfEmpty:z=!1,status:R,shade:j,weight:B,style:m,outlineColor:K,color:L,onlyChangeOnBlur:n=!1,endContent:q,borderWidth:U,borderShade:V=4,disabledOverlay:F,...W})=>{const E=a.useRef(""),[o,x]=a.useState(null),b=a.useRef(null),C=a.useRef(!1),I=t=>{C.current=!1,z&&t.target.value===""?s==null||s(E.current):n&&o!=null&&(s==null||s(o)),x(null),p==null||p(t)},A=t=>{n?x(t.target.value):s==null||s(t.target.value)},G=t=>{n&&x(i),S==null||S(t),E.current=t.target.value},H=()=>{var t;!k||C.current||(C.current=!0,(t=b.current)==null||t.select())},J=t=>{n&&t.key==="Enter"?t.currentTarget.blur():t.key==="Escape"&&(t.currentTarget.blur(),t.stopPropagation())},Q=$.useCombinedRefs(T,b),M=e.Color.z.safeParse(K),v=M.success&&l=="outlined";l==="preview"&&(d=!0),v&&(m={...m,[e.CSS.var("input-color")]:M.data.rgbString});const X=(i==null||i.length===0)&&o==null,Y=l==="natural"?Z.Space:_.Pack;return u.jsxRuntimeExports.jsxs(Y,{direction:"x",empty:!0,style:m,className:e.CSS(e.CSS.B("input"),e.CSS.disabled(d),r==null&&e.CSS.size(c),j!=null&&e.CSS.shade(j),e.CSS.BM("input",l),e.CSS.sharp(y),v&&e.CSS.BM("input","custom-color"),R!=null&&e.CSS.M(R),h),borderShade:V,borderWidth:U,align:"center",size:c,children:[u.jsxRuntimeExports.jsxs("div",{className:e.CSS.BE("input","internal"),children:[X&&u.jsxRuntimeExports.jsx("div",{className:e.CSS(e.CSS.BE("input","placeholder"),w&&e.CSS.M("centered")),children:P.formatChildren(r??N.ComponentSizeLevels[c],f)}),u.jsxRuntimeExports.jsx("input",{ref:Q,value:o??i,role:"textbox",onChange:A,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",onFocus:G,onKeyDown:J,onMouseUp:H,onBlur:I,className:e.CSS(e.CSS.visible(!1),r!=null&&e.CSS.BM("text",r)),disabled:d,placeholder:typeof f=="string"?f:void 0,style:{fontWeight:B,color:e.cssString(L)},...W}),q!=null&&u.jsxRuntimeExports.jsx("div",{className:e.CSS.BE("input","end-content"),children:P.formatChildren(r??N.ComponentSizeLevels[c],q)})]}),D]})};exports.Text=g;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const S=require("./jsx-runtime-CITbqOLs.cjs"),b=require("./Divider-CJNDIsD4.cjs"),M=require("./state-LaBGf4_k.cjs"),u=require("react");require("./Pack-BbwDtaE6.cjs");const q=require("./Space-BrQoodma.cjs"),E=require("./css-CU7tous7.cjs"),G=require("./ContextMenu-CNSewKSD.cjs"),K=require("./dimensions-e5IPRZhn.cjs"),ee=require("./WithIcon-tr8ELI3W.cjs"),X=require("./Provider-lJARiq5i.cjs");require("./provider-BrBEjlx5.cjs");const we=require("./font-Bas26Jn-.cjs"),je=require("react-dom"),O=require("./hooks-CJnV8Pt4.cjs"),L=require("./toArray-DRKOku1s.cjs"),De=require("./useMemoCompare-BGEWpAJU.cjs"),W=require("./aggregator-QqWwGnYH.cjs"),Oe=require("./Center-bD2cOjI8.cjs");function ze(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(l,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return l.default=n,Object.freeze(l)}const A=ze(u),te=({transforms:n=[]})=>{const[l,e]=u.useState(n),t=u.useCallback((r,i,c=0)=>e(h=>{const a=h.filter(x=>x.key!==r);return a.push({key:r,transform:i,priority:c}),a.sort((x,f)=>f.priority-x.priority),a}),[e]),s=u.useCallback(r=>e(i=>i.filter(c=>c.key!==r)),[t]);return{transform:u.useCallback(r=>l.reduce((i,c)=>c.transform(i),{...r,transformed:!1}),[l]),setTransform:t,deleteTransform:s}},P=n=>{const l=u.use(n);if(l===null)throw new Error("useRequiredContext: context value is null");return l},se=u.createContext({transformedData:[],sourceData:[],transformed:!1}),ne=u.createContext({setSourceData:()=>{},getSourceData:()=>[],getTransformedData:()=>[],deleteTransform:()=>{},setTransform:()=>{},setEmptyContent:()=>{},getEmptyContent:()=>{},getDefaultEmptyContent:()=>{},getTransformed:()=>!1}),z=()=>P(se),_=()=>P(ne),ke=()=>z().transformedData,re=()=>z().sourceData,B=()=>_().getTransformedData,Ae=()=>_().setSourceData,oe=({data:n,emptyContent:l,children:e})=>{const{transform:t,setTransform:s,deleteTransform:o}=te({}),[r,i,c]=b.useCombinedStateAndRef(()=>n??[]);u.useEffect(()=>{n!=null&&i(n)},[n]);const h=u.useMemo(()=>t({data:[...r],transformed:!1}),[r,t]),a=b.useSyncedRef(h),x=b.useSyncedRef(l),[f,g,p]=b.useCombinedStateAndRef(void 0);u.useEffect(()=>{l!=null&&g(l)},[l]);const d=u.useMemo(()=>({setSourceData:i,getSourceData:()=>c.current,getTransformedData:()=>a.current.data,getTransformed:()=>a.current.transformed,deleteTransform:o,setTransform:s,setEmptyContent:g,getEmptyContent:()=>p.current,getDefaultEmptyContent:()=>x.current}),[i,c,a,o,s]),m=u.useMemo(()=>({transformed:h.transformed,transformedData:h.data,sourceData:r,emptyContent:f}),[h,r,f]);return S.jsxRuntimeExports.jsx(ne,{value:d,children:S.jsxRuntimeExports.jsx(se,{value:m,children:e})})},ie=({entry:n,selected:l,hovered:e,onSelect:t,className:s,draggingOver:o,rightAligned:r=!1,highlightHovered:i=!1,allowSelect:c=!0,translate:h,style:a,sourceIndex:x,...f})=>S.jsxRuntimeExports.jsx(q.Space,{id:n.key.toString(),direction:"x",onClick:()=>t==null?void 0:t(n.key),tabIndex:0,className:E.CSS(s,G.CONTEXT_TARGET,l&&G.CONTEXT_SELECTED,c&&E.CSS.M("selectable"),e&&E.CSS.M("hovered"),r&&E.CSS.M("right-aligned"),i&&E.CSS.M("highlight-hover"),E.CSS.BE("list","item"),E.CSS.selected(l)),style:{position:h!=null?"absolute":"relative",transform:`translateY(${h}px)`,...a},...f}),le=u.createContext(null),_e=()=>P(le),N="sort",Fe=({hide:n=!1,columns:l,children:e})=>{const t=re(),{setTransform:s,deleteTransform:o}=_(),r=we.useTypography("p").toString(),[i,c]=u.useState([null,!1]),[h,a]=u.useState({columns:l}),x=f=>{const[g,p]=i;g===f?p?(c([f,!p]),s(N,Z(f,!p))):(c([null,!1]),o(N)):(c([f,!0]),s(N,Z(f,!0)))};return u.useEffect(()=>{a(f=>({columns:Le(f.columns.length===0?l:f.columns,t,r)}))},[r,t,l]),S.jsxRuntimeExports.jsxs(le,{value:h,children:[!n&&S.jsxRuntimeExports.jsx(q.Space,{direction:"x",size:"medium",className:E.CSS(E.CSS.BE("list-col-header","container"),E.CSS.visible(!n)),children:h.columns.filter(({visible:f=!0})=>f).map(({key:f,cWidth:g,name:p})=>{const[d,m]=i;let C;const v=t[0];return f===d&&(C=m?S.jsxRuntimeExports.jsx(b.d4.Caret.Up,{}):S.jsxRuntimeExports.jsx(b.d4.Caret.Down,{})),S.jsxRuntimeExports.jsx(ee.WithIcon,{className:E.CSS.BE("list-col-header","item"),justify:"spaceBetween",level:"p",endIcon:C,style:{width:g},shrink:!1,onClick:()=>v!=null&&f in v&&x(f),children:p},f.toString())})}),e]})},Ne=({entry:n,onSelect:l,className:e,...t})=>{const{columns:s}=_e(),{index:o}=t;return S.jsxRuntimeExports.jsx(ie,{entry:n,onSelect:l,className:E.CSS(e,E.CSS.BE("list-col-item","container"),l!=null&&E.CSS.BEM("list-col-item","container","selectable")),align:"center",size:"medium",...t,children:s.filter(({visible:r=!0})=>r).map(r=>S.jsxRuntimeExports.jsx(Ve,{entry:n,col:r,index:o},r.key.toString()))},n.key.toString())},Ve=({entry:n,index:l,col:{width:e,...t}})=>{const s={width:t.cWidth,userSelect:"none",padding:"1rem",flexShrink:0};if(t.render!=null)return t.render({key:t.key,entry:n,style:s,index:l});let o;return t.stringer!=null?o=t.stringer(n):o=n[t.key],S.jsxRuntimeExports.jsx(b.Text,{className:E.CSS.BE("list-col-item-value",t.key.toString()),level:"p",style:s,shade:t.shade,weight:t.weight,children:M.ne(o)},t.key.toString())},Le=(n,l,e,t=30)=>{const s=We(l,n);return n.map(o=>{if(o.width!=null)o.cWidth=o.width;else{const{width:r}=K.dimensions(o.name,e),{width:i}=K.dimensions(s[o.key],e);o.cWidth=Math.max(r,i)+t}return o})},We=(n,l)=>{const e={};return n.forEach(t=>l.forEach(({key:s,stringer:o})=>{const r=t[s];if(r==null)return;const i=o!=null?o(t):r.toString();(!(s in e)||i.length>e[s].length)&&(e[s]=i)})),e},Z=(n,l)=>({data:e})=>e.length===0?{data:e,transformed:!1}:{data:[...e].sort(M.F.newFieldF(n,e[0],!l)),transformed:!0},qe={Header:Fe,Item:Ne,itemHeight:5.5*6};function D(n,l,e){let t=e.initialDeps??[],s;function o(){var r,i,c,h;let a;e.key&&((r=e.debug)!=null&&r.call(e))&&(a=Date.now());const x=n();if(!(x.length!==t.length||x.some((p,d)=>t[d]!==p)))return s;t=x;let g;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(g=Date.now()),s=l(...x),e.key&&((c=e.debug)!=null&&c.call(e))){const p=Math.round((Date.now()-a)*100)/100,d=Math.round((Date.now()-g)*100)/100,m=d/16,C=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${C(d,5)} /${C(p,5)} ms`,`
|
|
2
|
+
font-size: .6rem;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(h=e==null?void 0:e.onChange)==null||h.call(e,s),s}return o.updateDeps=r=>{t=r},o}function V(n,l){if(n===void 0)throw new Error("Unexpected undefined");return n}const Pe=(n,l)=>Math.abs(n-l)<1,Be=(n,l,e)=>{let t;return function(...s){n.clearTimeout(t),t=n.setTimeout(()=>l.apply(this,s),e)}},Ue=n=>n,He=n=>{const l=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let s=l;s<=e;s++)t.push(s);return t},$e=(n,l)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const s=r=>{const{width:i,height:c}=r;l({width:Math.round(i),height:Math.round(c)})};if(s(e.getBoundingClientRect()),!t.ResizeObserver)return()=>{};const o=new t.ResizeObserver(r=>{const i=()=>{const c=r[0];if(c!=null&&c.borderBoxSize){const h=c.borderBoxSize[0];if(h){s({width:h.inlineSize,height:h.blockSize});return}}s(e.getBoundingClientRect())};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(e,{box:"border-box"}),()=>{o.unobserve(e)}},Y={passive:!0},Q=typeof window>"u"?!0:"onscrollend"in window,Ge=(n,l)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let s=0;const o=n.options.useScrollendEvent&&Q?()=>{}:Be(t,()=>{l(s,!1)},n.options.isScrollingResetDelay),r=a=>()=>{const{horizontal:x,isRtl:f}=n.options;s=x?e.scrollLeft*(f&&-1||1):e.scrollTop,o(),l(s,a)},i=r(!0),c=r(!1);c(),e.addEventListener("scroll",i,Y);const h=n.options.useScrollendEvent&&Q;return h&&e.addEventListener("scrollend",c,Y),()=>{e.removeEventListener("scroll",i),h&&e.removeEventListener("scrollend",c)}},Ke=(n,l,e)=>{if(l!=null&&l.borderBoxSize){const t=l.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},Xe=(n,{adjustments:l=0,behavior:e},t)=>{var s,o;const r=n+l;(o=(s=t.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[t.options.horizontal?"left":"top"]:r,behavior:e})};class Ze{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=t())==null||s.disconnect(),e=null},observe:s=>{var o;return(o=t())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=t())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,s])=>{typeof s>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ue,rangeExtractor:He,onChange:()=>{},measureElement:Ke,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,s;(s=(t=this.options).onChange)==null||s.call(t,this,e)},this.maybeNotify=D(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const s=new Map,o=new Map;for(let r=t-1;r>=0;r--){const i=e[r];if(s.has(i.lane))continue;const c=o.get(i.lane);if(c==null||i.end>c.end?o.set(i.lane,i):i.end<c.end&&s.set(i.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,i)=>r.end===i.end?r.index-i.index:r.end-i.end)[0]:void 0},this.getMeasurementOptions=D(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=D(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:o,enabled:r},i)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(a=>{this.itemSizeCache.set(a.key,a.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const h=this.measurementsCache.slice(0,c);for(let a=c;a<e;a++){const x=o(a),f=this.options.lanes===1?h[a-1]:this.getFurthestMeasurement(h,a),g=f?f.end+this.options.gap:t+s,p=i.get(x),d=typeof p=="number"?p:this.options.estimateSize(a),m=g+d,C=f?f.lane:a%this.options.lanes;h[a]={index:a,start:g,size:d,end:m,key:x,lane:C}}return this.measurementsCache=h,h},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=D(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,o)=>this.range=e.length>0&&t>0?Ye({measurements:e,outerSize:t,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=D(()=>{let e=null,t=null;const s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,o,r)=>o===null||r===null?[]:e({startIndex:o,endIndex:r,overscan:t,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const s=this.indexFromElement(e),o=this.measurementsCache[s];if(!o)return;const r=o.key,i=this.elementsCache.get(r);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(r,e)),e.isConnected&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const s=this.measurementsCache[e];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=t-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((t,s)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(s))});return}this._measureElement(e,void 0)},this.getVirtualItems=D(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const s=[];for(let o=0,r=e.length;o<r;o++){const i=e[o],c=t[i];s.push(c)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return V(t[ce(0,t.length-1,s=>V(t[s]).start,e)])},this.getOffsetForAlignment=(e,t,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();t==="auto"&&(t=e>=r+o?"end":"start"),t==="center"?e+=(s-o)/2:t==="end"&&(e-=o);const i=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(h,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const s=this.measurementsCache[e];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(t==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)t="end";else if(s.start<=r+this.options.scrollPaddingStart)t="start";else return[r,t];const i=t==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,s.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:s})},this.scrollToIndex=(e,{align:t="auto",behavior:s}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const o=this.getOffsetForIndex(e,t);if(!o)return;const[r,i]=o;this._scrollToOffset(r,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[h]=V(this.getOffsetForIndex(e,i));Pe(h,this.getScrollOffset())||this.scrollToIndex(e,{align:i,behavior:s})}else this.scrollToIndex(e,{align:i,behavior:s})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let s;if(t.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((e=t[t.length-1])==null?void 0:e.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=t.length-1;for(;r>=0&&o.some(i=>i===null);){const i=t[r];o[i.lane]===null&&(o[i.lane]=i.end),r--}s=Math.max(...o.filter(i=>i!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(l)}}const ce=(n,l,e,t)=>{for(;n<=l;){const s=(n+l)/2|0,o=e(s);if(o<t)n=s+1;else if(o>t)l=s-1;else return s}return n>0?n-1:0};function Ye({measurements:n,outerSize:l,scrollOffset:e,lanes:t}){const s=n.length-1,o=c=>n[c].start;if(n.length<=t)return{startIndex:0,endIndex:s};let r=ce(0,s,o,e),i=r;if(t===1)for(;i<s&&n[i].end<e+l;)i++;else if(t>1){const c=Array(t).fill(0);for(;i<s&&c.some(a=>a<e+l);){const a=n[i];c[a.lane]=a.end,i++}const h=Array(t).fill(e+l);for(;r>=0&&h.some(a=>a>=e);){const a=n[r];h[a.lane]=a.start,r--}r=Math.max(0,r-r%t),i=Math.min(s,i+(t-1-i%t))}return{startIndex:r,endIndex:i}}const J=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Qe(n){const l=A.useReducer(()=>({}),{})[1],e={...n,onChange:(s,o)=>{var r;o?je.flushSync(l):l(),(r=n.onChange)==null||r.call(n,s,o)}},[t]=A.useState(()=>new Ze(e));return t.setOptions(e),J(()=>t._didMount(),[]),J(()=>t._willUpdate()),t}function Je(n){return Qe({observeElementRect:$e,observeElementOffset:Ge,scrollToFn:Xe,...n})}const ae=n=>n==null?!0:Array.isArray(n)||typeof n=="string"?n.length===0:!1,et=[],tt=[],ue=({data:n=et,value:l=tt,allowMultiple:e,allowNone:t,replaceOnSingle:s=!1,autoSelectOnNone:o=!1,onChange:r})=>{const i=u.useRef(null),c=O.useHeldRef({triggers:[["Shift"]],loose:!0}),h=O.useHeldRef({triggers:[["Control"]],loose:!0}),a=b.useSyncedRef(l),x=b.useSyncedRef(n),f=u.useCallback((d,m)=>{if(a.current=d,d.length===0&&t!==!1)return r(e!==!1?[]:null,m);if(e!==!1)return r(d,m);if(d.length>0)return r(d[0],m)},[r,t,e]);u.useEffect(()=>{let d=x.current;if(Array.isArray(d)||(d=d()),ae(l)&&t===!1&&d.length>0&&o){const m=d[0];i.current=m.key,f([m.key],{entries:[m],clicked:m.key,clickedIndex:0})}},[f,x,l,t]);const g=u.useCallback(d=>{const m=i.current;let C=x.current;Array.isArray(C)||(C=C());let v=[];const y=L.A(a.current).filter(R=>R!=null);if(e===!1)v=y.includes(d)?[]:[d];else if(h.current.held&&s)y.includes(d)?v=y.filter(R=>R!==d):v=[...y,d];else if(c.current.held&&m!==null){const[R,k]=[C.findIndex(I=>I.key===d),C.findIndex(I=>I.key===m)].sort((I,j)=>I-j),T=C.slice(R,k+1).map(({key:I})=>I);T.slice(1,T.length-1).every(I=>y.includes(I))&&y.includes(d)?v=y.filter(I=>!T.includes(I)):v=[...y,...T],i.current=null}else i.current=d,s?v=y.includes(d)&&y.length===1?[]:[d]:y.includes(d)?v=y.filter(R=>R!==d):v=[...y,d];const w=M.c$1.unique(v);if(t===!1&&w.length===0)return f(y,{entries:C.filter(({key:R})=>y.includes(R)),clicked:d,clickedIndex:C.findIndex(({key:R})=>R===d)});w.length===0&&(i.current=null),f(w,{entries:C.filter(({key:R})=>v.includes(R)),clicked:d,clickedIndex:C.findIndex(({key:R})=>R===d)})},[a,x,f,e,t]),p=u.useCallback(()=>f([],{entries:[],clicked:null,clickedIndex:0}),[f]);return{onSelect:g,clear:p}},de=u.createContext({selected:[]}),he=u.createContext({onSelect:()=>{},clear:()=>{},getSelected:()=>[]}),U=()=>u.useContext(de),fe=()=>U().selected,F=()=>u.useContext(he),me=u.memo(({value:n,children:l,...e})=>{const t=B(),{onSelect:s,clear:o}=ue({...e,value:n,data:t}),r=b.useSyncedRef(n),i=u.useMemo(()=>({selected:L.o(n)}),[n]),c=u.useMemo(()=>({onSelect:s,clear:o,getSelected:()=>L.o(r.current)}),[s,o]);return S.jsxRuntimeExports.jsx(he,{value:c,children:S.jsxRuntimeExports.jsx(de,{value:i,children:l})})});me.displayName="List.Selector";const st=me,ge=["ArrowUp"],xe=["ArrowDown"],pe=["Enter"],nt=[ge,xe,pe],Se=u.createContext({hover:-1,setHover:()=>{}}),H=()=>u.use(Se),rt=({children:n,initialHover:l=-1,disabled:e=!1})=>{const t=B(),{transformedData:s}=z(),{onSelect:o}=F(),[r,i,c]=b.useCombinedStateAndRef(l),h=u.useRef(l);u.useEffect(()=>{e&&(h.current=r),i(e?-1:h.current)},[e]),u.useEffect(()=>{r>=s.length&&i(0)},[s.length]);const a=u.useRef(null),x=u.useCallback(({triggers:g,stage:p})=>{if(a.current!=null&&(clearInterval(a.current),a.current=null),p!=="start"||e)return;const d=t();if(O.match(g,[pe])){if(c.current===-1)return;o==null||o(d[c.current].key);return}const m=()=>{const C=t();O.match(g,[ge],{loose:!0})?i(v=>v<=0?C.length-1:v-1):O.match(g,[xe],{loose:!0})&&i(v=>v>=C.length-1?0:v+1)};m(),a.current=setTimeout(()=>{a.current=setInterval(m,100)},200)},[o,e]);O.use({triggers:nt,callback:x,loose:!0});const f=u.useMemo(()=>({hover:r,setHover:i}),[r,i]);return S.jsxRuntimeExports.jsx(Se,{value:f,children:n})},ve=u.createContext({hasMore:!1,onFetchMore:()=>{}}),Ee=u.createContext({setHasMore:()=>{},setOnFetchMore:()=>{}}),ot=()=>u.use(ve),it=()=>u.use(Ee),lt=({children:n})=>{const[l,e]=u.useState(!1),[t,s]=b.useStateRef(()=>{}),o=u.useCallback(()=>{var c;(c=t.current)==null||c.call(t)},[t]),r=u.useMemo(()=>({hasMore:l,onFetchMore:o}),[l,o]),i=u.useMemo(()=>({setHasMore:e,setOnFetchMore:c=>{s(()=>c)}}),[e,s]);return S.jsxRuntimeExports.jsx(ve,{value:r,children:S.jsxRuntimeExports.jsx(Ee,{value:i,children:n})})},ct=(n,l,e)=>{var r;const t=n>l?1:-1;let s;const o=n+t*2;E.H.contains({lower:0,upper:e.children.length},o)?s=n+t*2:s=n,(r=e.children[s])==null||r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},at=({itemHeight:n,children:l,overscan:e=0,className:t,...s})=>{var k;const{hasMore:o,onFetchMore:r}=ot(),{hover:i,setHover:c}=H(),{transformedData:h,emptyContent:a,transformed:x,sourceData:f}=z(),g=fe(),{onSelect:p}=F(),d=u.useRef(null),m=Je({count:h.length,getScrollElement:()=>d.current,estimateSize:()=>n,overscan:e}),C=b.usePrevious(h);u.useLayoutEffect(()=>{C==null||C.length===0||h.length>0&&h[0].key!==C[0].key&&(m==null||m.scrollToIndex(0),c(0))},[h]),u.useEffect(()=>{if(d.current==null)return;const T=m.calculateRange();if(T==null)return;const I=E.H.construct(T.startIndex+2,T.endIndex-2);E.H.contains(I,i)||m.scrollToIndex(i)},[i,n]);const v=m.getVirtualItems(),y=(k=v.at(-1))==null?void 0:k.index,w=h.length;if(u.useEffect(()=>{y===w-1&&o&&(r==null||r())},[y,w,o]),n<=0)throw new Error("itemHeight must be greater than 0");const R=h.length===0;return S.jsxRuntimeExports.jsx("div",{ref:d,className:E.CSS(t,E.CSS.BE("list","container"),R&&E.CSS.BM("list","empty")),...s,children:R?a:S.jsxRuntimeExports.jsx("div",{className:E.CSS.BE("list","virtualizer"),style:{height:m.getTotalSize()},children:v.map(({index:T,start:I})=>{const j=h[T];let $=T;return x&&($=f.findIndex(Me=>Me.key===j.key)),l({key:j.key,sourceIndex:$,index:T,onSelect:p,entry:j,selected:g.includes(j.key),hovered:T===i,translate:I})})})})},Ce=({itemHeight:n=50,className:l,...e})=>{const{transformedData:t,transformed:s,emptyContent:o,sourceData:r}=z(),{hover:i}=H(),{selected:c}=U(),{onSelect:h}=F(),a=u.useRef(null),x=b.usePrevious(i)??0;return u.useLayoutEffect(()=>{a.current!=null&&ct(i,x,a.current)},[i,n]),S.jsxRuntimeExports.jsx(q.Space,{className:E.CSS(l,E.CSS.BE("list","container")),ref:a,size:0,...e,children:t.length===0?o:S.jsxRuntimeExports.jsx(S.jsxRuntimeExports.Fragment,{children:t.map((f,g)=>{let p=g;return s&&(p=r.findIndex(d=>d.key===f.key)),e.children({key:f.key,index:g,sourceIndex:p,onSelect:h,entry:f,selected:c.includes(f.key),hovered:g===i})})})})};Ce.Virtual=at;const ut=({children:n,data:l,emptyContent:e,omit:t})=>{const s=De.useMemoCompare(()=>t!=null?l==null?void 0:l.filter(r=>!t.includes(r.key)):l,([r,i],[c,h])=>{let a;return r!=null&&c!=null?a=M.F.unorderedPrimitiveArrays(r,c)===M.F.EQUAL:a=r==c,i===h&&a},[t,l]),o=typeof e=="string"?S.jsxRuntimeExports.jsx(b.Text,{level:"p",children:e}):e;return S.jsxRuntimeExports.jsx(lt,{children:S.jsxRuntimeExports.jsx(oe,{data:s,emptyContent:o,children:n})})},ye=u.createContext([]),Re=u.createContext(()=>{}),dt=.9,ht=({children:n,maxHistory:l=500})=>{const[{path:e},{statuses:t},s]=X.use$1({type:W.Aggregator.TYPE,schema:W.aggregatorStateZ,initialState:{statuses:[]}});if(t.length>l){const r=Math.floor(l*dt);s(i=>({...i,statuses:t.slice(0,r)}))}const o=u.useCallback(r=>{const i={time:M.m.now(),key:M.Rt.create(),...r};s(c=>({...c,statuses:[i,...c.statuses]}))},[s]);return S.jsxRuntimeExports.jsx(ye,{value:t,children:S.jsxRuntimeExports.jsx(Re,{value:o,children:S.jsxRuntimeExports.jsx(X.Composite,{path:e,children:n})})})},be=()=>u.use(Re),ft=()=>{const n=be();return u.useMemo(()=>W.createErrorHandler(n),[n])},mt=M.y$1.seconds(7),gt=M.y$1.seconds(1),xt=({expiration:n=mt,poll:l=gt}={})=>{const e=u.use(ye),[t,s]=u.useState(new Set),[o,r]=u.useState(()=>M.m.now());u.useEffect(()=>{const a=setInterval(()=>r(M.m.now()),l.milliseconds);return()=>clearInterval(a)},[l.milliseconds]);const i=u.useMemo(()=>{const a=o.sub(n),f=e.filter(({key:g,time:p})=>p.afterEq(a)&&!t.has(g)).reduce((g,p)=>{const d=`${p.variant}:${p.message}`;if(!g.has(d))return g.set(d,{...p,count:1}),g;const m=g.get(d);return g.set(d,{...m,count:m.count+1,time:p.time.after(m.time)?p.time:m.time}),g},new Map);return Array.from(f.values())},[e,n,t,o]),c=b.useSyncedRef(e),h=u.useCallback(a=>{s(x=>{const f=new Set,g=c.current.find(({key:p})=>p===a);return x.has(a)||f.add(a),g!=null&&c.current.filter(({message:d,variant:m})=>d===g.message&&m===g.variant).forEach(d=>f.add(d.key)),f.size==0?x:new Set([...f,...x])})},[]);return{statuses:i,silence:h}},Ie={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-m1)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l6)",secondary:"var(--pluto-secondary-z)"},Te=({variant:n="info",level:l="p",hideIcon:e=!1,className:t,...s})=>{let o;return e||(o=n==="loading"?S.jsxRuntimeExports.jsx(b.d4.Loading,{}):S.jsxRuntimeExports.jsx(b.d4.Circle,{})),S.jsxRuntimeExports.jsx(ee.WithIcon,{color:Ie[n],className:E.CSS(t,E.CSS.B("status-text")),level:l,startIcon:o,...s})},pt=({style:n,...l})=>S.jsxRuntimeExports.jsx(Oe.Center,{style:n,grow:!0,children:S.jsxRuntimeExports.jsx(Te,{...l})}),St=Object.assign(Te,{Centered:pt});exports.Aggregator=ht;exports.Column=qe;exports.Core=Ce;exports.DataProvider=oe;exports.Hover=rt;exports.ItemFrame=ie;exports.List=ut;exports.Selector=st;exports.Text=St;exports.selectValueIsZero=ae;exports.useAdder=be;exports.useDataContext=z;exports.useDataUtils=_;exports.useErrorHandler=ft;exports.useGetTransformedData=B;exports.useHoverContext=H;exports.useInfiniteUtils=it;exports.useNotifications=xt;exports.useSelect=ue;exports.useSelection=fe;exports.useSelectionContext=U;exports.useSelectionUtils=F;exports.useSetSourceData=Ae;exports.useSourceData=re;exports.useTransformedData=ke;exports.useTransforms=te;exports.variantColors=Ie;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-CITbqOLs.cjs"),r=require("./Divider-CJNDIsD4.cjs");require("./state-LaBGf4_k.cjs");require("./css-CU7tous7.cjs");require("react");const x=require("./Keyboard-DHGtnfsf.cjs");require("./Pack-BbwDtaE6.cjs");const l={Control:()=>e.jsxRuntimeExports.jsx(r.Symbols.Meta,{},"control"),Alt:()=>e.jsxRuntimeExports.jsx(r.Symbols.Alt,{},"alt"),Shift:()=>e.jsxRuntimeExports.jsx(r.d4.Keyboard.Shift,{},"shift"),MouseLeft:"Left Click",MouseRight:"Right Click",MouseMiddle:"Middle Click",Enter:()=>e.jsxRuntimeExports.jsx(r.d4.Keyboard.Return,{},"enter")},i=s=>{const t=l[s];return t!=null?typeof t=="function"?t():t:s},c=s=>s.map(t=>i(t)),m=({className:s,style:t,trigger:n,children:d,...u})=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:n.map(o=>e.jsxRuntimeExports.jsx(x.Keyboard,{...u,children:i(o)},o))});exports.Text=m;exports.toSymbols=c;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-
|
|
2
|
-
import {
|
|
3
|
-
import "./state-
|
|
1
|
+
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { d as r, S as i } from "./Divider-CMyzWvRC.js";
|
|
3
|
+
import "./state-CUPEHHgf.js";
|
|
4
4
|
import "./css-rxwBYwM1.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { K as a } from "./Keyboard
|
|
6
|
+
import { K as a } from "./Keyboard--YA9DHRz.js";
|
|
7
7
|
import "./Pack-D50qN0Vu.js";
|
|
8
8
|
const c = {
|
|
9
9
|
Control: () => /* @__PURE__ */ o.jsx(i.Meta, {}, "control"),
|
|
@@ -20,7 +20,7 @@ const c = {
|
|
|
20
20
|
className: s,
|
|
21
21
|
style: t,
|
|
22
22
|
trigger: l,
|
|
23
|
-
children:
|
|
23
|
+
children: d,
|
|
24
24
|
...m
|
|
25
25
|
}) => /* @__PURE__ */ o.jsx(o.Fragment, { children: l.map((e) => (
|
|
26
26
|
// @ts-expect-error - issues with generic element types
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const x=require("./jsx-runtime-
|
|
1
|
+
"use strict";const x=require("./jsx-runtime-CITbqOLs.cjs"),_=require("./Divider-CJNDIsD4.cjs"),y=require("./state-LaBGf4_k.cjs"),le=require("./toArray-DRKOku1s.cjs"),c=require("react"),e=require("./css-CU7tous7.cjs"),F=require("./WithIcon-tr8ELI3W.cjs"),ce=require("react-dom");require("./Pack-BbwDtaE6.cjs");const ue=require("./hooks-CJnV8Pt4.cjs"),ie={delay:y.y$1.milliseconds(750),startAccelerating:()=>{}},Z=c.createContext(ie),H=()=>c.use(Z),ae=({delay:t=y.y$1.milliseconds(700),accelerate:n=!0,acceleratedDelay:s=y.y$1.minutes(60),accelerationDelay:r=y.y$1.seconds(0),children:u})=>{const[d,o]=c.useState(!1),l=c.useRef(null),f=c.useCallback(()=>{d||!n||(o(!0),l.current=setTimeout(()=>{o(!1)},new y.y$1(r).milliseconds))},[d,r]);return x.jsxRuntimeExports.jsx(Z,{value:{delay:d?s:t,startAccelerating:f},children:u})},de=t=>({key:n,...s})=>c.createElement(t,{...s,key:n}),W=t=>typeof t=="function",me=150,Y=["top","bottom"],V=["left","right"],U=[...V,...Y],X=[...U,"center"],fe={[e.K.xyToString(e.K.TOP_RIGHT)]:(t,n)=>e.G.translate(t,"x",-e.Mo.width(n)),[e.K.xyToString(e.K.TOP_LEFT)]:(t,n)=>e.G.translate(t,"x",e.Mo.width(n)),[e.K.xyToString(e.K.BOTTOM_RIGHT)]:(t,n)=>e.G.translate(t,"x",-e.Mo.width(n)),[e.K.xyToString(e.K.BOTTOM_LEFT)]:(t,n)=>e.G.translate(t,"x",e.Mo.width(n))},A=(t,n,s)=>{for(const r of s)if(Math.abs(e.Mo.loc(n,r)-e.Mo.loc(t,r))>me)return r;return s[0]},z=(t,n,s)=>{const r=e.K.location.safeParse(t),u=o=>{let l;return o==="center"?l=U:e.K.isX(o)?l=["center",...Y]:l=["center",...V],e.K.construct(A(n,s,l))};if(r.success)return e.K.constructXY(r.data,u(r.data));if(t!=null){const o={...t};return o.x==null&&o.y!=null?o.x=u(e.K.construct(o.y)):o.y==null&&o.x!=null?o.y=u(e.K.construct(o.x)):o.x==null&&o.y==null&&(o.x=A(n,s,X),o.y=u(e.K.construct(o.x))),e.K.constructXY(o)}const d=A(n,s,X);return e.K.constructXY(d,u(d))},Se=(t,n)=>{let s=t;for(;s!=null;){if(s.id===n)return s;s=s.parentElement}return t},J=({delay:t,children:n,location:s,hide:r=!1})=>{const{startAccelerating:u,delay:d}=H(),o=new y.y$1(t??d),[l,f,a]=_.useCombinedStateAndRef(null),[K,R]=c.useState(""),p=c.useRef(null),S=c.useId(),i=c.useRef(null),T=c.useRef(null),L=c.useCallback(m=>{m==null&&a.current==null||T.current!=null||(m!=null?(f(m),T.current=setTimeout(()=>{R(e.CSS.M("loaded")),T.current=null},1)):(R(""),T.current=setTimeout(()=>{f(null),T.current=null},500)))},[]),h=c.useCallback((m,C)=>{var G,q,$;if(!C||r)return(G=i.current)==null||G.call(i),L(null);u();const E=e.Mo.construct(Se(m.target,S));e.Mo.contains(E,e.G.construct(m))||((q=i.current)==null||q.call(i),L(null));const N=e.Mo.construct(document.documentElement),j=z(s,E,N);let O=e.Mo.xyLoc(E,j);const g=fe[e.K.xyToString(j)];g!=null&&(O=g(O,E));const se=e.Mo.construct(document.body);L({location:j,position:e.G.translate(O,e.G.scale(e.Mo.topLeft(se),-1)),triggerDims:e.Mo.dims(E)}),($=i.current)==null||$.call(i);const v=w=>{const re=e.G.construct(w);e.Mo.contains(E,re)||(L(null),document.removeEventListener("mousemove",v),i.current=null,p.current!=null&&clearTimeout(p.current))};document.addEventListener("mousemove",v),i.current=()=>document.removeEventListener("mousemove",v),document.addEventListener("mousedown",()=>{var w;L(null),(w=i.current)==null||w.call(i)},{once:!0})},[u,s,r,S,o.milliseconds]);r&&l!=null&&L(null);const B=c.useCallback(m=>{p.current=setTimeout(()=>h(m,!0),o.milliseconds)},[h,o.milliseconds]),P=c.useCallback(m=>{p.current!=null&&clearTimeout(p.current),h(m,!1)},[h]),[I,b]=n,M=document.body;return x.jsxRuntimeExports.jsxs(x.jsxRuntimeExports.Fragment,{children:[l!=null&&ce.createPortal(x.jsxRuntimeExports.jsx("div",{className:e.CSS(e.CSS.B("tooltip"),e.CSS.loc(l.location.x),e.CSS.loc(l.location.y),K),style:{"--pos-x":e.CSS.px(l.position.x),"--pos-y":e.CSS.px(l.position.y),"--el-width":e.CSS.px(l.triggerDims.width)},children:W(I)?I(l):Q(I)},S),M),c.cloneElement(b,{id:S,onMouseEnter:B,onMouseLeave:P,onMouseDown:c.useCallback(m=>{var C,E;P(m),(E=(C=b.props).onMouseDown)==null||E.call(C,m)},[h])})]})},Q=t=>typeof t=="string"||typeof t=="number"||!c.isValidElement(t)?x.jsxRuntimeExports.jsx(_.Text,{level:"small",children:t}):t,D=t=>{const n=({tooltipDelay:s,tooltip:r,tooltipLocation:u,...d})=>{const o=x.jsxRuntimeExports.jsx(t,{...d});return r==null?o:x.jsxRuntimeExports.jsxs(J,{delay:s,location:u,children:[r,o]})};return n.displayName=`Tooltip.Wrap(${t.displayName??t.name})`,n},k=D(({size:t,variant:n="filled",type:s="button",className:r,children:u,iconSpacing:d,sharp:o=!1,disabled:l=!1,loading:f=!1,level:a,triggers:K,startIcon:R=[],onClickDelay:p=0,onClick:S,color:i,status:T,style:L,endContent:h,onMouseDown:B,stopPropagation:P,...I})=>{const b=y.y$1.fromMilliseconds(p);f&&(R=[...le.A(R),x.jsxRuntimeExports.jsx(_.d4.Loading,{},"loader")]);const M=l||f;d??(d=t==="small"?"small":"medium"),n=="shadow"&&(n="text");const m=g=>{if(P&&g.stopPropagation(),!(M||n==="preview")&&b.isZero)return S==null?void 0:S(g)},C=c.useRef(null),E=g=>{B==null||B(g),!(M||n==="preview"||b.isZero)&&(document.addEventListener("mouseup",()=>C.current!=null&&clearTimeout(C.current)),C.current=setTimeout(()=>{S==null||S(g),C.current=null},b.milliseconds))};ue.use({triggers:K,callback:c.useCallback(({stage:g})=>{g!=="end"||M||n==="preview"||m(new MouseEvent("click"))},[m,M])});const N={...L},j=e.Color.z.safeParse(i),O=j.success&&(n==="filled"||n==="outlined");return O&&(N[e.CSS.var("btn-color")]=j.data.rgbString,N[e.CSS.var("btn-text-color")]=j.data.pickByContrast("#000000","#ffffff").rgbCSS),b.isZero||(N[e.CSS.var("btn-delay")]=`${b.seconds.toString()}s`),t==null&&a!=null?t=y.LevelComponentSizes[a]:t!=null&&a==null?a=y.ComponentSizeLevels[t]:t??(t="medium"),x.jsxRuntimeExports.jsxs(F.WithIcon,{el:"button",className:e.CSS(e.CSS.B("btn"),e.CSS.size(t),e.CSS.sharp(o),n!=="preview"&&e.CSS.disabled(M),T!=null&&e.CSS.M(T),e.CSS.BM("btn",n),O&&e.CSS.BM("btn","custom-color"),r),type:s,level:a??y.ComponentSizeLevels[t],size:d,onClick:m,onMouseDown:E,noWrap:!0,style:N,startIcon:R,color:i,...I,children:[u,h!=null?x.jsxRuntimeExports.jsx("div",{className:e.CSS.BE("btn","end-content"),children:F.formatChildren(a??y.ComponentSizeLevels[t],h)}):void 0]})}),xe=(t,n,s,r)=>n===!0?"var(--pluto-gray-l5)":s!=null?e.cssString(s):t==="filled"?"var(--pluto-text-on-primary)":"var(--pluto-text-color)",ee=D(({ref:t,children:n,stopPropagation:s,className:r,variant:u="text",size:d="medium",sharp:o=!1,disabled:l=!1,loading:f=!1,onClick:a,color:K,...R})=>{f&&(n=x.jsxRuntimeExports.jsx(_.d4.Loading,{}));const p=l||f,S=c.useCallback(i=>{s&&i.stopPropagation(),!p&&(a==null||a(i))},[s,p,a]);return x.jsxRuntimeExports.jsx("button",{ref:t,className:e.clsx(r,e.CSS.B("btn"),e.CSS.B("btn-icon"),e.CSS.size(d),e.CSS.sharp(o),e.CSS.BM("btn",u),e.CSS.disabled(p)),onClick:S,...R,children:typeof n=="string"?n:c.cloneElement(n,{color:xe(u,p,K),fill:"currentColor",...n.props})})}),te=t=>({value:n,onClick:s,onChange:r,checkedVariant:u="filled",uncheckedVariant:d="outlined",rightClickToggle:o=!1,stopPropagation:l,...f})=>x.jsxRuntimeExports.jsx(t,{...f,checked:n,onClick:a=>{l&&a.stopPropagation(),s==null||s(a),!o&&r(!n)},onContextMenu:a=>{a.preventDefault(),a.stopPropagation(),o&&r(!n)},className:e.CSS(e.CSS.B("btn-toggle"),f.className),variant:n?u:d}),ne=te(k);ne.displayName="ButtonToggle";const oe=te(ee);oe.displayName="ButtonToggleIcon";exports.Button=k;exports.Config=ae;exports.Dialog=J;exports.Icon=ee;exports.Toggle=ne;exports.ToggleIcon=oe;exports.chooseLocation=z;exports.componentRenderProp=de;exports.formatTip=Q;exports.isRenderProp=W;exports.useConfig=H;exports.wrap=D;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as T } from "./jsx-runtime-
|
|
2
|
-
import { g as st, T as ot,
|
|
3
|
-
import { i as _, C as Z, a as rt } from "./state-
|
|
1
|
+
import { j as T } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { g as st, T as ot, d as V } from "./Divider-CMyzWvRC.js";
|
|
3
|
+
import { i as _, C as Z, a as rt } from "./state-CUPEHHgf.js";
|
|
4
4
|
import { A as lt } from "./toArray-Dvn9FA_3.js";
|
|
5
5
|
import { createContext as ct, use as ut, useState as K, useRef as C, useCallback as O, createElement as at, useId as it, cloneElement as U, isValidElement as dt } from "react";
|
|
6
6
|
import { K as i, G as M, M as m, C as o, a as ft, c as mt, v as pt } from "./css-rxwBYwM1.js";
|
|
7
|
-
import { W as xt, f as Tt } from "./WithIcon-
|
|
7
|
+
import { W as xt, f as Tt } from "./WithIcon-BnDZ-Qu7.js";
|
|
8
8
|
import { createPortal as gt } from "react-dom";
|
|
9
9
|
import "./Pack-D50qN0Vu.js";
|
|
10
|
-
import { a as yt } from "./hooks-
|
|
10
|
+
import { a as yt } from "./hooks-B7ZV7Hz6.js";
|
|
11
11
|
const Et = {
|
|
12
12
|
delay: _.milliseconds(750),
|
|
13
13
|
startAccelerating: () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as o } from "./jsx-runtime-
|
|
1
|
+
import { j as o } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { C as t } from "./css-rxwBYwM1.js";
|
|
3
3
|
const i = ({ href: e, className: r, ...s }) => /* @__PURE__ */ o.jsx("video", { className: t(t.B("video"), r), ...s, children: /* @__PURE__ */ o.jsx("source", { id: e, src: e, type: "video/mp4" }) }), m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
4
|
__proto__: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./jsx-runtime-
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-CITbqOLs.cjs"),s=require("./css-CU7tous7.cjs"),r=({href:e,className:t,...i})=>o.jsxRuntimeExports.jsx("video",{className:s.CSS(s.CSS.B("video"),t),...i,children:o.jsxRuntimeExports.jsx("source",{id:e,src:e,type:"video/mp4"})}),c=Object.freeze(Object.defineProperty({__proto__:null,Video:r},Symbol.toStringTag,{value:"Module"}));exports.Video=c;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-
|
|
2
|
-
import {
|
|
3
|
-
import "./state-
|
|
1
|
+
import { j as a } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { b as S, T as y } from "./Divider-CMyzWvRC.js";
|
|
3
|
+
import "./state-CUPEHHgf.js";
|
|
4
4
|
import { isValidElement as v, Children as j } from "react";
|
|
5
5
|
import "./Pack-D50qN0Vu.js";
|
|
6
|
-
import { S as C } from "./Space-
|
|
6
|
+
import { S as C } from "./Space-I_hidXYi.js";
|
|
7
7
|
import { C as e } from "./css-rxwBYwM1.js";
|
|
8
8
|
import { A as E } from "./toArray-Dvn9FA_3.js";
|
|
9
9
|
const p = ({
|
|
@@ -35,15 +35,15 @@ const p = ({
|
|
|
35
35
|
divided: i = !1,
|
|
36
36
|
startIcon: r,
|
|
37
37
|
endIcon: l,
|
|
38
|
-
children:
|
|
38
|
+
children: c,
|
|
39
39
|
color: m,
|
|
40
40
|
className: s,
|
|
41
41
|
noWrap: t = !1,
|
|
42
|
-
shade:
|
|
42
|
+
shade: f,
|
|
43
43
|
weight: n,
|
|
44
44
|
...u
|
|
45
45
|
}) => {
|
|
46
|
-
const x =
|
|
46
|
+
const x = S(m, f), h = j.toArray(r), g = j.toArray(l), b = B(o, c, x, f, n);
|
|
47
47
|
return (
|
|
48
48
|
// @ts-expect-error - level type errors
|
|
49
49
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -63,25 +63,25 @@ const p = ({
|
|
|
63
63
|
children: [
|
|
64
64
|
h,
|
|
65
65
|
i && r != null && /* @__PURE__ */ a.jsx(p, { direction: "y" }),
|
|
66
|
-
|
|
66
|
+
b,
|
|
67
67
|
i && l != null && /* @__PURE__ */ a.jsx(p, { direction: "y" }),
|
|
68
68
|
g
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
)
|
|
72
72
|
);
|
|
73
|
-
}, B = (o, i = [], r, l,
|
|
73
|
+
}, B = (o, i = [], r, l, c) => {
|
|
74
74
|
const m = E(i), s = [];
|
|
75
75
|
let t = [];
|
|
76
|
-
const
|
|
76
|
+
const f = { color: r, level: o, shade: l, weight: c };
|
|
77
77
|
return m.forEach((n) => {
|
|
78
78
|
n != null && (typeof n == "string" || typeof n == "number" || !d(n) ? t.push(n) : (t.length > 0 && (s.push(
|
|
79
79
|
// @ts-expect-error - level type errors
|
|
80
|
-
/* @__PURE__ */ a.jsx(y, { ...
|
|
80
|
+
/* @__PURE__ */ a.jsx(y, { ...f, children: t }, t[0])
|
|
81
81
|
), t = []), s.push(n)));
|
|
82
82
|
}), t.length > 0 && s.push(
|
|
83
83
|
// @ts-expect-error- level type errors
|
|
84
|
-
/* @__PURE__ */ a.jsx(y, { ...
|
|
84
|
+
/* @__PURE__ */ a.jsx(y, { ...f, children: t }, t[0])
|
|
85
85
|
), s.length === 1 ? s[0] : s;
|
|
86
86
|
};
|
|
87
87
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./jsx-runtime-
|
|
1
|
+
"use strict";const l=require("./jsx-runtime-CITbqOLs.cjs"),f=require("./Divider-CJNDIsD4.cjs");require("./state-LaBGf4_k.cjs");const p=require("react");require("./Pack-BbwDtaE6.cjs");const d=require("./Space-BrQoodma.cjs"),s=require("./css-CU7tous7.cjs"),g=require("./toArray-DRKOku1s.cjs"),a=({direction:t="y",className:o,padded:e=!1,...c})=>(e===!0&&(e="center"),l.jsxRuntimeExports.jsx("div",{className:s.CSS(s.CSS.B("divider"),s.CSS.dir(t),e!==!1&&s.CSS.BM("divider","padded"),typeof e=="string"&&s.CSS.loc(e),o),...c})),q=Object.freeze(Object.defineProperty({__proto__:null,Divider:a},Symbol.toStringTag,{value:"Module"})),v=t=>p.isValidElement(t)&&!("hydrate"in t.props),R=({level:t="h1",divided:o=!1,startIcon:e,endIcon:c,children:x,color:S,className:n,noWrap:r=!1,shade:u,weight:i,...m})=>{const j=f.evalColor(S,u),C=p.Children.toArray(e),h=p.Children.toArray(c),E=y(t,x,j,u,i);return l.jsxRuntimeExports.jsxs(d.Space,{className:s.CSS(s.CSS.B("text-icon"),s.CSS.BM("text-icon",t),s.CSS.noWrap(r),n),direction:"x",size:"small",align:"center",...m,style:{...m.style,color:j},children:[C,o&&e!=null&&l.jsxRuntimeExports.jsx(a,{direction:"y"}),E,o&&c!=null&&l.jsxRuntimeExports.jsx(a,{direction:"y"}),h]})},y=(t,o=[],e,c,x)=>{const S=g.A(o),n=[];let r=[];const u={color:e,level:t,shade:c,weight:x};return S.forEach(i=>{i!=null&&(typeof i=="string"||typeof i=="number"||!v(i)?r.push(i):(r.length>0&&(n.push(l.jsxRuntimeExports.jsx(f.Text,{...u,children:r},r[0])),r=[]),n.push(i)))}),r.length>0&&n.push(l.jsxRuntimeExports.jsx(f.Text,{...u,children:r},r[0])),n.length===1?n[0]:n};exports.Divider=a;exports.Divider$1=q;exports.WithIcon=R;exports.formatChildren=y;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
2
|
var l = (t, s, a) => s in t ? u(t, s, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[s] = a;
|
|
3
3
|
var n = (t, s, a) => l(t, typeof s != "symbol" ? s + "" : s, a);
|
|
4
|
-
import { m as d, R as m } from "./state-
|
|
4
|
+
import { m as d, R as m } from "./state-CUPEHHgf.js";
|
|
5
5
|
import { z as r } from "zod";
|
|
6
|
-
import { C as p } from "./provider-
|
|
6
|
+
import { C as p } from "./provider-Dq9t3iAH.js";
|
|
7
7
|
const f = [
|
|
8
8
|
"success",
|
|
9
9
|
"error",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=Object.defineProperty;var m=(t,r,e)=>r in t?A(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var o=(t,r,e)=>m(t,typeof r!="symbol"?r+"":r,e);const c=require("./state-
|
|
1
|
+
"use strict";var A=Object.defineProperty;var m=(t,r,e)=>r in t?A(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var o=(t,r,e)=>m(t,typeof r!="symbol"?r+"":r,e);const c=require("./state-LaBGf4_k.cjs"),s=require("zod"),z=require("./provider-BrBEjlx5.cjs"),u=["success","error","warning","info","loading","disabled","secondary"],l=s.z.enum(u),E=s.z.object({key:s.z.string(),variant:l,message:s.z.string(),description:s.z.string().optional(),time:c.m.z,data:s.z.record(s.z.unknown()).optional()}),p=s.z.object({statuses:E.array()}),d="status.aggregator";class n extends z.Composite{constructor(){super(...arguments);o(this,"schema",p)}async afterUpdate(e){e.set(d,this)}add(e){this.setState(a=>({...a,statuses:[...a.statuses,{time:c.m.now(),...e,key:c.Rt.create()}]}))}}o(n,"TYPE","status.Aggregator");const g=t=>{const r=t.get(d);return r.add.bind(r)},f=t=>{const r=t.getOptional(d);return r!=null?r.add.bind(r):()=>{}},i=(t,r)=>{if(!(t instanceof Error))throw t;return{variant:"error",message:r??t.message,description:r!=null?t.message:void 0}},y=t=>(r,e)=>{if(typeof r!="function")return t(i(r,e));(async()=>{try{await r()}catch(a){t(i(a,e))}})()},T=t=>async(r,e)=>{try{await r()}catch(a){t(i(a,e))}},v=t=>y(g(t)),H=t=>T(g(t)),R={[n.TYPE]:n};exports.Aggregator=n;exports.REGISTRY=R;exports.VARIANTS=u;exports.aggregatorStateZ=p;exports.createErrorHandler=y;exports.specZ=E;exports.useAdder=g;exports.useAsyncErrorHandler=H;exports.useErrorHandler=v;exports.useOptionalAdder=f;exports.variantZ=l;
|
package/dist/align.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-Cztvb3-K.cjs");exports.Align=e.external;
|
package/dist/align.js
CHANGED
package/dist/button.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-dLVcM8tt.cjs");exports.Button=e.external;
|
package/dist/button.js
CHANGED
package/dist/color.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-BWb18P9x.cjs");exports.Color=e.external;
|
package/dist/color.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./state-
|
|
1
|
+
"use strict";const i=require("./state-LaBGf4_k.cjs"),g=e=>JSON.parse(JSON.stringify(e)),j=(e,...n)=>(n.forEach(a=>{let t=e;const o=a.split(".");o.forEach((s,r)=>{r===o.length-1?delete t[s]:s in t&&(t=t[s])})}),e),d=(e,n,a="")=>{const t={},o=(s,r,l)=>{if(typeof s!=typeof r||s===null||r===null){t[l]=[s,r];return}if(typeof s=="object"&&typeof r=="object")if(Array.isArray(s)&&Array.isArray(r)){if(s.length!==r.length){t[l]=[s,r];return}for(let f=0;f<s.length;f++)o(s[f],r[f],`${l}[${f}]`)}else new Set([...Object.keys(s),...Object.keys(r)]).forEach(f=>{o(s[f],r[f],l!==""?`${l}.${f}`:f)});else s!==r&&(t[l]=[s,r])};return o(e,n,a),t},u=(e,n)=>{const a=Array.isArray(e),t=Array.isArray(n);if(a!==t)return!1;if(a&&t){const r=e,l=n;if(r.length!==l.length)return!1;for(let f=0;f<r.length;f++)if(!u(r[f],l[f]))return!1;return!0}if(e==null||n==null||typeof e!="object"||typeof n!="object")return e===n;if("equals"in e)return e.equals(n);const o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(const r of o){const l=e[r],f=n[r];if(typeof l=="object"&&typeof f=="object"){if(!u(l,f))return!1}else if(l!==f)return!1}return!0},p=(e,n)=>{if(typeof e!="object"||e==null)return e===n;const a=Object.keys(e),t=Object.keys(n);if(t.length>a.length)return!1;for(const o of t){const s=e[o],r=n[o];if(typeof s=="object"&&typeof r=="object"){if(!p(s,r))return!1}else if(s!==r)return!1}return!0},y=(e,...n)=>{if(n.length===0)return e;const a=n.shift();if(i.o(e)&&i.o(a))for(const t in a)try{i.o(a[t])?(t in e||Object.assign(e,{[t]:{}}),y(e[t],a[t])):Object.assign(e,{[t]:a[t]})}catch(o){throw o instanceof TypeError?new TypeError(`.${t}: ${o.message}`):o}return y(e,...n)},O=(e,n,a)=>{const t=(o,s,r)=>{for(const l in s){const f=s[l],c=b(r);if(c!=null&&c[l]){const h=c[l].safeParse(f);h.success&&(o[l]=h.data)}else typeof f=="object"&&!Array.isArray(f)&&f!==null&&r&&r.shape&&r.shape[l]&&(o[l]||(o[l]={}),t(o[l],f,r.shape[l]))}return o};return t({...e},n,a)},b=e=>{var n;return((n=e._def)==null?void 0:n.typeName)==="ZodEffects"?b(e._def.schema):e==null?void 0:e.shape},A=Object.freeze(Object.defineProperty({__proto__:null,copy:g,deleteD:j,difference:d,element:i.p,equal:u,get:i.c,has:i.g,override:y,overrideValidItems:O,partialEqual:p,pathsMatch:i.y,remove:i.h,set:i.f,transformPath:i.u},Symbol.toStringTag,{value:"Module"}));exports.I=A;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as b, f as j, h as d, y as O, g as m, c as A, p as $, o as c } from "./state-
|
|
1
|
+
import { u as b, f as j, h as d, y as O, g as m, c as A, p as $, o as c } from "./state-CUPEHHgf.js";
|
|
2
2
|
const k = (e) => JSON.parse(JSON.stringify(e)), v = (e, ...f) => (f.forEach((a) => {
|
|
3
3
|
let t = e;
|
|
4
4
|
const o = a.split(".");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("./state-
|
|
1
|
+
"use strict";const u=require("./state-LaBGf4_k.cjs");let a=null;const i=()=>(a??(a=document.createElement("canvas")),a),c=(e,s,n)=>{if(u.S.RUNTIME==="node")return{width:0,height:0};n??(n=i().getContext("2d")),n.font=s;const t=n.measureText(e);return{width:Math.trunc(Math.abs(t.actualBoundingBoxLeft)+Math.abs(t.actualBoundingBoxRight)),height:Math.trunc(Math.abs(t.actualBoundingBoxAscent)+Math.abs(t.actualBoundingBoxDescent))}};exports.dimensions=c;
|
package/dist/dropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Dropdown-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Dropdown-CL7BefC8.cjs");exports.Dropdown=o.Dropdown;
|
package/dist/dropdown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var P=(h,e,t)=>e in h?L(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var n=(h,e,t)=>P(h,typeof e!="symbol"?e+"":e,t);const v=require("./state-
|
|
1
|
+
"use strict";var L=Object.defineProperty;var P=(h,e,t)=>e in h?L(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var n=(h,e,t)=>P(h,typeof e!="symbol"?e+"":e,t);const v=require("./state-LaBGf4_k.cjs"),x=require("zod"),_=require("./provider-BrBEjlx5.cjs"),a=require("./css-CU7tous7.cjs"),d=(h,e)=>a.Mo.construct(a.Mo.left(h)-e.x,a.Mo.top(h)-e.y,a.Mo.width(h)+e.x*2,a.Mo.height(h)+e.y*2);class u{constructor(e,t=a.b.XY.IDENTITY){n(this,"scale_");n(this,"wrapped");this.wrapped=e,this.scale_=t}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(e){this.wrapped.fontStretch=e}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(e){this.wrapped.fontVariantCaps=e}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(e){this.wrapped.wordSpacing=e}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(e){this.wrapped.letterSpacing=e}get textRendering(){return this.wrapped.textRendering}set textRendering(e){this.wrapped.textRendering=e}reset(){this.wrapped.reset()}applyScale(e){return new u(this,e)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.wrapped.miterLimit}set miterLimit(e){this.wrapped.miterLimit=this.scale_.x.dim(e)}get globalAlpha(){return this.wrapped.globalAlpha}set globalAlpha(e){this.wrapped.globalAlpha=e}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(e){this.wrapped.globalCompositeOperation=e}get fillStyle(){return this.wrapped.fillStyle}set fillStyle(e){this.wrapped.fillStyle=e}get strokeStyle(){return this.wrapped.strokeStyle}set strokeStyle(e){this.wrapped.strokeStyle=e}drawImage(e,t,s,r,i,o,p,l,f){this.wrapped.drawImage(e,t,s,r,i,o,p,l,f)}beginPath(){this.wrapped.beginPath()}clip(e,t){this.wrapped.clip(e,t)}fill(e,t){if(e==null)return this.wrapped.fill();this.wrapped.fill(e,t)}isPointInPath(e,t,s,r){return this.wrapped.isPointInPath(e,t,s,r)}isPointInStroke(e,t,s){return this.wrapped.isPointInStroke(e,t,s)}stroke(e){if(e==null)return this.wrapped.stroke();this.wrapped.stroke(e)}createConicGradient(e,t,s){return this.wrapped.createConicGradient(e,t,s)}createLinearGradient(e,t,s,r){return this.wrapped.createLinearGradient(e,t,s,r)}createPattern(e,t){return this.wrapped.createPattern(e,t)}createRadialGradient(e,t,s,r,i,o){return this.wrapped.createRadialGradient(e,t,s,r,i,o)}get filter(){return this.wrapped.filter}set filter(e){this.wrapped.filter=e}createImageData(e,t,s){return this.wrapped.createImageData(e,t,s)}getImageData(e,t,s,r,i){return this.wrapped.getImageData(e,t,s,r,i)}putImageData(e,t,s,r,i,o,p){this.wrapped.putImageData(e,t,s,r,i,o,p)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(e){this.wrapped.imageSmoothingEnabled=e}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(e){this.wrapped.imageSmoothingQuality=e}arc(e,t,s,r,i,o){this.wrapped.arc(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),r,i,o)}arcTo(e,t,s,r,i){this.wrapped.arcTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.dim(i))}bezierCurveTo(e,t,s,r,i,o){this.wrapped.bezierCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.pos(i),this.scale_.y.pos(o))}closePath(){this.wrapped.closePath()}ellipse(e,t,s,r,i,o,p,l){this.wrapped.ellipse(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),i,o,p,l)}lineTo(e,t){this.wrapped.lineTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}moveTo(e,t){this.wrapped.moveTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}quadraticCurveTo(e,t,s,r){this.wrapped.quadraticCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r))}rect(e,t,s,r){this.wrapped.rect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}roundRect(e,t,s,r,i){this.wrapped.roundRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),typeof i=="number"?this.scale_.x.dim(i):i)}get lineCap(){return this.wrapped.lineCap}set lineCap(e){this.wrapped.lineCap=e}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(e){this.wrapped.lineDashOffset=this.scale_.x.dim(e)}get lineJoin(){return this.wrapped.lineJoin}set lineJoin(e){this.wrapped.lineJoin=e}get lineWidth(){return this.wrapped.lineWidth}set lineWidth(e){this.wrapped.lineWidth=this.scale_.x.dim(e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(e){const t=Array.from(e).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(t)}clearRect(e,t,s,r){this.wrapped.clearRect(e,t,s,r)}fillRect(e,t,s,r){this.wrapped.fillRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}strokeRect(e,t,s,r){this.wrapped.strokeRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(e){this.wrapped.shadowBlur=e}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(e){this.wrapped.shadowColor=e}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(e){this.wrapped.shadowOffsetX=e}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.wrapped.restore()}save(){this.wrapped.save()}fillText(e,t,s,r){this.wrapped.fillText(e,this.scale_.x.pos(t),this.scale_.y.pos(s),r!=null?this.scale_.x.dim(r):void 0)}measureText(e){this.wrapped.font=m(this.wrapped.font,this.scale_.x.reverse());const t=this.wrapped.measureText(e);return this.wrapped.font=m(this.wrapped.font,this.scale_.x),t}strokeText(e,t,s,r){this.wrapped.strokeText(e,this.scale_.x.pos(t),this.scale_.y.pos(s),r!=null?this.scale_.x.dim(r):void 0)}get direction(){return this.wrapped.direction}set direction(e){this.wrapped.direction=e}get font(){return this.wrapped.font}set font(e){this.wrapped.font=m(e,this.scale_.x)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(e){this.wrapped.fontKerning=e}get textAlign(){return this.wrapped.textAlign}set textAlign(e){this.wrapped.textAlign=e}get textBaseline(){return this.wrapped.textBaseline}set textBaseline(e){this.wrapped.textBaseline=e}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(e){this.wrapped.rotate(e)}scale(e,t){this.wrapped.scale(e,t)}scissor(e,t=a.G.ZERO){const s=new D(this.scale_);return e=d(e,t),s.rect(...a.G.couple(a.Mo.topLeft(e)),...a._.couple(a.Mo.dims(e))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(e,t,s,r,i,o){this.wrapped.setTransform(e,t,s,r,i,o)}transform(e,t,s,r,i,o){this.wrapped.transform(e,t,s,r,i,o)}translate(e,t){this.wrapped.translate(e,t)}}const y=/(\d+(\.\d+)?)px/,m=(h,e)=>{var r;const t=Number((r=h.match(y))==null?void 0:r[1]);if(t==null)return h;const s=e.dim(t);return h.replace(y,`${s}px`)};class D{constructor(e=a.b.XY.IDENTITY,t){n(this,"scale_");n(this,"path");this.scale_=e,t instanceof Path2D||typeof t=="string"?this.path=new Path2D(t):this.path=new Path2D}addPath(e,t){this.path.addPath(e,t)}arc(e,t,s,r,i,o){this.path.arc(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),r,i,o)}arcTo(e,t,s,r,i){this.path.arcTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.dim(i))}bezierCurveTo(e,t,s,r,i,o){this.path.bezierCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r),this.scale_.x.pos(i),this.scale_.y.pos(o))}closePath(){this.path.closePath()}ellipse(e,t,s,r,i,o,p,l){this.path.ellipse(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),i,o,p,l)}lineTo(e,t){this.path.lineTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}moveTo(e,t){this.path.moveTo(this.scale_.x.pos(e),this.scale_.y.pos(t))}quadraticCurveTo(e,t,s,r){this.path.quadraticCurveTo(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.pos(s),this.scale_.y.pos(r))}rect(e,t,s,r){this.path.rect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r))}roundRect(e,t,s,r,i){const o=this.scaleRadii(i);this.path.roundRect(this.scale_.x.pos(e),this.scale_.y.pos(t),this.scale_.x.dim(s),this.scale_.y.dim(r),o)}scaleRadii(e){return e==null?e:typeof e=="number"?this.scale_.x.dim(e):Array.isArray(e)?e.map(t=>this.scaleRadius(t)):this.scaleRadius(e)}scaleRadius(e){return typeof e=="number"?this.scale_.x.dim(e):{x:this.scale_.x.dim(e.x??0),y:this.scale_.y.dim(e.y??0)}}getPath(){return this.path}}const M=`precision mediump float;
|
|
2
2
|
|
|
3
3
|
void main(void) {
|
|
4
4
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
2
|
var A = (h, e, t) => e in h ? b(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t;
|
|
3
3
|
var o = (h, e, t) => A(h, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { $ as L, i as P } from "./state-
|
|
4
|
+
import { $ as L, i as P } from "./state-CUPEHHgf.js";
|
|
5
5
|
import { z as y } from "zod";
|
|
6
|
-
import { M as D, d as I, L as B } from "./provider-
|
|
6
|
+
import { M as D, d as I, L as B } from "./provider-Dq9t3iAH.js";
|
|
7
7
|
import { M as n, r as u, G as p, _ as O, C as k, Z as G } from "./css-rxwBYwM1.js";
|
|
8
8
|
const g = (h, e) => n.construct(
|
|
9
9
|
n.left(h) - e.x,
|
package/dist/ether.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-BrBEjlx5.cjs"),r=require("./css-CU7tous7.cjs"),a=require("./transformColorsToHex-B2Bui-Wf.cjs");require("./state-LaBGf4_k.cjs");const e=require("./value-C6JZdCF2.cjs"),i=require("./aggregator-QqWwGnYH.cjs"),o=require("./eraser-D2I1qgOg.cjs"),s=require("./fontString-C7H8Imxd.cjs"),T=Object.freeze(Object.defineProperty({__proto__:null,Color:r.Color,ZERO:r.ZERO,crudeZ:r.crudeZ,cssString:r.cssString,fromGradient:r.fromGradient,fromHSLA:r.fromHSLA,gradientZ:r.gradientZ,paletteZ:r.paletteZ,stopZ:r.stopZ,toHex:r.toHex,transformColorsToHex:a.transformColorsToHex},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:s.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),E=Object.freeze(Object.defineProperty({__proto__:null,Context:o.Context,Controller:e.Controller,GLProgram:o.GLProgram,Loop:o.Loop,REASON_DATA:e.REASON_DATA,REASON_LAYOUT:e.REASON_LAYOUT,REASON_TOOL:e.REASON_TOOL},Symbol.toStringTag,{value:"Module"})),c=Object.freeze(Object.defineProperty({__proto__:null,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),Y=()=>{const n=new t.l((l,R)=>postMessage(l,R));onmessage=n.handle.bind(n);const S={...e.REGISTRY$18,...e.REGISTRY$17,...e.REGISTRY$16,...e.REGISTRY$15,...e.REGISTRY$14,...o.REGISTRY,...e.REGISTRY$13,...e.REGISTRY$12,...e.REGISTRY,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...e.REGISTRY$8,...i.REGISTRY,...e.REGISTRY$7,...e.REGISTRY$6,...t.REGISTRY,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1};t.render({comms:n.route("vis"),registry:S})},G=Object.freeze(Object.defineProperty({__proto__:null,render:Y},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.color=T;exports.lineplot=c;exports.pluto=G;exports.render=E;exports.theming=u;
|
package/dist/ether.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { P as R, R as e, S as n, a as l, b as S, f as i, t as m, u as T, l as p, r as E } from "./provider-
|
|
2
|
-
import { c as ua } from "./provider-
|
|
1
|
+
import { P as R, R as e, S as n, a as l, b as S, f as i, t as m, u as T, l as p, r as E } from "./provider-Dq9t3iAH.js";
|
|
2
|
+
import { c as ua } from "./provider-Dq9t3iAH.js";
|
|
3
3
|
import { a as G, Z as Y, h as c, c as f, j as $, k as _, o as I, p as u, s as d, q as g } from "./css-rxwBYwM1.js";
|
|
4
4
|
import { t as b } from "./transformColorsToHex-B6dG2LA6.js";
|
|
5
|
-
import "./state-
|
|
6
|
-
import { C as x, R as O, a as A, b as y, L as j, c as s, X as v, Y as P, l as Z, x as L, y as N, d as h, e as M, f as z, g as C, h as H, i as X, j as k, k as w, m as D, n as q, o as B, p as F, q as K, r as U, s as J, t as Q, u as V, v as W } from "./value-
|
|
7
|
-
import { A as ga, D as ba, E as xa, F as Oa, w as Aa, z as ya, B as ja, G as va } from "./value-
|
|
8
|
-
import { R as aa } from "./aggregator-
|
|
9
|
-
import { C as ea, G as sa, L as oa, R as ta } from "./eraser-
|
|
10
|
-
import { f as ra } from "./fontString-
|
|
5
|
+
import "./state-CUPEHHgf.js";
|
|
6
|
+
import { C as x, R as O, a as A, b as y, L as j, c as s, X as v, Y as P, l as Z, x as L, y as N, d as h, e as M, f as z, g as C, h as H, i as X, j as k, k as w, m as D, n as q, o as B, p as F, q as K, r as U, s as J, t as Q, u as V, v as W } from "./value-Dk2DJbst.js";
|
|
7
|
+
import { A as ga, D as ba, E as xa, F as Oa, w as Aa, z as ya, B as ja, G as va } from "./value-Dk2DJbst.js";
|
|
8
|
+
import { R as aa } from "./aggregator-AgOKLWHz.js";
|
|
9
|
+
import { C as ea, G as sa, L as oa, R as ta } from "./eraser-Dmishn8h.js";
|
|
10
|
+
import { f as ra } from "./fontString-DdV9bi9l.js";
|
|
11
11
|
const Ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
12
|
__proto__: null,
|
|
13
13
|
Color: G,
|