@asanchez-sa/abby 0.0.0-stage → 0.1.0
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 +217 -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 +336 -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 +683 -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,334 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { buttonLook } from "../button/button.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { FlipHorizontalIcon, FlipVerticalIcon, RotateClockwiseIcon } from "@hugeicons/core-free-icons";
|
|
8
|
+
import { ImageCropper as ImageCropper$1, ImageCropperFlip as ImageCropperFlip$1, ImageCropperGrid as ImageCropperGrid$1, ImageCropperHandle as ImageCropperHandle$1, ImageCropperImage as ImageCropperImage$1, ImageCropperRotate as ImageCropperRotate$1, ImageCropperSelection as ImageCropperSelection$1, ImageCropperViewport as ImageCropperViewport$1, ImageCropperZoom as ImageCropperZoom$1, createImageCropperController } from "@ui-sdk/react/image-cropper";
|
|
9
|
+
// src/components/image-cropper/image-cropper.tsx
|
|
10
|
+
function ImageCropper(t0) {
|
|
11
|
+
const $ = c(8);
|
|
12
|
+
let className;
|
|
13
|
+
let props;
|
|
14
|
+
if ($[0] !== t0) {
|
|
15
|
+
({className, ...props} = t0);
|
|
16
|
+
$[0] = t0;
|
|
17
|
+
$[1] = className;
|
|
18
|
+
$[2] = props;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
props = $[2];
|
|
22
|
+
}
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[3] !== className) {
|
|
25
|
+
t1 = cnState("flex flex-col gap-3", className);
|
|
26
|
+
$[3] = className;
|
|
27
|
+
$[4] = t1;
|
|
28
|
+
} else t1 = $[4];
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /* @__PURE__ */ jsx(ImageCropper$1, {
|
|
32
|
+
className: t1,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
$[5] = props;
|
|
36
|
+
$[6] = t1;
|
|
37
|
+
$[7] = t2;
|
|
38
|
+
} else t2 = $[7];
|
|
39
|
+
return t2;
|
|
40
|
+
}
|
|
41
|
+
function ImageCropperViewport(t0) {
|
|
42
|
+
const $ = c(8);
|
|
43
|
+
let className;
|
|
44
|
+
let props;
|
|
45
|
+
if ($[0] !== t0) {
|
|
46
|
+
({className, ...props} = t0);
|
|
47
|
+
$[0] = t0;
|
|
48
|
+
$[1] = className;
|
|
49
|
+
$[2] = props;
|
|
50
|
+
} else {
|
|
51
|
+
className = $[1];
|
|
52
|
+
props = $[2];
|
|
53
|
+
}
|
|
54
|
+
let t1;
|
|
55
|
+
if ($[3] !== className) {
|
|
56
|
+
t1 = cnState("w-full touch-none rounded-xl bg-muted p-3 select-none data-disabled:opacity-50 data-[mode=box]:aspect-(--image-cropper-aspect-ratio) data-[mode=frame]:aspect-square", className);
|
|
57
|
+
$[3] = className;
|
|
58
|
+
$[4] = t1;
|
|
59
|
+
} else t1 = $[4];
|
|
60
|
+
let t2;
|
|
61
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
62
|
+
t2 = /* @__PURE__ */ jsx(ImageCropperViewport$1, {
|
|
63
|
+
className: t1,
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
$[5] = props;
|
|
67
|
+
$[6] = t1;
|
|
68
|
+
$[7] = t2;
|
|
69
|
+
} else t2 = $[7];
|
|
70
|
+
return t2;
|
|
71
|
+
}
|
|
72
|
+
function ImageCropperImage(t0) {
|
|
73
|
+
const $ = c(8);
|
|
74
|
+
let className;
|
|
75
|
+
let props;
|
|
76
|
+
if ($[0] !== t0) {
|
|
77
|
+
({className, ...props} = t0);
|
|
78
|
+
$[0] = t0;
|
|
79
|
+
$[1] = className;
|
|
80
|
+
$[2] = props;
|
|
81
|
+
} else {
|
|
82
|
+
className = $[1];
|
|
83
|
+
props = $[2];
|
|
84
|
+
}
|
|
85
|
+
let t1;
|
|
86
|
+
if ($[3] !== className) {
|
|
87
|
+
t1 = cnState("select-none data-error:hidden", className);
|
|
88
|
+
$[3] = className;
|
|
89
|
+
$[4] = t1;
|
|
90
|
+
} else t1 = $[4];
|
|
91
|
+
let t2;
|
|
92
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
93
|
+
t2 = /* @__PURE__ */ jsx(ImageCropperImage$1, {
|
|
94
|
+
className: t1,
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
$[5] = props;
|
|
98
|
+
$[6] = t1;
|
|
99
|
+
$[7] = t2;
|
|
100
|
+
} else t2 = $[7];
|
|
101
|
+
return t2;
|
|
102
|
+
}
|
|
103
|
+
function ImageCropperSelection(t0) {
|
|
104
|
+
const $ = c(8);
|
|
105
|
+
let className;
|
|
106
|
+
let props;
|
|
107
|
+
if ($[0] !== t0) {
|
|
108
|
+
({className, ...props} = t0);
|
|
109
|
+
$[0] = t0;
|
|
110
|
+
$[1] = className;
|
|
111
|
+
$[2] = props;
|
|
112
|
+
} else {
|
|
113
|
+
className = $[1];
|
|
114
|
+
props = $[2];
|
|
115
|
+
}
|
|
116
|
+
let t1;
|
|
117
|
+
if ($[3] !== className) {
|
|
118
|
+
t1 = cnState("inset-ring-1 inset-ring-background shadow-[0_0_0_9999px_var(--overlay)] ring-1 ring-foreground focus-ring data-[shape=circle]:rounded-full", className);
|
|
119
|
+
$[3] = className;
|
|
120
|
+
$[4] = t1;
|
|
121
|
+
} else t1 = $[4];
|
|
122
|
+
let t2;
|
|
123
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
124
|
+
t2 = /* @__PURE__ */ jsx(ImageCropperSelection$1, {
|
|
125
|
+
className: t1,
|
|
126
|
+
...props
|
|
127
|
+
});
|
|
128
|
+
$[5] = props;
|
|
129
|
+
$[6] = t1;
|
|
130
|
+
$[7] = t2;
|
|
131
|
+
} else t2 = $[7];
|
|
132
|
+
return t2;
|
|
133
|
+
}
|
|
134
|
+
function ImageCropperGrid(t0) {
|
|
135
|
+
const $ = c(8);
|
|
136
|
+
let className;
|
|
137
|
+
let props;
|
|
138
|
+
if ($[0] !== t0) {
|
|
139
|
+
({className, ...props} = t0);
|
|
140
|
+
$[0] = t0;
|
|
141
|
+
$[1] = className;
|
|
142
|
+
$[2] = props;
|
|
143
|
+
} else {
|
|
144
|
+
className = $[1];
|
|
145
|
+
props = $[2];
|
|
146
|
+
}
|
|
147
|
+
let t1;
|
|
148
|
+
if ($[3] !== className) {
|
|
149
|
+
t1 = cnState("pointer-events-none absolute inset-0 bg-[linear-gradient(to_right,transparent_calc(100%/3-1px),var(--background)_calc(100%/3-1px),var(--background)_calc(100%/3),transparent_calc(100%/3),transparent_calc(200%/3-1px),var(--background)_calc(200%/3-1px),var(--background)_calc(200%/3),transparent_calc(200%/3)),linear-gradient(to_bottom,transparent_calc(100%/3-1px),var(--background)_calc(100%/3-1px),var(--background)_calc(100%/3),transparent_calc(100%/3),transparent_calc(200%/3-1px),var(--background)_calc(200%/3-1px),var(--background)_calc(200%/3),transparent_calc(200%/3))] opacity-0 transition-opacity data-dragging:opacity-70 in-data-[shape=circle]:rounded-full", className);
|
|
150
|
+
$[3] = className;
|
|
151
|
+
$[4] = t1;
|
|
152
|
+
} else t1 = $[4];
|
|
153
|
+
let t2;
|
|
154
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
155
|
+
t2 = /* @__PURE__ */ jsx(ImageCropperGrid$1, {
|
|
156
|
+
className: t1,
|
|
157
|
+
...props
|
|
158
|
+
});
|
|
159
|
+
$[5] = props;
|
|
160
|
+
$[6] = t1;
|
|
161
|
+
$[7] = t2;
|
|
162
|
+
} else t2 = $[7];
|
|
163
|
+
return t2;
|
|
164
|
+
}
|
|
165
|
+
function ImageCropperHandle(t0) {
|
|
166
|
+
const $ = c(8);
|
|
167
|
+
let className;
|
|
168
|
+
let props;
|
|
169
|
+
if ($[0] !== t0) {
|
|
170
|
+
({className, ...props} = t0);
|
|
171
|
+
$[0] = t0;
|
|
172
|
+
$[1] = className;
|
|
173
|
+
$[2] = props;
|
|
174
|
+
} else {
|
|
175
|
+
className = $[1];
|
|
176
|
+
props = $[2];
|
|
177
|
+
}
|
|
178
|
+
let t1;
|
|
179
|
+
if ($[3] !== className) {
|
|
180
|
+
t1 = cnState("absolute size-3 -translate-1/2 rounded-full border border-foreground bg-background focus-ring after:absolute after:-inset-2 data-disabled:hidden data-[position=e]:top-1/2 data-[position=e]:left-full data-[position=n]:top-0 data-[position=n]:left-1/2 data-[position=ne]:top-0 data-[position=ne]:left-full data-[position=nw]:top-0 data-[position=nw]:left-0 data-[position=s]:top-full data-[position=s]:left-1/2 data-[position=se]:top-full data-[position=se]:left-full data-[position=sw]:top-full data-[position=sw]:left-0 data-[position=w]:top-1/2 data-[position=w]:left-0", className);
|
|
181
|
+
$[3] = className;
|
|
182
|
+
$[4] = t1;
|
|
183
|
+
} else t1 = $[4];
|
|
184
|
+
let t2;
|
|
185
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
186
|
+
t2 = /* @__PURE__ */ jsx(ImageCropperHandle$1, {
|
|
187
|
+
className: t1,
|
|
188
|
+
...props
|
|
189
|
+
});
|
|
190
|
+
$[5] = props;
|
|
191
|
+
$[6] = t1;
|
|
192
|
+
$[7] = t2;
|
|
193
|
+
} else t2 = $[7];
|
|
194
|
+
return t2;
|
|
195
|
+
}
|
|
196
|
+
function ImageCropperZoom(t0) {
|
|
197
|
+
const $ = c(8);
|
|
198
|
+
let className;
|
|
199
|
+
let props;
|
|
200
|
+
if ($[0] !== t0) {
|
|
201
|
+
({className, ...props} = t0);
|
|
202
|
+
$[0] = t0;
|
|
203
|
+
$[1] = className;
|
|
204
|
+
$[2] = props;
|
|
205
|
+
} else {
|
|
206
|
+
className = $[1];
|
|
207
|
+
props = $[2];
|
|
208
|
+
}
|
|
209
|
+
let t1;
|
|
210
|
+
if ($[3] !== className) {
|
|
211
|
+
t1 = cnState("h-5 w-full min-w-0 cursor-pointer rounded-full accent-primary focus-ring disabled:cursor-not-allowed disabled:opacity-50", className);
|
|
212
|
+
$[3] = className;
|
|
213
|
+
$[4] = t1;
|
|
214
|
+
} else t1 = $[4];
|
|
215
|
+
let t2;
|
|
216
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
217
|
+
t2 = /* @__PURE__ */ jsx(ImageCropperZoom$1, {
|
|
218
|
+
className: t1,
|
|
219
|
+
...props
|
|
220
|
+
});
|
|
221
|
+
$[5] = props;
|
|
222
|
+
$[6] = t1;
|
|
223
|
+
$[7] = t2;
|
|
224
|
+
} else t2 = $[7];
|
|
225
|
+
return t2;
|
|
226
|
+
}
|
|
227
|
+
function ImageCropperRotate(t0) {
|
|
228
|
+
const $ = c(16);
|
|
229
|
+
let children;
|
|
230
|
+
let className;
|
|
231
|
+
let props;
|
|
232
|
+
let size;
|
|
233
|
+
let variant;
|
|
234
|
+
if ($[0] !== t0) {
|
|
235
|
+
({variant, size, className, children, ...props} = t0);
|
|
236
|
+
$[0] = t0;
|
|
237
|
+
$[1] = children;
|
|
238
|
+
$[2] = className;
|
|
239
|
+
$[3] = props;
|
|
240
|
+
$[4] = size;
|
|
241
|
+
$[5] = variant;
|
|
242
|
+
} else {
|
|
243
|
+
children = $[1];
|
|
244
|
+
className = $[2];
|
|
245
|
+
props = $[3];
|
|
246
|
+
size = $[4];
|
|
247
|
+
variant = $[5];
|
|
248
|
+
}
|
|
249
|
+
let t1;
|
|
250
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
251
|
+
t1 = cnState(buttonLook({
|
|
252
|
+
variant,
|
|
253
|
+
size
|
|
254
|
+
}), className);
|
|
255
|
+
$[6] = className;
|
|
256
|
+
$[7] = size;
|
|
257
|
+
$[8] = variant;
|
|
258
|
+
$[9] = t1;
|
|
259
|
+
} else t1 = $[9];
|
|
260
|
+
let t2;
|
|
261
|
+
if ($[10] !== children) {
|
|
262
|
+
t2 = children ?? /* @__PURE__ */ jsx(Icon, { icon: RotateClockwiseIcon });
|
|
263
|
+
$[10] = children;
|
|
264
|
+
$[11] = t2;
|
|
265
|
+
} else t2 = $[11];
|
|
266
|
+
let t3;
|
|
267
|
+
if ($[12] !== props || $[13] !== t1 || $[14] !== t2) {
|
|
268
|
+
t3 = /* @__PURE__ */ jsx(ImageCropperRotate$1, {
|
|
269
|
+
className: t1,
|
|
270
|
+
...props,
|
|
271
|
+
children: t2
|
|
272
|
+
});
|
|
273
|
+
$[12] = props;
|
|
274
|
+
$[13] = t1;
|
|
275
|
+
$[14] = t2;
|
|
276
|
+
$[15] = t3;
|
|
277
|
+
} else t3 = $[15];
|
|
278
|
+
return t3;
|
|
279
|
+
}
|
|
280
|
+
function ImageCropperFlip(t0) {
|
|
281
|
+
const $ = c(17);
|
|
282
|
+
let children;
|
|
283
|
+
let className;
|
|
284
|
+
let props;
|
|
285
|
+
let size;
|
|
286
|
+
let variant;
|
|
287
|
+
if ($[0] !== t0) {
|
|
288
|
+
({variant, size, className, children, ...props} = t0);
|
|
289
|
+
$[0] = t0;
|
|
290
|
+
$[1] = children;
|
|
291
|
+
$[2] = className;
|
|
292
|
+
$[3] = props;
|
|
293
|
+
$[4] = size;
|
|
294
|
+
$[5] = variant;
|
|
295
|
+
} else {
|
|
296
|
+
children = $[1];
|
|
297
|
+
className = $[2];
|
|
298
|
+
props = $[3];
|
|
299
|
+
size = $[4];
|
|
300
|
+
variant = $[5];
|
|
301
|
+
}
|
|
302
|
+
let t1;
|
|
303
|
+
if ($[6] !== className || $[7] !== size || $[8] !== variant) {
|
|
304
|
+
t1 = cnState(buttonLook({
|
|
305
|
+
variant,
|
|
306
|
+
size
|
|
307
|
+
}), className);
|
|
308
|
+
$[6] = className;
|
|
309
|
+
$[7] = size;
|
|
310
|
+
$[8] = variant;
|
|
311
|
+
$[9] = t1;
|
|
312
|
+
} else t1 = $[9];
|
|
313
|
+
let t2;
|
|
314
|
+
if ($[10] !== children || $[11] !== props) {
|
|
315
|
+
t2 = children ?? /* @__PURE__ */ jsx(Icon, { icon: props.direction === "vertical" ? FlipVerticalIcon : FlipHorizontalIcon });
|
|
316
|
+
$[10] = children;
|
|
317
|
+
$[11] = props;
|
|
318
|
+
$[12] = t2;
|
|
319
|
+
} else t2 = $[12];
|
|
320
|
+
let t3;
|
|
321
|
+
if ($[13] !== props || $[14] !== t1 || $[15] !== t2) {
|
|
322
|
+
t3 = /* @__PURE__ */ jsx(ImageCropperFlip$1, {
|
|
323
|
+
className: t1,
|
|
324
|
+
...props,
|
|
325
|
+
children: t2
|
|
326
|
+
});
|
|
327
|
+
$[13] = props;
|
|
328
|
+
$[14] = t1;
|
|
329
|
+
$[15] = t2;
|
|
330
|
+
$[16] = t3;
|
|
331
|
+
} else t3 = $[16];
|
|
332
|
+
return t3;
|
|
333
|
+
}
|
|
334
|
+
export { ImageCropper, ImageCropperFlip, ImageCropperGrid, ImageCropperHandle, ImageCropperImage, ImageCropperRotate, ImageCropperSelection, ImageCropperViewport, ImageCropperZoom, createImageCropperController };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HoverCardContentProps, HoverCardProps, HoverCardTrigger } from "../hover-card/hover-card.js";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
type InlineCitationProps = ComponentProps<"span">;
|
|
4
|
+
/** Wraps the cited text and its card, so hovering either marks the text. */
|
|
5
|
+
declare function InlineCitation({ className, ...props }: InlineCitationProps): import("react").JSX.Element;
|
|
6
|
+
type InlineCitationTextProps = ComponentProps<"span">;
|
|
7
|
+
/** The words the source supports. */
|
|
8
|
+
declare function InlineCitationText({ className, ...props }: InlineCitationTextProps): import("react").JSX.Element;
|
|
9
|
+
type InlineCitationCardProps = HoverCardProps;
|
|
10
|
+
/** The Hover Card of one citation. */
|
|
11
|
+
declare function InlineCitationCard(props: InlineCitationCardProps): import("react").JSX.Element;
|
|
12
|
+
type InlineCitationCardTriggerProps = Omit<ComponentProps<typeof HoverCardTrigger>, "children"> & {
|
|
13
|
+
/** The URLs cited. The first is where the link goes, unless `href` says otherwise. */
|
|
14
|
+
sources: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Read out after the host, for a screen reader and an agent: two citations
|
|
17
|
+
* can share a host, and this tells them apart.
|
|
18
|
+
*/
|
|
19
|
+
sourceTitle?: string;
|
|
20
|
+
/** Read out after the name while the link opens in a new tab. */
|
|
21
|
+
newTabLabel?: string;
|
|
22
|
+
/** Replaces the host and the count of other sources. */
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The citation: a link to its first source that opens in a new tab. Without
|
|
27
|
+
* children it reads the source's host, and "+2" when there are more.
|
|
28
|
+
*/
|
|
29
|
+
declare function InlineCitationCardTrigger({ sources, sourceTitle, newTabLabel, className, children, href, target, rel, ...props }: InlineCitationCardTriggerProps): import("react").JSX.Element;
|
|
30
|
+
type InlineCitationCardBodyProps = HoverCardContentProps;
|
|
31
|
+
/** The card: one `InlineCitationSource` or several, and a quote. */
|
|
32
|
+
declare function InlineCitationCardBody({ className, ...props }: InlineCitationCardBodyProps): import("react").JSX.Element;
|
|
33
|
+
type InlineCitationSourceProps = ComponentProps<"div"> & {
|
|
34
|
+
title?: ReactNode;
|
|
35
|
+
url?: string;
|
|
36
|
+
description?: ReactNode;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* One source: its title, its description and where it lives. The address is
|
|
40
|
+
* text, not a second link: the trigger is the link to the source.
|
|
41
|
+
*/
|
|
42
|
+
declare function InlineCitationSource({ title, url, description, className, children, ...props }: InlineCitationSourceProps): import("react").JSX.Element;
|
|
43
|
+
type InlineCitationQuoteProps = ComponentProps<"blockquote">;
|
|
44
|
+
/** The passage of the source the sentence rests on. */
|
|
45
|
+
declare function InlineCitationQuote({ className, ...props }: InlineCitationQuoteProps): import("react").JSX.Element;
|
|
46
|
+
export { InlineCitation, InlineCitationCard, InlineCitationCardBody, type InlineCitationCardBodyProps, type InlineCitationCardProps, InlineCitationCardTrigger, type InlineCitationCardTriggerProps, type InlineCitationProps, InlineCitationQuote, type InlineCitationQuoteProps, InlineCitationSource, type InlineCitationSourceProps, InlineCitationText, type InlineCitationTextProps };
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, cnState } from "../../utilities/cn/index.js";
|
|
3
|
+
import { buttonVariants } from "../button/button.js";
|
|
4
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from "../hover-card/hover-card.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
// src/components/inline-citation/inline-citation.tsx
|
|
8
|
+
/** "nextjs.org" from a URL, or the text itself when it isn't one. */
|
|
9
|
+
function hostname(url) {
|
|
10
|
+
try {
|
|
11
|
+
return new URL(url).hostname.replace(/^www\./, "");
|
|
12
|
+
} catch {
|
|
13
|
+
return url;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/** Wraps the cited text and its card, so hovering either marks the text. */
|
|
17
|
+
function InlineCitation(t0) {
|
|
18
|
+
const $ = c(8);
|
|
19
|
+
let className;
|
|
20
|
+
let props;
|
|
21
|
+
if ($[0] !== t0) {
|
|
22
|
+
({className, ...props} = t0);
|
|
23
|
+
$[0] = t0;
|
|
24
|
+
$[1] = className;
|
|
25
|
+
$[2] = props;
|
|
26
|
+
} else {
|
|
27
|
+
className = $[1];
|
|
28
|
+
props = $[2];
|
|
29
|
+
}
|
|
30
|
+
let t1;
|
|
31
|
+
if ($[3] !== className) {
|
|
32
|
+
t1 = cn("group/citation", className);
|
|
33
|
+
$[3] = className;
|
|
34
|
+
$[4] = t1;
|
|
35
|
+
} else t1 = $[4];
|
|
36
|
+
let t2;
|
|
37
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
38
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
39
|
+
"data-slot": "inline-citation",
|
|
40
|
+
className: t1,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
$[5] = props;
|
|
44
|
+
$[6] = t1;
|
|
45
|
+
$[7] = t2;
|
|
46
|
+
} else t2 = $[7];
|
|
47
|
+
return t2;
|
|
48
|
+
}
|
|
49
|
+
/** The words the source supports. */
|
|
50
|
+
function InlineCitationText(t0) {
|
|
51
|
+
const $ = c(8);
|
|
52
|
+
let className;
|
|
53
|
+
let props;
|
|
54
|
+
if ($[0] !== t0) {
|
|
55
|
+
({className, ...props} = t0);
|
|
56
|
+
$[0] = t0;
|
|
57
|
+
$[1] = className;
|
|
58
|
+
$[2] = props;
|
|
59
|
+
} else {
|
|
60
|
+
className = $[1];
|
|
61
|
+
props = $[2];
|
|
62
|
+
}
|
|
63
|
+
let t1;
|
|
64
|
+
if ($[3] !== className) {
|
|
65
|
+
t1 = cn("transition-colors group-hover/citation:bg-accent", className);
|
|
66
|
+
$[3] = className;
|
|
67
|
+
$[4] = t1;
|
|
68
|
+
} else t1 = $[4];
|
|
69
|
+
let t2;
|
|
70
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
71
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
72
|
+
"data-slot": "inline-citation-text",
|
|
73
|
+
className: t1,
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
$[5] = props;
|
|
77
|
+
$[6] = t1;
|
|
78
|
+
$[7] = t2;
|
|
79
|
+
} else t2 = $[7];
|
|
80
|
+
return t2;
|
|
81
|
+
}
|
|
82
|
+
/** The Hover Card of one citation. */
|
|
83
|
+
function InlineCitationCard(props) {
|
|
84
|
+
const $ = c(2);
|
|
85
|
+
let t0;
|
|
86
|
+
if ($[0] !== props) {
|
|
87
|
+
t0 = /* @__PURE__ */ jsx(HoverCard, {
|
|
88
|
+
delay: 10,
|
|
89
|
+
closeDelay: 100,
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
$[0] = props;
|
|
93
|
+
$[1] = t0;
|
|
94
|
+
} else t0 = $[1];
|
|
95
|
+
return t0;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The citation: a link to its first source that opens in a new tab. Without
|
|
99
|
+
* children it reads the source's host, and "+2" when there are more.
|
|
100
|
+
*/
|
|
101
|
+
function InlineCitationCardTrigger({ sources, sourceTitle, newTabLabel = "(opens in a new tab)", className, children, href = sources[0], target = "_blank", rel = "noreferrer", ...props }) {
|
|
102
|
+
const first = sources[0];
|
|
103
|
+
const hidden = [sourceTitle, target === "_blank" ? newTabLabel : void 0].filter(Boolean).join(" ");
|
|
104
|
+
return /* @__PURE__ */ jsxs(HoverCardTrigger, {
|
|
105
|
+
href,
|
|
106
|
+
target,
|
|
107
|
+
rel,
|
|
108
|
+
className: cnState(cn(buttonVariants({
|
|
109
|
+
variant: "secondary",
|
|
110
|
+
size: "xs"
|
|
111
|
+
}), "align-baseline no-underline"), className),
|
|
112
|
+
...props,
|
|
113
|
+
children: [children ?? /* @__PURE__ */ jsxs(Fragment, { children: [first ? hostname(first) : null, sources.length > 1 && ` +${sources.length - 1}`] }), hidden && /* @__PURE__ */ jsxs("span", {
|
|
114
|
+
className: "sr-only",
|
|
115
|
+
children: [", ", hidden]
|
|
116
|
+
})]
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/** The card: one `InlineCitationSource` or several, and a quote. */
|
|
120
|
+
function InlineCitationCardBody(t0) {
|
|
121
|
+
const $ = c(8);
|
|
122
|
+
let className;
|
|
123
|
+
let props;
|
|
124
|
+
if ($[0] !== t0) {
|
|
125
|
+
({className, ...props} = t0);
|
|
126
|
+
$[0] = t0;
|
|
127
|
+
$[1] = className;
|
|
128
|
+
$[2] = props;
|
|
129
|
+
} else {
|
|
130
|
+
className = $[1];
|
|
131
|
+
props = $[2];
|
|
132
|
+
}
|
|
133
|
+
let t1;
|
|
134
|
+
if ($[3] !== className) {
|
|
135
|
+
t1 = cnState("flex w-72 flex-col gap-3", className);
|
|
136
|
+
$[3] = className;
|
|
137
|
+
$[4] = t1;
|
|
138
|
+
} else t1 = $[4];
|
|
139
|
+
let t2;
|
|
140
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
141
|
+
t2 = /* @__PURE__ */ jsx(HoverCardContent, {
|
|
142
|
+
className: t1,
|
|
143
|
+
...props
|
|
144
|
+
});
|
|
145
|
+
$[5] = props;
|
|
146
|
+
$[6] = t1;
|
|
147
|
+
$[7] = t2;
|
|
148
|
+
} else t2 = $[7];
|
|
149
|
+
return t2;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* One source: its title, its description and where it lives. The address is
|
|
153
|
+
* text, not a second link: the trigger is the link to the source.
|
|
154
|
+
*/
|
|
155
|
+
function InlineCitationSource(t0) {
|
|
156
|
+
const $ = c(22);
|
|
157
|
+
let children;
|
|
158
|
+
let className;
|
|
159
|
+
let description;
|
|
160
|
+
let props;
|
|
161
|
+
let title;
|
|
162
|
+
let url;
|
|
163
|
+
if ($[0] !== t0) {
|
|
164
|
+
({title, url, description, className, children, ...props} = t0);
|
|
165
|
+
$[0] = t0;
|
|
166
|
+
$[1] = children;
|
|
167
|
+
$[2] = className;
|
|
168
|
+
$[3] = description;
|
|
169
|
+
$[4] = props;
|
|
170
|
+
$[5] = title;
|
|
171
|
+
$[6] = url;
|
|
172
|
+
} else {
|
|
173
|
+
children = $[1];
|
|
174
|
+
className = $[2];
|
|
175
|
+
description = $[3];
|
|
176
|
+
props = $[4];
|
|
177
|
+
title = $[5];
|
|
178
|
+
url = $[6];
|
|
179
|
+
}
|
|
180
|
+
let t1;
|
|
181
|
+
if ($[7] !== className) {
|
|
182
|
+
t1 = cn("flex min-w-0 flex-col gap-1", className);
|
|
183
|
+
$[7] = className;
|
|
184
|
+
$[8] = t1;
|
|
185
|
+
} else t1 = $[8];
|
|
186
|
+
let t2;
|
|
187
|
+
if ($[9] !== title) {
|
|
188
|
+
t2 = title != null && /* @__PURE__ */ jsx("div", {
|
|
189
|
+
className: "truncate font-medium",
|
|
190
|
+
children: title
|
|
191
|
+
});
|
|
192
|
+
$[9] = title;
|
|
193
|
+
$[10] = t2;
|
|
194
|
+
} else t2 = $[10];
|
|
195
|
+
let t3;
|
|
196
|
+
if ($[11] !== description) {
|
|
197
|
+
t3 = description != null && /* @__PURE__ */ jsx("p", {
|
|
198
|
+
className: "line-clamp-3 text-muted-foreground",
|
|
199
|
+
children: description
|
|
200
|
+
});
|
|
201
|
+
$[11] = description;
|
|
202
|
+
$[12] = t3;
|
|
203
|
+
} else t3 = $[12];
|
|
204
|
+
let t4;
|
|
205
|
+
if ($[13] !== url) {
|
|
206
|
+
t4 = url && /* @__PURE__ */ jsx("p", {
|
|
207
|
+
className: "truncate text-xs text-muted-foreground",
|
|
208
|
+
children: hostname(url)
|
|
209
|
+
});
|
|
210
|
+
$[13] = url;
|
|
211
|
+
$[14] = t4;
|
|
212
|
+
} else t4 = $[14];
|
|
213
|
+
let t5;
|
|
214
|
+
if ($[15] !== children || $[16] !== props || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4) {
|
|
215
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
216
|
+
"data-slot": "inline-citation-source",
|
|
217
|
+
className: t1,
|
|
218
|
+
...props,
|
|
219
|
+
children: [
|
|
220
|
+
t2,
|
|
221
|
+
t3,
|
|
222
|
+
t4,
|
|
223
|
+
children
|
|
224
|
+
]
|
|
225
|
+
});
|
|
226
|
+
$[15] = children;
|
|
227
|
+
$[16] = props;
|
|
228
|
+
$[17] = t1;
|
|
229
|
+
$[18] = t2;
|
|
230
|
+
$[19] = t3;
|
|
231
|
+
$[20] = t4;
|
|
232
|
+
$[21] = t5;
|
|
233
|
+
} else t5 = $[21];
|
|
234
|
+
return t5;
|
|
235
|
+
}
|
|
236
|
+
/** The passage of the source the sentence rests on. */
|
|
237
|
+
function InlineCitationQuote(t0) {
|
|
238
|
+
const $ = c(8);
|
|
239
|
+
let className;
|
|
240
|
+
let props;
|
|
241
|
+
if ($[0] !== t0) {
|
|
242
|
+
({className, ...props} = t0);
|
|
243
|
+
$[0] = t0;
|
|
244
|
+
$[1] = className;
|
|
245
|
+
$[2] = props;
|
|
246
|
+
} else {
|
|
247
|
+
className = $[1];
|
|
248
|
+
props = $[2];
|
|
249
|
+
}
|
|
250
|
+
let t1;
|
|
251
|
+
if ($[3] !== className) {
|
|
252
|
+
t1 = cn("border-s-2 border-border ps-3 text-muted-foreground italic", className);
|
|
253
|
+
$[3] = className;
|
|
254
|
+
$[4] = t1;
|
|
255
|
+
} else t1 = $[4];
|
|
256
|
+
let t2;
|
|
257
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
258
|
+
t2 = /* @__PURE__ */ jsx("blockquote", {
|
|
259
|
+
"data-slot": "inline-citation-quote",
|
|
260
|
+
className: t1,
|
|
261
|
+
...props
|
|
262
|
+
});
|
|
263
|
+
$[5] = props;
|
|
264
|
+
$[6] = t1;
|
|
265
|
+
$[7] = t2;
|
|
266
|
+
} else t2 = $[7];
|
|
267
|
+
return t2;
|
|
268
|
+
}
|
|
269
|
+
export { InlineCitation, InlineCitationCard, InlineCitationCardBody, InlineCitationCardTrigger, InlineCitationQuote, InlineCitationSource, InlineCitationText };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Input as Input$1 } from "@ui-sdk/react/input";
|
|
3
|
+
/**
|
|
4
|
+
* The look of a text control, shared with `FieldControl`: Alma's 36px
|
|
5
|
+
* capsule. A control that grows to several lines adds `rounded-2xl`.
|
|
6
|
+
*/
|
|
7
|
+
declare const inputClasses = "h-9 w-full min-w-0 rounded-full border border-input bg-transparent px-3.5 py-1 text-base transition-colors file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-placeholder focus-field data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:bg-input/50 data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30";
|
|
8
|
+
declare function Input({ className, ...props }: ComponentProps<typeof Input$1>): import("react").JSX.Element;
|
|
9
|
+
export { Input, inputClasses };
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { Input as Input$1 } from "@ui-sdk/react/input";
|
|
6
|
+
// src/components/input/input.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The look of a text control, shared with `FieldControl`: Alma's 36px
|
|
9
|
+
* capsule. A control that grows to several lines adds `rounded-2xl`.
|
|
10
|
+
*/
|
|
11
|
+
const inputClasses = "h-9 w-full min-w-0 rounded-full border border-input bg-transparent px-3.5 py-1 text-base transition-colors file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-placeholder focus-field data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:bg-input/50 data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30";
|
|
12
|
+
function Input(t0) {
|
|
13
|
+
const $ = c(8);
|
|
14
|
+
let className;
|
|
15
|
+
let props;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({className, ...props} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = className;
|
|
20
|
+
$[2] = props;
|
|
21
|
+
} else {
|
|
22
|
+
className = $[1];
|
|
23
|
+
props = $[2];
|
|
24
|
+
}
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[3] !== className) {
|
|
27
|
+
t1 = cnState(inputClasses, className);
|
|
28
|
+
$[3] = className;
|
|
29
|
+
$[4] = t1;
|
|
30
|
+
} else t1 = $[4];
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
33
|
+
t2 = /* @__PURE__ */ jsx(Input$1, {
|
|
34
|
+
className: t1,
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
$[5] = props;
|
|
38
|
+
$[6] = t1;
|
|
39
|
+
$[7] = t2;
|
|
40
|
+
} else t2 = $[7];
|
|
41
|
+
return t2;
|
|
42
|
+
}
|
|
43
|
+
export { Input, inputClasses };
|