@asanchez-sa/abby 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +245 -2
- package/dist/_virtual/_rolldown/runtime.js +26 -0
- package/dist/agents/approvals.d.ts +46 -0
- package/dist/agents/approvals.js +58 -0
- package/dist/agents/changes.d.ts +21 -0
- package/dist/agents/changes.js +21 -0
- package/dist/agents/hooks.d.ts +20 -0
- package/dist/agents/hooks.js +58 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/run-tool.d.ts +44 -0
- package/dist/agents/run-tool.js +79 -0
- package/dist/agents/ui-sdk.d.ts +5 -0
- package/dist/agents/ui-sdk.js +3 -0
- package/dist/behaviors/canvas/index.d.ts +2 -0
- package/dist/behaviors/canvas/index.js +1 -0
- package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
- package/dist/behaviors/canvas/ui-sdk.js +1 -0
- package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/index.js +1 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
- package/dist/behaviors/dragging/index.d.ts +2 -0
- package/dist/behaviors/dragging/index.js +1 -0
- package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
- package/dist/behaviors/dragging/ui-sdk.js +1 -0
- package/dist/behaviors/focus/index.d.ts +2 -0
- package/dist/behaviors/focus/index.js +1 -0
- package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
- package/dist/behaviors/focus/ui-sdk.js +1 -0
- package/dist/behaviors/lists/index.d.ts +3 -0
- package/dist/behaviors/lists/index.js +3 -0
- package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
- package/dist/behaviors/lists/ui-sdk.js +3 -0
- package/dist/behaviors/popups/index.d.ts +3 -0
- package/dist/behaviors/popups/index.js +3 -0
- package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
- package/dist/behaviors/popups/ui-sdk.js +3 -0
- package/dist/behaviors/preferences/index.d.ts +3 -0
- package/dist/behaviors/preferences/index.js +3 -0
- package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
- package/dist/behaviors/preferences/ui-sdk.js +3 -0
- package/dist/behaviors/selection/index.d.ts +3 -0
- package/dist/behaviors/selection/index.js +3 -0
- package/dist/behaviors/selection/indicator.d.ts +13 -0
- package/dist/behaviors/selection/indicator.js +20 -0
- package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
- package/dist/behaviors/selection/ui-sdk.js +1 -0
- package/dist/behaviors/transitions/index.d.ts +3 -0
- package/dist/behaviors/transitions/index.js +3 -0
- package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
- package/dist/behaviors/transitions/ui-sdk.js +3 -0
- package/dist/behaviors/trees/index.d.ts +2 -0
- package/dist/behaviors/trees/index.js +1 -0
- package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
- package/dist/behaviors/trees/ui-sdk.js +1 -0
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.js +165 -0
- package/dist/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.js +131 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog.js +257 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
- package/dist/components/attachment/attachment.d.ts +48 -0
- package/dist/components/attachment/attachment.js +372 -0
- package/dist/components/autocomplete/autocomplete.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.js +466 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar-group/avatar-group.d.ts +9 -0
- package/dist/components/avatar-group/avatar-group.js +75 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +31 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.js +279 -0
- package/dist/components/bubble/bubble.d.ts +26 -0
- package/dist/components/bubble/bubble.js +173 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button-group/button-group.d.ts +15 -0
- package/dist/components/button-group/button-group.js +71 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.js +453 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +213 -0
- package/dist/components/carousel/carousel.d.ts +16 -0
- package/dist/components/carousel/carousel.js +364 -0
- package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
- package/dist/components/chat/chat.d.ts +48 -0
- package/dist/components/chat/chat.js +207 -0
- package/dist/components/checkbox/checkbox.d.ts +10 -0
- package/dist/components/checkbox/checkbox.js +118 -0
- package/dist/components/checkpoint/checkpoint.d.ts +24 -0
- package/dist/components/checkpoint/checkpoint.js +178 -0
- package/dist/components/choice-cards/choice-cards.d.ts +38 -0
- package/dist/components/choice-cards/choice-cards.js +255 -0
- package/dist/components/code-block/code-block.d.ts +58 -0
- package/dist/components/code-block/code-block.js +506 -0
- package/dist/components/code-block/highlighter.js +96 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
- package/dist/components/code-block/use-highlighted-code.js +54 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/collapsible.js +92 -0
- package/dist/components/color-picker/color-picker.d.ts +17 -0
- package/dist/components/color-picker/color-picker.js +395 -0
- package/dist/components/combobox/combobox.d.ts +54 -0
- package/dist/components/combobox/combobox.js +683 -0
- package/dist/components/command/command.d.ts +23 -0
- package/dist/components/command/command.js +373 -0
- package/dist/components/command-dock/command-dock.d.ts +118 -0
- package/dist/components/command-dock/command-dock.js +944 -0
- package/dist/components/confirmation/confirmation.d.ts +58 -0
- package/dist/components/confirmation/confirmation.js +181 -0
- package/dist/components/context/context.d.ts +82 -0
- package/dist/components/context/context.js +490 -0
- package/dist/components/date-input/date-input.d.ts +16 -0
- package/dist/components/date-input/date-input.js +89 -0
- package/dist/components/date-picker/date-picker.d.ts +28 -0
- package/dist/components/date-picker/date-picker.js +361 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +261 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +309 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +192 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.js +261 -0
- package/dist/components/file-input/file-input.d.ts +12 -0
- package/dist/components/file-input/file-input.js +216 -0
- package/dist/components/file-tree/file-tree.d.ts +45 -0
- package/dist/components/file-tree/file-tree.js +283 -0
- package/dist/components/hover-card/hover-card.d.ts +10 -0
- package/dist/components/hover-card/hover-card.js +118 -0
- package/dist/components/icon/icon.d.ts +14 -0
- package/dist/components/icon/icon.js +60 -0
- package/dist/components/image-cropper/image-cropper.d.ts +15 -0
- package/dist/components/image-cropper/image-cropper.js +334 -0
- package/dist/components/inline-citation/inline-citation.d.ts +46 -0
- package/dist/components/inline-citation/inline-citation.js +269 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +43 -0
- package/dist/components/input-group/input-group.d.ts +42 -0
- package/dist/components/input-group/input-group.js +192 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.js +394 -0
- package/dist/components/kbd/kbd.d.ts +9 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.js +40 -0
- package/dist/components/link/link.d.ts +21 -0
- package/dist/components/link/link.js +126 -0
- package/dist/components/listbox/listbox.d.ts +20 -0
- package/dist/components/listbox/listbox.js +199 -0
- package/dist/components/marker/marker.d.ts +11 -0
- package/dist/components/marker/marker.js +88 -0
- package/dist/components/menu/menu.d.ts +38 -0
- package/dist/components/menu/menu.js +553 -0
- package/dist/components/menubar/menubar.d.ts +9 -0
- package/dist/components/menubar/menubar.js +47 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/message.js +328 -0
- package/dist/components/message-scroller/message-scroller.d.ts +111 -0
- package/dist/components/message-scroller/message-scroller.js +957 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/meter/meter.js +162 -0
- package/dist/components/model-selector/model-selector.d.ts +155 -0
- package/dist/components/model-selector/model-selector.js +905 -0
- package/dist/components/native-select/native-select.d.ts +27 -0
- package/dist/components/native-select/native-select.js +226 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu.js +318 -0
- package/dist/components/not-label.js +9 -0
- package/dist/components/note-editor/blocks.d.ts +22 -0
- package/dist/components/note-editor/blocks.js +245 -0
- package/dist/components/note-editor/diff.d.ts +19 -0
- package/dist/components/note-editor/diff.js +64 -0
- package/dist/components/note-editor/editor.js +249 -0
- package/dist/components/note-editor/note-editor.d.ts +109 -0
- package/dist/components/note-editor/note-editor.js +954 -0
- package/dist/components/note-editor/parts/comments.d.ts +24 -0
- package/dist/components/note-editor/parts/comments.js +337 -0
- package/dist/components/note-editor/parts/header.d.ts +25 -0
- package/dist/components/note-editor/parts/header.js +263 -0
- package/dist/components/note-editor/parts/history.d.ts +56 -0
- package/dist/components/note-editor/parts/history.js +409 -0
- package/dist/components/note-editor/parts/presence.d.ts +31 -0
- package/dist/components/note-editor/parts/presence.js +140 -0
- package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
- package/dist/components/note-editor/parts/suggestions.js +316 -0
- package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
- package/dist/components/note-editor/parts/toolbar.js +687 -0
- package/dist/components/note-editor/people.d.ts +84 -0
- package/dist/components/note-editor/people.js +276 -0
- package/dist/components/note-editor/person.d.ts +11 -0
- package/dist/components/note-editor/person.js +15 -0
- package/dist/components/note-place/note-place.d.ts +42 -0
- package/dist/components/note-place/note-place.js +256 -0
- package/dist/components/note-status/note-status.d.ts +59 -0
- package/dist/components/note-status/note-status.js +380 -0
- package/dist/components/number-input/number-input.d.ts +12 -0
- package/dist/components/number-input/number-input.js +252 -0
- package/dist/components/otp-input/otp-input.d.ts +12 -0
- package/dist/components/otp-input/otp-input.js +136 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/pagination.js +218 -0
- package/dist/components/password-input/password-input.d.ts +11 -0
- package/dist/components/password-input/password-input.js +117 -0
- package/dist/components/plan/plan.d.ts +51 -0
- package/dist/components/plan/plan.js +320 -0
- package/dist/components/popover/popover.d.ts +16 -0
- package/dist/components/popover/popover.js +268 -0
- package/dist/components/preferences/preferences.d.ts +5 -0
- package/dist/components/preferences/preferences.js +18 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +162 -0
- package/dist/components/prompt-input/prompt-input.d.ts +247 -0
- package/dist/components/prompt-input/prompt-input.js +1367 -0
- package/dist/components/questionnaire/questionnaire.d.ts +174 -0
- package/dist/components/questionnaire/questionnaire.js +1628 -0
- package/dist/components/queue/queue.d.ts +82 -0
- package/dist/components/queue/queue.js +471 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +101 -0
- package/dist/components/rating/rating.d.ts +10 -0
- package/dist/components/rating/rating.js +95 -0
- package/dist/components/reasoning/reasoning.d.ts +50 -0
- package/dist/components/reasoning/reasoning.js +233 -0
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/resizable/resizable.js +100 -0
- package/dist/components/scroll-area/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area/scroll-area.js +211 -0
- package/dist/components/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control/segmented-control.js +142 -0
- package/dist/components/select/select.d.ts +43 -0
- package/dist/components/select/select.js +577 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +38 -0
- package/dist/components/sheet/sheet.d.ts +24 -0
- package/dist/components/sheet/sheet.js +330 -0
- package/dist/components/sidebar/sidebar.d.ts +138 -0
- package/dist/components/sidebar/sidebar.js +1374 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +40 -0
- package/dist/components/slider/slider.d.ts +9 -0
- package/dist/components/slider/slider.js +193 -0
- package/dist/components/sources/sources.d.ts +35 -0
- package/dist/components/sources/sources.js +209 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
- package/dist/components/stack-trace/parse-stack-trace.js +61 -0
- package/dist/components/stack-trace/stack-trace.d.ts +79 -0
- package/dist/components/stack-trace/stack-trace.js +434 -0
- package/dist/components/subagent/subagent.d.ts +71 -0
- package/dist/components/subagent/subagent.js +450 -0
- package/dist/components/suggestion/suggestion.d.ts +21 -0
- package/dist/components/suggestion/suggestion.js +130 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/switch/switch.js +70 -0
- package/dist/components/table/table.d.ts +19 -0
- package/dist/components/table/table.js +284 -0
- package/dist/components/table-of-contents/spy.js +84 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
- package/dist/components/table-of-contents/table-of-contents.js +787 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +273 -0
- package/dist/components/task/task.d.ts +40 -0
- package/dist/components/task/task.js +262 -0
- package/dist/components/terminal/terminal.d.ts +82 -0
- package/dist/components/terminal/terminal.js +457 -0
- package/dist/components/test-results/test-results.d.ts +127 -0
- package/dist/components/test-results/test-results.js +687 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +43 -0
- package/dist/components/time-input/time-input.d.ts +7 -0
- package/dist/components/time-input/time-input.js +82 -0
- package/dist/components/timeline/timeline.d.ts +19 -0
- package/dist/components/timeline/timeline.js +247 -0
- package/dist/components/toast/toast.d.ts +12 -0
- package/dist/components/toast/toast.js +285 -0
- package/dist/components/toggle/toggle.d.ts +15 -0
- package/dist/components/toggle/toggle.js +137 -0
- package/dist/components/token-input/token-input.d.ts +7 -0
- package/dist/components/token-input/token-input.js +117 -0
- package/dist/components/tool/tool.d.ts +66 -0
- package/dist/components/tool/tool.js +413 -0
- package/dist/components/toolbar/toolbar.d.ts +91 -0
- package/dist/components/toolbar/toolbar.js +655 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +97 -0
- package/dist/components/trace/trace.d.ts +31 -0
- package/dist/components/trace/trace.js +309 -0
- package/dist/components/tree/tree.d.ts +13 -0
- package/dist/components/tree/tree.js +258 -0
- package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
- package/dist/components/trigger-menu/trigger-menu.js +352 -0
- package/dist/components/usage/usage.d.ts +132 -0
- package/dist/components/usage/usage.js +1368 -0
- package/dist/components/waterfall/waterfall.d.ts +20 -0
- package/dist/components/waterfall/waterfall.js +360 -0
- package/dist/components/week-strip/week-strip.d.ts +177 -0
- package/dist/components/week-strip/week-strip.js +1081 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +27 -0
- package/dist/core/ui-sdk.d.ts +3 -0
- package/dist/core/ui-sdk.js +3 -0
- package/dist/core/use-primitive-state.d.ts +14 -0
- package/dist/core/use-primitive-state.js +25 -0
- package/dist/styles/LICENSE-shadcn.md +21 -0
- package/dist/styles/color-scheme.css +32 -0
- package/dist/styles/components.css +303 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/tokens.css +474 -0
- package/dist/styles/typeset/shadcn.css +506 -0
- package/dist/styles/typeset.css +70 -0
- package/dist/styles/utilities.css +555 -0
- package/dist/tools/observe/index.d.ts +2 -0
- package/dist/tools/observe/index.js +3 -0
- package/dist/tools/observe/ui-sdk.d.ts +1 -0
- package/dist/tools/observe/ui-sdk.js +2 -0
- package/dist/tools/testing/check-agent.d.ts +28 -0
- package/dist/tools/testing/check-agent.js +42 -0
- package/dist/tools/testing/index.d.ts +4 -0
- package/dist/tools/testing/index.js +4 -0
- package/dist/tools/testing/ui-sdk.d.ts +1 -0
- package/dist/tools/testing/ui-sdk.js +2 -0
- package/dist/utilities/cn/index.d.ts +12 -0
- package/dist/utilities/cn/index.js +47 -0
- package/dist/utilities/color/index.d.ts +2 -0
- package/dist/utilities/color/index.js +3 -0
- package/dist/utilities/color/ui-sdk.d.ts +1 -0
- package/dist/utilities/color/ui-sdk.js +2 -0
- package/dist/utilities/date/index.d.ts +2 -0
- package/dist/utilities/date/index.js +6 -0
- package/dist/utilities/date/ui-sdk.d.ts +1 -0
- package/dist/utilities/date/ui-sdk.js +2 -0
- package/dist/utilities/image/index.d.ts +2 -0
- package/dist/utilities/image/index.js +3 -0
- package/dist/utilities/image/ui-sdk.d.ts +1 -0
- package/dist/utilities/image/ui-sdk.js +2 -0
- package/dist/utilities/mobile/index.d.ts +2 -0
- package/dist/utilities/mobile/index.js +1 -0
- package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
- package/dist/utilities/mobile/ui-sdk.js +1 -0
- package/dist/utilities/number/index.d.ts +2 -0
- package/dist/utilities/number/index.js +3 -0
- package/dist/utilities/number/ui-sdk.d.ts +1 -0
- package/dist/utilities/number/ui-sdk.js +2 -0
- package/dist/utilities/platform/index.d.ts +3 -0
- package/dist/utilities/platform/index.js +14 -0
- package/dist/utilities/platform/ui-sdk.d.ts +3 -0
- package/dist/utilities/platform/ui-sdk.js +3 -0
- package/dist/utilities/storage/index.d.ts +2 -0
- package/dist/utilities/storage/index.js +1 -0
- package/dist/utilities/storage/ui-sdk.d.ts +2 -0
- package/dist/utilities/storage/ui-sdk.js +1 -0
- package/dist/utilities/text/index.d.ts +3 -0
- package/dist/utilities/text/index.js +3 -0
- package/dist/utilities/text/ui-sdk.d.ts +3 -0
- package/dist/utilities/text/ui-sdk.js +3 -0
- package/package.json +192 -4
- package/skills/agent-ready-ui/SKILL.md +229 -0
- package/skills/blocks/SKILL.md +262 -0
- package/skills/compose-screens/SKILL.md +354 -0
- package/skills/note-editor/SKILL.md +493 -0
- package/skills/note-status/SKILL.md +295 -0
- package/skills/setup/SKILL.md +136 -0
- package/skills/theming/SKILL.md +216 -0
- package/src/blocks/notes/adapters.ts +77 -0
- package/src/blocks/notes/data.ts +508 -0
- package/src/blocks/notes/notes-block.tsx +244 -0
- package/src/blocks/notes/parts/home.tsx +219 -0
- package/src/blocks/notes/parts/no-access.tsx +84 -0
- package/src/blocks/notes/parts/note-screen.tsx +412 -0
- package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
- package/src/blocks/notes/parts/panels.tsx +393 -0
- package/src/blocks/notes/parts/place.ts +15 -0
- package/src/blocks/notes/parts/review-dialog.tsx +159 -0
- package/src/blocks/notes/parts/share.tsx +172 -0
- package/src/blocks/notes/texts.ts +135 -0
- package/src/blocks/shell/adapters.ts +69 -0
- package/src/blocks/shell/data.ts +281 -0
- package/src/blocks/shell/parts/compose.tsx +292 -0
- package/src/blocks/shell/parts/home.tsx +203 -0
- package/src/blocks/shell/parts/marks.tsx +144 -0
- package/src/blocks/shell/parts/rail.tsx +166 -0
- package/src/blocks/shell/parts/rooms-column.tsx +326 -0
- package/src/blocks/shell/shell-block.tsx +210 -0
- package/src/blocks/shell/texts.ts +80 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
/** A placeholder for content that is loading. It's decorative: say what loads on the region around it. */
|
|
3
|
+
declare function Skeleton({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
4
|
+
export { Skeleton };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/skeleton/skeleton.tsx
|
|
6
|
+
/** A placeholder for content that is loading. It's decorative: say what loads on the region around it. */
|
|
7
|
+
function Skeleton(t0) {
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== className) {
|
|
22
|
+
t1 = cn("animate-pulse rounded-md bg-muted", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
29
|
+
"data-slot": "skeleton",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
className: t1,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
$[5] = props;
|
|
35
|
+
$[6] = t1;
|
|
36
|
+
$[7] = t2;
|
|
37
|
+
} else t2 = $[7];
|
|
38
|
+
return t2;
|
|
39
|
+
}
|
|
40
|
+
export { Skeleton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Slider as Slider$1, SliderControl as SliderControl$1, SliderIndicator as SliderIndicator$1, SliderThumb as SliderThumb$1, SliderTrack as SliderTrack$1, SliderValue as SliderValue$1, createSliderController } from "@ui-sdk/react/slider";
|
|
3
|
+
declare function Slider<Value extends number | number[] = number | number[]>({ className, ...props }: ComponentProps<typeof Slider$1<Value>>): import("react").JSX.Element;
|
|
4
|
+
declare function SliderValue({ className, ...props }: ComponentProps<typeof SliderValue$1>): import("react").JSX.Element;
|
|
5
|
+
declare function SliderControl({ className, ...props }: ComponentProps<typeof SliderControl$1>): import("react").JSX.Element;
|
|
6
|
+
declare function SliderTrack({ className, ...props }: ComponentProps<typeof SliderTrack$1>): import("react").JSX.Element;
|
|
7
|
+
declare function SliderIndicator({ className, ...props }: ComponentProps<typeof SliderIndicator$1>): import("react").JSX.Element;
|
|
8
|
+
declare function SliderThumb({ className, ...props }: ComponentProps<typeof SliderThumb$1>): import("react").JSX.Element;
|
|
9
|
+
export { Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack, SliderValue, createSliderController };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Slider as Slider$1, SliderControl as SliderControl$1, SliderIndicator as SliderIndicator$1, SliderThumb as SliderThumb$1, SliderTrack as SliderTrack$1, SliderValue as SliderValue$1, createSliderController } from "@ui-sdk/react/slider";
|
|
6
|
+
// src/components/slider/slider.tsx
|
|
7
|
+
function Slider(t0) {
|
|
8
|
+
const $ = c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({className, ...props} = t0);
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = className;
|
|
15
|
+
$[2] = props;
|
|
16
|
+
} else {
|
|
17
|
+
className = $[1];
|
|
18
|
+
props = $[2];
|
|
19
|
+
}
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== className) {
|
|
22
|
+
t1 = cnState("flex w-full flex-col gap-2 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-fit data-[orientation=vertical]:items-center", className);
|
|
23
|
+
$[3] = className;
|
|
24
|
+
$[4] = t1;
|
|
25
|
+
} else t1 = $[4];
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
28
|
+
t2 = /* @__PURE__ */ jsx(Slider$1, {
|
|
29
|
+
className: t1,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
$[5] = props;
|
|
33
|
+
$[6] = t1;
|
|
34
|
+
$[7] = t2;
|
|
35
|
+
} else t2 = $[7];
|
|
36
|
+
return t2;
|
|
37
|
+
}
|
|
38
|
+
function SliderValue(t0) {
|
|
39
|
+
const $ = c(8);
|
|
40
|
+
let className;
|
|
41
|
+
let props;
|
|
42
|
+
if ($[0] !== t0) {
|
|
43
|
+
({className, ...props} = t0);
|
|
44
|
+
$[0] = t0;
|
|
45
|
+
$[1] = className;
|
|
46
|
+
$[2] = props;
|
|
47
|
+
} else {
|
|
48
|
+
className = $[1];
|
|
49
|
+
props = $[2];
|
|
50
|
+
}
|
|
51
|
+
let t1;
|
|
52
|
+
if ($[3] !== className) {
|
|
53
|
+
t1 = cnState("text-sm text-muted-foreground tabular-nums", className);
|
|
54
|
+
$[3] = className;
|
|
55
|
+
$[4] = t1;
|
|
56
|
+
} else t1 = $[4];
|
|
57
|
+
let t2;
|
|
58
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
59
|
+
t2 = /* @__PURE__ */ jsx(SliderValue$1, {
|
|
60
|
+
className: t1,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
$[5] = props;
|
|
64
|
+
$[6] = t1;
|
|
65
|
+
$[7] = t2;
|
|
66
|
+
} else t2 = $[7];
|
|
67
|
+
return t2;
|
|
68
|
+
}
|
|
69
|
+
function SliderControl(t0) {
|
|
70
|
+
const $ = c(8);
|
|
71
|
+
let className;
|
|
72
|
+
let props;
|
|
73
|
+
if ($[0] !== t0) {
|
|
74
|
+
({className, ...props} = t0);
|
|
75
|
+
$[0] = t0;
|
|
76
|
+
$[1] = className;
|
|
77
|
+
$[2] = props;
|
|
78
|
+
} else {
|
|
79
|
+
className = $[1];
|
|
80
|
+
props = $[2];
|
|
81
|
+
}
|
|
82
|
+
let t1;
|
|
83
|
+
if ($[3] !== className) {
|
|
84
|
+
t1 = cnState("relative flex h-5 w-full cursor-pointer touch-none items-center select-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-5 data-[orientation=vertical]:flex-col", className);
|
|
85
|
+
$[3] = className;
|
|
86
|
+
$[4] = t1;
|
|
87
|
+
} else t1 = $[4];
|
|
88
|
+
let t2;
|
|
89
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
90
|
+
t2 = /* @__PURE__ */ jsx(SliderControl$1, {
|
|
91
|
+
className: t1,
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
$[5] = props;
|
|
95
|
+
$[6] = t1;
|
|
96
|
+
$[7] = t2;
|
|
97
|
+
} else t2 = $[7];
|
|
98
|
+
return t2;
|
|
99
|
+
}
|
|
100
|
+
function SliderTrack(t0) {
|
|
101
|
+
const $ = c(8);
|
|
102
|
+
let className;
|
|
103
|
+
let props;
|
|
104
|
+
if ($[0] !== t0) {
|
|
105
|
+
({className, ...props} = t0);
|
|
106
|
+
$[0] = t0;
|
|
107
|
+
$[1] = className;
|
|
108
|
+
$[2] = props;
|
|
109
|
+
} else {
|
|
110
|
+
className = $[1];
|
|
111
|
+
props = $[2];
|
|
112
|
+
}
|
|
113
|
+
let t1;
|
|
114
|
+
if ($[3] !== className) {
|
|
115
|
+
t1 = cnState("h-1.5 w-full grow rounded-full bg-input data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5", className);
|
|
116
|
+
$[3] = className;
|
|
117
|
+
$[4] = t1;
|
|
118
|
+
} else t1 = $[4];
|
|
119
|
+
let t2;
|
|
120
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
121
|
+
t2 = /* @__PURE__ */ jsx(SliderTrack$1, {
|
|
122
|
+
className: t1,
|
|
123
|
+
...props
|
|
124
|
+
});
|
|
125
|
+
$[5] = props;
|
|
126
|
+
$[6] = t1;
|
|
127
|
+
$[7] = t2;
|
|
128
|
+
} else t2 = $[7];
|
|
129
|
+
return t2;
|
|
130
|
+
}
|
|
131
|
+
function SliderIndicator(t0) {
|
|
132
|
+
const $ = c(8);
|
|
133
|
+
let className;
|
|
134
|
+
let props;
|
|
135
|
+
if ($[0] !== t0) {
|
|
136
|
+
({className, ...props} = t0);
|
|
137
|
+
$[0] = t0;
|
|
138
|
+
$[1] = className;
|
|
139
|
+
$[2] = props;
|
|
140
|
+
} else {
|
|
141
|
+
className = $[1];
|
|
142
|
+
props = $[2];
|
|
143
|
+
}
|
|
144
|
+
let t1;
|
|
145
|
+
if ($[3] !== className) {
|
|
146
|
+
t1 = cnState("rounded-full bg-brand", className);
|
|
147
|
+
$[3] = className;
|
|
148
|
+
$[4] = t1;
|
|
149
|
+
} else t1 = $[4];
|
|
150
|
+
let t2;
|
|
151
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
152
|
+
t2 = /* @__PURE__ */ jsx(SliderIndicator$1, {
|
|
153
|
+
className: t1,
|
|
154
|
+
...props
|
|
155
|
+
});
|
|
156
|
+
$[5] = props;
|
|
157
|
+
$[6] = t1;
|
|
158
|
+
$[7] = t2;
|
|
159
|
+
} else t2 = $[7];
|
|
160
|
+
return t2;
|
|
161
|
+
}
|
|
162
|
+
function SliderThumb(t0) {
|
|
163
|
+
const $ = c(8);
|
|
164
|
+
let className;
|
|
165
|
+
let props;
|
|
166
|
+
if ($[0] !== t0) {
|
|
167
|
+
({className, ...props} = t0);
|
|
168
|
+
$[0] = t0;
|
|
169
|
+
$[1] = className;
|
|
170
|
+
$[2] = props;
|
|
171
|
+
} else {
|
|
172
|
+
className = $[1];
|
|
173
|
+
props = $[2];
|
|
174
|
+
}
|
|
175
|
+
let t1;
|
|
176
|
+
if ($[3] !== className) {
|
|
177
|
+
t1 = cnState("block size-4 shrink-0 rounded-full border-2 border-brand bg-background ring-ring/40 transition-shadow focus-ring-within after:absolute after:-inset-2 hover:ring-4 data-disabled:pointer-events-none data-dragging:ring-4", className);
|
|
178
|
+
$[3] = className;
|
|
179
|
+
$[4] = t1;
|
|
180
|
+
} else t1 = $[4];
|
|
181
|
+
let t2;
|
|
182
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
183
|
+
t2 = /* @__PURE__ */ jsx(SliderThumb$1, {
|
|
184
|
+
className: t1,
|
|
185
|
+
...props
|
|
186
|
+
});
|
|
187
|
+
$[5] = props;
|
|
188
|
+
$[6] = t1;
|
|
189
|
+
$[7] = t2;
|
|
190
|
+
} else t2 = $[7];
|
|
191
|
+
return t2;
|
|
192
|
+
}
|
|
193
|
+
export { Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack, SliderValue, createSliderController };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LinkPartProps } from "../link/link.js";
|
|
2
|
+
import { TraceCollapsibleContent, TraceCollapsibleProps, TraceCollapsibleTrigger } from "../trace/trace.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
type SourcesProps = TraceCollapsibleProps;
|
|
5
|
+
/**
|
|
6
|
+
* The sources of a reply: a line that opens into the links. It takes
|
|
7
|
+
* Collapsible's props: `open`, `defaultOpen`, `onOpenChange`, `controller`.
|
|
8
|
+
*/
|
|
9
|
+
declare function Sources(props: SourcesProps): import("react").JSX.Element;
|
|
10
|
+
type SourcesTriggerProps = Omit<ComponentProps<typeof TraceCollapsibleTrigger>, "children"> & {
|
|
11
|
+
/** How many sources the list holds, for the default title. */
|
|
12
|
+
count: number;
|
|
13
|
+
/** Replaces the globe. */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/** Replaces the title, "Used 3 sources". */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/** The line that opens the list. It says how many sources there are, so the person knows what opens. */
|
|
19
|
+
declare function SourcesTrigger({ count, icon, children, ...props }: SourcesTriggerProps): import("react").JSX.Element;
|
|
20
|
+
type SourcesContentProps = ComponentProps<typeof TraceCollapsibleContent>;
|
|
21
|
+
/** The list of links under the line. Its children are `Source` parts. */
|
|
22
|
+
declare function SourcesContent({ children, ...props }: SourcesContentProps): import("react").JSX.Element;
|
|
23
|
+
type SourceProps = Omit<LinkPartProps, "title" | "children"> & {
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/** The link's text. Without it, and without children, the link shows the hostname of `href`. */
|
|
26
|
+
title?: ReactNode;
|
|
27
|
+
/** Read after the title by a screen reader, since the link leaves the page. */
|
|
28
|
+
newTabLabel?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* One source: a link that opens in a new tab. `children` replace the title.
|
|
32
|
+
* An agent finds it by its title and follows it with `follow`.
|
|
33
|
+
*/
|
|
34
|
+
declare function Source({ href, title, newTabLabel, className, children, ...props }: SourceProps): import("react").JSX.Element;
|
|
35
|
+
export { Source, type SourceProps, Sources, SourcesContent, type SourcesContentProps, type SourcesProps, SourcesTrigger, type SourcesTriggerProps };
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon } from "../icon/icon.js";
|
|
3
|
+
import { LinkPart } from "../link/link.js";
|
|
4
|
+
import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceIcon, TraceLine, TraceTitle } from "../trace/trace.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { ArrowUpRight01Icon, Globe02Icon } from "@hugeicons/core-free-icons";
|
|
8
|
+
// src/components/sources/sources.tsx
|
|
9
|
+
/**
|
|
10
|
+
* The sources of a reply: a line that opens into the links. It takes
|
|
11
|
+
* Collapsible's props: `open`, `defaultOpen`, `onOpenChange`, `controller`.
|
|
12
|
+
*/
|
|
13
|
+
function Sources(props) {
|
|
14
|
+
const $ = c(2);
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
|
+
t0 = /* @__PURE__ */ jsx(Trace, {
|
|
18
|
+
"data-slot": "sources",
|
|
19
|
+
children: /* @__PURE__ */ jsx(TraceCollapsible, { ...props })
|
|
20
|
+
});
|
|
21
|
+
$[0] = props;
|
|
22
|
+
$[1] = t0;
|
|
23
|
+
} else t0 = $[1];
|
|
24
|
+
return t0;
|
|
25
|
+
}
|
|
26
|
+
/** The line that opens the list. It says how many sources there are, so the person knows what opens. */
|
|
27
|
+
function SourcesTrigger(t0) {
|
|
28
|
+
const $ = c(17);
|
|
29
|
+
let children;
|
|
30
|
+
let count;
|
|
31
|
+
let icon;
|
|
32
|
+
let props;
|
|
33
|
+
if ($[0] !== t0) {
|
|
34
|
+
({count, icon, children, ...props} = t0);
|
|
35
|
+
$[0] = t0;
|
|
36
|
+
$[1] = children;
|
|
37
|
+
$[2] = count;
|
|
38
|
+
$[3] = icon;
|
|
39
|
+
$[4] = props;
|
|
40
|
+
} else {
|
|
41
|
+
children = $[1];
|
|
42
|
+
count = $[2];
|
|
43
|
+
icon = $[3];
|
|
44
|
+
props = $[4];
|
|
45
|
+
}
|
|
46
|
+
let t1;
|
|
47
|
+
if ($[5] !== icon) {
|
|
48
|
+
t1 = icon ?? /* @__PURE__ */ jsx(Icon, { icon: Globe02Icon });
|
|
49
|
+
$[5] = icon;
|
|
50
|
+
$[6] = t1;
|
|
51
|
+
} else t1 = $[6];
|
|
52
|
+
let t2;
|
|
53
|
+
if ($[7] !== t1) {
|
|
54
|
+
t2 = /* @__PURE__ */ jsx(TraceIcon, { children: t1 });
|
|
55
|
+
$[7] = t1;
|
|
56
|
+
$[8] = t2;
|
|
57
|
+
} else t2 = $[8];
|
|
58
|
+
const t3 = children ?? `Used ${count} ${count === 1 ? "source" : "sources"}`;
|
|
59
|
+
let t4;
|
|
60
|
+
if ($[9] !== t3) {
|
|
61
|
+
t4 = /* @__PURE__ */ jsx(TraceTitle, { children: t3 });
|
|
62
|
+
$[9] = t3;
|
|
63
|
+
$[10] = t4;
|
|
64
|
+
} else t4 = $[10];
|
|
65
|
+
let t5;
|
|
66
|
+
if ($[11] !== t2 || $[12] !== t4) {
|
|
67
|
+
t5 = /* @__PURE__ */ jsxs(TraceLine, { children: [t2, t4] });
|
|
68
|
+
$[11] = t2;
|
|
69
|
+
$[12] = t4;
|
|
70
|
+
$[13] = t5;
|
|
71
|
+
} else t5 = $[13];
|
|
72
|
+
let t6;
|
|
73
|
+
if ($[14] !== props || $[15] !== t5) {
|
|
74
|
+
t6 = /* @__PURE__ */ jsx(TraceCollapsibleTrigger, {
|
|
75
|
+
...props,
|
|
76
|
+
children: t5
|
|
77
|
+
});
|
|
78
|
+
$[14] = props;
|
|
79
|
+
$[15] = t5;
|
|
80
|
+
$[16] = t6;
|
|
81
|
+
} else t6 = $[16];
|
|
82
|
+
return t6;
|
|
83
|
+
}
|
|
84
|
+
/** The list of links under the line. Its children are `Source` parts. */
|
|
85
|
+
function SourcesContent(t0) {
|
|
86
|
+
const $ = c(8);
|
|
87
|
+
let children;
|
|
88
|
+
let props;
|
|
89
|
+
if ($[0] !== t0) {
|
|
90
|
+
({children, ...props} = t0);
|
|
91
|
+
$[0] = t0;
|
|
92
|
+
$[1] = children;
|
|
93
|
+
$[2] = props;
|
|
94
|
+
} else {
|
|
95
|
+
children = $[1];
|
|
96
|
+
props = $[2];
|
|
97
|
+
}
|
|
98
|
+
let t1;
|
|
99
|
+
if ($[3] !== children) {
|
|
100
|
+
t1 = /* @__PURE__ */ jsx(Trace, { children });
|
|
101
|
+
$[3] = children;
|
|
102
|
+
$[4] = t1;
|
|
103
|
+
} else t1 = $[4];
|
|
104
|
+
let t2;
|
|
105
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
106
|
+
t2 = /* @__PURE__ */ jsx(TraceCollapsibleContent, {
|
|
107
|
+
...props,
|
|
108
|
+
children: t1
|
|
109
|
+
});
|
|
110
|
+
$[5] = props;
|
|
111
|
+
$[6] = t1;
|
|
112
|
+
$[7] = t2;
|
|
113
|
+
} else t2 = $[7];
|
|
114
|
+
return t2;
|
|
115
|
+
}
|
|
116
|
+
/** The hostname of a URL, or the text as given when it isn't one. */
|
|
117
|
+
function hostname(href) {
|
|
118
|
+
if (!href) return void 0;
|
|
119
|
+
try {
|
|
120
|
+
return new URL(href).hostname;
|
|
121
|
+
} catch {
|
|
122
|
+
return href;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* One source: a link that opens in a new tab. `children` replace the title.
|
|
127
|
+
* An agent finds it by its title and follows it with `follow`.
|
|
128
|
+
*/
|
|
129
|
+
function Source(t0) {
|
|
130
|
+
const $ = c(24);
|
|
131
|
+
let children;
|
|
132
|
+
let className;
|
|
133
|
+
let href;
|
|
134
|
+
let props;
|
|
135
|
+
let t1;
|
|
136
|
+
let title;
|
|
137
|
+
if ($[0] !== t0) {
|
|
138
|
+
({href, title, newTabLabel: t1, className, children, ...props} = t0);
|
|
139
|
+
$[0] = t0;
|
|
140
|
+
$[1] = children;
|
|
141
|
+
$[2] = className;
|
|
142
|
+
$[3] = href;
|
|
143
|
+
$[4] = props;
|
|
144
|
+
$[5] = t1;
|
|
145
|
+
$[6] = title;
|
|
146
|
+
} else {
|
|
147
|
+
children = $[1];
|
|
148
|
+
className = $[2];
|
|
149
|
+
href = $[3];
|
|
150
|
+
props = $[4];
|
|
151
|
+
t1 = $[5];
|
|
152
|
+
title = $[6];
|
|
153
|
+
}
|
|
154
|
+
const newTabLabel = t1 === void 0 ? "(opens in a new tab)" : t1;
|
|
155
|
+
let t2;
|
|
156
|
+
if ($[7] !== children || $[8] !== href || $[9] !== title) {
|
|
157
|
+
t2 = children ?? title ?? hostname(href);
|
|
158
|
+
$[7] = children;
|
|
159
|
+
$[8] = href;
|
|
160
|
+
$[9] = title;
|
|
161
|
+
$[10] = t2;
|
|
162
|
+
} else t2 = $[10];
|
|
163
|
+
let t3;
|
|
164
|
+
if ($[11] !== newTabLabel) {
|
|
165
|
+
t3 = /* @__PURE__ */ jsxs("span", {
|
|
166
|
+
className: "sr-only",
|
|
167
|
+
children: [" ", newTabLabel]
|
|
168
|
+
});
|
|
169
|
+
$[11] = newTabLabel;
|
|
170
|
+
$[12] = t3;
|
|
171
|
+
} else t3 = $[12];
|
|
172
|
+
let t4;
|
|
173
|
+
if ($[13] !== t2 || $[14] !== t3) {
|
|
174
|
+
t4 = /* @__PURE__ */ jsxs(TraceTitle, { children: [t2, t3] });
|
|
175
|
+
$[13] = t2;
|
|
176
|
+
$[14] = t3;
|
|
177
|
+
$[15] = t4;
|
|
178
|
+
} else t4 = $[15];
|
|
179
|
+
let t5;
|
|
180
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
181
|
+
t5 = /* @__PURE__ */ jsx(TraceIcon, { children: /* @__PURE__ */ jsx(Icon, { icon: ArrowUpRight01Icon }) });
|
|
182
|
+
$[16] = t5;
|
|
183
|
+
} else t5 = $[16];
|
|
184
|
+
let t6;
|
|
185
|
+
if ($[17] !== t4) {
|
|
186
|
+
t6 = /* @__PURE__ */ jsxs(TraceLine, { children: [t4, t5] });
|
|
187
|
+
$[17] = t4;
|
|
188
|
+
$[18] = t6;
|
|
189
|
+
} else t6 = $[18];
|
|
190
|
+
let t7;
|
|
191
|
+
if ($[19] !== className || $[20] !== href || $[21] !== props || $[22] !== t6) {
|
|
192
|
+
t7 = /* @__PURE__ */ jsx(LinkPart, {
|
|
193
|
+
"data-slot": "source",
|
|
194
|
+
href,
|
|
195
|
+
target: "_blank",
|
|
196
|
+
rel: "noreferrer",
|
|
197
|
+
className,
|
|
198
|
+
...props,
|
|
199
|
+
children: t6
|
|
200
|
+
});
|
|
201
|
+
$[19] = className;
|
|
202
|
+
$[20] = href;
|
|
203
|
+
$[21] = props;
|
|
204
|
+
$[22] = t6;
|
|
205
|
+
$[23] = t7;
|
|
206
|
+
} else t7 = $[23];
|
|
207
|
+
return t7;
|
|
208
|
+
}
|
|
209
|
+
export { Source, Sources, SourcesContent, SourcesTrigger };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconProps } from "../icon/icon.js";
|
|
2
|
+
type SpinnerProps = Omit<IconProps, "icon" | "label"> & {
|
|
3
|
+
/** What is loading, for screen readers. Set it in the page's language. */
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A loading indicator: a status named by `label`. Next to text that already
|
|
8
|
+
* says what loads, like a pending button's, pass `aria-hidden` instead.
|
|
9
|
+
*/
|
|
10
|
+
declare function Spinner({ label, className, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
11
|
+
export { Spinner, type SpinnerProps };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utilities/cn/index.js";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Loading03Icon } from "@hugeicons/core-free-icons";
|
|
7
|
+
// src/components/spinner/spinner.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A loading indicator: a status named by `label`. Next to text that already
|
|
10
|
+
* says what loads, like a pending button's, pass `aria-hidden` instead.
|
|
11
|
+
*/
|
|
12
|
+
function Spinner(t0) {
|
|
13
|
+
const $ = c(12);
|
|
14
|
+
let className;
|
|
15
|
+
let props;
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[0] !== t0) {
|
|
18
|
+
({label: t1, className, ...props} = t0);
|
|
19
|
+
$[0] = t0;
|
|
20
|
+
$[1] = className;
|
|
21
|
+
$[2] = props;
|
|
22
|
+
$[3] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
className = $[1];
|
|
25
|
+
props = $[2];
|
|
26
|
+
t1 = $[3];
|
|
27
|
+
}
|
|
28
|
+
const label = t1 === void 0 ? "Loading" : t1;
|
|
29
|
+
const hidden = props["aria-hidden"] === true || props["aria-hidden"] === "true";
|
|
30
|
+
const t2 = hidden ? void 0 : "status";
|
|
31
|
+
const t3 = hidden ? void 0 : label;
|
|
32
|
+
const t4 = hidden ? true : void 0;
|
|
33
|
+
let t5;
|
|
34
|
+
if ($[4] !== className) {
|
|
35
|
+
t5 = cn("animate-spin motion-reduce:animate-pulse", className);
|
|
36
|
+
$[4] = className;
|
|
37
|
+
$[5] = t5;
|
|
38
|
+
} else t5 = $[5];
|
|
39
|
+
let t6;
|
|
40
|
+
if ($[6] !== props || $[7] !== t2 || $[8] !== t3 || $[9] !== t4 || $[10] !== t5) {
|
|
41
|
+
t6 = /* @__PURE__ */ jsx(Icon, {
|
|
42
|
+
icon: Loading03Icon,
|
|
43
|
+
"data-slot": "spinner",
|
|
44
|
+
role: t2,
|
|
45
|
+
"aria-label": t3,
|
|
46
|
+
"aria-hidden": t4,
|
|
47
|
+
className: t5,
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
$[6] = props;
|
|
51
|
+
$[7] = t2;
|
|
52
|
+
$[8] = t3;
|
|
53
|
+
$[9] = t4;
|
|
54
|
+
$[10] = t5;
|
|
55
|
+
$[11] = t6;
|
|
56
|
+
} else t6 = $[11];
|
|
57
|
+
return t6;
|
|
58
|
+
}
|
|
59
|
+
export { Spinner };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** One `at …` line of a stack trace. */
|
|
2
|
+
export type StackFrame = {
|
|
3
|
+
/** The line as written, trimmed. */
|
|
4
|
+
raw: string;
|
|
5
|
+
functionName: string | null;
|
|
6
|
+
filePath: string | null;
|
|
7
|
+
lineNumber: number | null;
|
|
8
|
+
columnNumber: number | null;
|
|
9
|
+
/** Whether the frame is from node_modules or from Node itself, not from the app. */
|
|
10
|
+
isInternal: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ParsedStackTrace = {
|
|
13
|
+
/** "TypeError", or null when the first line doesn't name an error. */
|
|
14
|
+
errorType: string | null;
|
|
15
|
+
errorMessage: string;
|
|
16
|
+
frames: StackFrame[];
|
|
17
|
+
/** The trace as given. */
|
|
18
|
+
raw: string;
|
|
19
|
+
};
|
|
20
|
+
/** Splits a raw stack trace into the error's type, its message and its frames. */
|
|
21
|
+
export declare function parseStackTrace(trace: string): ParsedStackTrace;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// src/components/stack-trace/parse-stack-trace.ts
|
|
2
|
+
const frameWithFunction = /^at\s+(.+?)\s+\((.+):(\d+):(\d+)\)$/;
|
|
3
|
+
const frameWithoutFunction = /^at\s+(.+):(\d+):(\d+)$/;
|
|
4
|
+
const errorLine = /^(\w*Error):\s*(.*)$/;
|
|
5
|
+
function isInternalPath(path) {
|
|
6
|
+
return path.includes("node_modules") || path.startsWith("node:") || path.includes("internal/");
|
|
7
|
+
}
|
|
8
|
+
function parseStackFrame(line) {
|
|
9
|
+
const raw = line.trim();
|
|
10
|
+
const withFunction = raw.match(frameWithFunction);
|
|
11
|
+
if (withFunction) {
|
|
12
|
+
const [, functionName, filePath, lineNumber, columnNumber] = withFunction;
|
|
13
|
+
return {
|
|
14
|
+
raw,
|
|
15
|
+
functionName,
|
|
16
|
+
filePath,
|
|
17
|
+
lineNumber: Number.parseInt(lineNumber, 10),
|
|
18
|
+
columnNumber: Number.parseInt(columnNumber, 10),
|
|
19
|
+
isInternal: isInternalPath(filePath)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const withoutFunction = raw.match(frameWithoutFunction);
|
|
23
|
+
if (withoutFunction) {
|
|
24
|
+
const [, filePath, lineNumber, columnNumber] = withoutFunction;
|
|
25
|
+
return {
|
|
26
|
+
raw,
|
|
27
|
+
functionName: null,
|
|
28
|
+
filePath,
|
|
29
|
+
lineNumber: Number.parseInt(lineNumber, 10),
|
|
30
|
+
columnNumber: Number.parseInt(columnNumber, 10),
|
|
31
|
+
isInternal: isInternalPath(filePath)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
raw,
|
|
36
|
+
functionName: null,
|
|
37
|
+
filePath: null,
|
|
38
|
+
lineNumber: null,
|
|
39
|
+
columnNumber: null,
|
|
40
|
+
isInternal: raw.includes("node_modules") || raw.includes("node:")
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Splits a raw stack trace into the error's type, its message and its frames. */
|
|
44
|
+
function parseStackTrace(trace) {
|
|
45
|
+
const lines = trace.split("\n").filter((line) => line.trim());
|
|
46
|
+
if (lines.length === 0) return {
|
|
47
|
+
errorType: null,
|
|
48
|
+
errorMessage: trace,
|
|
49
|
+
frames: [],
|
|
50
|
+
raw: trace
|
|
51
|
+
};
|
|
52
|
+
const first = lines[0].trim();
|
|
53
|
+
const error = first.match(errorLine);
|
|
54
|
+
return {
|
|
55
|
+
errorType: error ? error[1] : null,
|
|
56
|
+
errorMessage: error ? error[2] : first,
|
|
57
|
+
frames: lines.slice(1).filter((line) => line.trim().startsWith("at ")).map(parseStackFrame),
|
|
58
|
+
raw: trace
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export { parseStackTrace };
|