@ngrok/mantle 0.66.9 → 0.66.10
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/alert-dialog.d.ts +8 -8
- package/dist/alert.d.ts +1 -1
- package/dist/{button-DQO0IuzC.d.ts → button-Ba6S4LFn.d.ts} +7 -7
- package/dist/button.d.ts +2 -2
- package/dist/checkbox.d.ts +1 -1
- package/dist/code-block.d.ts +1 -1
- package/dist/code-block.js +1 -1
- package/dist/command.d.ts +3 -3
- package/dist/data-table.d.ts +1 -1
- package/dist/{dialog-BAZ_LYI4.d.ts → dialog-BuD_JQf_.d.ts} +2 -2
- package/dist/dialog.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{icon-button-ikEU0Ctp.d.ts → icon-button-2r6S3HVA.d.ts} +2 -2
- package/dist/{index-aG53Gdqx.d.ts → index-DWqhfw9n.d.ts} +4 -4
- package/dist/input.d.ts +1 -1
- package/dist/sheet.d.ts +1 -1
- package/dist/split-button.d.ts +2 -2
- package/dist/theme.d.ts +3 -3
- package/dist/use-copy-to-clipboard-BCpEp-sO.js +2 -0
- package/dist/use-copy-to-clipboard-BCpEp-sO.js.map +1 -0
- package/package.json +1 -1
- package/dist/use-copy-to-clipboard-BEbQOKHc.js +0 -2
- package/dist/use-copy-to-clipboard-BEbQOKHc.js.map +0 -1
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -147,9 +147,9 @@ declare const AlertDialog: {
|
|
|
147
147
|
* ```
|
|
148
148
|
*/
|
|
149
149
|
readonly Action: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
150
|
-
appearance?: "
|
|
150
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
151
151
|
isLoading?: boolean | null | undefined;
|
|
152
|
-
priority?: "
|
|
152
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
153
153
|
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
154
154
|
icon?: ReactNode;
|
|
155
155
|
iconPlacement?: "start" | "end";
|
|
@@ -157,9 +157,9 @@ declare const AlertDialog: {
|
|
|
157
157
|
asChild: true;
|
|
158
158
|
type?: ComponentProps<"button">["type"];
|
|
159
159
|
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
160
|
-
appearance?: "
|
|
160
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
161
161
|
isLoading?: boolean | null | undefined;
|
|
162
|
-
priority?: "
|
|
162
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
163
163
|
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
164
164
|
icon?: ReactNode;
|
|
165
165
|
iconPlacement?: "start" | "end";
|
|
@@ -204,9 +204,9 @@ declare const AlertDialog: {
|
|
|
204
204
|
* ```
|
|
205
205
|
*/
|
|
206
206
|
readonly Cancel: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
207
|
-
appearance?: "
|
|
207
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
208
208
|
isLoading?: boolean | null | undefined;
|
|
209
|
-
priority?: "
|
|
209
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
210
210
|
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
211
211
|
icon?: ReactNode;
|
|
212
212
|
iconPlacement?: "start" | "end";
|
|
@@ -214,9 +214,9 @@ declare const AlertDialog: {
|
|
|
214
214
|
asChild: true;
|
|
215
215
|
type?: ComponentProps<"button">["type"];
|
|
216
216
|
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
217
|
-
appearance?: "
|
|
217
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
218
218
|
isLoading?: boolean | null | undefined;
|
|
219
|
-
priority?: "
|
|
219
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
220
220
|
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
221
221
|
icon?: ReactNode;
|
|
222
222
|
iconPlacement?: "start" | "end";
|
package/dist/alert.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as SvgAttributes } from "./types-Dh4BVhXC.js";
|
|
2
2
|
import { t as WithAsChild } from "./as-child-XMVTepJu.js";
|
|
3
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
3
|
+
import { n as IconButtonProps } from "./icon-button-2r6S3HVA.js";
|
|
4
4
|
import * as react from "react";
|
|
5
5
|
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
6
6
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -7,9 +7,9 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/button/button.d.ts
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
|
-
appearance?: "
|
|
10
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
11
11
|
isLoading?: boolean | null | undefined;
|
|
12
|
-
priority?: "
|
|
12
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
13
13
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
14
14
|
type ButtonVariants = VariantProps$1<typeof buttonVariants>;
|
|
15
15
|
/**
|
|
@@ -91,9 +91,9 @@ type ButtonProps = ComponentProps<"button"> & ButtonVariants & {
|
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
93
|
declare const Button: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
94
|
-
appearance?: "
|
|
94
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
95
95
|
isLoading?: boolean | null | undefined;
|
|
96
|
-
priority?: "
|
|
96
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
97
97
|
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
98
98
|
/**
|
|
99
99
|
* An icon to render inside the button. If the `state` is `"pending"`, then
|
|
@@ -137,9 +137,9 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<react.ClassAttribute
|
|
|
137
137
|
*/
|
|
138
138
|
type?: ComponentProps<"button">["type"];
|
|
139
139
|
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
140
|
-
appearance?: "
|
|
140
|
+
appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
|
|
141
141
|
isLoading?: boolean | null | undefined;
|
|
142
|
-
priority?: "
|
|
142
|
+
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
143
143
|
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
144
144
|
/**
|
|
145
145
|
* An icon to render inside the button. If the `state` is `"pending"`, then
|
|
@@ -172,4 +172,4 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<react.ClassAttribute
|
|
|
172
172
|
}, "ref">) & react.RefAttributes<HTMLButtonElement>>;
|
|
173
173
|
//#endregion
|
|
174
174
|
export { ButtonProps as n, Button as t };
|
|
175
|
-
//# sourceMappingURL=button-
|
|
175
|
+
//# sourceMappingURL=button-Ba6S4LFn.d.ts.map
|
package/dist/button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as IconButtonProps, t as IconButton } from "./icon-button-
|
|
2
|
-
import { n as ButtonProps, t as Button } from "./button-
|
|
1
|
+
import { n as IconButtonProps, t as IconButton } from "./icon-button-2r6S3HVA.js";
|
|
2
|
+
import { n as ButtonProps, t as Button } from "./button-Ba6S4LFn.js";
|
|
3
3
|
import { n as ButtonGroupProps, t as ButtonGroup } from "./index-ViSCOUrU.js";
|
|
4
4
|
export { Button, ButtonGroup, ButtonGroupProps, ButtonProps, IconButton, IconButtonProps };
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ type CheckedState = boolean | "indeterminate";
|
|
|
19
19
|
* </form>
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "defaultChecked" | "
|
|
22
|
+
declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "defaultChecked" | "type" | "checked"> & WithValidation & {
|
|
23
23
|
/**
|
|
24
24
|
* The controlled checked state of the checkbox. Must be used in conjunction with onChange.
|
|
25
25
|
*/
|
package/dist/code-block.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare const isSupportedLanguage: (value: unknown) => value is SupportedLanguag
|
|
|
27
27
|
* Formats a language name into a class name that Prism.js can understand.
|
|
28
28
|
* @default "language-sh"
|
|
29
29
|
*/
|
|
30
|
-
declare function formatLanguageClassName(language?: SupportedLanguage | undefined): "language-
|
|
30
|
+
declare function formatLanguageClassName(language?: SupportedLanguage | undefined): "language-html" | "language-ruby" | "language-text" | "language-go" | "language-py" | "language-plaintext" | "language-bash" | "language-cs" | "language-csharp" | "language-css" | "language-dotnet" | "language-java" | "language-javascript" | "language-js" | "language-json" | "language-jsx" | "language-markup" | "language-plain" | "language-python" | "language-rb" | "language-rust" | "language-sh" | "language-shell" | "language-ts" | "language-tsx" | "language-txt" | "language-typescript" | "language-xml" | "language-yaml" | "language-yml";
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/components/code-block/indentation.d.ts
|
|
33
33
|
declare const indentations: readonly ["tabs", "spaces"];
|
package/dist/code-block.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./cx-bKromGBh.js";import{t}from"./icon-B5oNYYrJ.js";import{t as n}from"./booleanish-CBGdPL3Q.js";import{t as r}from"./slot-DdnjeV2n.js";import{t as i}from"./use-copy-to-clipboard-
|
|
1
|
+
import{t as e}from"./cx-bKromGBh.js";import{t}from"./icon-B5oNYYrJ.js";import{t as n}from"./booleanish-CBGdPL3Q.js";import{t as r}from"./slot-DdnjeV2n.js";import{t as i}from"./use-copy-to-clipboard-BCpEp-sO.js";import{t as a}from"./traffic-policy-file-QnF-2YkY.js";import{CaretDownIcon as o}from"@phosphor-icons/react/CaretDown";import{createContext as s,forwardRef as c,useContext as l,useEffect as u,useId as d,useMemo as f,useRef as p,useState as m}from"react";import h from"clsx";import g from"tiny-invariant";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";import{CheckIcon as b}from"@phosphor-icons/react/Check";import{CopyIcon as x}from"@phosphor-icons/react/Copy";import{FileTextIcon as S}from"@phosphor-icons/react/FileText";import{TerminalIcon as C}from"@phosphor-icons/react/Terminal";import w from"prismjs";import"prismjs/components/prism-bash.js";import"prismjs/components/prism-csharp.js";import"prismjs/components/prism-css.js";import"prismjs/components/prism-go.js";import"prismjs/components/prism-java.js";import"prismjs/components/prism-javascript.js";import"prismjs/components/prism-json.js";import"prismjs/components/prism-jsx.js";import"prismjs/components/prism-markup.js";import"prismjs/components/prism-python.js";import"prismjs/components/prism-ruby.js";import"prismjs/components/prism-rust.js";import"prismjs/components/prism-tsx.js";import"prismjs/components/prism-typescript.js";import"prismjs/components/prism-yaml.js";function T(e){let t=-1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`&`||r===`<`||r===`>`||r===`"`||r===`'`){t=n;break}}if(t===-1)return e;let n=e.slice(0,t);for(let r=t;r<e.length;r++){let t=e[r];switch(t){case`&`:n+=`&`;break;case`<`:n+=`<`;break;case`>`:n+=`>`;break;case`"`:n+=`"`;break;case`'`:n+=`'`;break;default:n+=t}}return n}const E=[`tabs`,`spaces`];function D(e){return E.includes(e)}function O(e,t){return t||(j(e)?`tabs`:(M(e),`spaces`))}const k=new Set([`csharp`,`css`,`go`,`html`,`java`,`javascript`,`js`,`jsx`,`ts`,`tsx`,`typescript`,`xml`]),A=new Set([`python`,`py`,`yaml`,`yml`,`ruby`,`rb`]);function j(e){return k.has(e)}function M(e){return A.has(e)}function N(e,...t){if(!ee(e)||!Array.isArray(t))throw Error("It looks like you tried to call `fmtCode` as a function. Make sure to use it as a tagged template.\n Example: fmtCode`SELECT * FROM users`, not fmtCode('SELECT * FROM users')");let n=String.raw({raw:e},...t),r=P(n),i=n.trim().split(`
|
|
2
2
|
`),a=Array(i.length);for(let e=0;e<i.length;e++){let t=i[e];t!=null&&(a[e]=F(t)?t:t.slice(r))}return a.join(`
|
|
3
3
|
`)}function P(e){let t=1/0,n=0,r=!0;for(let i=0;i<e.length;i++){let a=e[i];if(r){if(a===` `||a===` `){n+=1;continue}if(a===`
|
|
4
4
|
`||a===`\r`){n=0;continue}if(n<t&&(t=n,t===0))return 0;r=!1;continue}(a===`
|
package/dist/command.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as WithAsChild } from "./as-child-XMVTepJu.js";
|
|
2
|
-
import { t as Dialog } from "./dialog-
|
|
2
|
+
import { t as Dialog } from "./dialog-BuD_JQf_.js";
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
import { ComponentProps, ComponentPropsWithoutRef } from "react";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -142,7 +142,7 @@ declare const Command: {
|
|
|
142
142
|
ref?: React.Ref<HTMLInputElement>;
|
|
143
143
|
} & {
|
|
144
144
|
asChild?: boolean;
|
|
145
|
-
}, "key" |
|
|
145
|
+
}, "key" | keyof react.InputHTMLAttributes<HTMLInputElement> | "asChild">, "onChange" | "type" | "value"> & {
|
|
146
146
|
value?: string;
|
|
147
147
|
onValueChange?: (search: string) => void;
|
|
148
148
|
} & react.RefAttributes<HTMLInputElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -226,7 +226,7 @@ declare const Command: {
|
|
|
226
226
|
ref?: React.Ref<HTMLDivElement>;
|
|
227
227
|
} & {
|
|
228
228
|
asChild?: boolean;
|
|
229
|
-
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild">, "
|
|
229
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
230
230
|
disabled?: boolean;
|
|
231
231
|
onSelect?: (value: string) => void;
|
|
232
232
|
value?: string;
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Root } from "./primitive-tuHqhoRE.js";
|
|
2
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
2
|
+
import { n as IconButtonProps } from "./icon-button-2r6S3HVA.js";
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -419,4 +419,4 @@ declare const Dialog: {
|
|
|
419
419
|
};
|
|
420
420
|
//#endregion
|
|
421
421
|
export { Dialog as t };
|
|
422
|
-
//# sourceMappingURL=dialog-
|
|
422
|
+
//# sourceMappingURL=dialog-BuD_JQf_.d.ts.map
|
package/dist/dialog.d.ts
CHANGED
package/dist/hooks.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./use-matches-media-query-CojcYxlA.js";import{r as t}from"./browser-only-QPyyfLaB.js";import{n}from"./compose-refs-DeIsFv68.js";import{t as r}from"./use-copy-to-clipboard-
|
|
1
|
+
import{t as e}from"./use-matches-media-query-CojcYxlA.js";import{r as t}from"./browser-only-QPyyfLaB.js";import{n}from"./compose-refs-DeIsFv68.js";import{t as r}from"./use-copy-to-clipboard-BCpEp-sO.js";import{n as i,t as a}from"./use-prefers-reduced-motion-BiG6QGkf.js";import{t as o}from"./in-view-bPnaWEL4.js";import{useCallback as s,useEffect as c,useLayoutEffect as l,useMemo as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";const h=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],g=[`default`,...h];function _(){return m(j,M,()=>`default`)}function v(e){return m(P(e),I(e),()=>!1)}const y={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},b={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let x=null,S=null;function C(){return x||={"2xl":window.matchMedia(y[`2xl`]),xl:window.matchMedia(y.xl),lg:window.matchMedia(y.lg),md:window.matchMedia(y.md),sm:window.matchMedia(y.sm),xs:window.matchMedia(y.xs),"2xs":window.matchMedia(y[`2xs`])},x}function w(e){return S||={"2xl":window.matchMedia(b[`2xl`]),xl:window.matchMedia(b.xl),lg:window.matchMedia(b.lg),md:window.matchMedia(b.md),sm:window.matchMedia(b.sm),xs:window.matchMedia(b.xs),"2xs":window.matchMedia(b[`2xs`])},S[e]}let T=`default`;const E=new Set;let D=!1;function O(){let e=C();for(let t of h)if(e[t].matches)return t;return`default`}let k=!1;function A(){k||(k=!0,requestAnimationFrame(()=>{k=!1;let e=O();if(e!==T){T=e;for(let e of E)e()}}))}function j(e){if(E.add(e),!D){D=!0;let e=C();T=O();for(let t of Object.values(e))t.addEventListener(`change`,A)}return e(),()=>{if(E.delete(e),E.size===0&&D){D=!1;let e=C();for(let t of Object.values(e))t.removeEventListener(`change`,A)}}}function M(){return T}const N=new Map;function P(e){let t=N.get(e);return t||(t=t=>{let n=w(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},N.set(e,t),t)}const F=new Map;function I(e){let t=F.get(e);return t||(t=()=>w(e).matches,F.set(e,t),t)}function L(e){let t=f(e);return c(()=>{t.current=e}),u(()=>((...e)=>t.current?.(...e)),[])}function R(e,t){let n=L(e),r=f(0);return c(()=>()=>window.clearTimeout(r.current),[]),s((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...e),t.waitMs)},[n,t.waitMs])}const z=typeof window<`u`?l:c,B=(e=`mantle`)=>u(()=>V(e),[e]);function V(e=`mantle`){return[e.trim()||`mantle`,H()].join(`-`)}function H(){return Math.random().toString(36).substring(2,9)}function U(){let e=i();return u(()=>e?`auto`:`smooth`,[e])}function W(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[s,l]=p(a);return c(()=>{if(!e.current||i&&s)return;function a(){return l(!0),i?void 0:()=>l(!1)}let c={root:t&&t.current||void 0,margin:n,amount:r};return o(e.current,a,c)},[t,e,n,i,r]),s}function G(e,t){switch(t.type){case`push`:return{undoStack:[...e.undoStack,t.snapshot],redoStack:[]};case`undo`:{if(e.undoStack.length===0)return e;let n=e.undoStack.slice(0,-1);return e.undoStack[e.undoStack.length-1]===void 0?e:{undoStack:n,redoStack:[...e.redoStack,t.current]}}case`redo`:{if(e.redoStack.length===0)return e;let n=e.redoStack.slice(0,-1);return e.redoStack[e.redoStack.length-1]===void 0?e:{undoStack:[...e.undoStack,t.current],redoStack:n}}}}function K(){let[e,t]=d(G,{undoStack:[],redoStack:[]}),n=s(e=>{t({type:`push`,snapshot:e})},[]),r=s(n=>{let r=e.undoStack[e.undoStack.length-1];if(r!==void 0)return t({type:`undo`,current:n}),r},[e.undoStack]),i=s(n=>{let r=e.redoStack[e.redoStack.length-1];if(r!==void 0)return t({type:`redo`,current:n}),r},[e.redoStack]);return u(()=>({canUndo:e.undoStack.length>0,canRedo:e.redoStack.length>0,push:n,undo:r,redo:i}),[e.undoStack.length,e.redoStack.length,n,r,i])}export{g as breakpoints,a as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,n as useComposedRefs,r as useCopyToClipboard,R as useDebouncedCallback,W as useInView,v as useIsBelowBreakpoint,t as useIsHydrated,z as useIsomorphicLayoutEffect,e as useMatchesMediaQuery,i as usePrefersReducedMotion,B as useRandomStableId,U as useScrollBehavior,K as useUndoRedo};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -8,7 +8,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
|
|
|
8
8
|
declare const iconButtonVariants: (props?: ({
|
|
9
9
|
appearance?: "ghost" | "outlined" | null | undefined;
|
|
10
10
|
isLoading?: boolean | null | undefined;
|
|
11
|
-
size?: "
|
|
11
|
+
size?: "xs" | "sm" | "md" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
13
|
type IconButtonVariants = VariantProps<typeof iconButtonVariants>;
|
|
14
14
|
/**
|
|
@@ -95,4 +95,4 @@ type IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & WithAsChild & I
|
|
|
95
95
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
96
96
|
//#endregion
|
|
97
97
|
export { IconButtonProps as n, IconButton as t };
|
|
98
|
-
//# sourceMappingURL=icon-button-
|
|
98
|
+
//# sourceMappingURL=icon-button-2r6S3HVA.d.ts.map
|
|
@@ -23,7 +23,7 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "
|
|
|
23
23
|
* />
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
26
|
+
declare const Input: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & WithAutoComplete & WithInputType & WithValidation & {
|
|
27
27
|
children?: react.ReactNode | undefined;
|
|
28
28
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
29
29
|
type InputCaptureProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & BaseProps;
|
|
@@ -41,7 +41,7 @@ type InputCaptureProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComple
|
|
|
41
41
|
* </Input>
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
declare const InputCapture: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
44
|
+
declare const InputCapture: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & WithAutoComplete & WithInputType & WithValidation & react.RefAttributes<HTMLInputElement>>;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region src/components/input/password-input.d.ts
|
|
47
47
|
type PasswordInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & WithValidation & WithAutoComplete & {
|
|
@@ -70,7 +70,7 @@ type PasswordInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoCompl
|
|
|
70
70
|
* />
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
|
-
declare const PasswordInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
73
|
+
declare const PasswordInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & WithValidation & WithAutoComplete & {
|
|
74
74
|
/**
|
|
75
75
|
* Callback for when the visibility of the password value changes.
|
|
76
76
|
*/
|
|
@@ -100,4 +100,4 @@ declare const PasswordInput: react.ForwardRefExoticComponent<Omit<InputHTMLAttri
|
|
|
100
100
|
declare function isInput(value: unknown): value is HTMLInputElement;
|
|
101
101
|
//#endregion
|
|
102
102
|
export { InputCapture as a, Input as i, PasswordInput as n, InputCaptureProps as o, PasswordInputProps as r, InputProps as s, isInput as t };
|
|
103
|
-
//# sourceMappingURL=index-
|
|
103
|
+
//# sourceMappingURL=index-DWqhfw9n.d.ts.map
|
package/dist/input.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as WithInputType, i as WithAutoComplete, n as InputType, o as WithValidation, r as Validation, t as AutoComplete } from "./types-DgXUgkpc.js";
|
|
2
|
-
import { a as InputCapture, i as Input, n as PasswordInput, o as InputCaptureProps, r as PasswordInputProps, s as InputProps, t as isInput } from "./index-
|
|
2
|
+
import { a as InputCapture, i as Input, n as PasswordInput, o as InputCaptureProps, r as PasswordInputProps, s as InputProps, t as isInput } from "./index-DWqhfw9n.js";
|
|
3
3
|
export { AutoComplete, Input, InputCapture, InputCaptureProps, InputProps, InputType, PasswordInput, PasswordInputProps, Validation, WithAutoComplete, WithInputType, WithValidation, isInput };
|
package/dist/sheet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Root } from "./primitive-tuHqhoRE.js";
|
|
2
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
2
|
+
import { n as IconButtonProps } from "./icon-button-2r6S3HVA.js";
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
import { HTMLAttributes } from "react";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
package/dist/split-button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as IconButton } from "./icon-button-
|
|
2
|
-
import { t as Button } from "./button-
|
|
1
|
+
import { t as IconButton } from "./icon-button-2r6S3HVA.js";
|
|
2
|
+
import { t as Button } from "./button-Ba6S4LFn.js";
|
|
3
3
|
import { t as DropdownMenu } from "./dropdown-menu-D_ZoY1AH.js";
|
|
4
4
|
import * as react from "react";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
package/dist/theme.d.ts
CHANGED
|
@@ -184,14 +184,14 @@ declare function useTheme(): ThemeProviderState;
|
|
|
184
184
|
* Read the theme and applied theme from the `<html>` element.
|
|
185
185
|
*/
|
|
186
186
|
declare function readThemeFromHtmlElement(): {
|
|
187
|
-
appliedTheme: "
|
|
188
|
-
theme: "
|
|
187
|
+
appliedTheme: "light" | "dark" | "light-high-contrast" | "dark-high-contrast" | undefined;
|
|
188
|
+
theme: "system" | "light" | "dark" | "light-high-contrast" | "dark-high-contrast" | undefined;
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
191
191
|
* If the theme is "system", it will resolve the theme based on the user's media query preferences, otherwise it will return the theme as is.
|
|
192
192
|
* This will mirror the result that gets applied to the <html> element.
|
|
193
193
|
*/
|
|
194
|
-
declare function useAppliedTheme(): "
|
|
194
|
+
declare function useAppliedTheme(): "light" | "dark" | "light-high-contrast" | "dark-high-contrast";
|
|
195
195
|
/**
|
|
196
196
|
* determineThemeFromMediaQuery returns the theme that should be used based on the user's media query preferences.
|
|
197
197
|
* @private
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useCallback as e,useState as t}from"react";function n(){let[n,i]=t(``);return[n,e(e=>{(async()=>{try{if(typeof window.navigator?.clipboard?.writeText==`function`)await navigator.clipboard.writeText(e);else throw Error(`writeText not supported`)}catch{try{r(e)}catch{return}}i(e)})()},[])]}function r(e){let t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t);try{t.select(),document.execCommand(`copy`)}finally{document.body.removeChild(t)}}export{n as t};
|
|
2
|
+
//# sourceMappingURL=use-copy-to-clipboard-BCpEp-sO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-copy-to-clipboard-BCpEp-sO.js","names":[],"sources":["../src/hooks/use-copy-to-clipboard.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\n/**\n * A hook that allows you to copy a string to the clipboard.\n *\n * Inspired by: https://usehooks.com/usecopytoclipboard\n */\nfunction useCopyToClipboard() {\n\tconst [state, setState] = useState<string>(\"\");\n\n\tconst copyToClipboard = useCallback((value: string) => {\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tif (typeof window.navigator?.clipboard?.writeText === \"function\") {\n\t\t\t\t\tawait navigator.clipboard.writeText(value);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"writeText not supported\");\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\ttry {\n\t\t\t\t\tcopyToClipboardPolyfill(value);\n\t\t\t\t} catch {\n\t\t\t\t\treturn; // both approaches failed; don't update state\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetState(value);\n\t\t})();\n\t}, []);\n\n\treturn [state, copyToClipboard] as const;\n}\n\nexport { useCopyToClipboard };\n\n/**\n * A fallback copy to clipboard function for older browsers.\n */\nfunction copyToClipboardPolyfill(text: string) {\n\tconst tempTextArea = document.createElement(\"textarea\");\n\ttempTextArea.value = text;\n\tdocument.body.appendChild(tempTextArea);\n\ttry {\n\t\ttempTextArea.select();\n\t\tdocument.execCommand(\"copy\");\n\t} finally {\n\t\tdocument.body.removeChild(tempTextArea);\n\t}\n}\n"],"mappings":"kDAOA,SAAS,GAAqB,CAC7B,GAAM,CAAC,EAAO,GAAY,EAAiB,GAAG,CAqB9C,MAAO,CAAC,EAnBgB,EAAa,GAAkB,EACrD,SAAY,CACZ,GAAI,CACH,GAAI,OAAO,OAAO,WAAW,WAAW,WAAc,WACrD,MAAM,UAAU,UAAU,UAAU,EAAM,MAE1C,MAAU,MAAM,0BAA0B,MAEpC,CACP,GAAI,CACH,EAAwB,EAAM,MACvB,CACP,QAGF,EAAS,EAAM,IACZ,EACF,EAAE,CAAC,CAEyB,CAQhC,SAAS,EAAwB,EAAc,CAC9C,IAAM,EAAe,SAAS,cAAc,WAAW,CACvD,EAAa,MAAQ,EACrB,SAAS,KAAK,YAAY,EAAa,CACvC,GAAI,CACH,EAAa,QAAQ,CACrB,SAAS,YAAY,OAAO,QACnB,CACT,SAAS,KAAK,YAAY,EAAa"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as e,useState as t}from"react";function n(){let[n,i]=t(``);return[n,e(e=>{(async()=>{try{if(typeof window.navigator?.clipboard?.writeText==`function`)await navigator.clipboard.writeText(e),i(e);else throw Error(`writeText not supported`)}catch{r(e),i(e)}})()},[])]}function r(e){let t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}export{n as t};
|
|
2
|
-
//# sourceMappingURL=use-copy-to-clipboard-BEbQOKHc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-copy-to-clipboard-BEbQOKHc.js","names":[],"sources":["../src/hooks/use-copy-to-clipboard.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\n/**\n * A hook that allows you to copy a string to the clipboard.\n *\n * Inspired by: https://usehooks.com/usecopytoclipboard\n */\nfunction useCopyToClipboard() {\n\tconst [state, setState] = useState<string>(\"\");\n\n\tconst copyToClipboard = useCallback((value: string) => {\n\t\tconst handleCopy = async () => {\n\t\t\ttry {\n\t\t\t\tif (typeof window.navigator?.clipboard?.writeText === \"function\") {\n\t\t\t\t\tawait navigator.clipboard.writeText(value);\n\t\t\t\t\tsetState(value);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"writeText not supported\");\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tcopyToClipboardPolyfill(value);\n\t\t\t\tsetState(value);\n\t\t\t}\n\t\t};\n\n\t\thandleCopy();\n\t}, []);\n\n\treturn [state, copyToClipboard] as const;\n}\n\nexport {\n\t//,\n\tuseCopyToClipboard,\n};\n\n/**\n * A fallback copy to clipboard function for older browsers.\n */\nfunction copyToClipboardPolyfill(text: string) {\n\tconst tempTextArea = document.createElement(\"textarea\");\n\ttempTextArea.value = text;\n\tdocument.body.appendChild(tempTextArea);\n\ttempTextArea.select();\n\tdocument.execCommand(\"copy\");\n\tdocument.body.removeChild(tempTextArea);\n}\n"],"mappings":"kDAOA,SAAS,GAAqB,CAC7B,GAAM,CAAC,EAAO,GAAY,EAAiB,GAAG,CAoB9C,MAAO,CAAC,EAlBgB,EAAa,GAAkB,EACnC,SAAY,CAC9B,GAAI,CACH,GAAI,OAAO,OAAO,WAAW,WAAW,WAAc,WACrD,MAAM,UAAU,UAAU,UAAU,EAAM,CAC1C,EAAS,EAAM,MAEf,MAAU,MAAM,0BAA0B,MAEpC,CACP,EAAwB,EAAM,CAC9B,EAAS,EAAM,KAIL,EACV,EAAE,CAAC,CAEyB,CAWhC,SAAS,EAAwB,EAAc,CAC9C,IAAM,EAAe,SAAS,cAAc,WAAW,CACvD,EAAa,MAAQ,EACrB,SAAS,KAAK,YAAY,EAAa,CACvC,EAAa,QAAQ,CACrB,SAAS,YAAY,OAAO,CAC5B,SAAS,KAAK,YAAY,EAAa"}
|