@ngrok/mantle 0.76.5 → 0.76.7
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/README.md +6 -6
- package/dist/accordion.d.ts +98 -122
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1 -1
- package/dist/alert-dialog.d.ts +2 -2
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js +1 -1
- package/dist/{anchor-CcTY5SIz.js → anchor-BtgEJoPN.js} +1 -1
- package/dist/anchor.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button-C9GW9nAr.js +1 -0
- package/dist/{button-BAxneEMu.js → button-CERx95KE.js} +1 -1
- package/dist/{button-mfYak6Rx.d.ts → button-D9kqQuu9.d.ts} +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/clsx-DUGZgXfJ.js +1 -0
- package/dist/clsx-Dj3RWZ2l.js +1 -0
- package/dist/code-block.d.ts +1 -1
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/command.js +1 -1
- package/dist/cx-C1UYP5We.js +1 -0
- package/dist/cx.d.ts +55 -6
- package/dist/cx.js +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js +1 -1
- package/dist/description-list.js +1 -1
- package/dist/{dialog-ebkUwitP.js → dialog-Cp0S2jsG.js} +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-BHyYWtrH.js → dropdown-menu-Dj8qPMRh.js} +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.js +1 -1
- package/dist/flag.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/icon-SUx16Sl3.js +1 -0
- package/dist/{icon-button-DUNHVWpb.js → icon-button-DiX9iZ9n.js} +1 -1
- package/dist/icon.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/input.js +1 -1
- package/dist/{kbd-Bv6tefdB.js → kbd-D6k4Dnrf.js} +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{label-DhIUmTN2.js → label-BLXfnQmn.js} +1 -1
- package/dist/label.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main.js +1 -1
- package/dist/media-object.js +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/{popover-DponNBot.js → popover-Bq52EC7X.js} +1 -1
- package/dist/popover.js +1 -1
- package/dist/{primitive-Cn3h4DJg.js → primitive-BFUir4UB.js} +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{resolve-pre-rendered-props-CF9-Qy2H.js → resolve-pre-rendered-props-DwIF_M_K.js} +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/{select-g0E_TsXr.js → select-CvI6VKAL.js} +1 -1
- package/dist/select.js +1 -1
- package/dist/{separator-BXFUCWFa.js → separator-DtufgIHt.js} +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet.js +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/{slot-CV5fmqFr.js → slot-DT_E5BQx.js} +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +1 -1
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-Cz1cby8y.js → svg-only-CSOaF1tL.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-DWy_oNta.js → table-DpEcAEq5.js} +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-area.js +1 -1
- package/dist/{theme-provider-MMwxHEfw.js → theme-provider-BNFS3Acf.js} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{toast-CR3MVChj.js → toast-Bwno5LUs.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/well.js +1 -1
- package/package.json +1 -10
- package/dist/button-BfMn3PgP.js +0 -1
- package/dist/cx-CBSnSC36.js +0 -1
- package/dist/icon-C8bYBIHW.js +0 -1
package/README.md
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
|
|
21
21
|
Install `@ngrok/mantle` and all of the required `peerDependencies` with your preferred package manager:
|
|
22
22
|
|
|
23
|
-
| package manager | command
|
|
24
|
-
| --------------- |
|
|
25
|
-
| npm | npm install -E @ngrok/mantle @phosphor-icons/react
|
|
26
|
-
| pnpm | pnpm add -E @ngrok/mantle @phosphor-icons/react
|
|
27
|
-
| bun | bun add -E @ngrok/mantle @phosphor-icons/react
|
|
28
|
-
| yarn | yarn add -E @ngrok/mantle @phosphor-icons/react
|
|
23
|
+
| package manager | command |
|
|
24
|
+
| --------------- | -------------------------------------------------- |
|
|
25
|
+
| npm | npm install -E @ngrok/mantle @phosphor-icons/react |
|
|
26
|
+
| pnpm | pnpm add -E @ngrok/mantle @phosphor-icons/react |
|
|
27
|
+
| bun | bun add -E @ngrok/mantle @phosphor-icons/react |
|
|
28
|
+
| yarn | yarn add -E @ngrok/mantle @phosphor-icons/react |
|
|
29
29
|
|
|
30
30
|
Also install the required `devDependencies`:
|
|
31
31
|
|
package/dist/accordion.d.ts
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
|
+
import { t as WithAsChild } from "./as-child-uN_018tj.js";
|
|
1
2
|
import { n as IconProps } from "./icon-n49kOh4_.js";
|
|
2
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
3
|
import { ComponentPropsWithoutRef } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/accordion/accordion.d.ts
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* `"single"` mode props: at most one item open at a time. `value`/`defaultValue`
|
|
8
|
+
* are the open item's value (`""` for none).
|
|
9
|
+
*/
|
|
10
|
+
type AccordionSingleProps = {
|
|
11
|
+
type: "single"; /** The controlled open item value (`""` for none). */
|
|
12
|
+
value?: string; /** The initial open item value when uncontrolled. */
|
|
13
|
+
defaultValue?: string; /** Called with the newly open item value (`""` when collapsed). */
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* `"multiple"` mode props: any number of items may be open. `value`/`defaultValue`
|
|
18
|
+
* are the list of open item values.
|
|
19
|
+
*/
|
|
20
|
+
type AccordionMultipleProps = {
|
|
21
|
+
type: "multiple"; /** The controlled list of open item values. */
|
|
22
|
+
value?: string[]; /** The initial list of open item values when uncontrolled. */
|
|
23
|
+
defaultValue?: string[]; /** Called with the new list of open item values. */
|
|
24
|
+
onValueChange?: (value: string[]) => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Props for {@link Root}. A discriminated union on `type` so `value`,
|
|
28
|
+
* `defaultValue`, and `onValueChange` are typed as a single string in
|
|
29
|
+
* `"single"` mode and a string array in `"multiple"` mode. Also accepts all
|
|
30
|
+
* standard `<div>` props (forwarded to the container) plus `asChild`.
|
|
31
|
+
*/
|
|
32
|
+
type AccordionRootProps = (AccordionSingleProps | AccordionMultipleProps) & Omit<ComponentPropsWithoutRef<"div">, "defaultValue"> & WithAsChild;
|
|
33
|
+
/**
|
|
34
|
+
* A vertically stacked set of disclosure sections styled after the shadcn /
|
|
35
|
+
* ngrok.com accordion.
|
|
36
|
+
*
|
|
37
|
+
* Its defining feature: collapsed content is never removed from the DOM — it
|
|
38
|
+
* stays put with `hidden="until-found"` — so the browser's find-in-page (⌘F /
|
|
39
|
+
* Ctrl-F) can find text inside closed sections and auto-expand them (synced via
|
|
40
|
+
* the `beforematch` event). Built on plain `<div>`/`<button>` elements, so a
|
|
41
|
+
* section header can be any layout, including a non-toggling action button
|
|
42
|
+
* beside the trigger.
|
|
8
43
|
*
|
|
9
44
|
* @see https://mantle.ngrok.com/components/accordion
|
|
10
45
|
*
|
|
@@ -12,181 +47,122 @@ import { ComponentPropsWithoutRef } from "react";
|
|
|
12
47
|
* Composition:
|
|
13
48
|
* ```
|
|
14
49
|
* Accordion.Root
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* │ └── Accordion.Content
|
|
50
|
+
* └── Accordion.Item
|
|
51
|
+
* ├── Accordion.Trigger
|
|
52
|
+
* │ └── Accordion.TriggerIcon
|
|
53
|
+
* └── Accordion.Content
|
|
20
54
|
* ```
|
|
21
55
|
*
|
|
22
56
|
* @example
|
|
23
|
-
*
|
|
24
|
-
* <Accordion.Root type="single" collapsible>
|
|
57
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
25
58
|
* <Accordion.Item value="item-1">
|
|
26
|
-
* <Accordion.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* </Accordion.Trigger>
|
|
31
|
-
* </Accordion.Heading>
|
|
59
|
+
* <Accordion.Trigger>
|
|
60
|
+
* Is it accessible?
|
|
61
|
+
* <Accordion.TriggerIcon />
|
|
62
|
+
* </Accordion.Trigger>
|
|
32
63
|
* <Accordion.Content>
|
|
33
|
-
* Yes. It adheres to the WAI-ARIA
|
|
64
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
34
65
|
* </Accordion.Content>
|
|
35
66
|
* </Accordion.Item>
|
|
36
67
|
* </Accordion.Root>
|
|
37
|
-
* ```
|
|
38
68
|
*/
|
|
39
69
|
declare const Accordion: {
|
|
40
70
|
/**
|
|
41
|
-
*
|
|
42
|
-
* The root component that contains all accordion items.
|
|
43
|
-
*
|
|
44
|
-
* @see https://mantle.ngrok.com/components/accordion#api-accordion
|
|
71
|
+
* The root that owns open/closed state. See {@link Root}.
|
|
45
72
|
*
|
|
46
73
|
* @example
|
|
47
|
-
*
|
|
48
|
-
* <Accordion.Root type="single" collapsible>
|
|
74
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
49
75
|
* <Accordion.Item value="item-1">
|
|
50
|
-
* <Accordion.
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* </Accordion.Trigger>
|
|
55
|
-
* </Accordion.Heading>
|
|
76
|
+
* <Accordion.Trigger>
|
|
77
|
+
* Is it accessible?
|
|
78
|
+
* <Accordion.TriggerIcon />
|
|
79
|
+
* </Accordion.Trigger>
|
|
56
80
|
* <Accordion.Content>
|
|
57
|
-
* Yes. It adheres to the WAI-ARIA
|
|
81
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
58
82
|
* </Accordion.Content>
|
|
59
83
|
* </Accordion.Item>
|
|
60
84
|
* </Accordion.Root>
|
|
61
|
-
* ```
|
|
62
85
|
*/
|
|
63
|
-
readonly Root: import("react").ForwardRefExoticComponent<
|
|
86
|
+
readonly Root: import("react").ForwardRefExoticComponent<AccordionRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
64
87
|
/**
|
|
65
|
-
*
|
|
66
|
-
* The content area that is revealed when the accordion item is expanded.
|
|
67
|
-
*
|
|
68
|
-
* @see https://mantle.ngrok.com/components/accordion#api-accordion-content
|
|
88
|
+
* A single collapsible section. See {@link Item}.
|
|
69
89
|
*
|
|
70
90
|
* @example
|
|
71
|
-
*
|
|
72
|
-
* <Accordion.Root type="single" collapsible>
|
|
91
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
73
92
|
* <Accordion.Item value="item-1">
|
|
74
|
-
* <Accordion.
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* </Accordion.Trigger>
|
|
79
|
-
* </Accordion.Heading>
|
|
93
|
+
* <Accordion.Trigger>
|
|
94
|
+
* Is it accessible?
|
|
95
|
+
* <Accordion.TriggerIcon />
|
|
96
|
+
* </Accordion.Trigger>
|
|
80
97
|
* <Accordion.Content>
|
|
81
|
-
* Yes. It adheres to the WAI-ARIA
|
|
98
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
82
99
|
* </Accordion.Content>
|
|
83
100
|
* </Accordion.Item>
|
|
84
101
|
* </Accordion.Root>
|
|
85
|
-
* ```
|
|
86
102
|
*/
|
|
87
|
-
readonly
|
|
103
|
+
readonly Item: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
104
|
+
/** The unique value identifying this item within its accordion. */value: string;
|
|
105
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
88
106
|
/**
|
|
89
|
-
*
|
|
90
|
-
* Contains the accordion trigger and provides proper heading semantics.
|
|
91
|
-
*
|
|
92
|
-
* @see https://mantle.ngrok.com/components/accordion#api-accordion-heading
|
|
107
|
+
* The `<button>` header that toggles a section. See {@link Trigger}.
|
|
93
108
|
*
|
|
94
109
|
* @example
|
|
95
|
-
*
|
|
96
|
-
* <Accordion.Root type="single" collapsible>
|
|
110
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
97
111
|
* <Accordion.Item value="item-1">
|
|
98
|
-
* <Accordion.
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* </Accordion.Trigger>
|
|
103
|
-
* </Accordion.Heading>
|
|
112
|
+
* <Accordion.Trigger>
|
|
113
|
+
* Is it accessible?
|
|
114
|
+
* <Accordion.TriggerIcon />
|
|
115
|
+
* </Accordion.Trigger>
|
|
104
116
|
* <Accordion.Content>
|
|
105
|
-
* Yes. It adheres to the WAI-ARIA
|
|
117
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
106
118
|
* </Accordion.Content>
|
|
107
119
|
* </Accordion.Item>
|
|
108
120
|
* </Accordion.Root>
|
|
109
|
-
* ```
|
|
110
121
|
*/
|
|
111
|
-
readonly
|
|
122
|
+
readonly Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
112
123
|
/**
|
|
113
|
-
*
|
|
114
|
-
* A single accordion item that can be expanded or collapsed.
|
|
115
|
-
*
|
|
116
|
-
* @see https://mantle.ngrok.com/components/accordion#api-accordion-item
|
|
124
|
+
* The caret indicating open/closed state. See {@link TriggerIcon}.
|
|
117
125
|
*
|
|
118
126
|
* @example
|
|
119
|
-
*
|
|
120
|
-
* <Accordion.Root type="single" collapsible>
|
|
127
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
121
128
|
* <Accordion.Item value="item-1">
|
|
122
|
-
* <Accordion.
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* </Accordion.Trigger>
|
|
127
|
-
* </Accordion.Heading>
|
|
129
|
+
* <Accordion.Trigger>
|
|
130
|
+
* Is it accessible?
|
|
131
|
+
* <Accordion.TriggerIcon />
|
|
132
|
+
* </Accordion.Trigger>
|
|
128
133
|
* <Accordion.Content>
|
|
129
|
-
* Yes. It adheres to the WAI-ARIA
|
|
134
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
130
135
|
* </Accordion.Content>
|
|
131
136
|
* </Accordion.Item>
|
|
132
137
|
* </Accordion.Root>
|
|
133
|
-
* ```
|
|
134
138
|
*/
|
|
135
|
-
readonly
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
* <Accordion.Item value="item-1">
|
|
146
|
-
* <Accordion.Heading>
|
|
147
|
-
* <Accordion.Trigger>
|
|
148
|
-
* <Accordion.TriggerIcon />
|
|
149
|
-
* Is it accessible?
|
|
150
|
-
* </Accordion.Trigger>
|
|
151
|
-
* </Accordion.Heading>
|
|
152
|
-
* <Accordion.Content>
|
|
153
|
-
* Yes. It adheres to the WAI-ARIA design pattern.
|
|
154
|
-
* </Accordion.Content>
|
|
155
|
-
* </Accordion.Item>
|
|
156
|
-
* </Accordion.Root>
|
|
157
|
-
* ```
|
|
158
|
-
*/
|
|
159
|
-
readonly Trigger: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
139
|
+
readonly TriggerIcon: {
|
|
140
|
+
({
|
|
141
|
+
className,
|
|
142
|
+
svg,
|
|
143
|
+
...props
|
|
144
|
+
}: Omit<IconProps, "svg"> & {
|
|
145
|
+
/** The icon to render. Defaults to a downward caret that rotates open. */svg?: IconProps["svg"];
|
|
146
|
+
}): import("react").JSX.Element;
|
|
147
|
+
displayName: string;
|
|
148
|
+
};
|
|
160
149
|
/**
|
|
161
|
-
*
|
|
162
|
-
* Rotates based on the accordion item state to provide visual feedback.
|
|
163
|
-
*
|
|
164
|
-
* @see https://mantle.ngrok.com/components/accordion#api-accordion-trigger-icon
|
|
150
|
+
* The collapsible, find-in-page-discoverable body. See {@link Content}.
|
|
165
151
|
*
|
|
166
152
|
* @example
|
|
167
|
-
*
|
|
168
|
-
* <Accordion.Root type="single" collapsible>
|
|
153
|
+
* <Accordion.Root type="single" defaultValue="item-1">
|
|
169
154
|
* <Accordion.Item value="item-1">
|
|
170
|
-
* <Accordion.
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* </Accordion.Trigger>
|
|
175
|
-
* </Accordion.Heading>
|
|
155
|
+
* <Accordion.Trigger>
|
|
156
|
+
* Is it accessible?
|
|
157
|
+
* <Accordion.TriggerIcon />
|
|
158
|
+
* </Accordion.Trigger>
|
|
176
159
|
* <Accordion.Content>
|
|
177
|
-
* Yes. It adheres to the WAI-ARIA
|
|
160
|
+
* Yes. It adheres to the WAI-ARIA disclosure pattern.
|
|
178
161
|
* </Accordion.Content>
|
|
179
162
|
* </Accordion.Item>
|
|
180
163
|
* </Accordion.Root>
|
|
181
|
-
* ```
|
|
182
164
|
*/
|
|
183
|
-
readonly
|
|
184
|
-
({
|
|
185
|
-
className,
|
|
186
|
-
...props
|
|
187
|
-
}: Omit<IconProps, "svg">): import("react").JSX.Element;
|
|
188
|
-
displayName: string;
|
|
189
|
-
};
|
|
165
|
+
readonly Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
190
166
|
};
|
|
191
167
|
//#endregion
|
|
192
168
|
export { Accordion };
|
package/dist/accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-C1UYP5We.js";import{t as n}from"./icon-SUx16Sl3.js";import{t as r}from"./slot-DT_E5BQx.js";import{CaretDownIcon as i}from"@phosphor-icons/react/CaretDown";import{createContext as a,forwardRef as o,useCallback as s,useContext as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import p from"tiny-invariant";import{jsx as m}from"react/jsx-runtime";function h(e,t){return e.includes(t)}function g(e,t,n,r){let i=e.includes(t);return n?r===`single`?i&&e.length===1?e:[t]:i?e:[...e,t]:i?e.filter(e=>e!==t):e}function _(e){return e==null?[]:typeof e==`string`?e===``?[]:[e]:e}function v(e,t){e.type===`single`?e.onValueChange?.(t[0]??``):e.onValueChange?.([...t])}function y(){return typeof document<`u`&&document.body!=null&&`onbeforematch`in document.body}const b=a(null);function x(e){let t=c(b);return p(t,`\`${e}\` must be rendered within \`Accordion.Root\`.`),t}const S=a(null);function C(e){let t=c(S);return p(t,`\`${e}\` must be rendered within \`Accordion.Item\`.`),t}const w=o((e,n)=>{let{type:i,value:a,defaultValue:o,onValueChange:s,asChild:c,children:l,className:d,...p}=e,h=a!=null,[y,x]=f(()=>_(o)),S=h?_(a):y,C=u(()=>({type:i,openValues:S,setItemOpen:(t,n)=>{let r=g(S,t,n,i);r!==S&&(h||x(r),v(e,r))}}),[i,S,h,e]),w={...p,"data-slot":`accordion`,className:t(`w-full`,d)};return m(b.Provider,{value:C,children:m(c?r:`div`,{ref:n,...w,children:l})})});w.displayName=`Accordion`;const T=o(({className:e,children:n,value:r,...i},a)=>{let{openValues:o,setItemOpen:c}=x(`Accordion.Item`),l=h(o,r),d=s(e=>{c(r,e)},[c,r]),f=u(()=>({open:l,setOpen:d}),[l,d]);return m(S.Provider,{value:f,children:m(`div`,{ref:a,...i,role:`group`,"data-slot":`accordion-item`,"data-state":l?`open`:`closed`,className:t(`border-card-muted border-b last:border-b-0`,e),children:n})})});T.displayName=`AccordionItem`;const E=o(({className:e,children:n,onClick:r,...i},a)=>{let{open:o,setOpen:s}=C(`Accordion.Trigger`);return m(`button`,{ref:a,type:`button`,...i,"data-slot":`accordion-trigger`,"data-state":o?`open`:`closed`,"aria-expanded":o,className:t(`group flex w-full cursor-pointer items-center justify-between gap-4 py-4 text-left text-sm font-medium outline-none`,`-mx-2 rounded-md px-2`,`focus:outline-hidden focus-visible:ring-4 focus-visible:ring-focus-accent`,e),onClick:e=>{r?.(e),s(!o)},children:n})});E.displayName=`AccordionTrigger`;const D=m(i,{weight:`bold`}),O=({className:e,svg:r=D,...i})=>m(n,{...i,"data-slot":`accordion-trigger-icon`,svg:r,className:t(`size-4 shrink-0 text-muted transition-transform duration-200 group-data-[state=open]:rotate-180`,e)});O.displayName=`AccordionTriggerIcon`;const k=o(({className:n,children:r,...i},a)=>{let{open:o,setOpen:c}=C(`Accordion.Content`),u=d(null),f=s(e=>{u.current=e,typeof a==`function`?a(e):a!=null&&(a.current=e)},[a]);return l(()=>{let e=u.current;if(e==null||!y())return;let t=()=>{e.removeAttribute(`hidden`),e.style.height=`auto`,c(!0)};return e.addEventListener(`beforematch`,t),()=>{e.removeEventListener(`beforematch`,t)}},[c]),e(()=>{let e=u.current;e!=null&&(o||!y()?e.removeAttribute(`hidden`):(e.setAttribute(`hidden`,`until-found`),e.style.height=``))},[o]),m(`div`,{ref:f,...i,"data-slot":`accordion-content`,"data-state":o?`open`:`closed`,className:t(`h-0 overflow-hidden text-sm transition-[height,content-visibility] duration-200 ease-out [interpolate-size:allow-keywords] transition-discrete data-[state=open]:h-auto motion-reduce:transition-none`,n),children:m(`div`,{className:`pb-4`,children:r})})});k.displayName=`AccordionContent`;const A={Root:w,Item:T,Trigger:E,TriggerIcon:O,Content:k};export{A as Accordion};
|
package/dist/agent.json
CHANGED
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as SvgAttributes } from "./types-BvUzforF.js";
|
|
2
1
|
import { t as WithAsChild } from "./as-child-uN_018tj.js";
|
|
3
|
-
import {
|
|
2
|
+
import { t as SvgAttributes } from "./types-BvUzforF.js";
|
|
3
|
+
import { n as ButtonProps } from "./button-D9kqQuu9.js";
|
|
4
4
|
import { t as Root$1 } from "./primitive-FoWela9a.js";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
|
6
6
|
|
package/dist/alert-dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./svg-only-CSOaF1tL.js";import{t as n}from"./slot-DT_E5BQx.js";import{t as r}from"./button-C9GW9nAr.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./primitive-BFUir4UB.js";import{createContext as f,forwardRef as p,useContext as m,useMemo as h}from"react";import g from"tiny-invariant";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{InfoIcon as y}from"@phosphor-icons/react/Info";import{WarningIcon as b}from"@phosphor-icons/react/Warning";const x=f(null);function S(){let e=m(x);return g(e,`AlertDialog child component used outside of AlertDialog parent!`),e}function C({priority:e,...t}){let n=h(()=>({priority:e}),[e]);return _(x.Provider,{value:n,children:_(c,{...t})})}C.displayName=`AlertDialog`;const w=p(({...e},t)=>_(a,{ref:t,"data-slot":`alert-dialog-trigger`,...e}));w.displayName=`AlertDialogTrigger`;const T=i;T.displayName=`AlertDialogPortal`;const E=p(({className:t,...n},r)=>_(o,{"data-slot":`alert-dialog-overlay`,className:e(`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-xs`,t),...n,ref:r}));E.displayName=`AlertDialogOverlay`;const D=p(({className:t,preferredWidth:n=`max-w-md`,...r},i)=>v(T,{children:[_(E,{}),_(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:_(s,{"data-slot":`alert-dialog-content`,"data-mantle-modal-content":!0,ref:i,className:e(`flex w-full flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start`,`outline-hidden focus-within:outline-hidden`,`p-6`,`border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200`,`data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,n,t),...r})})]}));D.displayName=`AlertDialogContent`;const O=p(({asChild:t=!1,className:r,...i},a)=>_(t?n:`div`,{"data-slot":`alert-dialog-body`,className:e(`flex-1 space-y-4`,r),ref:a,...i}));O.displayName=`AlertDialogBody`;const k=p(({asChild:t=!1,className:r,...i},a)=>_(t?n:`div`,{"data-slot":`alert-dialog-header`,className:e(`flex flex-col space-y-2 text-center sm:text-start`,r),ref:a,...i}));k.displayName=`AlertDialogHeader`;const A=p(({asChild:t=!1,className:r,...i},a)=>_(t?n:`div`,{"data-slot":`alert-dialog-footer`,className:e(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,r),ref:a,...i}));A.displayName=`AlertDialogFooter`;const j=p(({className:t,...n},r)=>_(u,{ref:r,"data-slot":`alert-dialog-title`,className:e(`text-strong text-center text-lg font-medium sm:text-start`,t),...n}));j.displayName=`AlertDialogTitle`;const M=p(({className:t,...n},r)=>_(l,{ref:r,"data-slot":`alert-dialog-description`,className:e(`text-body text-center text-sm font-normal sm:text-start`,t),...n}));M.displayName=`AlertDialogDescription`;const N=p(({appearance:e=`filled`,...t},n)=>{let i=S(),a=`default`;return i.priority===`danger`&&(a=`danger`),_(r,{appearance:e,"data-slot":`alert-dialog-action`,priority:a,ref:n,...t})});N.displayName=`AlertDialogAction`;const P=p(({appearance:t=`outlined`,className:n,priority:i=`neutral`,...a},o)=>_(d,{asChild:!0,children:_(r,{appearance:t,"data-slot":`alert-dialog-cancel`,className:e(`mt-2 sm:mt-0`,n),priority:i,ref:o,...a})}));P.displayName=`AlertDialogCancel`;const F=p(({className:n,svg:r,...i},a)=>{let o=S(),s=o.priority===`danger`?`text-danger-600`:`text-accent-600`,c=o.priority===`danger`?_(b,{}):_(y,{});return _(t,{ref:a,"data-slot":`alert-dialog-icon`,className:e(`size-12 sm:size-7`,s,n),svg:r??c,...i})});F.displayName=`AlertDialogIcon`;const I=p(({...e},t)=>_(d,{ref:t,"data-slot":`alert-dialog-close`,...e}));I.displayName=`AlertDialogClose`;const L={Root:C,Action:N,Body:O,Cancel:P,Close:I,Content:D,Description:M,Footer:A,Header:k,Icon:F,Title:j,Trigger:w};export{L as AlertDialog};
|
package/dist/alert.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SvgAttributes } from "./types-BvUzforF.js";
|
|
2
1
|
import { t as WithAsChild } from "./as-child-uN_018tj.js";
|
|
2
|
+
import { t as SvgAttributes } from "./types-BvUzforF.js";
|
|
3
3
|
import { n as IconButtonProps } from "./icon-button-D7hs6bX2.js";
|
|
4
4
|
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
5
5
|
|
package/dist/alert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./svg-only-CSOaF1tL.js";import{t as n}from"./slot-DT_E5BQx.js";import{t as r}from"./types-D85fCNV3.js";import{t as i}from"./icon-button-DiX9iZ9n.js";import{createContext as a,forwardRef as o,useContext as s,useMemo as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";import{CheckCircleIcon as d}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as f}from"@phosphor-icons/react/Info";import{MegaphoneIcon as p}from"@phosphor-icons/react/Megaphone";import{WarningIcon as m}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as h}from"@phosphor-icons/react/WarningDiamond";import{XIcon as g}from"@phosphor-icons/react/X";import{cva as _}from"class-variance-authority";const v=a(null),y=u(g,{});function b(){let e=s(v);return l(e,`useAlertContext hook used outside of Alert parent!`),e}const x=_(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{priority:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a]:text-danger-700 [&_a]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a]:text-important-700 [&_a]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a]:text-info-700 [&_a]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a]:text-success-700 [&_a]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a]:text-warning-700 [&_a]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}},compoundVariants:[{priority:`danger`,appearance:`banner`,className:``},{priority:`important`,appearance:`banner`,className:``},{priority:`info`,appearance:`banner`,className:``},{priority:`success`,appearance:`banner`,className:``},{priority:`warning`,appearance:`banner`,className:``}]}),S=o(({appearance:t=`default`,className:n,priority:r,...i},a)=>{let o=c(()=>({priority:r}),[r]);return u(v.Provider,{value:o,children:u(`div`,{ref:a,"data-slot":`alert`,className:e(x({appearance:t,priority:r}),n),...i})})});S.displayName=`Alert`;const C={danger:u(m,{}),important:u(p,{mirrored:!0}),info:u(f,{}),success:u(d,{}),warning:u(h,{})},w=o(({className:n,svg:r,...i},a)=>{let o=C[b().priority];return u(t,{ref:a,"data-slot":`alert-icon`,className:e(`size-5`,n),svg:r??o,...i})});w.displayName=`AlertIcon`;const T=o(({className:t,...n},r)=>u(`div`,{ref:r,"data-slot":`alert-content`,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...n}));T.displayName=`AlertContent`;const E=o(({asChild:t=!1,className:r,...i},a)=>u(t?n:`h5`,{ref:a,"data-slot":`alert-title`,className:e(`font-medium`,r),...i}));E.displayName=`AlertTitle`;const D=o(({asChild:t=!1,className:r,...i},a)=>u(t?n:`div`,{ref:a,"data-slot":`alert-description`,className:e(`text-sm`,r),...i}));D.displayName=`AlertDescription`;const O=e=>`var(--color-${e}-700)`,k=e=>`var(--color-${e}-800)`,A=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`,j=({size:t=`sm`,type:n=`button`,label:a=`Dismiss Alert`,appearance:o=`ghost`,className:s,icon:c=y,style:l,...d})=>{let f=b();return u(i,{appearance:o,icon:c,label:a,size:t,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:e(`right-1.5 top-1.5 absolute`,`text-(--alert-dismiss-icon-color)`,`not-disabled:hover:bg-(--alert-dismiss-hover-bg) not-disabled:hover:text-(--alert-dismiss-icon-hover-color)`,s),type:n,style:r({...l,"--alert-dismiss-icon-color":O(f.priority),"--alert-dismiss-icon-hover-color":k(f.priority),"--alert-dismiss-hover-bg":A(f.priority)}),...d})};j.displayName=`AlertDismissIconButton`;const M={Root:S,Content:T,Description:D,DismissIconButton:j,Icon:w,Title:E};export{M as Alert};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-SUx16Sl3.js";import{t as n}from"./slot-DT_E5BQx.js";import{Children as r,cloneElement as i,forwardRef as a,isValidElement as o}from"react";import s from"tiny-invariant";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";const d=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),f=a(({asChild:e,children:a,className:f,rel:m,icon:h,iconPlacement:g=`start`,..._},v)=>{let y=p(m),b={"data-slot":`anchor`,className:d(f),ref:v,rel:y,..._};if(e){let e=r.only(a);s(o(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let d=e.props?.children;return l(n,{...b,children:i(e,{},u(c,{children:[h&&g===`start`&&l(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&l(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return u(`a`,{...b,children:[h&&g===`start`&&l(t,{className:`inline-block mr-1.5`,svg:h}),a,h&&g===`end`&&l(t,{className:`inline-block ml-1.5`,svg:h})]})});f.displayName=`Anchor`;function p(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{d as n,p as r,f as t};
|
package/dist/anchor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./anchor-
|
|
1
|
+
import{n as e,r as t,t as n}from"./anchor-BtgEJoPN.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};
|
package/dist/badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./svg-only-CSOaF1tL.js";import{t as n}from"./slot-DT_E5BQx.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=({appearance:u,asChild:d=!1,children:p,className:h,color:g=`neutral`,icon:_,...v})=>{let y=f(g,u),b=m(g,u),x=e(`inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs font-sans`,_&&`ps-1`,y,b,h);if(d){let e=r.only(p);o(a(e),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{"data-slot":`badge`,className:x,...v,children:i(e,{},l(s,{children:[_&&c(t,{className:`size-4`,svg:_}),u]}))})}return l(`span`,{"data-slot":`badge`,className:x,...v,children:[_&&c(t,{className:`size-4`,svg:_}),p]})};u.displayName=`Badge`;const d={amber:`bg-amber-500/20`,blue:`bg-blue-500/20`,cyan:`bg-cyan-500/20`,emerald:`bg-emerald-500/20`,fuchsia:`bg-fuchsia-500/20`,gray:`bg-gray-500/20`,green:`bg-green-500/20`,indigo:`bg-indigo-500/20`,lime:`bg-lime-500/20`,orange:`bg-orange-500/20`,pink:`bg-pink-500/20`,purple:`bg-purple-500/20`,red:`bg-red-500/20`,rose:`bg-rose-500/20`,sky:`bg-sky-500/20`,teal:`bg-teal-500/20`,violet:`bg-violet-500/20`,yellow:`bg-yellow-500/20`,accent:`bg-accent-500/20`,danger:`bg-danger-500/20`,important:`bg-important-500/20`,info:`bg-info-500/20`,neutral:`bg-neutral-500/20`,success:`bg-success-500/20`,warning:`bg-warning-500/20`};function f(e,t){switch(t){case`muted`:return d[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}const p={amber:`text-amber-700`,blue:`text-blue-700`,cyan:`text-cyan-700`,emerald:`text-emerald-700`,fuchsia:`text-fuchsia-700`,gray:`text-gray-700`,green:`text-green-700`,indigo:`text-indigo-700`,lime:`text-lime-700`,orange:`text-orange-700`,pink:`text-pink-700`,purple:`text-purple-700`,red:`text-red-700`,rose:`text-rose-700`,sky:`text-sky-700`,teal:`text-teal-700`,violet:`text-violet-700`,yellow:`text-yellow-700`,accent:`text-accent-700`,danger:`text-danger-700`,important:`text-important-700`,info:`text-info-700`,neutral:`text-neutral-700`,success:`text-success-700`,warning:`text-warning-700`};function m(e,t){switch(t){case`muted`:return p[e];default:o(!1,`Invalid appearance: ${String(t)}`)}}export{u as Badge};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-SUx16Sl3.js";import{t as n}from"./slot-DT_E5BQx.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{Children as a,cloneElement as o,forwardRef as s,isValidElement as c}from"react";import l from"tiny-invariant";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{cva as p}from"class-variance-authority";import{CircleNotchIcon as m}from"@phosphor-icons/react/CircleNotch";const h=p(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover h-9 border border-transparent px-3 text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 h-9 border border-transparent px-3 text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 h-9 border px-3 text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},priority:{danger:``,default:``,neutral:``}},defaultVariants:{appearance:`outlined`,isLoading:!1,priority:`default`},compoundVariants:[{appearance:`ghost`,priority:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,priority:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,priority:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,priority:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,priority:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,priority:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600`},{appearance:`filled`,priority:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,priority:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),g=s(({"aria-disabled":s,appearance:p=`outlined`,asChild:g,children:_,className:v,disabled:y,icon:b,iconPlacement:x=`start`,isLoading:S=!1,priority:C=`default`,type:w,...T},E)=>{let D=r(s??y??S),O=S?d(m,{className:`animate-spin`}):b,k=O&&p!==`link`,A={"aria-disabled":D,"data-slot":`button`,className:e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,h({appearance:p,priority:C,isLoading:S}),p!==`link`&&`font-sans`,k&&x===`start`&&`ps-2.5`,k&&x===`end`&&`pe-2.5`,v),"data-appearance":p,"data-disabled":D,"data-loading":S,"data-priority":C,disabled:D,ref:E,...T};return g?(l(c(_)&&a.only(_),"When using `asChild`, Button must be passed a single child as a JSX tag."),d(n,{...A,children:o(_,{},f(u,{children:[O&&d(t,{svg:O,className:i(x===`end`&&`order-last`)}),_.props.children]}))})):f(`button`,{...A,type:w??`button`,children:[O&&d(t,{svg:O,className:i(x===`end`&&`order-last`)}),_]})});g.displayName=`Button`;export{g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./slot-DT_E5BQx.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),o=n(({appearance:n,asChild:i,className:o,children:s,...c},l)=>r(i?t:`div`,{"data-slot":`button-group`,className:e(a({appearance:n}),o),ref:l,...c,children:s}));o.displayName=`ButtonGroup`;export{o as t};
|
|
@@ -4,7 +4,7 @@ import { ComponentProps, ReactNode } from "react";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/button/button.d.ts
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
|
-
appearance?: "link" | "
|
|
7
|
+
appearance?: "link" | "ghost" | "outlined" | "filled" | null | undefined;
|
|
8
8
|
isLoading?: boolean | null | undefined;
|
|
9
9
|
priority?: "danger" | "neutral" | "default" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
package/dist/button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ButtonProps, t as Button } from "./button-
|
|
1
|
+
import { n as ButtonProps, t as Button } from "./button-D9kqQuu9.js";
|
|
2
2
|
import { n as IconButtonProps, t as IconButton } from "./icon-button-D7hs6bX2.js";
|
|
3
3
|
import { n as ButtonGroupProps, t as ButtonGroup } from "./index-CTU6apE6.js";
|
|
4
4
|
export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps };
|
package/dist/button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icon-button-
|
|
1
|
+
import{t as e}from"./icon-button-DiX9iZ9n.js";import{t}from"./button-C9GW9nAr.js";import{t as n}from"./button-CERx95KE.js";export{t as Button,n as ButtonGroup,e as IconButton};
|
package/dist/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-SUx16Sl3.js";import{n,r}from"./icon-button-DiX9iZ9n.js";import{jsx as i}from"react/jsx-runtime";import{CaretLeftIcon as a}from"@phosphor-icons/react/CaretLeft";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{DayPicker as s}from"react-day-picker";function c({className:c,classNames:l,showOutsideDays:u=!1,...d}){return i(s,{"data-slot":`calendar`,animate:!1,components:{Chevron:e=>i(t,{svg:e.orientation===`left`?i(a,{}):i(o,{}),className:`size-4`})},classNames:{root:e(`isolate`,c),button_next:e(n,r({appearance:`ghost`,size:`sm`}),`absolute right-0`),button_previous:e(n,r({appearance:`ghost`,size:`sm`}),`absolute left-0`),caption_label:`text-sm font-medium`,day:e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,d.mode===`range`?`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`:``),day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`,...l},showOutsideDays:u,...d})}c.displayName=`Calendar`;export{c as Calendar};
|
package/dist/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./slot-DT_E5BQx.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card`,className:e(`border-card bg-card relative rounded-md border`,i),...o,children:a}));i.displayName=`Card`;const a=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-body`,className:e(`p-6 border-t border-card-muted first:border-t-0`,i),...o,children:a}));a.displayName=`CardBody`;const o=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-footer`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));o.displayName=`CardFooter`;const s=n(({asChild:n=!1,className:i,children:a,...o},s)=>r(n?t:`div`,{ref:s,"data-slot":`card-header`,className:e(`px-6 py-3 border-t border-card-muted first:border-t-0`,i),...o,children:a}));s.displayName=`CardHeader`;const c=n(({className:n,asChild:i,...a},o)=>r(i?t:`h3`,{ref:o,"data-slot":`card-title`,className:e(`text-strong text-base font-medium`,n),...a}));c.displayName=`CardTitle`;const l={Root:i,Body:a,Footer:o,Header:s,Title:c};export{l as Card};
|
package/dist/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compose-refs-Cjf2gfB8.js";import{a as
|
|
1
|
+
import{t as e}from"./clsx-DUGZgXfJ.js";import{t}from"./compose-refs-Cjf2gfB8.js";import{a as n,r}from"./validation-DCyx-ceH.js";import{forwardRef as i,useEffect as a,useRef as o,useState as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=e=>e===`indeterminate`,u=i(({"aria-invalid":i,className:u,checked:d,defaultChecked:f,defaultValue:p=`on`,onClick:m,readOnly:h,validation:g,..._},v)=>{let y=o(null),[b]=s(f),x=n(),{ariaInvalid:S,validation:C}=r({"aria-invalid":i,validation:g??x}),w=d??b;a(()=>{y.current&&(y.current.indeterminate=l(w))},[w]);let T=d==null?{defaultChecked:l(b)?void 0:b}:{checked:l(d)?!1:d};return c(`input`,{"aria-checked":l(d)?`mixed`:d,"aria-invalid":S,"data-slot":`checkbox`,className:e(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-validation-success:border-success-600 data-validation-success:checked:bg-success-600 data-validation-success:indeterminate:bg-success-600 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-600 data-validation-warning:indeterminate:bg-warning-600 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-600 data-validation-error:indeterminate:bg-danger-600 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger`,`where:block where:size-4 where:p-0`,u),...T,"data-validation":C||void 0,defaultValue:p,onClick:e=>{if(h){e.preventDefault();return}m?.(e)},readOnly:h,ref:t(y,v),type:`checkbox`,..._})});u.displayName=`Checkbox`;function d({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{u as Checkbox,d as selectAllChecked};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./clsx-Dj3RWZ2l.js";const t=e;export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Array.isArray,t=n=>{if(!n)return``;if(typeof n==`string`)return n;if(typeof n==`number`)return``+n;let r=``;if(e(n)){let e=n.length;for(let i=0;i<e;i++){let e=n[i];if(!e)continue;let a=typeof e==`string`?e:t(e);a&&(r&&(r+=` `),r+=a)}return r}if(typeof n==`object`)for(let e in n)n[e]&&(r&&(r+=` `),r+=e);return r},n=(...e)=>t(e);export{t as n,n as t};
|
package/dist/code-block.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SvgAttributes } from "./types-BvUzforF.js";
|
|
2
1
|
import { t as WithAsChild } from "./as-child-uN_018tj.js";
|
|
2
|
+
import { t as SvgAttributes } from "./types-BvUzforF.js";
|
|
3
3
|
import { A as FoldStrategy, B as computeJsonFoldRanges, C as Indentation, D as FoldExplanation, E as ComputeFoldRangesInput, F as isSupportedLanguage, H as finalizeFoldRanges, I as parseLanguage, L as supportedLanguages, M as computeFoldRanges, N as foldStrategyFor, O as FoldLine, P as SupportedLanguage, S as normalizeIndentation, T as isIndentation, U as LineRange, V as FoldableRange, _ as MantleCodeBlockValue, a as Mode, c as ResolvedPreRenderedCodeBlockProps, d as parseMetastring, f as resolvePreRenderedCodeBlockProps, g as parseCodeBlockShowLineNumbers, h as parseCodeBlockLineNumberStart, i as MetaInput, j as FoldToken, k as FoldScope, l as defaultMeta, m as parseCodeBlockHighlightLines, n as DefaultMeta, o as ResolvePreRenderedCodeBlockPropsInput, p as tokenizeMetastring, r as Meta, s as ResolvePreRenderedCodeBlockPropsResult, t as CodeBlockPreElementInput, u as normalizeValue, v as MantleCodeOptions, w as inferIndentation, x as mantleCode, y as createMantleCodeBlockValue, z as decorateHighlightedHtml } from "./resolve-pre-rendered-props-DxJ9-DAl.js";
|
|
4
4
|
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
5
5
|
import { Content, List, Trigger } from "@radix-ui/react-tabs";
|
package/dist/code-block.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./icon-SUx16Sl3.js";import{t as n}from"./slot-DT_E5BQx.js";import{t as r}from"./icon-button-DiX9iZ9n.js";import{t as i}from"./compose-refs-Cjf2gfB8.js";import{t as a}from"./use-copy-to-clipboard-BLpquU9d.js";import{t as o}from"./traffic-policy-file-0g5RXFqu.js";import{S as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h,i as g,l as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T,v as E,y as D}from"./resolve-pre-rendered-props-DwIF_M_K.js";import{CaretDownIcon as O}from"@phosphor-icons/react/CaretDown";import{createContext as ee,forwardRef as k,useCallback as A,useContext as te,useEffect as j,useId as ne,useLayoutEffect as re,useMemo as M,useRef as N,useState as P}from"react";import F from"tiny-invariant";import{jsx as I,jsxs as ie}from"react/jsx-runtime";import{CheckIcon as ae}from"@phosphor-icons/react/Check";import{CopyIcon as oe}from"@phosphor-icons/react/Copy";import{FileTextIcon as se}from"@phosphor-icons/react/FileText";import{TerminalIcon as ce}from"@phosphor-icons/react/Terminal";import{Content as le,List as ue,Root as de,Trigger as fe}from"@radix-ui/react-tabs";function L(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 R=new WeakMap;function z(e){let t=new Set;if(e==null||e===``)return t;for(let n of e.split(` `))n!==``&&t.add(n);return t}function pe(e){let t=R.get(e);if(t!=null&&ge(t))return t;let n=new Map,r=new WeakMap,i=e.querySelectorAll(`[data-fold-regions]`);for(let e=0;e<i.length;e+=1){let t=i[e];if(!(t instanceof HTMLElement))continue;let a=z(t.dataset.foldRegions);if(a.size!==0){r.set(t,a);for(let e of a){let r=n.get(e);r??(r=[],n.set(e,r)),r.push(t)}}}let a={regionToLines:n,lineToRegions:r};return R.set(e,a),a}function me(e){R.delete(e)}function he(e){me(e),e.removeAttribute(`data-folded-regions`)}function ge(e){for(let t of e.regionToLines.values()){if(t.length===0)continue;let e=t[0];if(e!=null)return e.isConnected}return!0}function _e(e,t,n){let r=!1;for(let e of n)if(t.has(e)){r=!0;break}r?e.dataset.foldHidden=`true`:delete e.dataset.foldHidden}function ve(e){let t=e.dataset.foldLine;if(t==null||t===``)return!1;let n=e.closest(`[data-slot='code-block-code']`)?.querySelector(`code`);if(n==null)return!1;let r=z(n.getAttribute(`data-folded-regions`)),i=!r.has(t);i?r.add(t):r.delete(t),r.size===0?n.removeAttribute(`data-folded-regions`):n.setAttribute(`data-folded-regions`,[...r].join(` `)),e.setAttribute(`aria-expanded`,i?`false`:`true`);let{regionToLines:a,lineToRegions:o}=pe(n),s=a.get(t);if(s!=null)for(let e of s){let t=o.get(e);t!=null&&_e(e,r,t)}return!0}function ye(e){let t=e=>{let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`.mantle-code-fold-toggle`);n instanceof HTMLButtonElement&&ve(n)};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}const B=ee(null);function V(){let e=te(B);return F(e!=null,`CodeBlock subcomponents must be rendered within a <CodeBlock.Root>.`),e}const H=k(({asChild:t=!1,className:r,defaultTab:i,activeTab:a,onActiveTabChange:o,...s},c)=>{let l=N(``),[u,d]=P(!1),[f,p]=P(!1),[m,h]=P(void 0),g=A(e=>{h(t=>(F(t==null,`You can only render a single CodeBlock.Code within a CodeBlock.`),e))},[]),_=A(e=>{h(t=>{F(t===e,`You can only render a single CodeBlock.Code within a CodeBlock.`)})},[]),v=M(()=>({codeId:m,copyTextRef:l,hasCodeExpander:u,isCodeExpanded:f,registerCodeId:g,setHasCodeExpander:d,setIsCodeExpanded:p,unregisterCodeId:_}),[m,u,f,g,_]),y=i!=null||a!=null,b=I(t?n:`div`,{"data-slot":`code-block`,className:e(`text-mono w-full overflow-hidden rounded-md border border-gray-300 bg-card font-mono`,`[&_svg]:shrink-0`,r),ref:c,...s});return I(B.Provider,{value:v,children:y?I(de,{asChild:!0,defaultValue:i,value:a,onValueChange:o,children:b}):b})});H.displayName=`CodeBlock`;const U=k(({asChild:t=!1,className:r,...i},a)=>I(t?n:`div`,{"data-slot":`code-block-body`,className:e(`relative`,r),ref:a,...i}));U.displayName=`CodeBlockBody`;const be=/SHIKI_VAL_(\d+)/g;function xe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const W=new Map;function Se(e){if(e==null||e.length===0)return be;let t=W.get(e);return t??(W.size>=500&&W.clear(),t=RegExp(`${xe(e)}(\\d+)__`,`g`),W.set(e,t)),t}function G(e,t,n,r){if(n==null){if(!e.includes(`SHIKI_VAL_`))return e}else if(!e.includes(n))return e;return e.replaceAll(Se(n),(e,n)=>{let i=Number.parseInt(n,10);return Number.isNaN(i)||i<0||i>=t.length?e:r(t[i])})}function Ce(e,t,n){return G(e,t,n,e=>L(String(e)))}function we(e,t,n){return G(e,t,n,e=>String(e))}const K=k(({className:t,style:n,value:r,...a},o)=>{let s=ne(),c=N(null),{copyTextRef:l,hasCodeExpander:u,isCodeExpanded:d,registerCodeId:f,unregisterCodeId:p}=V(),{language:m,code:h,"~preValToken":g,"~preVals":_,"~highlightLines":v,"~lineNumberStart":y,"~preHtml":b,"~showLineNumbers":x}=r,S=v,C=y??1,w=x??!1,T=M(()=>_!=null&&_.length>0?we(h,_,g):h,[g,_,h]);re(()=>{l.current=T},[l,T]),j(()=>(f(s),()=>{p(s)}),[s,f,p]);let E=M(()=>{if(b!=null)return _!=null&&_.length>0?Ce(b,_,g):b},[b,g,_]);j(()=>{let e=c.current;if(e==null)return;let t=e.querySelector(`code`);return t!=null&&he(t),ye(e)},[E]);let D=E!=null,O=E??L(T),ee=M(()=>({__html:O}),[O]);return I(`pre`,{"data-slot":`code-block-code`,"aria-expanded":u?d:void 0,className:e(`scrollbar overflow-x-auto overflow-y-hidden py-4`,!D&&`pr-14`,`data-[mantle-line-numbers~='false']:pl-4`,`text-mono m-0 font-mono outline-hidden`,`aria-collapsed:max-h-[13.6rem]`,t),"data-highlighted":D?`true`:`false`,"data-lang":m,"data-mantle-highlight-lines":D&&S!=null&&S.length>0?S.join(`,`):void 0,"data-mantle-line-number-start":D&&w?String(C):`1`,"data-mantle-line-numbers":D&&w?`true`:`false`,id:s,ref:i(c,o),style:{...n,"--mantle-line-number-start":String(C),tabSize:2,MozTabSize:2},...a,children:I(`code`,{className:`text-size-inherit block min-w-full w-max`,dangerouslySetInnerHTML:ee})})});K.displayName=`CodeBlockCode`;const q=k(({asChild:t=!1,className:r,...i},a)=>I(t?n:`div`,{"data-slot":`code-block-header`,className:e(`flex items-center gap-1 border-b border-gray-300 bg-base px-4 py-2 text-gray-700`,r),ref:a,...i}));q.displayName=`CodeBlockHeader`;const J=k(({asChild:t=!1,className:r,...i},a)=>I(t?n:`h3`,{"data-slot":`code-block-title`,ref:a,className:e(`text-mono m-0 font-mono font-normal`,r),...i}));J.displayName=`CodeBlockTitle`;const Y=k(({className:e,label:t=`Copy code`,onCopy:n,onCopyError:i,onClick:o,...s},c)=>{let{copyTextRef:l}=V(),u=a(),[d,f]=P(!1),p=N(void 0);return j(()=>()=>{p.current!=null&&clearTimeout(p.current)},[]),I(`span`,{"data-slot":`code-block-copy-button`,className:`absolute right-3 top-3 z-10 inline-flex size-7 items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] bg-card`,children:I(r,{type:`button`,appearance:`ghost`,size:`sm`,label:t,icon:I(d?ae:oe,{}),className:e,ref:c,onClick:async e=>{try{if(o?.(e),e.defaultPrevented){p.current!=null&&clearTimeout(p.current);return}let t=l.current;await u(t),n?.(t),f(!0),p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{f(!1)},2e3)}catch(e){i?.(e)}},...s})})});Y.displayName=`CodeBlockCopyButton`;const X=k(({asChild:r=!1,className:i,onClick:a,...o},s)=>{let{codeId:c,isCodeExpanded:l,setIsCodeExpanded:u,setHasCodeExpander:d}=V();return j(()=>(d(!0),()=>{d(!1)}),[d]),ie(r?n:`button`,{...o,"data-slot":`code-block-expander-button`,"aria-controls":c,"aria-expanded":l,className:e(`flex w-full items-center justify-center gap-0.5 border-t border-gray-300 bg-card px-4 py-2 font-sans text-gray-700 hover:bg-gray-100`,i),ref:s,type:`button`,onClick:e=>{u(e=>!e),a?.(e)},children:[l?`Show less`:`Show more`,` `,I(t,{svg:I(O,{weight:`bold`}),className:e(`size-4`,l&&`rotate-180`,`transition-all duration-150`)})]})});X.displayName=`CodeBlockExpanderButton`;function Z({className:e,preset:n,svg:r,...i}){let a=r;if(n!=null)switch(n){case`file`:a=I(se,{weight:`fill`});break;case`cli`:a=I(ce,{weight:`fill`});break;case`traffic-policy`:a=I(o,{});break}return I(t,{"data-slot":`code-block-icon`,className:e,svg:a,...i})}Z.displayName=`CodeBlockIcon`;const Q=k(({className:t,...n},r)=>I(ue,{"data-slot":`code-block-tab-list`,className:e(`flex items-center gap-1`,t),ref:r,...n}));Q.displayName=`CodeBlockTabList`;const Te=k(({className:t,...n},r)=>I(fe,{"data-slot":`code-block-tab-trigger`,className:e(`cursor-pointer rounded px-1.5 py-0.5 text-xs font-medium`,`text-gray-600 outline-hidden`,`hover:text-gray-900`,`data-[state=active]:bg-neutral-500/15 data-[state=active]:text-strong`,`focus-visible:ring-focus-accent focus-visible:ring-4`,t),ref:r,...n}));Te.displayName=`CodeBlockTabTrigger`;const Ee=k((e,t)=>I(le,{"data-slot":`code-block-tab-content`,ref:t,...e}));Ee.displayName=`CodeBlockTabContent`;const De={Root:H,Body:U,Code:K,CopyButton:Y,ExpanderButton:X,Header:q,Icon:Z,TabContent:Ee,TabList:Q,TabTrigger:Te,Title:J},Oe=`var(--shiki-foreground)`;function ke(e){return e.replace(/[&<]/g,e=>e===`&`?`&`:`<`)}function Ae(e){return e===` `||e===` `||e===`
|
|
2
2
|
`||e===`\r`||e===`{`||e===`}`||e===`[`||e===`]`||e===`:`||e===`,`||e===`"`}function je(e,t,n){let r=e.length,i=[],a=`"`,o=t+1;for(;o<r;){let t=e[o];if(t===`\\`){let t=e[o+1]===`u`&&/^[0-9a-fA-F]{4}$/.test(e.slice(o+2,o+6))?6:2;a!==``&&(i.push({text:a,isEscape:!1}),a=``),i.push({text:e.slice(o,o+t),isEscape:!0}),o+=t;continue}if(t===`"`){a+=`"`,o+=1;break}a+=t,o+=1}a!==``&&i.push({text:a,isEscape:!1});let s=o;for(;s<r;){let t=e[s];if(t===` `||t===` `||t===`
|
|
3
3
|
`||t===`\r`){s+=1;continue}break}let c=e[s]===`:`?`var(--shiki-token-keyword)`:`var(--shiki-token-string-expression)`;for(let e of i)n(e.text,e.isEscape?`var(--shiki-token-escape, var(--shiki-token-constant))`:c);return o}function Me(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(n!=null&&n.color==null){let r=Oe;for(let n=t+1;n<e.length;n+=1){let t=e[n];if(t!=null&&t.color!=null){r=t.color;break}}n.color=r}}let t=``,n=``,r=null,i=()=>{r!=null&&(t+=`<span style="color:${r}">${ke(n)}</span>`),n=``,r=null};for(let t of e)t!=null&&(t.color===r?n+=t.text:(i(),n=t.text,r=t.color));return i(),`<span class="line">${t}</span>`}function $(e){let t=[[]],n=t[0]??[],r=e.length,i=0,a=(e,t)=>{n.push({text:e,color:t})};for(;i<r;){let o=e[i];if(o===`
|
|
4
4
|
`||o===`\r`){o===`\r`&&e[i+1]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,n as l,o as u,p as d,s as f,u as p,v as m,x as h,y as g}from"./resolve-pre-rendered-props-
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,l as s,m as c,n as l,o as u,p as d,s as f,u as p,v as m,x as h,y as g}from"./resolve-pre-rendered-props-DwIF_M_K.js";export{o as computeFoldRanges,m as computeJsonFoldRanges,e as decorateHighlightedHtml,h as defaultShowLineNumbers,g as finalizeFoldRanges,a as foldStrategyFor,d as inferIndentation,c as isIndentation,s as isSupportedLanguage,i as normalizeIndentation,l as normalizeValue,u as parseCodeBlockHighlightLines,f as parseCodeBlockLineNumberStart,n as parseCodeBlockShowLineNumbers,p as parseLanguage,r as supportedLanguages,t as tokenizeMetastring};
|
package/dist/code.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-C1UYP5We.js";import{t}from"./slot-DT_E5BQx.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({asChild:n,className:i,...a},o)=>r(n?t:`code`,{ref:o,"data-slot":`code`,className:e(`border-gray-500/15 rounded-md border bg-gray-500/5 px-1 font-mono text-[0.8em]`,i),...a}));i.displayName=`Code`;export{i as Code};
|