@agent-ui-kit/web-components 0.0.8 → 0.0.14
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 +67 -4
- package/dist/agent-ui.css +1 -1
- package/dist/api.colors.json +2 -2
- package/dist/api.colors.yaml +2 -2
- package/dist/api.components.json +2859 -368
- package/dist/api.tokens.json +3 -3
- package/dist/api.tokens.yaml +3 -3
- package/dist/blocks/agent-chat/agent-chat.d.ts +0 -0
- package/dist/blocks/announcement-card/announcement-card.d.ts +0 -0
- package/dist/blocks/bpm-process/bpm-process.d.ts +0 -0
- package/dist/blocks/chart-activity/chart-activity.d.ts +0 -0
- package/dist/blocks/chart-card/chart-card.d.ts +0 -0
- package/dist/blocks/chart-donut/chart-donut.d.ts +0 -0
- package/dist/blocks/chart-grouped/chart-grouped.d.ts +0 -0
- package/dist/blocks/chart-horizontal/chart-horizontal.d.ts +0 -0
- package/dist/blocks/chart-interactive/chart-interactive.d.ts +0 -0
- package/dist/blocks/chart-labeled/chart-labeled.d.ts +0 -0
- package/dist/blocks/checkout-form/checkout-form.d.ts +0 -0
- package/dist/blocks/clinical-trial/clinical-trial.d.ts +0 -0
- package/dist/blocks/contributors/contributors.d.ts +0 -0
- package/dist/blocks/cyber-threat/cyber-threat.d.ts +0 -0
- package/dist/blocks/dashboard-layout/dashboard-layout.d.ts +0 -0
- package/dist/blocks/data-eng-dag/data-eng-dag.d.ts +0 -0
- package/dist/blocks/date-picker/date-picker.d.ts +0 -0
- package/dist/blocks/ddx-workflow/ddx-workflow.d.ts +0 -0
- package/dist/blocks/empty-state/empty-state.d.ts +0 -0
- package/dist/blocks/env-variables/env-variables.d.ts +0 -0
- package/dist/blocks/feature-upgrade/feature-upgrade.d.ts +0 -0
- package/dist/blocks/financial-risk/financial-risk.d.ts +0 -0
- package/dist/blocks/flow-editor/flow-editor.d.ts +0 -0
- package/dist/blocks/gen-ai-pipeline/gen-ai-pipeline.d.ts +0 -0
- package/dist/blocks/index.d.ts +0 -0
- package/dist/blocks/issue-assign/issue-assign.d.ts +0 -0
- package/dist/blocks/keyboard-shortcuts/keyboard-shortcuts.d.ts +0 -0
- package/dist/blocks/login-branded/login-branded.d.ts +0 -0
- package/dist/blocks/login-email-only/login-email-only.d.ts +0 -0
- package/dist/blocks/login-form/login-form.d.ts +0 -0
- package/dist/blocks/login-simple/login-simple.d.ts +0 -0
- package/dist/blocks/login-social/login-social.d.ts +0 -0
- package/dist/blocks/login-two-column/login-two-column.d.ts +0 -0
- package/dist/blocks/marketing-automation/marketing-automation.d.ts +0 -0
- package/dist/blocks/member-list/member-list.d.ts +0 -0
- package/dist/blocks/ml-pipeline/ml-pipeline.d.ts +0 -0
- package/dist/blocks/nav-card/nav-card.d.ts +0 -0
- package/dist/blocks/notification-list/notification-list.d.ts +0 -0
- package/dist/blocks/oncology-pathway/oncology-pathway.d.ts +0 -0
- package/dist/blocks/pricing-card/pricing-card.d.ts +0 -0
- package/dist/blocks/processing-state/processing-state.d.ts +0 -0
- package/dist/blocks/profile-card/profile-card.d.ts +0 -0
- package/dist/blocks/saas-onboarding/saas-onboarding.d.ts +0 -0
- package/dist/blocks/settings-form/settings-form.d.ts +0 -0
- package/dist/blocks/settings-panel/settings-panel.d.ts +0 -0
- package/dist/blocks/sidebar-nav/sidebar-nav.d.ts +0 -0
- package/dist/blocks/signup-form/signup-form.d.ts +0 -0
- package/dist/blocks/stat-cards/stat-cards.d.ts +0 -0
- package/dist/blocks/status-card/status-card.d.ts +0 -0
- package/dist/blocks/suggested-labs/suggested-labs.d.ts +0 -0
- package/dist/blocks/supply-chain/supply-chain.d.ts +0 -0
- package/dist/blocks/survey-card/survey-card.d.ts +0 -0
- package/dist/blocks/tabbed-panel/tabbed-panel.d.ts +0 -0
- package/dist/blocks/team-empty/team-empty.d.ts +0 -0
- package/dist/blocks/usage-billing/usage-billing.d.ts +0 -0
- package/dist/blocks-incoming/action-toolbar/action-toolbar.d.ts +0 -0
- package/dist/blocks-incoming/agent-artifact-card/agent-artifact-card.d.ts +0 -0
- package/dist/blocks-incoming/agent-chat-response/agent-chat-response.d.ts +0 -0
- package/dist/blocks-incoming/agent-code-result/agent-code-result.d.ts +0 -0
- package/dist/blocks-incoming/agent-context-panel/agent-context-panel.d.ts +0 -0
- package/dist/blocks-incoming/agent-feedback-controls/agent-feedback-controls.d.ts +0 -0
- package/dist/blocks-incoming/agent-follow-up-chips/agent-follow-up-chips.d.ts +0 -0
- package/dist/blocks-incoming/agent-model-selector/agent-model-selector.d.ts +0 -0
- package/dist/blocks-incoming/agent-prompt-input/agent-prompt-input.d.ts +0 -0
- package/dist/blocks-incoming/agent-streaming-message/agent-streaming-message.d.ts +0 -0
- package/dist/blocks-incoming/agent-suggestion-card/agent-suggestion-card.d.ts +0 -0
- package/dist/blocks-incoming/agent-task-card/agent-task-card.d.ts +0 -0
- package/dist/blocks-incoming/agent-thinking-state/agent-thinking-state.d.ts +0 -0
- package/dist/blocks-incoming/agent-tool-use-card/agent-tool-use-card.d.ts +0 -0
- package/dist/blocks-incoming/auth-card/auth-card.d.ts +0 -0
- package/dist/blocks-incoming/commerce-pricing-table/commerce-pricing-table.d.ts +0 -0
- package/dist/blocks-incoming/comms-chat-thread/comms-chat-thread.d.ts +0 -0
- package/dist/blocks-incoming/comms-notification-list/comms-notification-list.d.ts +0 -0
- package/dist/blocks-incoming/content-article-card/content-article-card.d.ts +0 -0
- package/dist/blocks-incoming/dashboard-kpi-grid/dashboard-kpi-grid.d.ts +0 -0
- package/dist/blocks-incoming/data-activity-log/data-activity-log.d.ts +0 -0
- package/dist/blocks-incoming/data-metric-card/data-metric-card.d.ts +0 -0
- package/dist/blocks-incoming/data-table/data-table.d.ts +0 -0
- package/dist/blocks-incoming/data-timeline/data-timeline.d.ts +0 -0
- package/dist/blocks-incoming/feedback-alert-banner/feedback-alert-banner.d.ts +0 -0
- package/dist/blocks-incoming/feedback-empty-state/feedback-empty-state.d.ts +0 -0
- package/dist/blocks-incoming/feedback-progress-stepper/feedback-progress-stepper.d.ts +0 -0
- package/dist/blocks-incoming/form-settings-section/form-settings-section.d.ts +0 -0
- package/dist/blocks-incoming/game-battleship/game-battleship.d.ts +0 -0
- package/dist/blocks-incoming/game-chess/game-chess.d.ts +0 -0
- package/dist/blocks-incoming/game-connect-four/game-connect-four.d.ts +0 -0
- package/dist/blocks-incoming/game-tic-tac-toe/game-tic-tac-toe.d.ts +0 -0
- package/dist/blocks-incoming/list-kanban-board/list-kanban-board.d.ts +0 -0
- package/dist/blocks-incoming/media-image-gallery/media-image-gallery.d.ts +0 -0
- package/dist/blocks-incoming/nav-sidebar/nav-sidebar.d.ts +0 -0
- package/dist/blocks-incoming/onboard-stepper/onboard-stepper.d.ts +0 -0
- package/dist/blocks-incoming/overlay-confirmation-modal/overlay-confirmation-modal.d.ts +0 -0
- package/dist/blocks-incoming/overlay-dropdown-menu/overlay-dropdown-menu.d.ts +0 -0
- package/dist/blocks-incoming/user-profile-card/user-profile-card.d.ts +0 -0
- package/dist/blocks-incoming/user-team-list/user-team-list.d.ts +0 -0
- package/dist/chunks/{agent-ciCayeod.js → agent-C72JZNe6.js} +8 -8
- package/dist/chunks/{agent-ciCayeod.js.map → agent-C72JZNe6.js.map} +1 -1
- package/dist/chunks/empty-state-5M3uR5CM.js +5160 -0
- package/dist/chunks/empty-state-5M3uR5CM.js.map +1 -0
- package/dist/components/accordion/accordion-item.d.ts +9 -0
- package/dist/components/accordion/accordion.d.ts +9 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/agent/agent-activity.d.ts +13 -0
- package/dist/components/agent/agent-feed.d.ts +13 -0
- package/dist/components/agent/agent-input.d.ts +18 -0
- package/dist/components/agent/agent-message.d.ts +22 -0
- package/dist/components/agent/agent-panel.d.ts +16 -0
- package/dist/components/agent/agent-prompt.d.ts +7 -0
- package/dist/components/agent/agent-seeds.d.ts +15 -0
- package/dist/components/agent/agent-text.d.ts +14 -0
- package/dist/components/agent/agent-thread.d.ts +11 -0
- package/dist/components/agent/index.d.ts +9 -0
- package/dist/components/agent.js +1 -1
- package/dist/components/alert/alert.d.ts +3 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/app-shell/app-shell.d.ts +4 -0
- package/dist/components/app-shell/index.d.ts +1 -0
- package/dist/components/avatar-group/avatar-group.d.ts +10 -0
- package/dist/components/avatar-group/index.d.ts +1 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +7 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/button/button.d.ts +17 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/calendar/calendar.d.ts +26 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/store/calendar-store.d.ts +60 -0
- package/dist/components/calendar-picker/calendar-picker.d.ts +14 -0
- package/dist/components/calendar-picker/index.d.ts +1 -0
- package/dist/components/calendar-range-picker/calendar-range-picker.d.ts +14 -0
- package/dist/components/calendar-range-picker/index.d.ts +1 -0
- package/dist/components/canvas/canvas.d.ts +19 -0
- package/dist/components/canvas/index.d.ts +1 -0
- package/dist/components/carousel/carousel.d.ts +13 -0
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.d.ts +18 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/chip/chip.d.ts +8 -0
- package/dist/components/chip/index.d.ts +1 -0
- package/dist/components/code-block/code-block.d.ts +10 -0
- package/dist/components/code-block/index.d.ts +1 -0
- package/dist/components/color-area/color-area.d.ts +11 -0
- package/dist/components/color-area/index.d.ts +1 -0
- package/dist/components/color-field/color-field.d.ts +10 -0
- package/dist/components/color-field/index.d.ts +1 -0
- package/dist/components/color-picker/color-picker.d.ts +10 -0
- package/dist/components/color-picker/index.d.ts +1 -0
- package/dist/components/color-slider/color-slider.d.ts +15 -0
- package/dist/components/color-slider/index.d.ts +1 -0
- package/dist/components/command/command-empty.d.ts +4 -0
- package/dist/components/command/command-group.d.ts +6 -0
- package/dist/components/command/command-input.d.ts +12 -0
- package/dist/components/command/command-item.d.ts +10 -0
- package/dist/components/command/command-list.d.ts +4 -0
- package/dist/components/command/command.d.ts +6 -0
- package/dist/components/command/index.d.ts +6 -0
- package/dist/components/container/container.d.ts +11 -0
- package/dist/components/container/index.d.ts +1 -0
- package/dist/components/context-menu/context-menu.d.ts +12 -0
- package/dist/components/context-menu/index.d.ts +1 -0
- package/dist/components/copy-button/copy-button.d.ts +10 -0
- package/dist/components/copy-button/index.d.ts +1 -0
- package/dist/components/date-field/date-field.d.ts +13 -0
- package/dist/components/date-field/index.d.ts +1 -0
- package/dist/components/dialog/dialog.d.ts +12 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/disclosure/disclosure.d.ts +10 -0
- package/dist/components/disclosure/index.d.ts +1 -0
- package/dist/components/disclosure-group/disclosure-group.d.ts +8 -0
- package/dist/components/disclosure-group/index.d.ts +1 -0
- package/dist/components/drawer/drawer.d.ts +13 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +12 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/editor/context.d.ts +15 -0
- package/dist/components/editor/editor-layer.d.ts +11 -0
- package/dist/components/editor/editor.d.ts +32 -0
- package/dist/components/editor/index.d.ts +4 -0
- package/dist/components/editor.js +1 -1
- package/dist/components/empty-state/empty-state.d.ts +10 -0
- package/dist/components/empty-state/index.d.ts +1 -0
- package/dist/components/feed/feed.d.ts +11 -0
- package/dist/components/feed/index.d.ts +1 -0
- package/dist/components/field/index.d.ts +0 -0
- package/dist/components/file-upload/file-upload.d.ts +13 -0
- package/dist/components/file-upload/index.d.ts +1 -0
- package/dist/components/graph/graph-layer.d.ts +3 -0
- package/dist/components/graph/graph-node.d.ts +13 -0
- package/dist/components/graph/graph-noodle.d.ts +19 -0
- package/dist/components/graph/graph-port.d.ts +17 -0
- package/dist/components/graph/graph-ui.d.ts +10 -0
- package/dist/components/graph/index.d.ts +5 -0
- package/dist/components/graph.js +1 -1
- package/dist/components/gripper/gripper.d.ts +9 -0
- package/dist/components/gripper/index.d.ts +1 -0
- package/dist/components/hover-card/hover-card.d.ts +11 -0
- package/dist/components/hover-card/index.d.ts +1 -0
- package/dist/components/icon/icon.d.ts +12 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/registry.d.ts +8 -0
- package/dist/components/image/image.d.ts +13 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +72 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/input-otp.d.ts +17 -0
- package/dist/components/input/input.d.ts +29 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/link.d.ts +3 -0
- package/dist/components/meter/index.d.ts +1 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/nav-item/index.d.ts +1 -0
- package/dist/components/nav-item/nav-item.d.ts +3 -0
- package/dist/components/noodles/datasets.d.ts +16 -0
- package/dist/components/noodles/index.d.ts +3 -0
- package/dist/components/noodles/noodle-controller.d.ts +71 -0
- package/dist/components/noodles/noodles.d.ts +30 -0
- package/dist/components/notification-center/index.d.ts +2 -0
- package/dist/components/notification-center/notification-center.d.ts +27 -0
- package/dist/components/optgroup/index.d.ts +1 -0
- package/dist/components/optgroup/optgroup.d.ts +9 -0
- package/dist/components/option/index.d.ts +1 -0
- package/dist/components/option/option.d.ts +11 -0
- package/dist/components/page/index.d.ts +3 -0
- package/dist/components/page/page-context.d.ts +4 -0
- package/dist/components/page/page-main.d.ts +3 -0
- package/dist/components/page/page.d.ts +4 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +10 -0
- package/dist/components/pane/index.d.ts +2 -0
- package/dist/components/pane/pane.d.ts +27 -0
- package/dist/components/pane/panes.d.ts +10 -0
- package/dist/components/preview-app/index.d.ts +1 -0
- package/dist/components/preview-app/preview-app.d.ts +8 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/progress/progress.d.ts +6 -0
- package/dist/components/progress-circle/index.d.ts +1 -0
- package/dist/components/progress-circle/progress-circle.d.ts +9 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/radio-group.d.ts +10 -0
- package/dist/components/radio/radio.d.ts +17 -0
- package/dist/components/range/index.d.ts +1 -0
- package/dist/components/range/range.d.ts +18 -0
- package/dist/components/root/index.d.ts +1 -0
- package/dist/components/root/root.d.ts +4 -0
- package/dist/components/segmented-control/index.d.ts +2 -0
- package/dist/components/segmented-control/segment.d.ts +8 -0
- package/dist/components/segmented-control/segmented-control.d.ts +13 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/select.d.ts +37 -0
- package/dist/components/sidebar/index.d.ts +4 -0
- package/dist/components/sidebar/sidebar-content.d.ts +4 -0
- package/dist/components/sidebar/sidebar-footer.d.ts +4 -0
- package/dist/components/sidebar/sidebar-header.d.ts +4 -0
- package/dist/components/sidebar/sidebar.d.ts +14 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/skeleton.d.ts +3 -0
- package/dist/components/sparkline/index.d.ts +1 -0
- package/dist/components/sparkline/sparkline.d.ts +8 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/spinner.d.ts +3 -0
- package/dist/components/stat/index.d.ts +1 -0
- package/dist/components/stat/stat.d.ts +11 -0
- package/dist/components/stepper/index.d.ts +2 -0
- package/dist/components/stepper/step.d.ts +3 -0
- package/dist/components/stepper/stepper.d.ts +3 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.d.ts +16 -0
- package/dist/components/tab/index.d.ts +3 -0
- package/dist/components/tab/tab-panel.d.ts +7 -0
- package/dist/components/tab/tab.d.ts +8 -0
- package/dist/components/tab/tabs.d.ts +9 -0
- package/dist/components/table/index.d.ts +7 -0
- package/dist/components/table/table-body.d.ts +3 -0
- package/dist/components/table/table-cell.d.ts +3 -0
- package/dist/components/table/table-column.d.ts +11 -0
- package/dist/components/table/table-head.d.ts +3 -0
- package/dist/components/table/table-header.d.ts +3 -0
- package/dist/components/table/table-row.d.ts +3 -0
- package/dist/components/table/table.d.ts +16 -0
- package/dist/components/tag-group/index.d.ts +1 -0
- package/dist/components/tag-group/tag-group.d.ts +10 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/textarea.d.ts +23 -0
- package/dist/components/time-field/index.d.ts +1 -0
- package/dist/components/time-field/time-field.d.ts +14 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +19 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +9 -0
- package/dist/components/tree/index.d.ts +2 -0
- package/dist/components/tree/tree-item.d.ts +11 -0
- package/dist/components/tree/tree.d.ts +6 -0
- package/dist/components.js +123 -3120
- package/dist/components.js.map +1 -1
- package/dist/docs/blocks/chart-interactive.yaml +4 -10
- package/dist/docs/blocks/checkout-form.yaml +13 -13
- package/dist/docs/blocks/contributors.yaml +25 -26
- package/dist/docs/blocks/dashboard-layout.yaml +24 -42
- package/dist/docs/blocks/empty-state.yaml +4 -9
- package/dist/docs/blocks/env-variables.yaml +2 -2
- package/dist/docs/blocks/feature-upgrade.yaml +4 -4
- package/dist/docs/blocks/issue-assign.yaml +7 -7
- package/dist/docs/blocks/profile-card.yaml +8 -17
- package/dist/docs/blocks/settings-form.yaml +4 -4
- package/dist/docs/blocks/sidebar-nav.yaml +19 -19
- package/dist/docs/blocks/stat-cards.yaml +9 -26
- package/dist/docs/blocks/status-card.yaml +3 -3
- package/dist/docs/blocks/suggested-labs.yaml +4 -4
- package/dist/docs/blocks/survey-card.yaml +9 -9
- package/dist/docs/blocks/tabbed-panel.yaml +1 -1
- package/dist/docs/blocks/team-empty.yaml +6 -14
- package/dist/docs/blocks/usage-billing.yaml +12 -37
- package/dist/docs/components/alert.yaml +79 -0
- package/dist/docs/components/avatar-group.yaml +86 -0
- package/dist/docs/components/calendar-picker.yaml +142 -0
- package/dist/docs/components/calendar-range-picker.yaml +139 -0
- package/dist/docs/components/chip.yaml +91 -0
- package/dist/docs/components/code-block.yaml +126 -0
- package/dist/docs/components/color-picker.yaml +78 -0
- package/dist/docs/components/context-menu.yaml +102 -0
- package/dist/docs/components/date-field.yaml +115 -0
- package/dist/docs/components/disclosure-group.yaml +69 -0
- package/dist/docs/components/disclosure.yaml +81 -0
- package/dist/docs/components/dropdown-menu.yaml +146 -0
- package/dist/docs/components/hover-card.yaml +85 -0
- package/dist/docs/components/index.yaml +168 -0
- package/dist/docs/components/input.yaml +25 -0
- package/dist/docs/components/link.yaml +85 -0
- package/dist/docs/components/meter.yaml +89 -0
- package/dist/docs/components/nav-item.yaml +93 -0
- package/dist/docs/components/progress-circle.yaml +105 -0
- package/dist/docs/components/progress.yaml +104 -0
- package/dist/docs/components/skeleton.yaml +81 -0
- package/dist/docs/components/sparkline.yaml +88 -0
- package/dist/docs/components/spinner.yaml +75 -0
- package/dist/docs/components/step.yaml +91 -0
- package/dist/docs/components/stepper.yaml +91 -0
- package/dist/docs/components/tag-group.yaml +90 -0
- package/dist/docs/components/time-field.yaml +120 -0
- package/dist/element/agent-element.d.ts +29 -0
- package/dist/element/context.d.ts +20 -0
- package/dist/element/define.d.ts +2 -0
- package/dist/element/index.d.ts +4 -0
- package/dist/element/types.d.ts +23 -0
- package/dist/element.js +1 -1
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +49 -43
- package/dist/icons.js.map +1 -1
- package/dist/reactivity.js +1 -1
- package/dist/register.d.ts +1 -0
- package/dist/register.js +369 -342
- package/dist/register.js.map +1 -1
- package/dist/store.js +1 -1
- package/dist/styles-entry.d.ts +0 -0
- package/dist/traits/attach.d.ts +12 -0
- package/dist/traits/auto-dismiss/auto-dismiss.d.ts +0 -0
- package/dist/traits/auto-dismiss/auto-dismiss.trait.d.ts +2 -0
- package/dist/traits/backtick-wrap/backtick-wrap.d.ts +0 -0
- package/dist/traits/backtick-wrap/backtick-wrap.trait.d.ts +2 -0
- package/dist/traits/clipboard/clipboard.d.ts +0 -0
- package/dist/traits/clipboard/clipboard.trait.d.ts +2 -0
- package/dist/traits/collapsible/collapsible.d.ts +0 -0
- package/dist/traits/collapsible/collapsible.trait.d.ts +2 -0
- package/dist/traits/confetti/confetti.d.ts +0 -0
- package/dist/traits/confetti/confetti.trait.d.ts +2 -0
- package/dist/traits/copy/copy.d.ts +0 -0
- package/dist/traits/copy/copy.trait.d.ts +2 -0
- package/dist/traits/css-inspect/css-inspect-controller.d.ts +38 -0
- package/dist/traits/css-inspect/css-inspect.d.ts +0 -0
- package/dist/traits/css-inspect/css-inspect.trait.d.ts +2 -0
- package/dist/traits/dismiss/dismiss.d.ts +0 -0
- package/dist/traits/dismiss/dismiss.trait.d.ts +2 -0
- package/dist/traits/drag/drag.d.ts +0 -0
- package/dist/traits/drag/drag.trait.d.ts +2 -0
- package/dist/traits/drop-zone/drop-zone.d.ts +0 -0
- package/dist/traits/drop-zone/drop-zone.trait.d.ts +2 -0
- package/dist/traits/edit/edit.d.ts +0 -0
- package/dist/traits/edit/edit.trait.d.ts +2 -0
- package/dist/traits/flip/flip.d.ts +0 -0
- package/dist/traits/flip/flip.trait.d.ts +2 -0
- package/dist/traits/gateway/gateway.d.ts +0 -0
- package/dist/traits/gateway/gateway.trait.d.ts +2 -0
- package/dist/traits/hover/hover.d.ts +0 -0
- package/dist/traits/hover/hover.trait.d.ts +2 -0
- package/dist/traits/index.d.ts +6 -0
- package/dist/traits/intersect/intersect.d.ts +0 -0
- package/dist/traits/intersect/intersect.trait.d.ts +2 -0
- package/dist/traits/link-paste/link-paste.d.ts +0 -0
- package/dist/traits/link-paste/link-paste.trait.d.ts +2 -0
- package/dist/traits/linked-scroll/linked-scroll.d.ts +0 -0
- package/dist/traits/linked-scroll/linked-scroll.trait.d.ts +2 -0
- package/dist/traits/list-navigate/list-navigate.d.ts +0 -0
- package/dist/traits/list-navigate/list-navigate.trait.d.ts +2 -0
- package/dist/traits/magnet/magnet.d.ts +0 -0
- package/dist/traits/magnet/magnet.trait.d.ts +2 -0
- package/dist/traits/mention/mention.d.ts +0 -0
- package/dist/traits/mention/mention.trait.d.ts +2 -0
- package/dist/traits/modal/modal.d.ts +0 -0
- package/dist/traits/modal/modal.trait.d.ts +2 -0
- package/dist/traits/noodle/noodle.d.ts +0 -0
- package/dist/traits/noodle/noodle.trait.d.ts +2 -0
- package/dist/traits/overlay/overlay.d.ts +0 -0
- package/dist/traits/overlay/overlay.trait.d.ts +3 -0
- package/dist/traits/pan-zoom/pan-zoom.d.ts +0 -0
- package/dist/traits/pan-zoom/pan-zoom.trait.d.ts +2 -0
- package/dist/traits/parallax/parallax.d.ts +0 -0
- package/dist/traits/parallax/parallax.trait.d.ts +2 -0
- package/dist/traits/parse.d.ts +3 -0
- package/dist/traits/persist/persist.d.ts +0 -0
- package/dist/traits/persist/persist.trait.d.ts +2 -0
- package/dist/traits/popover/overlay.d.ts +2 -0
- package/dist/traits/popover/popover.d.ts +0 -0
- package/dist/traits/popover/popover.trait.d.ts +2 -0
- package/dist/traits/present/present.d.ts +0 -0
- package/dist/traits/present/present.trait.d.ts +2 -0
- package/dist/traits/press-hold/press-hold.d.ts +0 -0
- package/dist/traits/press-hold/press-hold.trait.d.ts +2 -0
- package/dist/traits/range-select/range-select.d.ts +0 -0
- package/dist/traits/range-select/range-select.trait.d.ts +2 -0
- package/dist/traits/registry.d.ts +17 -0
- package/dist/traits/resize/resize.d.ts +0 -0
- package/dist/traits/resize/resize.trait.d.ts +2 -0
- package/dist/traits/ripple/ripple.d.ts +0 -0
- package/dist/traits/ripple/ripple.trait.d.ts +2 -0
- package/dist/traits/roving-focus/roving-focus.d.ts +0 -0
- package/dist/traits/roving-focus/roving-focus.trait.d.ts +2 -0
- package/dist/traits/search/search.d.ts +0 -0
- package/dist/traits/search/search.trait.d.ts +2 -0
- package/dist/traits/selection/selection.d.ts +0 -0
- package/dist/traits/selection/selection.trait.d.ts +2 -0
- package/dist/traits/shortcut/shortcut.d.ts +0 -0
- package/dist/traits/shortcut/shortcut.trait.d.ts +2 -0
- package/dist/traits/slash-command/slash-command.d.ts +0 -0
- package/dist/traits/slash-command/slash-command.trait.d.ts +2 -0
- package/dist/traits/snap-resize/snap-resize.d.ts +0 -0
- package/dist/traits/snap-resize/snap-resize.trait.d.ts +2 -0
- package/dist/traits/sort/sort.d.ts +0 -0
- package/dist/traits/sort/sort.trait.d.ts +2 -0
- package/dist/traits/store/store.d.ts +0 -0
- package/dist/traits/store/store.trait.d.ts +2 -0
- package/dist/traits/swipe/swipe.d.ts +0 -0
- package/dist/traits/swipe/swipe.trait.d.ts +2 -0
- package/dist/traits/text-trigger/text-trigger.d.ts +0 -0
- package/dist/traits/text-trigger/text-trigger.trait.d.ts +2 -0
- package/dist/traits/toast/toast.d.ts +0 -0
- package/dist/traits/toast/toast.trait.d.ts +2 -0
- package/dist/traits/toggle-scheme/toggle-scheme.d.ts +0 -0
- package/dist/traits/toggle-scheme/toggle-scheme.trait.d.ts +2 -0
- package/dist/traits/toggle-state/toggle-state.d.ts +0 -0
- package/dist/traits/toggle-state/toggle-state.trait.d.ts +2 -0
- package/dist/traits/tooltip/tooltip.d.ts +0 -0
- package/dist/traits/tooltip/tooltip.trait.d.ts +2 -0
- package/dist/traits/toss/toss.d.ts +0 -0
- package/dist/traits/toss/toss.trait.d.ts +2 -0
- package/dist/traits/trap-focus/trap-focus.d.ts +0 -0
- package/dist/traits/trap-focus/trap-focus.trait.d.ts +2 -0
- package/dist/traits/types.d.ts +45 -0
- package/dist/traits/validate/validate.d.ts +0 -0
- package/dist/traits/validate/validate.trait.d.ts +2 -0
- package/dist/traits/virtual-scroll/virtual-scroll.d.ts +0 -0
- package/dist/traits/virtual-scroll/virtual-scroll.trait.d.ts +2 -0
- package/dist/traits.js +45 -45
- package/package.json +52 -13
package/dist/register.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as T, s as S, a as I, b as $, d as
|
|
1
|
+
import { A as T, s as S, a as I, b as $, d as z, e as n, p as W, v as X, f as B, g as K, h as j, i as _, j as J, k as V, l as Z, m as Q, n as tt } from "./chunks/agent-C72JZNe6.js";
|
|
2
2
|
import { registerBuiltinTraits as et } from "./traits.js";
|
|
3
3
|
import { AuiEditor as it, AuiEditorLayer as st } from "./components/editor.js";
|
|
4
|
-
import { AuiGraphUi as at, AuiGraphLayer as nt, AuiGraphNode as ot, AuiGraphNoodle as rt, AuiGraphPort as
|
|
5
|
-
import {
|
|
6
|
-
class
|
|
4
|
+
import { AuiGraphUi as at, AuiGraphLayer as nt, AuiGraphNode as ot, AuiGraphNoodle as rt, AuiGraphPort as ut } from "./components/graph.js";
|
|
5
|
+
import { A as lt, a as dt, b as ct, c as ht, d as mt, e as pt, f as ft, g as bt, h as gt, i as vt, j as At, k as yt, l as wt, m as xt, n as Ct, o as Et, p as kt, q as St, r as Pt, s as $t, t as Lt, u as Mt, v as Dt, w as Tt, x as It, y as Nt, z as Yt, B as qt, C as Rt, D as Ft, E as zt, F as Gt, G as Ut, H as Ht, I as Ot, J as Wt, K as Xt, L as Bt, M as Kt, N as jt, O as _t, P as Jt, Q as Vt, R as Zt, S as Qt, T as te, U as ee, V as ie, W as se, X as ae, Y as ne, Z as oe, _ as re, $ as ue, a0 as le, a1 as de, a2 as ce, a3 as he, a4 as me, a5 as pe, a6 as fe, a7 as be, a8 as ge, a9 as ve, aa as Ae, ab as ye, ac as we, ad as xe, ae as Ce, af as Ee, ag as ke, ah as Se, ai as Pe, aj as $e, ak as Le, al as Me, am as De, an as Te, ao as Ie, ap as Ne, aq as Ye, ar as qe } from "./chunks/empty-state-5M3uR5CM.js";
|
|
6
|
+
class Re extends T {
|
|
7
7
|
static attributes = {
|
|
8
8
|
key: { type: "string", default: "" },
|
|
9
9
|
label: { type: "string", default: "" },
|
|
@@ -14,7 +14,7 @@ class de extends T {
|
|
|
14
14
|
align: { type: "enum", values: ["start", "center", "end"], default: "start" }
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
class
|
|
17
|
+
class Fe extends T {
|
|
18
18
|
static attributes = {
|
|
19
19
|
background: { type: "string", default: "none" },
|
|
20
20
|
orientation: { type: "string", default: "horizontal" },
|
|
@@ -29,11 +29,11 @@ class he extends T {
|
|
|
29
29
|
// Pan state
|
|
30
30
|
#a = 0;
|
|
31
31
|
#s = 0;
|
|
32
|
-
#
|
|
33
|
-
#
|
|
32
|
+
#u = !1;
|
|
33
|
+
#l = 0;
|
|
34
34
|
#i = 0;
|
|
35
35
|
#m = 0;
|
|
36
|
-
#
|
|
36
|
+
#p = 0;
|
|
37
37
|
// Zoom state
|
|
38
38
|
#r = 1;
|
|
39
39
|
// ── Public API ──
|
|
@@ -73,14 +73,14 @@ class he extends T {
|
|
|
73
73
|
this.appendChild(this.#e);
|
|
74
74
|
}
|
|
75
75
|
const t = this.hasAttribute("pan-enabled") || this.hasAttribute("zoom-enabled") || this.hasAttribute("infinite") || this.#e.querySelector(':scope > [slot^="float-"]');
|
|
76
|
-
t && this.#
|
|
76
|
+
t && this.#h(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.setAttribute("role", "region"), t && this.addEventListener("keydown", this.#c);
|
|
77
77
|
}
|
|
78
78
|
dispose() {
|
|
79
79
|
const t = this.#n;
|
|
80
|
-
t && (t.removeEventListener("pointerdown", this.#
|
|
80
|
+
t && (t.removeEventListener("pointerdown", this.#y), t.removeEventListener("pointermove", this.#w), t.removeEventListener("pointerup", this.#v), t.removeEventListener("pointercancel", this.#v), t.removeEventListener("wheel", this.#A)), this.removeEventListener("keydown", this.#c);
|
|
81
81
|
}
|
|
82
82
|
// ── DOM stamping ──
|
|
83
|
-
#
|
|
83
|
+
#h() {
|
|
84
84
|
const t = this.#e, e = document.createElement("div");
|
|
85
85
|
e.setAttribute("data-viewport", "");
|
|
86
86
|
const i = document.createElement("div");
|
|
@@ -94,8 +94,8 @@ class he extends T {
|
|
|
94
94
|
i.appendChild(r);
|
|
95
95
|
}
|
|
96
96
|
e.appendChild(i), t.appendChild(e), this.#n = e, this.#t = i;
|
|
97
|
-
const a = this.hasAttribute("pan-enabled") || this.hasAttribute("infinite"),
|
|
98
|
-
a && (t.addEventListener("pointerdown", this.#
|
|
97
|
+
const a = this.hasAttribute("pan-enabled") || this.hasAttribute("infinite"), o = this.hasAttribute("zoom-enabled") || this.hasAttribute("infinite");
|
|
98
|
+
a && (t.addEventListener("pointerdown", this.#y), t.addEventListener("pointermove", this.#w), t.addEventListener("pointerup", this.#v), t.addEventListener("pointercancel", this.#v)), o && t.addEventListener("wheel", this.#A, { passive: !1 }), this.#o();
|
|
99
99
|
}
|
|
100
100
|
// ── Transform ──
|
|
101
101
|
#o() {
|
|
@@ -116,29 +116,29 @@ class he extends T {
|
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
118
|
// ── Pan handlers ──
|
|
119
|
-
#
|
|
119
|
+
#y = (t) => {
|
|
120
120
|
if (t.button !== 0) return;
|
|
121
121
|
const e = t.target, i = this.#t;
|
|
122
|
-
i && i.contains(e) || (this.#
|
|
122
|
+
i && i.contains(e) || (this.#u = !0, this.#l = t.clientX, this.#i = t.clientY, this.#m = this.#a, this.#p = this.#s, this.#e.setPointerCapture(t.pointerId), this.setAttribute("data-canvas-panning", ""));
|
|
123
123
|
};
|
|
124
124
|
#w = (t) => {
|
|
125
|
-
this.#
|
|
125
|
+
this.#u && (this.#a = this.#m + (t.clientX - this.#l), this.#s = this.#p + (t.clientY - this.#i), this.#o());
|
|
126
126
|
};
|
|
127
127
|
#v = (t) => {
|
|
128
|
-
this.#
|
|
128
|
+
this.#u && (this.#u = !1, this.removeAttribute("data-canvas-panning"), this.#d());
|
|
129
129
|
};
|
|
130
130
|
// ── Zoom handler ──
|
|
131
|
-
#
|
|
131
|
+
#A = (t) => {
|
|
132
132
|
t.preventDefault();
|
|
133
133
|
const e = t.deltaY > 0 ? -0.05 : 0.05, i = Math.max(0.1, Math.min(10, this.#r + e * this.#r));
|
|
134
134
|
if (this.#e) {
|
|
135
|
-
const s = this.#e.getBoundingClientRect(), a = (t.clientX - s.left) / s.width,
|
|
136
|
-
this.#a = a * s.width * (1 - r) + this.#a * r, this.#s =
|
|
135
|
+
const s = this.#e.getBoundingClientRect(), a = (t.clientX - s.left) / s.width, o = (t.clientY - s.top) / s.height, r = i / this.#r;
|
|
136
|
+
this.#a = a * s.width * (1 - r) + this.#a * r, this.#s = o * s.height * (1 - r) + this.#s * r;
|
|
137
137
|
}
|
|
138
138
|
this.#r = i, this.#o(), this.#b();
|
|
139
139
|
};
|
|
140
140
|
// ── Keyboard ──
|
|
141
|
-
#
|
|
141
|
+
#c = (t) => {
|
|
142
142
|
switch (t.key) {
|
|
143
143
|
case "0":
|
|
144
144
|
t.preventDefault(), this.#r = 1, this.#o(), this.#b();
|
|
@@ -161,14 +161,14 @@ function L(m) {
|
|
|
161
161
|
const t = /* @__PURE__ */ new Date(m + "T00:00:00");
|
|
162
162
|
return isNaN(t.getTime()) ? null : t;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function ze(m) {
|
|
165
165
|
const t = m.getFullYear(), e = String(m.getMonth() + 1).padStart(2, "0"), i = String(m.getDate()).padStart(2, "0");
|
|
166
166
|
return `${t}-${e}-${i}`;
|
|
167
167
|
}
|
|
168
168
|
function N(m, t) {
|
|
169
169
|
return m.getFullYear() === t.getFullYear() && m.getMonth() === t.getMonth() && m.getDate() === t.getDate();
|
|
170
170
|
}
|
|
171
|
-
class
|
|
171
|
+
class Ge {
|
|
172
172
|
view;
|
|
173
173
|
focusedYear;
|
|
174
174
|
focusedMonth;
|
|
@@ -236,27 +236,27 @@ class me {
|
|
|
236
236
|
}
|
|
237
237
|
// ── Private Computations ──
|
|
238
238
|
#n() {
|
|
239
|
-
const t = this.focusedYear.value, e = this.focusedMonth.value, i = L(this.value.value), s = /* @__PURE__ */ new Date(), a = L(this.rangeStart.value),
|
|
240
|
-
for (let
|
|
241
|
-
const
|
|
242
|
-
let b = !1,
|
|
243
|
-
if (a &&
|
|
244
|
-
const
|
|
245
|
-
b =
|
|
239
|
+
const t = this.focusedYear.value, e = this.focusedMonth.value, i = L(this.value.value), s = /* @__PURE__ */ new Date(), a = L(this.rangeStart.value), o = L(this.rangeEnd.value), h = new Date(t, e, 1).getDay(), c = new Date(t, e, 1 - h), p = [];
|
|
240
|
+
for (let l = 0; l < 42; l++) {
|
|
241
|
+
const u = new Date(c.getFullYear(), c.getMonth(), c.getDate() + l), v = ze(u), d = u.getMonth() === e, f = N(u, s), g = i ? N(u, i) : !1, C = this.isDateDisabled(v);
|
|
242
|
+
let b = !1, y = !1, P = !1;
|
|
243
|
+
if (a && o) {
|
|
244
|
+
const E = a <= o ? a : o, D = a <= o ? o : a;
|
|
245
|
+
b = u >= E && u <= D, y = N(u, E), P = N(u, D);
|
|
246
246
|
}
|
|
247
|
-
|
|
247
|
+
p.push({
|
|
248
248
|
date: v,
|
|
249
|
-
day:
|
|
249
|
+
day: u.getDate(),
|
|
250
250
|
inMonth: d,
|
|
251
|
-
isToday:
|
|
251
|
+
isToday: f,
|
|
252
252
|
isSelected: g,
|
|
253
|
-
isDisabled:
|
|
253
|
+
isDisabled: C,
|
|
254
254
|
inRange: b,
|
|
255
|
-
isRangeStart:
|
|
255
|
+
isRangeStart: y,
|
|
256
256
|
isRangeEnd: P
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return p;
|
|
260
260
|
}
|
|
261
261
|
#t() {
|
|
262
262
|
const t = this.focusedYear.value, e = this.focusedMonth.value;
|
|
@@ -305,7 +305,7 @@ class me {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
class
|
|
308
|
+
class Ue extends T {
|
|
309
309
|
static attributes = {
|
|
310
310
|
value: { type: "string", default: "" },
|
|
311
311
|
min: { type: "string", default: "" },
|
|
@@ -314,14 +314,14 @@ class fe extends T {
|
|
|
314
314
|
range: { type: "boolean", default: !1 }
|
|
315
315
|
};
|
|
316
316
|
#n;
|
|
317
|
-
#t = new
|
|
317
|
+
#t = new Ge();
|
|
318
318
|
#e = S(!1);
|
|
319
319
|
// WHY: Track focused cell index for keyboard navigation within the grid
|
|
320
320
|
#a = S(0);
|
|
321
321
|
// WHY: 3-phase range cycle: idle → selecting (hover previews) → committed → idle
|
|
322
322
|
#s = "idle";
|
|
323
323
|
// WHY: Drag-based range selection — pointerdown starts, pointermove previews, pointerup commits
|
|
324
|
-
#
|
|
324
|
+
#u = !1;
|
|
325
325
|
constructor() {
|
|
326
326
|
super(), this.#n = this.attachInternals(), this.#n.role = "group";
|
|
327
327
|
}
|
|
@@ -370,16 +370,16 @@ class fe extends T {
|
|
|
370
370
|
const t = this.getAttribute("value"), e = this.getAttribute("min"), i = this.getAttribute("max");
|
|
371
371
|
$(() => {
|
|
372
372
|
t && (this.#t.value.value = t), e && (this.#t.min.value = e), i && (this.#t.max.value = i);
|
|
373
|
-
}), this.#
|
|
373
|
+
}), this.#l(), this.addEventListener("keydown", this.#E), this.addEffect(() => this.#i()), this.addEffect(() => {
|
|
374
374
|
this.setAttribute("aria-label", this.#t.title.value);
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
dispose() {
|
|
378
|
-
this.querySelector('aui-button[data-role="prev"]')?.removeEventListener("click", this.#m), this.querySelector('aui-button[data-role="next"]')?.removeEventListener("click", this.#
|
|
378
|
+
this.querySelector('aui-button[data-role="prev"]')?.removeEventListener("click", this.#m), this.querySelector('aui-button[data-role="next"]')?.removeEventListener("click", this.#p), this.querySelector('aui-button[data-role="title"]')?.removeEventListener("click", this.#r);
|
|
379
379
|
const t = this.querySelector("[data-cal-grid]");
|
|
380
|
-
t?.removeEventListener("click", this.#
|
|
380
|
+
t?.removeEventListener("click", this.#h), t?.removeEventListener("pointermove", this.#o), t?.removeEventListener("pointerdown", this.#d), t?.removeEventListener("pointerup", this.#b), this.removeEventListener("keydown", this.#E), super.dispose();
|
|
381
381
|
}
|
|
382
|
-
#
|
|
382
|
+
#l() {
|
|
383
383
|
this.innerHTML = `
|
|
384
384
|
<div data-cal-header>
|
|
385
385
|
<aui-button data-role="prev" aria-label="Previous" tabindex="-1"><aui-icon name="caret-left"></aui-icon></aui-button>
|
|
@@ -392,33 +392,33 @@ class fe extends T {
|
|
|
392
392
|
for (const a of this.querySelectorAll("[data-cal-header] aui-button"))
|
|
393
393
|
a.setAttribute("tabindex", "-1");
|
|
394
394
|
const t = this.querySelector('aui-button[data-role="prev"]'), e = this.querySelector('aui-button[data-role="next"]'), i = this.querySelector('aui-button[data-role="title"]');
|
|
395
|
-
t?.addEventListener("click", this.#m), e?.addEventListener("click", this.#
|
|
395
|
+
t?.addEventListener("click", this.#m), e?.addEventListener("click", this.#p), i?.addEventListener("click", this.#r);
|
|
396
396
|
const s = this.querySelector("[data-cal-grid]");
|
|
397
|
-
s?.addEventListener("click", this.#
|
|
397
|
+
s?.addEventListener("click", this.#h), s?.addEventListener("pointermove", this.#o), s?.addEventListener("pointerdown", this.#d), s?.addEventListener("pointerup", this.#b);
|
|
398
398
|
}
|
|
399
399
|
#i() {
|
|
400
400
|
const t = this.#t.view.value, e = this.querySelector('aui-button[data-role="title"]'), i = this.querySelector("[data-cal-weekdays]"), s = this.querySelector("[data-cal-grid]");
|
|
401
401
|
if (!(!e || !i || !s)) {
|
|
402
402
|
if (e.textContent = this.#t.title.value, t === "day") {
|
|
403
|
-
this.setAttribute("view", "day"), i.innerHTML = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((
|
|
403
|
+
this.setAttribute("view", "day"), i.innerHTML = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((o) => `<span data-cal-weekday>${o}</span>`).join("");
|
|
404
404
|
const a = this.#t.days.value;
|
|
405
|
-
s.innerHTML = a.map((
|
|
406
|
-
let
|
|
407
|
-
return
|
|
405
|
+
s.innerHTML = a.map((o, r) => {
|
|
406
|
+
let h = `data-date="${o.date}" data-index="${r}" tabindex="-1"`;
|
|
407
|
+
return o.inMonth || (h += " data-outside"), o.isToday && (h += ' data-today aria-current="date"'), o.isSelected && (h += ' data-selected aria-selected="true"'), o.isDisabled && (h += " disabled"), o.inRange && (h += " data-in-range"), o.isRangeStart && (h += " data-range-start"), o.isRangeEnd && (h += " data-range-end"), `<div data-cal-day ${h}>${o.day}</div>`;
|
|
408
408
|
}).join("");
|
|
409
409
|
} else if (t === "month") {
|
|
410
410
|
this.setAttribute("view", "month"), i.innerHTML = "";
|
|
411
411
|
const a = this.#t.months.value;
|
|
412
|
-
s.innerHTML = a.map((
|
|
413
|
-
let r = `data-month="${
|
|
414
|
-
return
|
|
412
|
+
s.innerHTML = a.map((o) => {
|
|
413
|
+
let r = `data-month="${o.month}" tabindex="-1"`;
|
|
414
|
+
return o.isCurrent && (r += ' data-today aria-current="date"'), o.isSelected && (r += ' data-selected aria-selected="true"'), `<div data-cal-cell ${r}>${o.name}</div>`;
|
|
415
415
|
}).join("");
|
|
416
416
|
} else {
|
|
417
417
|
this.setAttribute("view", "year"), i.innerHTML = "";
|
|
418
418
|
const a = this.#t.years.value;
|
|
419
|
-
s.innerHTML = a.map((
|
|
420
|
-
let r = `data-year="${
|
|
421
|
-
return
|
|
419
|
+
s.innerHTML = a.map((o) => {
|
|
420
|
+
let r = `data-year="${o.year}" tabindex="-1"`;
|
|
421
|
+
return o.inDecade || (r += " data-outside"), o.isCurrent && (r += ' data-today aria-current="date"'), o.isSelected && (r += ' data-selected aria-selected="true"'), `<div data-cal-cell ${r}>${o.year}</div>`;
|
|
422
422
|
}).join("");
|
|
423
423
|
}
|
|
424
424
|
for (const a of s.querySelectorAll("[data-cal-day]:not([disabled]), [data-cal-cell]"))
|
|
@@ -426,27 +426,27 @@ class fe extends T {
|
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
#m = () => {
|
|
429
|
-
this.#
|
|
429
|
+
this.#y();
|
|
430
430
|
};
|
|
431
|
-
#
|
|
431
|
+
#p = () => {
|
|
432
432
|
this.#w();
|
|
433
433
|
};
|
|
434
434
|
#r = () => {
|
|
435
435
|
this.#v();
|
|
436
436
|
};
|
|
437
|
-
#
|
|
438
|
-
this.#
|
|
437
|
+
#h = (t) => {
|
|
438
|
+
this.#A(t);
|
|
439
439
|
};
|
|
440
440
|
#o = (t) => {
|
|
441
|
-
this.#
|
|
441
|
+
this.#C(t);
|
|
442
442
|
};
|
|
443
443
|
#d = (t) => {
|
|
444
444
|
this.#k(t);
|
|
445
445
|
};
|
|
446
446
|
#b = (t) => {
|
|
447
|
-
this.#
|
|
447
|
+
this.#f(t);
|
|
448
448
|
};
|
|
449
|
-
#
|
|
449
|
+
#y() {
|
|
450
450
|
const t = this.#t.view.value;
|
|
451
451
|
t === "day" ? this.#t.prevMonth() : t === "month" ? this.#t.prevYear() : this.#t.prevDecade();
|
|
452
452
|
}
|
|
@@ -458,14 +458,14 @@ class fe extends T {
|
|
|
458
458
|
const t = this.#t.view.value;
|
|
459
459
|
t === "day" ? this.#t.view.value = "month" : t === "month" && (this.#t.view.value = "year");
|
|
460
460
|
}
|
|
461
|
-
#
|
|
461
|
+
#A(t) {
|
|
462
462
|
if (this.#e.value) return;
|
|
463
463
|
const e = t.target.closest("[data-cal-day], [data-cal-cell]");
|
|
464
464
|
if (!e || e.hasAttribute("disabled")) return;
|
|
465
465
|
const i = e.dataset.date, s = e.dataset.month, a = e.dataset.year;
|
|
466
|
-
i ? this.#
|
|
466
|
+
i ? this.#c(i) : s !== void 0 ? this.#t.selectMonth(Number(s)) : a !== void 0 && this.#t.selectYear(Number(a));
|
|
467
467
|
}
|
|
468
|
-
#
|
|
468
|
+
#c(t) {
|
|
469
469
|
this.range ? this.#s === "idle" ? ($(() => {
|
|
470
470
|
this.#t.selectDate(t), this.#t.setRange(t, null);
|
|
471
471
|
}), this.setAttribute("value", t), this.#s = "selecting") : this.#s === "selecting" ? this.#g(t) : ($(() => {
|
|
@@ -478,7 +478,7 @@ class fe extends T {
|
|
|
478
478
|
}
|
|
479
479
|
#g(t) {
|
|
480
480
|
const e = this.#t.rangeStart.value;
|
|
481
|
-
e && (this.#t.setRange(e, t), this.#s = "committed", this.#
|
|
481
|
+
e && (this.#t.setRange(e, t), this.#s = "committed", this.#u = !1, this.dispatchEvent(new CustomEvent("aui:range-select", {
|
|
482
482
|
bubbles: !0,
|
|
483
483
|
composed: !0,
|
|
484
484
|
detail: { start: this.#t.rangeStart.value, end: this.#t.rangeEnd.value }
|
|
@@ -489,12 +489,12 @@ class fe extends T {
|
|
|
489
489
|
const e = t.target.closest("[data-cal-day]");
|
|
490
490
|
if (!e || e.hasAttribute("disabled")) return;
|
|
491
491
|
const i = e.dataset.date;
|
|
492
|
-
i && (this.#
|
|
492
|
+
i && (this.#u = !0, (this.#s === "idle" || this.#s === "committed") && ($(() => {
|
|
493
493
|
this.#t.selectDate(i), this.#t.setRange(i, null);
|
|
494
494
|
}), this.setAttribute("value", i), this.#s = "selecting"));
|
|
495
495
|
}
|
|
496
|
-
#
|
|
497
|
-
if (!this.#
|
|
496
|
+
#f(t) {
|
|
497
|
+
if (!this.#u || (this.#u = !1, this.#s !== "selecting")) return;
|
|
498
498
|
const e = t.target.closest("[data-cal-day]");
|
|
499
499
|
if (!e || e.hasAttribute("disabled")) return;
|
|
500
500
|
const i = e.dataset.date;
|
|
@@ -502,7 +502,7 @@ class fe extends T {
|
|
|
502
502
|
const s = this.#t.rangeStart.value;
|
|
503
503
|
s && s !== i && this.#g(i);
|
|
504
504
|
}
|
|
505
|
-
#
|
|
505
|
+
#C(t) {
|
|
506
506
|
if (this.#e.value || !this.range || this.#s !== "selecting") return;
|
|
507
507
|
const e = t.target.closest("[data-cal-day]");
|
|
508
508
|
if (!e || e.hasAttribute("disabled")) return;
|
|
@@ -511,7 +511,7 @@ class fe extends T {
|
|
|
511
511
|
const s = this.#t.rangeStart.value;
|
|
512
512
|
s && this.#t.setRange(s, i);
|
|
513
513
|
}
|
|
514
|
-
#
|
|
514
|
+
#E = (t) => {
|
|
515
515
|
if (this.#e.value || this.#t.view.value !== "day") return;
|
|
516
516
|
const i = this.#t.days.value;
|
|
517
517
|
let s = this.#a.value, a = !0;
|
|
@@ -542,8 +542,8 @@ class fe extends T {
|
|
|
542
542
|
break;
|
|
543
543
|
case "Enter":
|
|
544
544
|
case " ": {
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const o = i[s];
|
|
546
|
+
o && !o.isDisabled && this.#c(o.date);
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
549
|
default:
|
|
@@ -552,12 +552,12 @@ class fe extends T {
|
|
|
552
552
|
a && (t.preventDefault(), s = Math.max(0, Math.min(41, s)), this.#a.value = s, s < 0 && this.#t.prevMonth(), s > 41 && this.#t.nextMonth());
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
let
|
|
555
|
+
let He = 0;
|
|
556
556
|
function H(m) {
|
|
557
|
-
return `${m}-${Date.now().toString(36)}-${(++
|
|
557
|
+
return `${m}-${Date.now().toString(36)}-${(++He).toString(36)}`;
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
class
|
|
559
|
+
const Oe = 50, M = "http://www.w3.org/2000/svg";
|
|
560
|
+
class We {
|
|
561
561
|
host;
|
|
562
562
|
// ── Public mutable options ──
|
|
563
563
|
selector;
|
|
@@ -576,13 +576,13 @@ class ge {
|
|
|
576
576
|
#e = /* @__PURE__ */ new Map();
|
|
577
577
|
#a = null;
|
|
578
578
|
#s = null;
|
|
579
|
-
#
|
|
580
|
-
#
|
|
579
|
+
#u = [];
|
|
580
|
+
#l = null;
|
|
581
581
|
#i = null;
|
|
582
582
|
#m = null;
|
|
583
|
-
#
|
|
583
|
+
#p = null;
|
|
584
584
|
#r = 0;
|
|
585
|
-
#
|
|
585
|
+
#h = !1;
|
|
586
586
|
#o = !1;
|
|
587
587
|
#d = null;
|
|
588
588
|
constructor(t, e = {}) {
|
|
@@ -598,10 +598,10 @@ class ge {
|
|
|
598
598
|
// ── Lifecycle ──
|
|
599
599
|
attach() {
|
|
600
600
|
if (this.#n) return;
|
|
601
|
-
this.#n = !0, getComputedStyle(this.host).position === "static" && (this.host.style.position = "relative"), this.host.style.isolation = "isolate", this.#b(), this.#w(), this.#R(), this.showPorts && this.#S(), this.host.addEventListener("aui:magnet-snap", this.#x), this.host.addEventListener("aui:magnet-drop", this.#x), this.host.addEventListener("aui:drag-move", this.#x), this.#
|
|
601
|
+
this.#n = !0, getComputedStyle(this.host).position === "static" && (this.host.style.position = "relative"), this.host.style.isolation = "isolate", this.#b(), this.#w(), this.#R(), this.showPorts && this.#S(), this.host.addEventListener("aui:magnet-snap", this.#x), this.host.addEventListener("aui:magnet-drop", this.#x), this.host.addEventListener("aui:drag-move", this.#x), this.#f();
|
|
602
602
|
}
|
|
603
603
|
detach() {
|
|
604
|
-
this.#n && (this.#n = !1, this.#
|
|
604
|
+
this.#n && (this.#n = !1, this.#F(), this.#T(), this.#y(), this.#v(), this.host.style.isolation = "", this.host.removeEventListener("aui:magnet-snap", this.#x), this.host.removeEventListener("aui:magnet-drop", this.#x), this.host.removeEventListener("aui:drag-move", this.#x), this.#r && (cancelAnimationFrame(this.#r), this.#r = 0), this.#h = !1);
|
|
605
605
|
}
|
|
606
606
|
destroy() {
|
|
607
607
|
this.#M(), this.detach(), this.#e.clear();
|
|
@@ -609,8 +609,8 @@ class ge {
|
|
|
609
609
|
// ── Public API ──
|
|
610
610
|
/** Add a connection. Returns the connection ID. */
|
|
611
611
|
connect(t, e, i = "right", s = "left") {
|
|
612
|
-
const a = H("noodle"),
|
|
613
|
-
return this.#e.set(a,
|
|
612
|
+
const a = H("noodle"), o = { id: a, from: t, to: e, fromPort: i, toPort: s };
|
|
613
|
+
return this.#e.set(a, o), this.#f(), this.host.dispatchEvent(new CustomEvent("aui:noodle-connect", {
|
|
614
614
|
bubbles: !0,
|
|
615
615
|
composed: !0,
|
|
616
616
|
detail: { id: a, from: t, to: e, fromPort: i, toPort: s }
|
|
@@ -619,7 +619,7 @@ class ge {
|
|
|
619
619
|
/** Remove a connection by ID. */
|
|
620
620
|
disconnect(t) {
|
|
621
621
|
const e = this.#e.get(t);
|
|
622
|
-
return e ? (this.#e.delete(t), this.#
|
|
622
|
+
return e ? (this.#e.delete(t), this.#f(), this.host.dispatchEvent(new CustomEvent("aui:noodle-disconnect", {
|
|
623
623
|
bubbles: !0,
|
|
624
624
|
composed: !0,
|
|
625
625
|
detail: { id: t, from: e.from, to: e.to, fromPort: e.fromPort, toPort: e.toPort }
|
|
@@ -628,7 +628,7 @@ class ge {
|
|
|
628
628
|
/** Remove all connections. */
|
|
629
629
|
clear() {
|
|
630
630
|
const t = [...this.#e.values()];
|
|
631
|
-
this.#e.clear(), this.#
|
|
631
|
+
this.#e.clear(), this.#f();
|
|
632
632
|
for (const e of t)
|
|
633
633
|
this.host.dispatchEvent(new CustomEvent("aui:noodle-disconnect", {
|
|
634
634
|
bubbles: !0,
|
|
@@ -649,19 +649,19 @@ class ge {
|
|
|
649
649
|
fromPort: e.fromPort ?? "right",
|
|
650
650
|
toPort: e.toPort ?? "left"
|
|
651
651
|
});
|
|
652
|
-
this.#
|
|
652
|
+
this.#f();
|
|
653
653
|
}
|
|
654
654
|
/** Force re-render all paths and rebuild port indicators.
|
|
655
655
|
* Call after programmatic element moves or when the set of port elements changes. */
|
|
656
656
|
update() {
|
|
657
|
-
this.#
|
|
657
|
+
this.#f(), this.showPorts && !this.#l && this.#S();
|
|
658
658
|
}
|
|
659
659
|
// ── SVG overlay ──
|
|
660
660
|
#b() {
|
|
661
661
|
const t = document.createElementNS(M, "svg");
|
|
662
662
|
t.setAttribute("data-noodle-svg", ""), t.style.cssText = "position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:0;", this.#s = document.createElementNS(M, "g"), this.#s.setAttribute("data-noodle-hits", ""), t.appendChild(this.#s), this.#a = document.createElementNS(M, "g"), this.#a.setAttribute("data-noodle-paths", ""), t.appendChild(this.#a), this.host.appendChild(t), this.#t = t;
|
|
663
663
|
}
|
|
664
|
-
#
|
|
664
|
+
#y() {
|
|
665
665
|
this.#t?.remove(), this.#t = null, this.#a = null, this.#s = null;
|
|
666
666
|
}
|
|
667
667
|
#w() {
|
|
@@ -675,7 +675,7 @@ class ge {
|
|
|
675
675
|
// ── Coordinate helpers ──
|
|
676
676
|
/** Convert client (screen) coordinates to the host's layout coordinate space,
|
|
677
677
|
* accounting for CSS transforms (zoom/pan) on the host or its ancestors. */
|
|
678
|
-
#
|
|
678
|
+
#A(t, e) {
|
|
679
679
|
const i = this.host.getBoundingClientRect(), s = i.width / (this.host.clientWidth || 1), a = i.height / (this.host.clientHeight || 1);
|
|
680
680
|
return {
|
|
681
681
|
x: (t - i.left) / s,
|
|
@@ -683,29 +683,29 @@ class ge {
|
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
// ── Path computation ──
|
|
686
|
-
#
|
|
686
|
+
#c(t, e) {
|
|
687
687
|
const i = this.host.querySelector(`#${CSS.escape(t)}`);
|
|
688
688
|
if (!i) return null;
|
|
689
|
-
let s = 0, a = 0,
|
|
690
|
-
for (;
|
|
691
|
-
s +=
|
|
692
|
-
const
|
|
693
|
-
if (
|
|
694
|
-
const
|
|
695
|
-
|
|
689
|
+
let s = 0, a = 0, o = i;
|
|
690
|
+
for (; o && o !== this.host; ) {
|
|
691
|
+
s += o.offsetLeft, a += o.offsetTop;
|
|
692
|
+
const c = o.style.translate;
|
|
693
|
+
if (c) {
|
|
694
|
+
const p = c.match(/-?[\d.]+/g);
|
|
695
|
+
p && (s += parseFloat(p[0]) || 0, a += parseFloat(p[1]) || 0);
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
o = o.offsetParent;
|
|
698
698
|
}
|
|
699
|
-
const r = i.offsetWidth,
|
|
699
|
+
const r = i.offsetWidth, h = i.offsetHeight;
|
|
700
700
|
switch (e) {
|
|
701
701
|
case "top":
|
|
702
702
|
return { x: s + r / 2, y: a };
|
|
703
703
|
case "right":
|
|
704
|
-
return { x: s + r, y: a +
|
|
704
|
+
return { x: s + r, y: a + h / 2 };
|
|
705
705
|
case "bottom":
|
|
706
|
-
return { x: s + r / 2, y: a +
|
|
706
|
+
return { x: s + r / 2, y: a + h };
|
|
707
707
|
case "left":
|
|
708
|
-
return { x: s, y: a +
|
|
708
|
+
return { x: s, y: a + h / 2 };
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
#g(t, e, i, s) {
|
|
@@ -721,7 +721,7 @@ class ge {
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
#k(t) {
|
|
724
|
-
const e = this.#
|
|
724
|
+
const e = this.#c(t.from, t.fromPort), i = this.#c(t.to, t.toPort);
|
|
725
725
|
if (!e || !i) return null;
|
|
726
726
|
switch (this.style) {
|
|
727
727
|
case "straight":
|
|
@@ -732,13 +732,13 @@ class ge {
|
|
|
732
732
|
}
|
|
733
733
|
case "bezier":
|
|
734
734
|
default: {
|
|
735
|
-
const s = Math.max(Math.abs(i.x - e.x), Math.abs(i.y - e.y)), a = Math.max(50, s * this.tension), [
|
|
736
|
-
return `M ${e.x} ${e.y} C ${
|
|
735
|
+
const s = Math.max(Math.abs(i.x - e.x), Math.abs(i.y - e.y)), a = Math.max(50, s * this.tension), [o, r] = this.#g(e.x, e.y, t.fromPort, a), [h, c] = this.#g(i.x, i.y, t.toPort, a);
|
|
736
|
+
return `M ${e.x} ${e.y} C ${o} ${r}, ${h} ${c}, ${i.x} ${i.y}`;
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
// ── Rendering ──
|
|
741
|
-
#
|
|
741
|
+
#f() {
|
|
742
742
|
if (!(!this.#a || !this.#s)) {
|
|
743
743
|
this.#o = !0, this.#a.textContent = "", this.#s.textContent = "", this.#i && this.#a.appendChild(this.#i);
|
|
744
744
|
for (const t of this.#e.values()) {
|
|
@@ -751,20 +751,20 @@ class ge {
|
|
|
751
751
|
const i = document.createElementNS(M, "path");
|
|
752
752
|
i.setAttribute("d", e), i.setAttribute("fill", "none"), i.setAttribute("stroke-linecap", "round"), this.disabled ? (i.setAttribute("stroke", "var(--aui-ink-muted)"), i.setAttribute("stroke-width", String(this.strokeWidth)), i.setAttribute("stroke-dasharray", "6 4"), i.style.opacity = "0.6") : (i.setAttribute("stroke", t.color ?? this.color), i.setAttribute("stroke-width", String(this.strokeWidth)), this.animated && (i.setAttribute("stroke-dasharray", "8 4"), i.style.animation = "noodle-flow 0.6s linear infinite")), this.#a.appendChild(i);
|
|
753
753
|
}
|
|
754
|
-
this.#
|
|
754
|
+
this.#l || queueMicrotask(() => {
|
|
755
755
|
this.#o = !1;
|
|
756
756
|
});
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
#
|
|
760
|
-
this.#
|
|
761
|
-
this.#
|
|
759
|
+
#C() {
|
|
760
|
+
this.#h || (this.#h = !0, this.#r = requestAnimationFrame(() => {
|
|
761
|
+
this.#h = !1, this.#f(), this.showPorts && this.#D();
|
|
762
762
|
}));
|
|
763
763
|
}
|
|
764
764
|
/** Full update: recreate port indicators (for child list changes). */
|
|
765
|
-
#
|
|
766
|
-
this.#
|
|
767
|
-
this.#
|
|
765
|
+
#E() {
|
|
766
|
+
this.#h || (this.#h = !0, this.#r = requestAnimationFrame(() => {
|
|
767
|
+
this.#h = !1, this.#f(), this.showPorts && !this.#l && this.#S();
|
|
768
768
|
}));
|
|
769
769
|
}
|
|
770
770
|
// ── Port indicators (edit mode) ──
|
|
@@ -775,24 +775,24 @@ class ge {
|
|
|
775
775
|
const i = (e.getAttribute("data-noodle-port") ?? "").split(/\s+/).filter(Boolean), s = e.id;
|
|
776
776
|
if (s)
|
|
777
777
|
for (const a of i) {
|
|
778
|
-
const
|
|
779
|
-
|
|
778
|
+
const o = document.createElement("div");
|
|
779
|
+
o.setAttribute("data-noodle-port-indicator", ""), o.setAttribute("data-noodle-side", a), o.setAttribute("data-noodle-target", s), o.style.cssText = `position:absolute;width:${this.portSize}px;height:${this.portSize}px;border-radius:50%;background:${this.color};border:2px solid white;pointer-events:auto;cursor:crosshair;z-index:5;touch-action:none;transform:translate(-50%,-50%);transition:transform 150ms ease,box-shadow 150ms ease;box-shadow:0 1px 3px rgba(0,0,0,0.2);`, o.addEventListener("pointerdown", this.#I), this.host.appendChild(o), this.#u.push(o);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
this.#D(), this.#
|
|
782
|
+
this.#D(), this.#l || queueMicrotask(() => {
|
|
783
783
|
this.#o = !1;
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
#D() {
|
|
787
|
-
for (const t of this.#
|
|
788
|
-
const e = t.getAttribute("data-noodle-target"), i = t.getAttribute("data-noodle-side"), s = this.#
|
|
787
|
+
for (const t of this.#u) {
|
|
788
|
+
const e = t.getAttribute("data-noodle-target"), i = t.getAttribute("data-noodle-side"), s = this.#c(e, i);
|
|
789
789
|
s && (t.style.left = `${s.x}px`, t.style.top = `${s.y}px`);
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
#T() {
|
|
793
|
-
for (const t of this.#
|
|
793
|
+
for (const t of this.#u)
|
|
794
794
|
t.removeEventListener("pointerdown", this.#I), t.remove();
|
|
795
|
-
this.#
|
|
795
|
+
this.#u = [];
|
|
796
796
|
}
|
|
797
797
|
// ── Edit mode: drag-to-connect ──
|
|
798
798
|
#I = (t) => {
|
|
@@ -802,17 +802,17 @@ class ge {
|
|
|
802
802
|
t.preventDefault(), t.stopPropagation();
|
|
803
803
|
const i = e.getAttribute("data-noodle-target"), s = e.getAttribute("data-noodle-side"), a = this.host.querySelector(`#${CSS.escape(i)}`);
|
|
804
804
|
if (a) {
|
|
805
|
-
this.#
|
|
805
|
+
this.#l = {
|
|
806
806
|
fromElement: a,
|
|
807
807
|
fromPort: s,
|
|
808
808
|
fromId: i,
|
|
809
809
|
pointerId: t.pointerId,
|
|
810
810
|
sourceDot: e
|
|
811
811
|
}, e.setAttribute("data-noodle-dragging", "");
|
|
812
|
-
for (const
|
|
813
|
-
if (
|
|
814
|
-
const r =
|
|
815
|
-
r === i &&
|
|
812
|
+
for (const o of this.#u) {
|
|
813
|
+
if (o === e) continue;
|
|
814
|
+
const r = o.getAttribute("data-noodle-target"), h = o.getAttribute("data-noodle-side");
|
|
815
|
+
r === i && h === s || o.setAttribute("data-noodle-droppable", "");
|
|
816
816
|
}
|
|
817
817
|
this.#o = !0, this.#i = document.createElementNS(M, "path"), this.#i.setAttribute("stroke", "var(--aui-ink-muted)"), this.#i.setAttribute("stroke-width", String(this.strokeWidth)), this.#i.setAttribute("fill", "none"), this.#i.setAttribute("stroke-dasharray", "6 4"), this.#i.setAttribute("stroke-linecap", "round"), this.#i.style.opacity = "0.7", this.#a?.appendChild(this.#i), this.host.dispatchEvent(new CustomEvent("aui:noodle-drag", {
|
|
818
818
|
bubbles: !0,
|
|
@@ -822,15 +822,15 @@ class ge {
|
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
#P = (t) => {
|
|
825
|
-
const e = this.#
|
|
825
|
+
const e = this.#l;
|
|
826
826
|
if (!e || !this.#i) return;
|
|
827
|
-
const i = this.#
|
|
827
|
+
const i = this.#c(e.fromId, e.fromPort);
|
|
828
828
|
if (!i) return;
|
|
829
|
-
const { x: s, y: a } = this.#
|
|
830
|
-
this.#i.setAttribute("d",
|
|
829
|
+
const { x: s, y: a } = this.#A(t.clientX, t.clientY), o = Math.max(Math.abs(s - i.x), Math.abs(a - i.y)), r = Math.max(50, o * this.tension), [h, c] = this.#g(i.x, i.y, e.fromPort, r), p = `M ${i.x} ${i.y} C ${h} ${c}, ${s} ${a}, ${s} ${a}`;
|
|
830
|
+
this.#i.setAttribute("d", p), this.#Y(t.clientX, t.clientY);
|
|
831
831
|
};
|
|
832
832
|
#$ = (t) => {
|
|
833
|
-
const e = this.#
|
|
833
|
+
const e = this.#l;
|
|
834
834
|
if (!e) return;
|
|
835
835
|
const i = this.#N(t.clientX, t.clientY);
|
|
836
836
|
if (i) {
|
|
@@ -843,32 +843,32 @@ class ge {
|
|
|
843
843
|
this.#M();
|
|
844
844
|
};
|
|
845
845
|
#M() {
|
|
846
|
-
for (const t of this.#
|
|
846
|
+
for (const t of this.#u)
|
|
847
847
|
t.removeAttribute("data-noodle-dragging"), t.removeAttribute("data-noodle-droppable"), t.removeAttribute("data-noodle-drop-ready");
|
|
848
|
-
this.#i?.remove(), this.#i = null, this.#
|
|
848
|
+
this.#i?.remove(), this.#i = null, this.#l = null, document.removeEventListener("pointermove", this.#P), document.removeEventListener("pointerup", this.#$), document.removeEventListener("pointercancel", this.#L), this.#o = !1;
|
|
849
849
|
}
|
|
850
850
|
// ── Proximity helpers ──
|
|
851
851
|
/** Find the nearest droppable port within DROP_SNAP_RADIUS of a screen point. */
|
|
852
852
|
#N(t, e) {
|
|
853
|
-
let i = null, s =
|
|
854
|
-
for (const a of this.#
|
|
853
|
+
let i = null, s = Oe;
|
|
854
|
+
for (const a of this.#u) {
|
|
855
855
|
if (!a.hasAttribute("data-noodle-droppable")) continue;
|
|
856
|
-
const
|
|
857
|
-
|
|
856
|
+
const o = a.getBoundingClientRect(), r = o.left + o.width / 2, h = o.top + o.height / 2, c = Math.hypot(t - r, e - h);
|
|
857
|
+
c < s && (s = c, i = a);
|
|
858
858
|
}
|
|
859
859
|
return i;
|
|
860
860
|
}
|
|
861
861
|
/** Toggle data-noodle-drop-ready on the nearest droppable port and update drag path color. */
|
|
862
862
|
#Y(t, e) {
|
|
863
863
|
const i = this.#N(t, e);
|
|
864
|
-
for (const s of this.#
|
|
864
|
+
for (const s of this.#u)
|
|
865
865
|
s === i ? s.setAttribute("data-noodle-drop-ready", "") : s.removeAttribute("data-noodle-drop-ready");
|
|
866
|
-
if (i && this.#i && this.#
|
|
866
|
+
if (i && this.#i && this.#l) {
|
|
867
867
|
this.#i.setAttribute("stroke", this.color), this.#i.style.opacity = "1", this.#i.removeAttribute("stroke-dasharray");
|
|
868
|
-
const s = i.getAttribute("data-noodle-target"), a = i.getAttribute("data-noodle-side"),
|
|
869
|
-
if (r &&
|
|
870
|
-
const
|
|
871
|
-
this.#i.setAttribute("d", `M ${r.x} ${r.y} C ${
|
|
868
|
+
const s = i.getAttribute("data-noodle-target"), a = i.getAttribute("data-noodle-side"), o = this.#c(s, a), r = this.#c(this.#l.fromId, this.#l.fromPort);
|
|
869
|
+
if (r && o) {
|
|
870
|
+
const h = Math.max(Math.abs(o.x - r.x), Math.abs(o.y - r.y)), c = Math.max(50, h * this.tension), [p, l] = this.#g(r.x, r.y, this.#l.fromPort, c), [u, v] = this.#g(o.x, o.y, a, c);
|
|
871
|
+
this.#i.setAttribute("d", `M ${r.x} ${r.y} C ${p} ${l}, ${u} ${v}, ${o.x} ${o.y}`);
|
|
872
872
|
}
|
|
873
873
|
} else this.#i && (this.#i.setAttribute("stroke", "var(--aui-ink-muted)"), this.#i.style.opacity = "0.7", this.#i.setAttribute("stroke-dasharray", "6 4"));
|
|
874
874
|
}
|
|
@@ -880,70 +880,70 @@ class ge {
|
|
|
880
880
|
const s = this.#e.get(i);
|
|
881
881
|
if (!s) return;
|
|
882
882
|
t.preventDefault(), t.stopPropagation(), this.#o = !0;
|
|
883
|
-
const a = this.#
|
|
884
|
-
if (!a || !
|
|
883
|
+
const a = this.#c(s.from, s.fromPort), o = this.#c(s.to, s.toPort);
|
|
884
|
+
if (!a || !o) {
|
|
885
885
|
this.#o = !1;
|
|
886
886
|
return;
|
|
887
887
|
}
|
|
888
|
-
const { x: r, y:
|
|
888
|
+
const { x: r, y: h } = this.#A(t.clientX, t.clientY), c = Math.hypot(r - a.x, h - a.y), p = Math.hypot(r - o.x, h - o.y), l = c < p ? s.to : s.from, u = c < p ? s.toPort : s.fromPort;
|
|
889
889
|
this.disconnect(i);
|
|
890
|
-
const v = this.#
|
|
891
|
-
(b) => b.getAttribute("data-noodle-target") ===
|
|
890
|
+
const v = this.#u.find(
|
|
891
|
+
(b) => b.getAttribute("data-noodle-target") === l && b.getAttribute("data-noodle-side") === u
|
|
892
892
|
);
|
|
893
893
|
if (!v) {
|
|
894
894
|
this.#o = !1;
|
|
895
895
|
return;
|
|
896
896
|
}
|
|
897
|
-
const d = this.host.querySelector(`#${CSS.escape(
|
|
897
|
+
const d = this.host.querySelector(`#${CSS.escape(l)}`);
|
|
898
898
|
if (!d) {
|
|
899
899
|
this.#o = !1;
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
this.#
|
|
902
|
+
this.#l = {
|
|
903
903
|
fromElement: d,
|
|
904
|
-
fromPort:
|
|
905
|
-
fromId:
|
|
904
|
+
fromPort: u,
|
|
905
|
+
fromId: l,
|
|
906
906
|
pointerId: t.pointerId,
|
|
907
907
|
sourceDot: v,
|
|
908
908
|
reconnectId: i
|
|
909
909
|
}, v.setAttribute("data-noodle-dragging", "");
|
|
910
|
-
for (const b of this.#
|
|
910
|
+
for (const b of this.#u) {
|
|
911
911
|
if (b === v) continue;
|
|
912
|
-
const
|
|
913
|
-
|
|
912
|
+
const y = b.getAttribute("data-noodle-target"), P = b.getAttribute("data-noodle-side");
|
|
913
|
+
y === l && P === u || b.setAttribute("data-noodle-droppable", "");
|
|
914
914
|
}
|
|
915
915
|
this.#i = document.createElementNS(M, "path"), this.#i.setAttribute("stroke", "var(--aui-ink-muted)"), this.#i.setAttribute("stroke-width", String(this.strokeWidth)), this.#i.setAttribute("fill", "none"), this.#i.setAttribute("stroke-dasharray", "6 4"), this.#i.setAttribute("stroke-linecap", "round"), this.#i.style.opacity = "0.7";
|
|
916
|
-
const
|
|
917
|
-
if (
|
|
918
|
-
const b = Math.max(Math.abs(g -
|
|
919
|
-
this.#i.setAttribute("d", `M ${
|
|
916
|
+
const f = this.#c(l, u), { x: g, y: C } = this.#A(t.clientX, t.clientY);
|
|
917
|
+
if (f) {
|
|
918
|
+
const b = Math.max(Math.abs(g - f.x), Math.abs(C - f.y)), y = Math.max(50, b * this.tension), [P, E] = this.#g(f.x, f.y, u, y);
|
|
919
|
+
this.#i.setAttribute("d", `M ${f.x} ${f.y} C ${P} ${E}, ${g} ${C}, ${g} ${C}`);
|
|
920
920
|
}
|
|
921
921
|
this.#a?.appendChild(this.#i), this.host.dispatchEvent(new CustomEvent("aui:noodle-drag", {
|
|
922
922
|
bubbles: !0,
|
|
923
923
|
composed: !0,
|
|
924
|
-
detail: { from:
|
|
924
|
+
detail: { from: l, fromPort: u, x: t.clientX, y: t.clientY, reconnect: !0 }
|
|
925
925
|
})), document.addEventListener("pointermove", this.#P), document.addEventListener("pointerup", this.#$), document.addEventListener("pointercancel", this.#L);
|
|
926
926
|
};
|
|
927
927
|
// ── Movement tracking ──
|
|
928
928
|
#x = () => {
|
|
929
|
-
this.#
|
|
929
|
+
this.#C();
|
|
930
930
|
};
|
|
931
931
|
#R() {
|
|
932
|
-
this.#m = new ResizeObserver(() => this.#
|
|
932
|
+
this.#m = new ResizeObserver(() => this.#C()), this.#m.observe(this.host), this.#p = new MutationObserver((t) => {
|
|
933
933
|
if (this.#o) return;
|
|
934
|
-
t.some((i) => i.type === "childList") ? this.#
|
|
935
|
-
}), this.#
|
|
934
|
+
t.some((i) => i.type === "childList") ? this.#E() : this.#C();
|
|
935
|
+
}), this.#p.observe(this.host, {
|
|
936
936
|
childList: !0,
|
|
937
937
|
subtree: !0,
|
|
938
938
|
attributes: !0,
|
|
939
939
|
attributeFilter: ["style", "class", "translate", "data-noodle-port"]
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
|
-
#
|
|
943
|
-
this.#m?.disconnect(), this.#m = null, this.#
|
|
942
|
+
#F() {
|
|
943
|
+
this.#m?.disconnect(), this.#m = null, this.#p?.disconnect(), this.#p = null;
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
|
-
class
|
|
946
|
+
class Xe extends T {
|
|
947
947
|
static attributes = {
|
|
948
948
|
editable: { type: "boolean", default: !1 },
|
|
949
949
|
color: { type: "string", default: "" },
|
|
@@ -983,7 +983,7 @@ class ve extends T {
|
|
|
983
983
|
}
|
|
984
984
|
// ── Lifecycle ──
|
|
985
985
|
activate() {
|
|
986
|
-
this.#n = new
|
|
986
|
+
this.#n = new We(this, this.#t());
|
|
987
987
|
}
|
|
988
988
|
dispose() {
|
|
989
989
|
this.#n?.destroy(), this.#n = null;
|
|
@@ -1013,8 +1013,8 @@ class ve extends T {
|
|
|
1013
1013
|
const r = Number(a);
|
|
1014
1014
|
isNaN(r) || (t.portSize = r);
|
|
1015
1015
|
}
|
|
1016
|
-
const
|
|
1017
|
-
return (
|
|
1016
|
+
const o = this.getAttribute("curve");
|
|
1017
|
+
return (o === "bezier" || o === "step" || o === "straight") && (t.style = o), t;
|
|
1018
1018
|
}
|
|
1019
1019
|
#e(t, e) {
|
|
1020
1020
|
const i = this.#n;
|
|
@@ -1055,11 +1055,11 @@ class ve extends T {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
const
|
|
1058
|
+
const Be = '<svg width="20" height="20" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M92.2671 346.112C88.1711 262.144 202.347 250.88 288.875 237.568C288.363 202.752 290.923 133.12 221.291 133.12C206.955 133.12 197.227 134.144 186.987 137.216L189.547 147.968C228.459 148.992 238.187 173.056 237.163 193.024C235.115 229.888 196.715 242.688 169.579 242.688C141.419 242.688 104.555 227.328 106.091 186.88C107.627 143.872 163.435 112.64 250.987 112.64C348.779 112.64 403.563 139.776 403.563 244.736V351.744C403.563 369.152 407.659 375.296 417.387 375.296C422.507 375.296 427.627 369.664 431.723 361.984L444.523 369.152C423.019 401.408 391.275 415.744 362.603 415.744C302.699 415.744 279.147 377.856 308.331 313.856L296.043 309.76C277.611 386.048 232.555 415.744 180.331 415.744C135.787 415.744 94.3151 391.68 92.2671 346.112ZM202.859 327.168C208.491 348.672 227.435 357.888 245.355 351.232C267.883 343.04 285.291 311.808 288.363 265.216L288.875 257.536C232.555 267.776 191.083 283.136 202.859 327.168Z" fill="currentColor"/></svg>';
|
|
1059
1059
|
function k(m) {
|
|
1060
1060
|
return m.split("-").map((t) => t[0].toUpperCase() + t.slice(1)).join(" ");
|
|
1061
1061
|
}
|
|
1062
|
-
class
|
|
1062
|
+
class Ke extends T {
|
|
1063
1063
|
static attributes = {
|
|
1064
1064
|
src: { type: "string", default: "./preview.json" }
|
|
1065
1065
|
};
|
|
@@ -1070,12 +1070,12 @@ class Ae extends T {
|
|
|
1070
1070
|
#a = null;
|
|
1071
1071
|
#s = null;
|
|
1072
1072
|
activate() {
|
|
1073
|
-
this.#
|
|
1073
|
+
this.#u();
|
|
1074
1074
|
}
|
|
1075
1075
|
dispose() {
|
|
1076
|
-
document.removeEventListener("keydown", this.#
|
|
1076
|
+
document.removeEventListener("keydown", this.#p);
|
|
1077
1077
|
}
|
|
1078
|
-
async #
|
|
1078
|
+
async #u() {
|
|
1079
1079
|
let t;
|
|
1080
1080
|
try {
|
|
1081
1081
|
t = await (await fetch(this.src)).json();
|
|
@@ -1083,98 +1083,98 @@ class Ae extends T {
|
|
|
1083
1083
|
this.textContent = "Failed to load preview.json";
|
|
1084
1084
|
return;
|
|
1085
1085
|
}
|
|
1086
|
-
const { section: e, param: i, items: s, links: a } = t, r = new URL(this.src, window.location.href).href.replace(/preview\.json$/, ""),
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1086
|
+
const { section: e, param: i, items: s, links: a } = t, r = new URL(this.src, window.location.href).href.replace(/preview\.json$/, ""), c = new URLSearchParams(location.search).get(i), p = document.createElement("div");
|
|
1087
|
+
p.setAttribute("data-role", "navbar");
|
|
1088
|
+
const l = document.createElement("aui-select");
|
|
1089
|
+
l.setAttribute("mode", "bar"), l.setAttribute("width", "full");
|
|
1090
|
+
const u = document.createElement("aui-option");
|
|
1091
|
+
u.setAttribute("value", ""), u.setAttribute("overflow-pin", ""), u.setAttribute("data-preview-logo", ""), u.dataset.href = window.location.pathname, u.innerHTML = `${Be} AgentUI`, l.appendChild(u);
|
|
1092
1092
|
const v = "aui-preview-scheme", d = localStorage.getItem(v);
|
|
1093
1093
|
d && (document.documentElement.dataset.theme = d, document.documentElement.style.colorScheme = d);
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
const g = document.createElement("aui-icon"),
|
|
1097
|
-
g.setAttribute("name",
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1094
|
+
const f = document.createElement("aui-button");
|
|
1095
|
+
f.setAttribute("ghost", ""), f.setAttribute("size", "sm"), f.setAttribute("hide-label", ""), f.setAttribute("label", "Toggle color scheme");
|
|
1096
|
+
const g = document.createElement("aui-icon"), C = document.documentElement.dataset.theme === "dark";
|
|
1097
|
+
g.setAttribute("name", C ? "sun" : "moon"), f.appendChild(g), l.appendChild(f), f.addEventListener("click", () => {
|
|
1098
|
+
const A = document.documentElement, x = A.dataset.theme === "dark", w = x ? "light" : "dark";
|
|
1099
|
+
A.dataset.theme = w, A.style.colorScheme = w, localStorage.setItem(v, w), g.setAttribute("name", x ? "moon" : "sun");
|
|
1100
1100
|
});
|
|
1101
1101
|
const b = document.createElement("aui-select");
|
|
1102
1102
|
if (b.setAttribute("placeholder", k(e)), b.setAttribute("outline", ""), b.setAttribute("data-role", "page-select"), a.length) {
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1103
|
+
const A = document.createElement("aui-optgroup");
|
|
1104
|
+
A.setAttribute("label", "Sections");
|
|
1105
1105
|
for (const x of a) {
|
|
1106
1106
|
const w = document.createElement("aui-option");
|
|
1107
|
-
w.setAttribute("value", `go-${x.label.toLowerCase()}`), w.dataset.href = x.href, w.textContent = x.label,
|
|
1107
|
+
w.setAttribute("value", `go-${x.label.toLowerCase()}`), w.dataset.href = x.href, w.textContent = x.label, A.appendChild(w);
|
|
1108
1108
|
}
|
|
1109
|
-
b.appendChild(
|
|
1109
|
+
b.appendChild(A);
|
|
1110
1110
|
}
|
|
1111
|
-
let
|
|
1112
|
-
for (const
|
|
1113
|
-
const x =
|
|
1114
|
-
x !== P && (
|
|
1111
|
+
let y = null, P = "";
|
|
1112
|
+
for (const A of s) {
|
|
1113
|
+
const x = A.group || k(e);
|
|
1114
|
+
x !== P && (y = document.createElement("aui-optgroup"), y.setAttribute("label", x), b.appendChild(y), P = x);
|
|
1115
1115
|
const w = document.createElement("aui-option");
|
|
1116
|
-
w.setAttribute("value",
|
|
1116
|
+
w.setAttribute("value", A.slug), A.file && (w.dataset.file = A.file), A.slug === c && w.setAttribute("selected", ""), w.textContent = A.name || k(A.slug), y.appendChild(w);
|
|
1117
1117
|
}
|
|
1118
|
-
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1118
|
+
c && b.setAttribute("value", c), l.appendChild(b), p.appendChild(l), this.appendChild(p);
|
|
1119
|
+
const E = document.createElement("aui-editor");
|
|
1120
|
+
E.setAttribute("data-role", "canvas"), E.setAttribute("background", "dots");
|
|
1121
1121
|
const D = document.createElement("aui-editor-layer");
|
|
1122
1122
|
D.setAttribute("name", "content");
|
|
1123
1123
|
const R = document.createElement("div");
|
|
1124
|
-
if (R.setAttribute("data-role", "content"), D.appendChild(R),
|
|
1125
|
-
const w =
|
|
1124
|
+
if (R.setAttribute("data-role", "content"), D.appendChild(R), E.appendChild(D), this.appendChild(E), this.#n = E, this.#t = R, l.addEventListener("click", (A) => {
|
|
1125
|
+
const w = A.target.closest("aui-option")?.dataset?.href;
|
|
1126
1126
|
w && (window.location.href = w);
|
|
1127
|
-
}), b.addEventListener("change", (
|
|
1128
|
-
const x =
|
|
1127
|
+
}), b.addEventListener("change", (A) => {
|
|
1128
|
+
const x = A.target.value, G = b.querySelector(`aui-option[value="${x}"]`)?.dataset?.href;
|
|
1129
1129
|
if (G) {
|
|
1130
1130
|
window.location.href = G;
|
|
1131
1131
|
return;
|
|
1132
1132
|
}
|
|
1133
1133
|
const U = new URL(window.location.href);
|
|
1134
1134
|
U.searchParams.set(i, x), window.location.href = U.toString();
|
|
1135
|
-
}),
|
|
1136
|
-
const x = s.find((w) => w.slug ===
|
|
1137
|
-
document.title = `${k(
|
|
1135
|
+
}), c) {
|
|
1136
|
+
const x = s.find((w) => w.slug === c)?.file || `${c}/${c}.html`;
|
|
1137
|
+
document.title = `${k(c)} — AgentUI ${k(e)}`, await this.#h(x, r);
|
|
1138
1138
|
} else
|
|
1139
1139
|
document.title = `AgentUI — ${k(e)}`, await this.#o(s, r);
|
|
1140
|
-
this.#e = t, this.#a =
|
|
1140
|
+
this.#e = t, this.#a = c, this.#l(t, i), document.addEventListener("keydown", this.#p), requestAnimationFrame(() => this.#d());
|
|
1141
1141
|
}
|
|
1142
1142
|
// ── Command palette ──
|
|
1143
|
-
#
|
|
1143
|
+
#l(t, e) {
|
|
1144
1144
|
const i = document.createElement("aui-dialog");
|
|
1145
1145
|
i.setAttribute("size", "sm");
|
|
1146
1146
|
const s = document.createElement("aui-command");
|
|
1147
1147
|
s.setAttribute("max-width", "full");
|
|
1148
1148
|
const a = document.createElement("aui-command-input");
|
|
1149
1149
|
a.setAttribute("placeholder", `Go to ${k(t.section)}…`), s.appendChild(a);
|
|
1150
|
-
const
|
|
1150
|
+
const o = document.createElement("aui-command-list");
|
|
1151
1151
|
if (t.links.length) {
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1154
|
-
for (const
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1152
|
+
const p = document.createElement("aui-command-group");
|
|
1153
|
+
p.setAttribute("label", "Sections");
|
|
1154
|
+
for (const l of t.links) {
|
|
1155
|
+
const u = document.createElement("aui-command-item");
|
|
1156
|
+
u.setAttribute("value", `section:${l.label}`), u.dataset.href = l.href, u.textContent = l.label, p.appendChild(u);
|
|
1157
1157
|
}
|
|
1158
|
-
|
|
1158
|
+
o.appendChild(p);
|
|
1159
1159
|
}
|
|
1160
|
-
let r = null,
|
|
1161
|
-
for (const
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1160
|
+
let r = null, h = "";
|
|
1161
|
+
for (const p of t.items) {
|
|
1162
|
+
const l = p.group || k(t.section);
|
|
1163
|
+
l !== h && (r = document.createElement("aui-command-group"), r.setAttribute("label", l), o.appendChild(r), h = l);
|
|
1164
|
+
const u = document.createElement("aui-command-item");
|
|
1165
|
+
u.setAttribute("value", p.slug), p.summary && u.setAttribute("keywords", p.summary), u.textContent = p.name || k(p.slug), r.appendChild(u);
|
|
1166
1166
|
}
|
|
1167
|
-
s.appendChild(
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
const { value:
|
|
1167
|
+
s.appendChild(o);
|
|
1168
|
+
const c = document.createElement("aui-command-empty");
|
|
1169
|
+
c.textContent = "No results.", s.appendChild(c), s.addEventListener("select", (p) => {
|
|
1170
|
+
const { value: l } = p.detail, v = s.querySelector(`aui-command-item[value="${CSS.escape(l)}"]`)?.dataset?.href;
|
|
1171
1171
|
if (v) {
|
|
1172
1172
|
window.location.href = v;
|
|
1173
1173
|
return;
|
|
1174
1174
|
}
|
|
1175
|
-
if (
|
|
1175
|
+
if (l.startsWith("section:")) return;
|
|
1176
1176
|
const d = new URL(window.location.href);
|
|
1177
|
-
d.searchParams.set(e,
|
|
1177
|
+
d.searchParams.set(e, l), window.location.href = d.toString();
|
|
1178
1178
|
}), s.addEventListener("dismiss", () => this.#m()), i.addEventListener("close", () => {
|
|
1179
1179
|
this.#s?.removeAttribute("open");
|
|
1180
1180
|
}), i.appendChild(s), this.appendChild(i), this.#s = i;
|
|
@@ -1190,7 +1190,7 @@ class Ae extends T {
|
|
|
1190
1190
|
this.#s?.removeAttribute("open");
|
|
1191
1191
|
}
|
|
1192
1192
|
// ── Keyboard navigation ──
|
|
1193
|
-
#
|
|
1193
|
+
#p = (t) => {
|
|
1194
1194
|
if ((t.metaKey || t.ctrlKey) && t.key === "k") {
|
|
1195
1195
|
t.preventDefault(), this.#s?.hasAttribute("open") ? this.#m() : this.#i();
|
|
1196
1196
|
return;
|
|
@@ -1206,15 +1206,15 @@ class Ae extends T {
|
|
|
1206
1206
|
if (!this.#e) return;
|
|
1207
1207
|
const { items: e, param: i } = this.#e;
|
|
1208
1208
|
if (!e.length) return;
|
|
1209
|
-
let a = (this.#a ? e.findIndex((
|
|
1209
|
+
let a = (this.#a ? e.findIndex((h) => h.slug === this.#a) : -1) + t;
|
|
1210
1210
|
a >= e.length && (a = 0), a < 0 && (a = e.length - 1);
|
|
1211
|
-
const
|
|
1212
|
-
if (!
|
|
1211
|
+
const o = e[a];
|
|
1212
|
+
if (!o) return;
|
|
1213
1213
|
const r = new URL(window.location.href);
|
|
1214
|
-
r.searchParams.set(i,
|
|
1214
|
+
r.searchParams.set(i, o.slug), window.location.href = r.toString();
|
|
1215
1215
|
}
|
|
1216
|
-
async #
|
|
1217
|
-
const i = t.split("/")[0], s = `${e}${t}`, a = `${e}${i}/${i}.css`,
|
|
1216
|
+
async #h(t, e) {
|
|
1217
|
+
const i = t.split("/")[0], s = `${e}${t}`, a = `${e}${i}/${i}.css`, o = `${e}${i}/${i}.ts`;
|
|
1218
1218
|
try {
|
|
1219
1219
|
const d = await fetch(s);
|
|
1220
1220
|
d.ok && (this.#t.innerHTML = await d.text());
|
|
@@ -1223,43 +1223,43 @@ class Ae extends T {
|
|
|
1223
1223
|
await new Promise((d) => requestAnimationFrame(() => requestAnimationFrame(d))), await new Promise((d) => requestAnimationFrame(() => requestAnimationFrame(d)));
|
|
1224
1224
|
const r = Array.from(this.#t.children).filter(
|
|
1225
1225
|
(d) => d.nodeType === 1 && d.tagName !== "SCRIPT"
|
|
1226
|
-
),
|
|
1226
|
+
), h = 96, c = 200, p = r.map((d) => ({
|
|
1227
1227
|
el: d,
|
|
1228
1228
|
height: d.offsetHeight,
|
|
1229
1229
|
width: d.offsetWidth
|
|
1230
1230
|
}));
|
|
1231
|
-
let
|
|
1232
|
-
for (const { el: d, height:
|
|
1233
|
-
d.style.position = "absolute", d.style.left = "0px", d.style.top = `${
|
|
1234
|
-
this.#t.style.width = `${
|
|
1231
|
+
let l = c, u = 0;
|
|
1232
|
+
for (const { el: d, height: f, width: g } of p)
|
|
1233
|
+
d.style.position = "absolute", d.style.left = "0px", d.style.top = `${l}px`, d.tagName === "AUI-GRAPH-UI" || d.tagName === "AUI-EDITOR" || (z(d, "drag", { config: { mode: "free", modifier: "alt" } }), z(d, "resize", { config: { modifier: "alt" } })), g > u && (u = g), l += f + h;
|
|
1234
|
+
this.#t.style.width = `${u}px`, this.#t.style.height = `${l}px`;
|
|
1235
1235
|
const v = document.createElement("link");
|
|
1236
1236
|
v.rel = "stylesheet", v.href = a, document.head.appendChild(v);
|
|
1237
1237
|
try {
|
|
1238
1238
|
await import(
|
|
1239
1239
|
/* @vite-ignore */
|
|
1240
|
-
|
|
1240
|
+
o
|
|
1241
1241
|
);
|
|
1242
1242
|
} catch {
|
|
1243
1243
|
}
|
|
1244
1244
|
for (const d of Array.from(this.#t.querySelectorAll("script"))) {
|
|
1245
|
-
const
|
|
1246
|
-
for (const g of d.attributes)
|
|
1247
|
-
|
|
1245
|
+
const f = document.createElement("script");
|
|
1246
|
+
for (const g of d.attributes) f.setAttribute(g.name, g.value);
|
|
1247
|
+
f.textContent = d.textContent, d.replaceWith(f);
|
|
1248
1248
|
}
|
|
1249
1249
|
requestAnimationFrame(() => this.#d());
|
|
1250
1250
|
}
|
|
1251
1251
|
async #o(t, e) {
|
|
1252
|
-
const a = /* @__PURE__ */ new Set(),
|
|
1253
|
-
let r = 200,
|
|
1254
|
-
for (const
|
|
1255
|
-
const
|
|
1252
|
+
const a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
1253
|
+
let r = 200, h = 0;
|
|
1254
|
+
for (const c of t) {
|
|
1255
|
+
const p = c.file || `${c.slug}/${c.slug}.html`, l = p.split("/")[0], u = `${e}${p}`, v = `${e}${l}/${l}.css`, d = `${e}${l}/${l}.ts`;
|
|
1256
1256
|
if (!a.has(v)) {
|
|
1257
1257
|
a.add(v);
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1258
|
+
const y = document.createElement("link");
|
|
1259
|
+
y.rel = "stylesheet", y.href = v, document.head.appendChild(y);
|
|
1260
1260
|
}
|
|
1261
|
-
if (!
|
|
1262
|
-
|
|
1261
|
+
if (!o.has(d)) {
|
|
1262
|
+
o.add(d);
|
|
1263
1263
|
try {
|
|
1264
1264
|
await import(
|
|
1265
1265
|
/* @vite-ignore */
|
|
@@ -1268,20 +1268,20 @@ class Ae extends T {
|
|
|
1268
1268
|
} catch {
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
let
|
|
1271
|
+
let f = "";
|
|
1272
1272
|
try {
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1273
|
+
const y = await fetch(u);
|
|
1274
|
+
y.ok && (f = await y.text());
|
|
1275
1275
|
} catch {
|
|
1276
1276
|
continue;
|
|
1277
1277
|
}
|
|
1278
|
-
if (!
|
|
1278
|
+
if (!f.trim()) continue;
|
|
1279
1279
|
const g = document.createElement("div");
|
|
1280
|
-
g.setAttribute("data-role", "gallery-item"), g.innerHTML = `<h3 style="margin:0 0 1rem;font-family:var(--aui-font-family);font-size:var(--aui-font-lg);font-weight:var(--aui-font-weight-semibold);color:var(--aui-ink-muted);">${
|
|
1281
|
-
const
|
|
1282
|
-
g.style.position = "absolute", g.style.left = "0px", g.style.top = `${r}px`, b >
|
|
1280
|
+
g.setAttribute("data-role", "gallery-item"), g.innerHTML = `<h3 style="margin:0 0 1rem;font-family:var(--aui-font-family);font-size:var(--aui-font-lg);font-weight:var(--aui-font-weight-semibold);color:var(--aui-ink-muted);">${c.name || k(c.slug)}</h3>${f}`, this.#t.appendChild(g), await new Promise((y) => requestAnimationFrame(y));
|
|
1281
|
+
const C = g.offsetHeight, b = g.offsetWidth;
|
|
1282
|
+
g.style.position = "absolute", g.style.left = "0px", g.style.top = `${r}px`, b > h && (h = b), r += C + 96;
|
|
1283
1283
|
}
|
|
1284
|
-
this.#t.style.width = `${
|
|
1284
|
+
this.#t.style.width = `${h}px`, this.#t.style.height = `${r}px`, requestAnimationFrame(() => this.#d());
|
|
1285
1285
|
}
|
|
1286
1286
|
#d() {
|
|
1287
1287
|
const t = this.#n, e = this.#n.clientWidth, i = this.#t.offsetWidth, s = (e - i) / 2;
|
|
@@ -1289,82 +1289,109 @@ class Ae extends T {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
1291
|
et();
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1292
|
+
n("aui-button", lt);
|
|
1293
|
+
n("aui-input", dt);
|
|
1294
|
+
n("aui-checkbox", ct);
|
|
1295
|
+
n("aui-switch", ht);
|
|
1296
|
+
n("aui-radio", mt);
|
|
1297
|
+
n("aui-radio-group", pt);
|
|
1298
|
+
n("aui-textarea", ft);
|
|
1299
|
+
n("aui-container", bt);
|
|
1300
|
+
n("aui-dialog", gt);
|
|
1301
|
+
n("aui-drawer", vt);
|
|
1302
|
+
n("aui-icon", At);
|
|
1303
|
+
n("aui-tooltip", yt);
|
|
1304
|
+
n("aui-range", wt);
|
|
1305
|
+
n("aui-input-otp", xt);
|
|
1306
|
+
n("aui-gripper", Ct);
|
|
1307
|
+
n("aui-option", Et);
|
|
1308
|
+
n("aui-optgroup", kt);
|
|
1309
|
+
n("aui-select", St);
|
|
1310
|
+
n("aui-toast", Pt);
|
|
1311
|
+
n("aui-tabs", $t);
|
|
1312
|
+
n("aui-tab", Lt);
|
|
1313
|
+
n("aui-tab-panel", Mt);
|
|
1314
|
+
n("aui-accordion", Dt);
|
|
1315
|
+
n("aui-accordion-item", Tt);
|
|
1316
|
+
n("aui-breadcrumb", It);
|
|
1317
|
+
n("aui-breadcrumb-item", Nt);
|
|
1318
|
+
n("aui-segmented-control", Yt);
|
|
1319
|
+
n("aui-segment", qt);
|
|
1320
|
+
n("aui-pagination", Rt);
|
|
1321
|
+
n("aui-command", Ft);
|
|
1322
|
+
n("aui-command-input", zt);
|
|
1323
|
+
n("aui-command-list", Gt);
|
|
1324
|
+
n("aui-command-item", Ut);
|
|
1325
|
+
n("aui-command-group", Ht);
|
|
1326
|
+
n("aui-command-empty", Ot);
|
|
1327
|
+
n("aui-panes", Wt);
|
|
1328
|
+
n("aui-pane", Xt);
|
|
1329
|
+
n("aui-table", Bt);
|
|
1330
|
+
n("aui-table-head", Kt);
|
|
1331
|
+
n("aui-table-body", jt);
|
|
1332
|
+
n("aui-table-row", _t);
|
|
1333
|
+
n("aui-table-header", Jt);
|
|
1334
|
+
n("aui-table-cell", Vt);
|
|
1335
|
+
n("aui-table-column", Re);
|
|
1336
|
+
n("aui-tree", Zt);
|
|
1337
|
+
n("aui-tree-item", Qt);
|
|
1338
|
+
n("aui-feed", te);
|
|
1339
|
+
n("aui-root", ee);
|
|
1340
|
+
n("aui-canvas", Fe);
|
|
1341
|
+
n("aui-calendar", Ue);
|
|
1342
|
+
n("aui-calendar-picker", ie);
|
|
1343
|
+
n("aui-calendar-range-picker", se);
|
|
1344
|
+
n("aui-noodles", Xe);
|
|
1345
|
+
n("aui-agent-feed", B);
|
|
1346
|
+
n("aui-agent-thread", K);
|
|
1347
|
+
n("aui-agent-message", j);
|
|
1348
|
+
n("aui-agent-text", _);
|
|
1349
|
+
n("aui-agent-activity", J);
|
|
1350
|
+
n("aui-agent-seeds", V);
|
|
1351
|
+
n("aui-agent-panel", Z);
|
|
1352
|
+
n("aui-agent-input", Q);
|
|
1353
|
+
n("aui-agent-prompt", tt);
|
|
1354
|
+
n("aui-app-shell", ae);
|
|
1355
|
+
n("aui-page", ne);
|
|
1356
|
+
n("aui-page-main", oe);
|
|
1357
|
+
n("aui-page-context", re);
|
|
1358
|
+
n("aui-sidebar", ue);
|
|
1359
|
+
n("aui-sidebar-header", le);
|
|
1360
|
+
n("aui-sidebar-content", de);
|
|
1361
|
+
n("aui-sidebar-footer", ce);
|
|
1362
|
+
n("aui-preview-app", Ke);
|
|
1363
|
+
n("aui-editor", it);
|
|
1364
|
+
n("aui-editor-layer", st);
|
|
1365
|
+
n("aui-graph-ui", at);
|
|
1366
|
+
n("aui-graph-layer", nt);
|
|
1367
|
+
n("aui-graph-node", ot);
|
|
1368
|
+
n("aui-graph-noodle", rt);
|
|
1369
|
+
n("aui-graph-port", ut);
|
|
1370
|
+
n("aui-progress", he);
|
|
1371
|
+
n("aui-code-block", me);
|
|
1372
|
+
n("aui-sparkline", pe);
|
|
1373
|
+
n("aui-chip", fe);
|
|
1374
|
+
n("aui-disclosure", be);
|
|
1375
|
+
n("aui-avatar-group", ge);
|
|
1376
|
+
n("aui-progress-circle", ve);
|
|
1377
|
+
n("aui-disclosure-group", Ae);
|
|
1378
|
+
n("aui-tag-group", ye);
|
|
1379
|
+
n("aui-color-area", we);
|
|
1380
|
+
n("aui-color-slider", xe);
|
|
1381
|
+
n("aui-color-field", Ce);
|
|
1382
|
+
n("aui-time-field", Ee);
|
|
1383
|
+
n("aui-date-field", ke);
|
|
1384
|
+
n("aui-context-menu", Se);
|
|
1385
|
+
n("aui-dropdown-menu", Pe);
|
|
1386
|
+
n("aui-hover-card", $e);
|
|
1387
|
+
n("aui-color-picker", Le);
|
|
1388
|
+
n("aui-file-upload", Me);
|
|
1389
|
+
n("aui-copy-button", De);
|
|
1390
|
+
n("aui-stat", Te);
|
|
1391
|
+
n("aui-image", Ie);
|
|
1392
|
+
n("aui-carousel", Ne);
|
|
1393
|
+
n("aui-notification-center", Ye);
|
|
1394
|
+
n("aui-empty-state", qe);
|
|
1368
1395
|
const q = /* @__PURE__ */ new WeakMap();
|
|
1369
1396
|
function Y(m) {
|
|
1370
1397
|
if (m instanceof T || q.has(m)) return;
|
|
@@ -1372,14 +1399,14 @@ function Y(m) {
|
|
|
1372
1399
|
if (!t) return;
|
|
1373
1400
|
const e = W(t), i = X(e, m.localName), s = [];
|
|
1374
1401
|
for (const { entry: a } of i) {
|
|
1375
|
-
const
|
|
1402
|
+
const o = z(m, a.name, {
|
|
1376
1403
|
config: a.config
|
|
1377
1404
|
});
|
|
1378
|
-
s.push(
|
|
1405
|
+
s.push(o);
|
|
1379
1406
|
}
|
|
1380
1407
|
q.set(m, s);
|
|
1381
1408
|
}
|
|
1382
|
-
function
|
|
1409
|
+
function F(m) {
|
|
1383
1410
|
const t = q.get(m);
|
|
1384
1411
|
if (t) {
|
|
1385
1412
|
for (const e of t) e();
|
|
@@ -1402,14 +1429,14 @@ function O() {
|
|
|
1402
1429
|
for (const i of e.removedNodes) {
|
|
1403
1430
|
if (i.nodeType !== 1) continue;
|
|
1404
1431
|
const s = i;
|
|
1405
|
-
|
|
1432
|
+
F(s);
|
|
1406
1433
|
for (const a of s.querySelectorAll("[traits]"))
|
|
1407
|
-
|
|
1434
|
+
F(a);
|
|
1408
1435
|
}
|
|
1409
1436
|
}
|
|
1410
1437
|
if (e.type === "attributes" && e.attributeName === "traits") {
|
|
1411
1438
|
const i = e.target;
|
|
1412
|
-
|
|
1439
|
+
F(i), i.hasAttribute("traits") && Y(i);
|
|
1413
1440
|
}
|
|
1414
1441
|
}
|
|
1415
1442
|
}).observe(document.body, {
|