@synnaxlabs/pluto 0.21.5 → 0.21.6
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/{Keyboard-BqO4SYSr.js → Keyboard-DCHQVLbP.js} +2 -2
- package/dist/{Keyboard-BqO4SYSr.js.map → Keyboard-DCHQVLbP.js.map} +1 -1
- package/dist/{Keyboard-CsgjS96C.cjs → Keyboard-DD2KYOn6.cjs} +2 -2
- package/dist/{Keyboard-CsgjS96C.cjs.map → Keyboard-DD2KYOn6.cjs.map} +1 -1
- package/dist/{Link-BaPpY2rf.js → Link-D48KH--6.js} +2 -2
- package/dist/{Link-BaPpY2rf.js.map → Link-D48KH--6.js.map} +1 -1
- package/dist/{Link-B6B7MB7O.cjs → Link-DlYOVhHH.cjs} +2 -2
- package/dist/{Link-B6B7MB7O.cjs.map → Link-DlYOVhHH.cjs.map} +1 -1
- package/dist/{List-aJEsDHql.js → List-CUO-_-jL.js} +2 -2
- package/dist/{List-aJEsDHql.js.map → List-CUO-_-jL.js.map} +1 -1
- package/dist/{List-J5T88ynF.cjs → List-CUq1lENO.cjs} +2 -2
- package/dist/{List-J5T88ynF.cjs.map → List-CUq1lENO.cjs.map} +1 -1
- package/dist/{Toggle-CAW20E9V.cjs → Toggle-ClTExSi6.cjs} +4 -4
- package/dist/{Toggle-CAW20E9V.cjs.map → Toggle-ClTExSi6.cjs.map} +1 -1
- package/dist/{Toggle-DcOiWiHG.js → Toggle-DozaP3Tx.js} +4 -4
- package/dist/{Toggle-DcOiWiHG.js.map → Toggle-DozaP3Tx.js.map} +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/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{external-CPB95nWX.js → external-B0DCjEX5.js} +2 -2
- package/dist/{external-CPB95nWX.js.map → external-B0DCjEX5.js.map} +1 -1
- package/dist/{external-Brr6przd.js → external-BGyrJwT6.js} +2 -2
- package/dist/{external-Brr6przd.js.map → external-BGyrJwT6.js.map} +1 -1
- package/dist/{external-DL9-TJzC.cjs → external-BWNeNJEb.cjs} +4 -4
- package/dist/{external-DL9-TJzC.cjs.map → external-BWNeNJEb.cjs.map} +1 -1
- package/dist/{external-CtH30naU.js → external-BX1SuP7b.js} +2 -2
- package/dist/{external-CtH30naU.js.map → external-BX1SuP7b.js.map} +1 -1
- package/dist/{external-p8bRcctL.cjs → external-BbCvNSWY.cjs} +2 -2
- package/dist/{external-p8bRcctL.cjs.map → external-BbCvNSWY.cjs.map} +1 -1
- package/dist/{external-Drem1ngI.cjs → external-Br3dSWZy.cjs} +2 -2
- package/dist/{external-Drem1ngI.cjs.map → external-Br3dSWZy.cjs.map} +1 -1
- package/dist/{external-B6yW9yjs.js → external-Bw-gM1WS.js} +2 -2
- package/dist/external-Bw-gM1WS.js.map +1 -0
- package/dist/{external-CYRIymJR.cjs → external-CTg9-80v.cjs} +2 -2
- package/dist/{external-CYRIymJR.cjs.map → external-CTg9-80v.cjs.map} +1 -1
- package/dist/{external-CZli69bF.cjs → external-Cq-yOszj.cjs} +2 -2
- package/dist/{external-CZli69bF.cjs.map → external-Cq-yOszj.cjs.map} +1 -1
- package/dist/{external-axSECIuu.cjs → external-CsyhVOiV.cjs} +3 -3
- package/dist/{external-axSECIuu.cjs.map → external-CsyhVOiV.cjs.map} +1 -1
- package/dist/{external-Dpr-yBfa.cjs → external-DE-HpRm9.cjs} +3 -3
- package/dist/external-DE-HpRm9.cjs.map +1 -0
- package/dist/{external-yv4F8ndX.js → external-DGEGrIB8.js} +3 -3
- package/dist/{external-yv4F8ndX.js.map → external-DGEGrIB8.js.map} +1 -1
- package/dist/{external-Bn7V_LTL.js → external-DWisAHYJ.js} +3 -3
- package/dist/{external-Bn7V_LTL.js.map → external-DWisAHYJ.js.map} +1 -1
- package/dist/{external-Doprw1Uu.js → external-DX1JRejp.js} +4 -4
- package/dist/{external-Doprw1Uu.js.map → external-DX1JRejp.js.map} +1 -1
- package/dist/{external-wfv-EKsR.js → external-DrUfLzJs.js} +4 -4
- package/dist/{external-wfv-EKsR.js.map → external-DrUfLzJs.js.map} +1 -1
- package/dist/{external-B695Iunb.js → external-DwY1uz6Y.js} +2 -2
- package/dist/{external-B695Iunb.js.map → external-DwY1uz6Y.js.map} +1 -1
- package/dist/{external-D8uwkCSk.js → external-EIV24CTN.js} +3 -3
- package/dist/{external-D8uwkCSk.js.map → external-EIV24CTN.js.map} +1 -1
- package/dist/{external-DnojrP1p.cjs → external-JjFzMlTY.cjs} +3 -3
- package/dist/{external-DnojrP1p.cjs.map → external-JjFzMlTY.cjs.map} +1 -1
- package/dist/{external-BoNCimxR.cjs → external-VofAmo6_.cjs} +2 -2
- package/dist/external-VofAmo6_.cjs.map +1 -0
- package/dist/{external-kZAfJn1X.cjs → external-gzESdEqw.cjs} +3 -3
- package/dist/{external-kZAfJn1X.cjs.map → external-gzESdEqw.cjs.map} +1 -1
- package/dist/{external-CflFsngP.js → external-jVPC18yY.js} +3 -3
- package/dist/external-jVPC18yY.js.map +1 -0
- package/dist/{external-BGl-cQCe.cjs → external-rv9PfMM3.cjs} +4 -4
- package/dist/{external-BGl-cQCe.cjs.map → external-rv9PfMM3.cjs.map} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +21 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +29 -34
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- 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/src/form/Form.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/theming.cjs +2 -2
- 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/package.json +5 -5
- package/dist/external-B6yW9yjs.js.map +0 -1
- package/dist/external-BoNCimxR.cjs.map +0 -1
- package/dist/external-CflFsngP.js.map +0 -1
- package/dist/external-Dpr-yBfa.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
2
2
|
import { C as CSS } from "./css-DoalWJF6.js";
|
|
3
|
-
import { e as Text } from "./Toggle-
|
|
3
|
+
import { e as Text } from "./Toggle-DozaP3Tx.js";
|
|
4
4
|
const Keyboard = ({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
@@ -11,4 +11,4 @@ const Keyboard = ({
|
|
|
11
11
|
export {
|
|
12
12
|
Keyboard as K
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=Keyboard-
|
|
14
|
+
//# sourceMappingURL=Keyboard-DCHQVLbP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyboard-
|
|
1
|
+
{"version":3,"file":"Keyboard-DCHQVLbP.js","sources":["../src/text/Keyboard.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\nimport { type text } from \"@/text/core\";\nimport { type TextProps, Text } from \"@/text/Text\";\n\nimport \"@/text/Keyboard.css\";\n\nexport type KeyboardProps<L extends text.Level = \"h1\"> = TextProps<L>;\n\nexport const Keyboard = <L extends text.Level = \"p\">({\n className,\n ...props\n}: KeyboardProps<L>): ReactElement => (\n // @ts-expect-error\n <Text<L> className={CSS(className, CSS.BM(\"text\", \"keyboard\"))} {...props} />\n);\n"],"names":["jsx"],"mappings":";;;AAmBO,MAAM,WAAW,CAA6B;AAAA,EACnD;AAAA,EACA,GAAG;AACL;AAAA;AAAA,EAEGA,kCAAAA,IAAA,MAAA,EAAQ,WAAW,IAAI,WAAW,IAAI,GAAG,QAAQ,UAAU,CAAC,GAAI,GAAG,MAAO,CAAA;AAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
|
|
3
3
|
const css = require("./css-Pf9qxhQ4.cjs");
|
|
4
|
-
const Toggle = require("./Toggle-
|
|
4
|
+
const Toggle = require("./Toggle-ClTExSi6.cjs");
|
|
5
5
|
const Keyboard = ({
|
|
6
6
|
className,
|
|
7
7
|
...props
|
|
@@ -10,4 +10,4 @@ const Keyboard = ({
|
|
|
10
10
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.Text, { className: css.CSS(className, css.CSS.BM("text", "keyboard")), ...props })
|
|
11
11
|
);
|
|
12
12
|
exports.Keyboard = Keyboard;
|
|
13
|
-
//# sourceMappingURL=Keyboard-
|
|
13
|
+
//# sourceMappingURL=Keyboard-DD2KYOn6.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyboard-
|
|
1
|
+
{"version":3,"file":"Keyboard-DD2KYOn6.cjs","sources":["../src/text/Keyboard.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\nimport { type text } from \"@/text/core\";\nimport { type TextProps, Text } from \"@/text/Text\";\n\nimport \"@/text/Keyboard.css\";\n\nexport type KeyboardProps<L extends text.Level = \"h1\"> = TextProps<L>;\n\nexport const Keyboard = <L extends text.Level = \"p\">({\n className,\n ...props\n}: KeyboardProps<L>): ReactElement => (\n // @ts-expect-error\n <Text<L> className={CSS(className, CSS.BM(\"text\", \"keyboard\"))} {...props} />\n);\n"],"names":["jsx","Text","CSS"],"mappings":";;;;AAmBO,MAAM,WAAW,CAA6B;AAAA,EACnD;AAAA,EACA,GAAG;AACL;AAAA;AAAA,EAEGA,2BAAAA,kBAAAA,IAAAC,OAAAA,MAAA,EAAQ,WAAWC,IAAAA,IAAI,WAAWA,IAAAA,IAAI,GAAG,QAAQ,UAAU,CAAC,GAAI,GAAG,MAAO,CAAA;AAAA;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
2
|
-
import { B as Button } from "./Toggle-
|
|
2
|
+
import { B as Button } from "./Toggle-DozaP3Tx.js";
|
|
3
3
|
const Link = ({
|
|
4
4
|
href,
|
|
5
5
|
target,
|
|
@@ -10,4 +10,4 @@ const Link = ({
|
|
|
10
10
|
export {
|
|
11
11
|
Link as L
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=Link-
|
|
13
|
+
//# sourceMappingURL=Link-D48KH--6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link-
|
|
1
|
+
{"version":3,"file":"Link-D48KH--6.js","sources":["../src/button/Link.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Button, type ButtonProps } from \"@/button/Button\";\nimport { type Text } from \"@/text\";\n\n/** Props for the {@link Link} component. */\nexport interface LinkProps<L extends Text.Level = \"h1\">\n extends ButtonProps,\n Pick<Text.LinkProps<L>, \"href\" | \"target\"> {}\n/**\n * Use.Link renders a button that looks like a link and redirects to the given href\n * when clicked.\n *\n * @param props - Props for the component. Identical to the props for the Use component,\n * excluding 'variant', and adding the following:\n * @param props.href - The URL to redirect to when the button is clicked.\n * @param props.target - The target of the link. Defaults to \"_self\".\n */\n\nexport const Link = <L extends Text.Level = \"h1\">({\n href,\n target,\n ...props\n}: LinkProps<L>): ReactElement => {\n // @ts-expect-error\n return <Button<\"a\"> el=\"a\" href={href} {...props} />;\n};\n"],"names":[],"mappings":";;AA4BO,MAAM,OAAO,CAA8B;AAAA,EAChD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAEhC,+CAAQ,QAAY,EAAA,IAAG,KAAI,MAAa,GAAG,MAAO,CAAA;AACpD;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
|
|
3
|
-
const Toggle = require("./Toggle-
|
|
3
|
+
const Toggle = require("./Toggle-ClTExSi6.cjs");
|
|
4
4
|
const Link = ({
|
|
5
5
|
href,
|
|
6
6
|
target,
|
|
@@ -9,4 +9,4 @@ const Link = ({
|
|
|
9
9
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.Button, { el: "a", href, ...props });
|
|
10
10
|
};
|
|
11
11
|
exports.Link = Link;
|
|
12
|
-
//# sourceMappingURL=Link-
|
|
12
|
+
//# sourceMappingURL=Link-DlYOVhHH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link-
|
|
1
|
+
{"version":3,"file":"Link-DlYOVhHH.cjs","sources":["../src/button/Link.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Button, type ButtonProps } from \"@/button/Button\";\nimport { type Text } from \"@/text\";\n\n/** Props for the {@link Link} component. */\nexport interface LinkProps<L extends Text.Level = \"h1\">\n extends ButtonProps,\n Pick<Text.LinkProps<L>, \"href\" | \"target\"> {}\n/**\n * Use.Link renders a button that looks like a link and redirects to the given href\n * when clicked.\n *\n * @param props - Props for the component. Identical to the props for the Use component,\n * excluding 'variant', and adding the following:\n * @param props.href - The URL to redirect to when the button is clicked.\n * @param props.target - The target of the link. Defaults to \"_self\".\n */\n\nexport const Link = <L extends Text.Level = \"h1\">({\n href,\n target,\n ...props\n}: LinkProps<L>): ReactElement => {\n // @ts-expect-error\n return <Button<\"a\"> el=\"a\" href={href} {...props} />;\n};\n"],"names":["Button"],"mappings":";;;AA4BO,MAAM,OAAO,CAA8B;AAAA,EAChD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAEhC,0DAAQA,OAAY,QAAA,EAAA,IAAG,KAAI,MAAa,GAAG,MAAO,CAAA;AACpD;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
2
2
|
import { c as S } from "./aggregator-Dl2jHye5.js";
|
|
3
|
-
import { f as useMemoCompare, g as InfiniteProvider, h as DataProvider } from "./Toggle-
|
|
3
|
+
import { f as useMemoCompare, g as InfiniteProvider, h as DataProvider } from "./Toggle-DozaP3Tx.js";
|
|
4
4
|
const List = ({
|
|
5
5
|
children,
|
|
6
6
|
data,
|
|
@@ -24,4 +24,4 @@ const List = ({
|
|
|
24
24
|
export {
|
|
25
25
|
List as L
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=List-
|
|
27
|
+
//# sourceMappingURL=List-CUO-_-jL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List-
|
|
1
|
+
{"version":3,"file":"List-CUO-_-jL.js","sources":["../src/list/List.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { useMemo, type PropsWithChildren, type ReactElement } from \"react\";\n\nimport { type Keyed, type Key, compare } from \"@synnaxlabs/x\";\n\nimport { DataProvider } from \"@/list/Data\";\nimport { InfiniteProvider } from \"@/list/Infinite\";\nimport { useMemoCompare } from \"@/memo\";\n\nexport interface ListProps<K extends Key = Key, E extends Keyed<K> = Keyed<K>>\n extends PropsWithChildren<unknown> {\n data?: E[];\n emptyContent?: ReactElement;\n omit?: K[];\n}\n\n/**\n * The main component for building a List. By itself, it does not render any HTML, and\n * should be used in conjunction with its sub-components (List.'X') to build a list\n * component to fit your needs.\n *\n * @param props - The props for the List component.\n * @param props.data - The data to be displayed in the list. The values of the object in\n * each entry of the array must satisfy the {@link RenderableValue} interface i.e. they\n * must be a primitive type or implement a 'toString' method.\n * @param props.children - Sub-components of the List component to add additional functionality.\n *\n */\nexport const List = <K extends Key = Key, E extends Keyed<K> = Keyed<K>>({\n children,\n data,\n emptyContent,\n omit,\n}: ListProps<K, E>): ReactElement => {\n const omittedData = useMemoCompare(\n () => (omit != null ? data?.filter((e) => !omit.includes(e.key)) : data),\n ([prevOmit, prevData], [omit, data]) => {\n let omitsEqual = false;\n if (prevOmit != null && omit != null)\n omitsEqual = compare.unorderedPrimitiveArrays(prevOmit, omit) === compare.EQUAL;\n else omitsEqual = prevOmit == omit;\n return prevData === data && omitsEqual;\n },\n [omit, data] as [K[] | undefined, E[] | undefined],\n );\n return (\n <InfiniteProvider>\n <DataProvider<K, E> data={omittedData} emptyContent={emptyContent}>\n {children}\n </DataProvider>\n </InfiniteProvider>\n );\n};\n"],"names":["omit","data","compare","jsx"],"mappings":";;;AAoCO,MAAM,OAAO,CAAqD;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,cAAc;AAAA,IAClB,MAAO,QAAQ,OAAO,6BAAM,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,GAAG,KAAK;AAAA,IACnE,CAAC,CAAC,UAAU,QAAQ,GAAG,CAACA,OAAMC,KAAI,MAAM;AACtC,UAAI,aAAa;AACb,UAAA,YAAY,QAAQD,SAAQ;AAC9B,qBAAaE,EAAQ,yBAAyB,UAAUF,KAAI,MAAME,EAAQ;AAAA;AACvE,qBAAa,YAAYF;AAC9B,aAAO,aAAaC,SAAQ;AAAA,IAC9B;AAAA,IACA,CAAC,MAAM,IAAI;AAAA,EAAA;AAGX,SAAAE,kCAAA,IAAC,oBACC,UAACA,kCAAA,IAAA,cAAA,EAAmB,MAAM,aAAa,cACpC,SACH,CAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
|
|
3
3
|
const aggregator = require("./aggregator-Ca8xiVD2.cjs");
|
|
4
|
-
const Toggle = require("./Toggle-
|
|
4
|
+
const Toggle = require("./Toggle-ClTExSi6.cjs");
|
|
5
5
|
const List = ({
|
|
6
6
|
children,
|
|
7
7
|
data,
|
|
@@ -23,4 +23,4 @@ const List = ({
|
|
|
23
23
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.InfiniteProvider, { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.DataProvider, { data: omittedData, emptyContent, children }) });
|
|
24
24
|
};
|
|
25
25
|
exports.List = List;
|
|
26
|
-
//# sourceMappingURL=List-
|
|
26
|
+
//# sourceMappingURL=List-CUq1lENO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List-
|
|
1
|
+
{"version":3,"file":"List-CUq1lENO.cjs","sources":["../src/list/List.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { useMemo, type PropsWithChildren, type ReactElement } from \"react\";\n\nimport { type Keyed, type Key, compare } from \"@synnaxlabs/x\";\n\nimport { DataProvider } from \"@/list/Data\";\nimport { InfiniteProvider } from \"@/list/Infinite\";\nimport { useMemoCompare } from \"@/memo\";\n\nexport interface ListProps<K extends Key = Key, E extends Keyed<K> = Keyed<K>>\n extends PropsWithChildren<unknown> {\n data?: E[];\n emptyContent?: ReactElement;\n omit?: K[];\n}\n\n/**\n * The main component for building a List. By itself, it does not render any HTML, and\n * should be used in conjunction with its sub-components (List.'X') to build a list\n * component to fit your needs.\n *\n * @param props - The props for the List component.\n * @param props.data - The data to be displayed in the list. The values of the object in\n * each entry of the array must satisfy the {@link RenderableValue} interface i.e. they\n * must be a primitive type or implement a 'toString' method.\n * @param props.children - Sub-components of the List component to add additional functionality.\n *\n */\nexport const List = <K extends Key = Key, E extends Keyed<K> = Keyed<K>>({\n children,\n data,\n emptyContent,\n omit,\n}: ListProps<K, E>): ReactElement => {\n const omittedData = useMemoCompare(\n () => (omit != null ? data?.filter((e) => !omit.includes(e.key)) : data),\n ([prevOmit, prevData], [omit, data]) => {\n let omitsEqual = false;\n if (prevOmit != null && omit != null)\n omitsEqual = compare.unorderedPrimitiveArrays(prevOmit, omit) === compare.EQUAL;\n else omitsEqual = prevOmit == omit;\n return prevData === data && omitsEqual;\n },\n [omit, data] as [K[] | undefined, E[] | undefined],\n );\n return (\n <InfiniteProvider>\n <DataProvider<K, E> data={omittedData} emptyContent={emptyContent}>\n {children}\n </DataProvider>\n </InfiniteProvider>\n );\n};\n"],"names":["useMemoCompare","omit","data","compare","jsx","InfiniteProvider","DataProvider"],"mappings":";;;;AAoCO,MAAM,OAAO,CAAqD;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,cAAcA,OAAA;AAAA,IAClB,MAAO,QAAQ,OAAO,6BAAM,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,GAAG,KAAK;AAAA,IACnE,CAAC,CAAC,UAAU,QAAQ,GAAG,CAACC,OAAMC,KAAI,MAAM;AACtC,UAAI,aAAa;AACb,UAAA,YAAY,QAAQD,SAAQ;AAC9B,qBAAaE,WAAQ,EAAA,yBAAyB,UAAUF,KAAI,MAAME,WAAQ,EAAA;AAAA;AACvE,qBAAa,YAAYF;AAC9B,aAAO,aAAaC,SAAQ;AAAA,IAC9B;AAAA,IACA,CAAC,MAAM,IAAI;AAAA,EAAA;AAGX,SAAAE,2BAAA,kBAAA,IAACC,2BACC,UAACD,2BAAA,kBAAA,IAAAE,OAAA,cAAA,EAAmB,MAAM,aAAa,cACpC,SACH,CAAA,EACF,CAAA;AAEJ;;"}
|
|
@@ -57155,7 +57155,8 @@ const useProvider = ({
|
|
|
57155
57155
|
const synnaxDark = aggregator.themeZ.parse(
|
|
57156
57156
|
aggregator._.override(aggregator._.copy(aggregator.SYNNAX_DARK), theme)
|
|
57157
57157
|
);
|
|
57158
|
-
|
|
57158
|
+
if (theme.key != null && theme.key.length > 0)
|
|
57159
|
+
setSelected(theme.key);
|
|
57159
57160
|
return { synnaxLight, synnaxDark };
|
|
57160
57161
|
}
|
|
57161
57162
|
return Object.entries(themes).reduce(
|
|
@@ -57197,7 +57198,6 @@ const Provider$1 = wrap$1(
|
|
|
57197
57198
|
schema: aggregator.Provider.z,
|
|
57198
57199
|
initialState: { theme: ret.theme }
|
|
57199
57200
|
});
|
|
57200
|
-
React.useEffect(() => setAetherTheme({ theme: ret.theme }), [ret.theme]);
|
|
57201
57201
|
React.useLayoutEffect(() => {
|
|
57202
57202
|
if (applyCSSVars)
|
|
57203
57203
|
css.CSS.applyVars(document.documentElement, toCSSVars(ret.theme));
|
|
@@ -58373,7 +58373,7 @@ Core.Virtual = VirtualCore;
|
|
|
58373
58373
|
const variantColors = {
|
|
58374
58374
|
info: "var(--pluto-text-color)",
|
|
58375
58375
|
error: "var(--pluto-error-z)",
|
|
58376
|
-
warning: "var(--pluto-
|
|
58376
|
+
warning: "var(--pluto-warning-z)",
|
|
58377
58377
|
success: "var(--pluto-primary-z)",
|
|
58378
58378
|
loading: "var(--pluto-text-color)",
|
|
58379
58379
|
disabled: "var(--pluto-gray-l6)",
|
|
@@ -59437,4 +59437,4 @@ exports.useUniqueKey = useUniqueKey;
|
|
|
59437
59437
|
exports.variantColors = variantColors;
|
|
59438
59438
|
exports.wrap = wrap;
|
|
59439
59439
|
exports.wrap$1 = wrap$1;
|
|
59440
|
-
//# sourceMappingURL=Toggle-
|
|
59440
|
+
//# sourceMappingURL=Toggle-ClTExSi6.cjs.map
|