@f-ewald/components 1.41.0 → 1.42.2
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 +3 -1
- package/custom-elements.json +1228 -33
- package/dist/dag-graph.d.ts +161 -0
- package/dist/dag-graph.d.ts.map +1 -0
- package/dist/dag-graph.js +724 -0
- package/dist/dag-graph.js.map +1 -0
- package/dist/icons.d.ts +16 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +16 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +4 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +10 -0
- package/dist/tokens.js.map +1 -1
- package/dist/utils/dag-layout.d.ts +60 -0
- package/dist/utils/dag-layout.d.ts.map +1 -0
- package/dist/utils/dag-layout.js +80 -0
- package/dist/utils/dag-layout.js.map +1 -0
- package/docs/dag-graph.md +101 -0
- package/docs/design-language.md +4 -1
- package/docs/icons.md +8 -0
- package/llms.txt +57 -0
- package/package.json +2 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,YAAY,GAIb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAA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AAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAsB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,aAAa,GAGd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAA4C,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { GalleryItem } from \"./gallery-item.js\";\nexport { GalleryItemVariant } from \"./gallery-item-variant.js\";\nexport {\n PhotoGallery,\n type PhotoGalleryChangeReason,\n type PhotoGalleryObjectFit,\n type PhotoGallerySlideChangeDetail,\n} from \"./photo-gallery.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport { ModalDialog, type ModalDialogSize } from \"./modal-dialog.js\";\nexport { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n notifyWarning,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { ScrollToBottom } from \"./scroll-to-bottom.js\";\nexport {\n ScrollDots,\n type DotSelectDetail,\n type ScrollDotItem,\n type ScrollDotsItem,\n} from \"./scroll-dots.js\";\nexport { ScrollToTop } from \"./scroll-to-top.js\";\nexport { FullscreenButton, type FullscreenChangeDetail } from \"./fullscreen-button.js\";\nexport { SkipLink } from \"./skip-link.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { UserAvatar } from \"./user-avatar.js\";\nexport { MapPin } from \"./map-pin.js\";\nexport { MapCircle } from \"./map-circle.js\";\nexport { MapboxMap } from \"./mapbox-map.js\";\nexport { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { RangeSlider } from \"./range-slider.js\";\nexport { BreadcrumbNav, type BreadcrumbItem, type BreadcrumbNavigateDetail } from \"./breadcrumb-nav.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { ProgressBar } from \"./progress-bar.js\";\nexport { StatusBanner, type StatusBannerVariant } from \"./status-banner.js\";\nexport { UiAdmonition, type AdmonitionVariant } from \"./ui-admonition.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { EmptyState } from \"./empty-state.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport { CountdownTimer } from \"./countdown-timer.js\";\nexport { LoadMore } from \"./load-more.js\";\nexport { LoadingSpinner } from \"./loading-spinner.js\";\nexport { LoadingDots } from \"./loading-dots.js\";\nexport {\n ChatMessage,\n type ChatMessageRole,\n type ChatMessageVariant,\n} from \"./chat-message.js\";\nexport { ChevronPanel } from \"./chevron-panel.js\";\nexport { UiCheckbox } from \"./ui-checkbox.js\";\nexport { FormField } from \"./form-field.js\";\nexport { FormSelect, type SelectOption } from \"./form-select.js\";\nexport {\n MultiSelect,\n type MultiSelectOption,\n type MultiSelectVariant,\n} from \"./multi-select.js\";\nexport { DataTable, type DataTableColumn } from \"./data-table.js\";\nexport { TileGrid } from \"./tile-grid.js\";\nexport { TreeView, type TreeNode } from \"./tree-view.js\";\nexport { PopoverPanel } from \"./popover-panel.js\";\nexport {\n DropdownButton,\n type DropdownButtonVariant,\n type DropdownOption,\n} from \"./dropdown-button.js\";\nexport { IconButton } from \"./icon-button.js\";\nexport { KbdHint, type KbdPlatform } from \"./kbd-hint.js\";\nexport { FrameBox } from \"./frame-box.js\";\nexport { AppShell, type SidebarToggleDetail } from \"./app-shell.js\";\nexport { AppSidebar } from \"./app-sidebar.js\";\nexport { ActionBar } from \"./action-bar.js\";\nexport { PageHeader } from \"./page-header.js\";\nexport { PaginationNav, type PageChangeDetail } from \"./pagination-nav.js\";\nexport { FormActions } from \"./form-actions.js\";\nexport { TimelineContainer, type TimelineLayout } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarDay } from \"./calendar-day.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.js\";\nexport { CalendarWeek } from \"./calendar-week.js\";\nexport { CalendarYear } from \"./calendar-year.js\";\nexport {\n KanbanBoard,\n type KanbanCardData,\n type KanbanColumnData,\n type KanbanCardMoveDetail,\n type KanbanCardOpenDetail,\n} from \"./kanban-board.js\";\nexport { KanbanColumn } from \"./kanban-column.js\";\nexport { KanbanCard } from \"./kanban-card.js\";\nexport { TextArea } from \"./text-area.js\";\nexport { LinkCard, type LinkCardStatus } from \"./link-card.js\";\nexport { CardGrid } from \"./card-grid.js\";\nexport { MarkdownView } from \"./markdown-view.js\";\nexport { AutoScroll } from \"./auto-scroll.js\";\nexport { SpecList, type SpecListItem } from \"./spec-list.js\";\nexport { SplitHero } from \"./split-hero.js\";\nexport { TabBar, type TabChangeDetail } from \"./tab-bar.js\";\nexport { TabItem } from \"./tab-item.js\";\nexport { MarkdownEditor } from \"./markdown-editor.js\";\nexport {\n parseFrontMatter,\n formatFrontMatterValue,\n type FrontMatterResult,\n} from \"./utils/front-matter.js\";\nexport {\n formatDuration,\n formatClockDuration,\n type DurationFormat,\n} from \"./utils/duration.js\";\nexport { AudioPlayer } from \"./audio-player.js\";\nexport { VideoPlayer } from \"./video-player.js\";\nexport { VoteControl } from \"./vote-control.js\";\nexport { CommentComposer } from \"./comment-composer.js\";\nexport { CronSchedule } from \"./cron-schedule.js\";\nexport {\n CRON_ALIASES,\n CRON_FIELD_BOUNDS,\n CRON_FIELD_LABELS,\n CRON_FIELD_NAMES,\n MONTH_ABBREVIATIONS,\n MONTH_NAMES,\n WEEKDAY_ABBREVIATIONS,\n WEEKDAY_NAMES,\n describeCron,\n detectFrequency,\n expandField,\n fieldFromValues,\n formatCron,\n isEveryValue,\n parseCron,\n type CronExpression,\n type CronField,\n type CronFieldName,\n type CronFrequency,\n type CronTerm,\n} from \"./utils/cron.js\";\nexport {\n tokens,\n tokenValues,\n darkTokenValues,\n gradientTokenValues,\n metroTokenValues,\n blueprintTokenValues,\n developerDarkTokenValues,\n developerLightTokenValues,\n} from \"./tokens.js\";\nexport * from \"./icons.js\";\nexport { BlinkCursor } from \"./blink-cursor.js\";\nexport { CommentLabel } from \"./comment-label.js\";\nexport { StatStrip, type StatStripItem } from \"./stat-strip.js\";\nexport { StepLadder, type StepLadderItem } from \"./step-ladder.js\";\nexport {\n TerminalBlock,\n type TerminalLine,\n type TerminalLineType,\n} from \"./terminal-block.js\";\nexport { CodeDiff, type CodeDiffLine, type CodeDiffLineType } from \"./code-diff.js\";\nexport { WindowChrome } from \"./window-chrome.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,YAAY,GAI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,EACf,WAAW,EACX,eAAe,EACf,UAAU,EACV,YAAY,EACZ,SAAS,GAMV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,MAAM,EACN,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAsB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAuB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,aAAa,GAGd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAA4C,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { GalleryItem } from \"./gallery-item.js\";\nexport { GalleryItemVariant } from \"./gallery-item-variant.js\";\nexport {\n PhotoGallery,\n type PhotoGalleryChangeReason,\n type PhotoGalleryObjectFit,\n type PhotoGallerySlideChangeDetail,\n} from \"./photo-gallery.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport { ModalDialog, type ModalDialogSize } from \"./modal-dialog.js\";\nexport { ContentDivider } from \"./content-divider.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n notifyWarning,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { ScrollToBottom } from \"./scroll-to-bottom.js\";\nexport {\n ScrollDots,\n type DotSelectDetail,\n type ScrollDotItem,\n type ScrollDotsItem,\n} from \"./scroll-dots.js\";\nexport { ScrollToTop } from \"./scroll-to-top.js\";\nexport { FullscreenButton, type FullscreenChangeDetail } from \"./fullscreen-button.js\";\nexport { SkipLink } from \"./skip-link.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n DagGraph,\n type DagControl,\n type DagDirection,\n type DagDirectionChangeDetail,\n type DagEdge,\n type DagNode,\n type DagNodeKind,\n type DagNodeSelectDetail,\n} from \"./dag-graph.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { UserAvatar } from \"./user-avatar.js\";\nexport { MapPin } from \"./map-pin.js\";\nexport { MapCircle } from \"./map-circle.js\";\nexport { MapboxMap } from \"./mapbox-map.js\";\nexport { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { RangeSlider } from \"./range-slider.js\";\nexport { BreadcrumbNav, type BreadcrumbItem, type BreadcrumbNavigateDetail } from \"./breadcrumb-nav.js\";\nexport { ButtonGroup, type ButtonGroupOption } from \"./button-group.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { StatMeter } from \"./stat-meter.js\";\nexport { ProgressBar } from \"./progress-bar.js\";\nexport { StatusBanner, type StatusBannerVariant } from \"./status-banner.js\";\nexport { UiAdmonition, type AdmonitionVariant } from \"./ui-admonition.js\";\nexport { StatusPill, type StatusPillColor } from \"./status-pill.js\";\nexport { EditableText } from \"./editable-text.js\";\nexport { EmptyState } from \"./empty-state.js\";\nexport { LiveTimer } from \"./live-timer.js\";\nexport { CountdownTimer } from \"./countdown-timer.js\";\nexport { LoadMore } from \"./load-more.js\";\nexport { LoadingSpinner } from \"./loading-spinner.js\";\nexport { LoadingDots } from \"./loading-dots.js\";\nexport {\n ChatMessage,\n type ChatMessageRole,\n type ChatMessageVariant,\n} from \"./chat-message.js\";\nexport { ChevronPanel } from \"./chevron-panel.js\";\nexport { UiCheckbox } from \"./ui-checkbox.js\";\nexport { FormField } from \"./form-field.js\";\nexport { FormSelect, type SelectOption } from \"./form-select.js\";\nexport {\n MultiSelect,\n type MultiSelectOption,\n type MultiSelectVariant,\n} from \"./multi-select.js\";\nexport { DataTable, type DataTableColumn } from \"./data-table.js\";\nexport { TileGrid } from \"./tile-grid.js\";\nexport { TreeView, type TreeNode } from \"./tree-view.js\";\nexport { PopoverPanel } from \"./popover-panel.js\";\nexport {\n DropdownButton,\n type DropdownButtonVariant,\n type DropdownOption,\n} from \"./dropdown-button.js\";\nexport { IconButton } from \"./icon-button.js\";\nexport { KbdHint, type KbdPlatform } from \"./kbd-hint.js\";\nexport { FrameBox } from \"./frame-box.js\";\nexport { AppShell, type SidebarToggleDetail } from \"./app-shell.js\";\nexport { AppSidebar } from \"./app-sidebar.js\";\nexport { ActionBar } from \"./action-bar.js\";\nexport { PageHeader } from \"./page-header.js\";\nexport { PaginationNav, type PageChangeDetail } from \"./pagination-nav.js\";\nexport { FormActions } from \"./form-actions.js\";\nexport { TimelineContainer, type TimelineLayout } from \"./timeline-container.js\";\nexport { TimelineEntry } from \"./timeline-entry.js\";\nexport { CalendarDay } from \"./calendar-day.js\";\nexport { CalendarEntry } from \"./calendar-entry.js\";\nexport { CalendarMonth } from \"./calendar-month.js\";\nexport { CalendarWeek } from \"./calendar-week.js\";\nexport { CalendarYear } from \"./calendar-year.js\";\nexport {\n KanbanBoard,\n type KanbanCardData,\n type KanbanColumnData,\n type KanbanCardMoveDetail,\n type KanbanCardOpenDetail,\n} from \"./kanban-board.js\";\nexport { KanbanColumn } from \"./kanban-column.js\";\nexport { KanbanCard } from \"./kanban-card.js\";\nexport { TextArea } from \"./text-area.js\";\nexport { LinkCard, type LinkCardStatus } from \"./link-card.js\";\nexport { CardGrid } from \"./card-grid.js\";\nexport { MarkdownView } from \"./markdown-view.js\";\nexport { AutoScroll } from \"./auto-scroll.js\";\nexport { SpecList, type SpecListItem } from \"./spec-list.js\";\nexport { SplitHero } from \"./split-hero.js\";\nexport { TabBar, type TabChangeDetail } from \"./tab-bar.js\";\nexport { TabItem } from \"./tab-item.js\";\nexport { MarkdownEditor } from \"./markdown-editor.js\";\nexport {\n parseFrontMatter,\n formatFrontMatterValue,\n type FrontMatterResult,\n} from \"./utils/front-matter.js\";\nexport {\n formatDuration,\n formatClockDuration,\n type DurationFormat,\n} from \"./utils/duration.js\";\nexport { AudioPlayer } from \"./audio-player.js\";\nexport { VideoPlayer } from \"./video-player.js\";\nexport { VoteControl } from \"./vote-control.js\";\nexport { CommentComposer } from \"./comment-composer.js\";\nexport { CronSchedule } from \"./cron-schedule.js\";\nexport {\n CRON_ALIASES,\n CRON_FIELD_BOUNDS,\n CRON_FIELD_LABELS,\n CRON_FIELD_NAMES,\n MONTH_ABBREVIATIONS,\n MONTH_NAMES,\n WEEKDAY_ABBREVIATIONS,\n WEEKDAY_NAMES,\n describeCron,\n detectFrequency,\n expandField,\n fieldFromValues,\n formatCron,\n isEveryValue,\n parseCron,\n type CronExpression,\n type CronField,\n type CronFieldName,\n type CronFrequency,\n type CronTerm,\n} from \"./utils/cron.js\";\nexport {\n tokens,\n tokenValues,\n darkTokenValues,\n gradientTokenValues,\n metroTokenValues,\n blueprintTokenValues,\n developerDarkTokenValues,\n developerLightTokenValues,\n} from \"./tokens.js\";\nexport * from \"./icons.js\";\nexport { BlinkCursor } from \"./blink-cursor.js\";\nexport { CommentLabel } from \"./comment-label.js\";\nexport { StatStrip, type StatStripItem } from \"./stat-strip.js\";\nexport { StepLadder, type StepLadderItem } from \"./step-ladder.js\";\nexport {\n TerminalBlock,\n type TerminalLine,\n type TerminalLineType,\n} from \"./terminal-block.js\";\nexport { CodeDiff, type CodeDiffLine, type CodeDiffLineType } from \"./code-diff.js\";\nexport { WindowChrome } from \"./window-chrome.js\";\n"]}
|
package/dist/tokens.css
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
--ui-button-secondary-border: var(--ui-border, #e2e8f0);
|
|
15
15
|
--ui-button-secondary-border-hover: var(--ui-text-muted, #64748b);
|
|
16
16
|
--ui-button-secondary-surface-muted: var(--ui-surface-muted, #f8fafc);
|
|
17
|
+
--ui-button-secondary-gloss-start: var(--ui-surface, #ffffff);
|
|
18
|
+
--ui-button-secondary-gloss-end: var(--ui-surface, #ffffff);
|
|
17
19
|
--ui-button-highlight: 0 0 0 0 transparent;
|
|
18
20
|
--ui-button-text-shadow: none;
|
|
19
21
|
--ui-button-accent: var(--ui-primary, #4f46e5);
|
|
@@ -175,6 +177,8 @@
|
|
|
175
177
|
--ui-button-secondary-border: #cbd5e1;
|
|
176
178
|
--ui-button-secondary-border-hover: #94a3b8;
|
|
177
179
|
--ui-button-secondary-surface-muted: var(--ui-button-secondary-background-hover);
|
|
180
|
+
--ui-button-secondary-gloss-start: #f8fafc;
|
|
181
|
+
--ui-button-secondary-gloss-end: #f1f5f9;
|
|
178
182
|
--ui-button-highlight: inset 0 1px 0 rgb(255 255 255 / 0.35);
|
|
179
183
|
--ui-button-text-shadow: 0 1px 1px rgb(0 0 0 / 0.25);
|
|
180
184
|
--ui-button-accent: #4338ca;
|
package/dist/tokens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwM9C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqBlD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4CtD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAanD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+DvD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoC3D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2B5D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,MAAM,yBAAQ,CAAC"}
|
package/dist/tokens.js
CHANGED
|
@@ -51,6 +51,13 @@ export const tokenValues = {
|
|
|
51
51
|
// different default than secondary's borderless flat hover, so it can't
|
|
52
52
|
// reuse --ui-button-secondary-background-hover's "none" default.
|
|
53
53
|
"--ui-button-secondary-surface-muted": "var(--ui-surface-muted, #f8fafc)",
|
|
54
|
+
// The secondary gloss as two plain stop colors, for SVG surfaces that act
|
|
55
|
+
// as secondary buttons (dag-graph's nodes): SVG fills can't paint a CSS
|
|
56
|
+
// linear-gradient, so they build an SVG gradient from these stops instead.
|
|
57
|
+
// Both default to the flat --ui-surface, i.e. a solid fill; a gradient
|
|
58
|
+
// theme sets them to its secondary background's stops.
|
|
59
|
+
"--ui-button-secondary-gloss-start": "var(--ui-surface, #ffffff)",
|
|
60
|
+
"--ui-button-secondary-gloss-end": "var(--ui-surface, #ffffff)",
|
|
54
61
|
// Shared by both primary/danger — a purely cosmetic gloss/legibility pair,
|
|
55
62
|
// not color-specific, so one token covers both variants. `-highlight` is a
|
|
56
63
|
// full box-shadow value (e.g. `inset 0 1px 0 rgb(255 255 255 / 0.35)`) for
|
|
@@ -264,6 +271,9 @@ export const gradientTokenValues = {
|
|
|
264
271
|
// button turned glossy, so it tracks the hover gradient rather than a
|
|
265
272
|
// separate literal that could drift out of step with it.
|
|
266
273
|
"--ui-button-secondary-surface-muted": "var(--ui-button-secondary-background-hover)",
|
|
274
|
+
// Stops of --ui-button-secondary-background above, for SVG surfaces.
|
|
275
|
+
"--ui-button-secondary-gloss-start": "#f8fafc", // slate-50
|
|
276
|
+
"--ui-button-secondary-gloss-end": "#f1f5f9", // slate-100
|
|
267
277
|
"--ui-button-highlight": "inset 0 1px 0 rgb(255 255 255 / 0.35)", // glossy top edge
|
|
268
278
|
"--ui-button-text-shadow": "0 1px 1px rgb(0 0 0 / 0.25)", // legibility on primary/danger
|
|
269
279
|
"--ui-button-accent": "#4338ca", // indigo-700, matches --ui-button-border
|
package/dist/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAA2B;IACjD,SAAS;IACT,cAAc,EAAE,SAAS,EAAE,aAAa;IACxC,oBAAoB,EAAE,SAAS,EAAE,aAAa;IAC9C,4EAA4E;IAC5E,2EAA2E;IAC3E,0EAA0E;IAC1E,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,sEAAs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IAC5B,cAAc,EAAE,SAAS;IACzB,oBAAoB,EAAE,SAAS;IAC/B,aAAa,EAAE,SAAS;IACxB,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,sBAAsB;IACtC,oBAAoB,EAAE,yBAAyB;IAC/C,gBAAgB,EAAE,SAAS;IAE3B,cAAc,EAAE,SAAS;IACzB,oBAAoB,EAAE,SAAS;IAC/B,WAAW,EAAE,SAAS;IACtB,iBAAiB,EAAE,SAAS;IAC5B,aAAa,EAAE,SAAS;IACxB,mBAAmB,EAAE,SAAS;IAC9B,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,SAAS;IACzB,oBAAoB,EAAE,SAAS;IAC/B,iBAAiB,EAAE,iCAAiC;IAEpD,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,UAAU;IAC5B,cAAc,EAAE,cAAc;IAC9B,WAAW,EACT,oFAAoF;CACvF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,EAAE,CAAC","sourcesContent":["import { css } from \"lit\";\n\n/**\n * Design token values, sourced from Tailwind v4's default theme palette.\n * Each entry maps a `--ui-*` custom property name to its default value.\n * These are the same values baked in as `var(--ui-*, <fallback>)` fallbacks\n * throughout component styles, so components render correctly with zero\n * external CSS. Consumers may override any of these by setting the custom\n * property on `:root` or an ancestor element (see `tokens.css`).\n */\nexport const tokenValues: Record<string, string> = {\n // Colors\n \"--ui-primary\": \"#4f46e5\", // indigo-600\n \"--ui-primary-hover\": \"#4338ca\", // indigo-700\n // Button-specific background/border hooks: default to the flat --ui-primary\n // / --ui-danger tokens above unchanged, so those stay the single source of\n // truth for every other component. Overriding just these lets a theme opt\n // ui-button into a gradient (or any other) background without touching\n // component markup; --ui-button-border/--ui-button-danger-border default\n // to transparent (today's look) and are meant to be paired with a shade\n // darker than the gradient's dark stop when one is set. The `-active`\n // variants default to whatever `-background` already resolved to (so a\n // solid override still applies while pressed) — a gradient theme should\n // set them to the same stops in reverse, for a pressed/\"indented\" look.\n \"--ui-button-background\": \"var(--ui-primary, #4f46e5)\",\n \"--ui-button-background-hover\": \"var(--ui-primary-hover, #4338ca)\",\n \"--ui-button-background-active\": \"var(--ui-button-background, var(--ui-primary, #4f46e5))\",\n \"--ui-button-border\": \"transparent\",\n // The primary/danger fill's own text color, split out from --ui-on-accent\n // (which every button used directly until now): --ui-on-accent means \"text\n // on any solid semantic fill\" and a theme may need to darken it for a light\n // accent color (see developerDarkTokenValues), but that darkening should\n // only reach the button itself if the theme wants it to. Defaults to\n // --ui-on-accent unchanged, so every existing theme renders identically.\n \"--ui-button-text\": \"var(--ui-on-accent, #ffffff)\",\n \"--ui-button-danger-text\": \"var(--ui-on-accent, #ffffff)\",\n // The bordered, transparent-background secondary variant's equivalents —\n // shared with confirm-dialog's Cancel button, which is the same visual\n // pattern. Defaults reproduce today's literal secondary styling exactly\n // (no background at any state, border colors matching --ui-border /\n // --ui-text-muted), so a theme only needs to override these to make\n // secondary/Cancel buttons match a primary/danger gradient theme.\n \"--ui-button-secondary-background\": \"none\",\n \"--ui-button-secondary-background-hover\": \"none\",\n \"--ui-button-secondary-background-active\": \"var(--ui-button-secondary-background, none)\",\n \"--ui-button-secondary-border\": \"var(--ui-border, #e2e8f0)\",\n \"--ui-button-secondary-border-hover\": \"var(--ui-text-muted, #64748b)\",\n // A muted-gray surface used wherever something already paints\n // --ui-surface-muted as a state indicator in flat mode — button-group's\n // unchecked-segment hover, pagination-nav's button hover, and\n // radio-cards/radio-pills' checked background — which is a genuinely\n // different default than secondary's borderless flat hover, so it can't\n // reuse --ui-button-secondary-background-hover's \"none\" default.\n \"--ui-button-secondary-surface-muted\": \"var(--ui-surface-muted, #f8fafc)\",\n // Shared by both primary/danger — a purely cosmetic gloss/legibility pair,\n // not color-specific, so one token covers both variants. `-highlight` is a\n // full box-shadow value (e.g. `inset 0 1px 0 rgb(255 255 255 / 0.35)`) for\n // a glossy top edge, defaulting to a fully transparent (so invisible)\n // shadow rather than the keyword `none` — some usages combine it with\n // another literal shadow in a comma-separated list, where a bare `none`\n // item is invalid CSS and would zero out the *whole* declaration.\n // `-text-shadow` is a full text-shadow value for label legibility against\n // a gradient's lighter stop, always used standalone, so it keeps `none`.\n \"--ui-button-highlight\": \"0 0 0 0 transparent\",\n \"--ui-button-text-shadow\": \"none\",\n // A solid stand-in for the same accent, for spots that can't render a\n // background gradient at all — a native <input>'s accent-color only\n // accepts a plain color, and a hard-stop background gradient (e.g.\n // range-slider's filled track) can't nest another gradient inside its own\n // color-stop list. Consumers that theme the buttons into a gradient should\n // set this to the gradient's dark stop, so these non-button accents (radio\n // selection indicators, the range-slider track/thumb) stay visually\n // coordinated with it even though they can't literally paint a gradient.\n \"--ui-button-accent\": \"var(--ui-primary, #4f46e5)\",\n \"--ui-info\": \"#0ea5e9\", // sky-500\n \"--ui-info-hover\": \"#0284c7\", // sky-600\n \"--ui-danger\": \"#dc2626\", // red-600\n \"--ui-danger-hover\": \"#b91c1c\", // red-700\n \"--ui-button-danger-background\": \"var(--ui-danger, #dc2626)\",\n \"--ui-button-danger-background-hover\": \"var(--ui-danger-hover, #b91c1c)\",\n \"--ui-button-danger-background-active\":\n \"var(--ui-button-danger-background, var(--ui-danger, #dc2626))\",\n \"--ui-button-danger-border\": \"transparent\",\n \"--ui-success\": \"#16a34a\", // green-600\n \"--ui-warning\": \"#d97706\", // amber-600\n \"--ui-warning-hover\": \"#b45309\", // amber-700\n // toast-notification's per-variant background hooks: default to the flat\n // --ui-success/--ui-danger/--ui-info/--ui-warning tokens unchanged, so\n // those stay the single source of truth for every other component —\n // the same pattern as --ui-button-background/--ui-button-danger-background\n // above. `-highlight`/`-text-shadow` are the same glossy-top-edge /\n // legibility-shadow pair as --ui-button-highlight/--ui-button-text-shadow,\n // kept as separate tokens so a theme can gloss toasts and buttons\n // independently.\n \"--ui-toast-success-background\": \"var(--ui-success, #16a34a)\",\n \"--ui-toast-error-background\": \"var(--ui-danger, #dc2626)\",\n \"--ui-toast-info-background\": \"var(--ui-info, #0ea5e9)\",\n \"--ui-toast-warning-background\": \"var(--ui-warning, #d97706)\",\n \"--ui-toast-highlight\": \"0 0 0 0 transparent\",\n \"--ui-toast-text-shadow\": \"none\",\n // AI accent sweep — the four stops of the animated multi-hue ring\n // ui-button's `ai` modifier draws around a button (and the only place a\n // rainbow reads as meaning \"this action is AI-powered\" rather than a\n // semantic state). Ordered around the color wheel and looping back to\n // stop 1, so the sweep is seamless; --ui-ai-2 is --ui-primary's own\n // indigo, anchoring the ring to the rest of the palette. Overriding these\n // four retunes every AI button at once.\n \"--ui-ai-1\": \"#38bdf8\", // sky-400\n \"--ui-ai-2\": \"#6366f1\", // indigo-500\n \"--ui-ai-3\": \"#d946ef\", // fuchsia-500\n \"--ui-ai-4\": \"#fbbf24\", // amber-400\n \"--ui-on-accent\": \"#ffffff\",\n \"--ui-text\": \"#0f172a\", // slate-900\n \"--ui-text-muted\": \"#64748b\", // slate-500\n \"--ui-border\": \"#e2e8f0\", // slate-200\n \"--ui-surface\": \"#ffffff\", // white\n \"--ui-surface-muted\": \"#f8fafc\", // slate-50\n \"--ui-highlight\": \"#fde68a\", // amber-200 — transient \"just changed\" flash\n \"--ui-tooltip\": \"#0f172a\", // slate-900\n // The tooltip's own foreground, kept separate from --ui-on-accent: that\n // token means \"text on a solid *semantic* fill\" (a button, a toast), which\n // a theme may need to darken if it makes those fills light (see\n // developerDarkTokenValues). --ui-tooltip's own fill is a dedicated dark\n // surface in every theme regardless, so its text stays white unconditionally.\n \"--ui-tooltip-text\": \"#ffffff\",\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.32)\",\n \"--ui-overlay\": \"rgb(15 23 42 / 0.45)\", // slate-900 / 45%\n // Same reasoning as --ui-tooltip-text: a control drawn directly on the\n // --ui-overlay scrim (photo-gallery's arrow buttons) needs text/icon\n // contrast against that always-dark backdrop, not against whatever a theme\n // repoints --ui-on-accent to for its semantic fills.\n \"--ui-overlay-text\": \"#ffffff\",\n\n // Shape / depth\n \"--ui-radius\": \"0.5rem\", // rounded-lg\n \"--ui-radius-sm\": \"0.25rem\", // rounded\n // The width of a themeable surface/control border. Spacing is deliberately\n // untokenized, but a border is chrome rather than layout: the `blueprint`\n // theme's whole structure is carried by hairline rules instead of shadows,\n // and it needs those rules one step heavier than the default. Defaults to\n // the literal 1px every component used before, so nothing renders\n // differently until a theme overrides it. Only genuine surface/control\n // borders read this — forced-colors `CanvasText` borders and purely\n // decorative literals (a slider thumb's white ring, a tab's 2px underline)\n // keep their own widths, since those aren't the theme's structural rules.\n // Anything with a fixed height/width and a themeable border must also set\n // `box-sizing: border-box`, or a heavier border grows it past the shared\n // 2rem control target.\n \"--ui-border-width\": \"1px\",\n // Deliberate pill/circle shapes — a chip, an avatar, a slider thumb, a dot.\n // Tokenized rather than hardcoded so a theme that squares the design system\n // (metro) can reach them too; a literal 9999px/50% silently opts that shape\n // out of every theme. Use these only where the shape is the point, not as a\n // heavier --ui-radius.\n \"--ui-radius-pill\": \"9999px\",\n \"--ui-radius-circle\": \"50%\",\n \"--ui-shadow\":\n \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\", // shadow-md\n \"--ui-shadow-lg\":\n \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\", // shadow-xl\n \"--ui-focus-ring\": \"0 0 0 3px rgb(79 70 229 / 0.35)\",\n\n // Type\n \"--ui-font\":\n 'ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"',\n \"--ui-font-mono\":\n \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace\",\n \"--ui-font-size-lg\": \"1rem\", // text-base\n \"--ui-font-size\": \"0.875rem\", // text-sm\n \"--ui-font-size-sm\": \"0.75rem\", // text-xs\n \"--ui-font-size-xs\": \"0.6875rem\",\n\n // Font weights — the only four weights the system uses.\n \"--ui-font-weight-regular\": \"400\",\n \"--ui-font-weight-medium\": \"500\",\n \"--ui-font-weight-semibold\": \"600\",\n \"--ui-font-weight-bold\": \"700\",\n\n // Line heights — glyph (icon/marker box), tight (headings), normal (body).\n \"--ui-line-height-glyph\": \"1\",\n \"--ui-line-height-tight\": \"1.25\",\n \"--ui-line-height-normal\": \"1.5\",\n\n // Letter spacing / tracking — default and the single widened step.\n \"--ui-tracking-normal\": \"0\",\n \"--ui-tracking-wide\": \"0.04em\",\n\n // Casing of chrome micro-labels — the small, wide-tracked labels that name a\n // region rather than carry content (a `frame-box` legend, an `app-sidebar`\n // section heading, a `stat-meter` caption). Defaults to `none`, today's\n // sentence case, so nothing changes until a theme sets it; the `blueprint`\n // theme sets `uppercase`, where signage-style labels are the point. Never\n // apply this to user-supplied content — shouting someone's data is not a\n // theme's decision, and `text-transform` is a presentational lie that\n // survives copy/paste as the original casing anyway.\n \"--ui-label-transform\": \"none\",\n\n // Numeral rendering for figures that change in place or stack into a column\n // — a score, a page number, a running clock. Defaults to `normal`\n // (proportional, as before); `tabular-nums` stops digits from jittering\n // horizontally as they tick, which the `blueprint` theme's spec-sheet\n // aesthetic wants everywhere.\n \"--ui-numeric\": \"normal\",\n};\n\n/**\n * Dark-mode overrides for the same `--ui-*` custom properties, applied by\n * `tokens.css` via `@media (prefers-color-scheme: dark)` and `[data-theme]`\n * (see generate-tokens-css.mjs). Same Tailwind slate scale as the light\n * palette, inverted, with primary/danger/success lightened one step (500\n * instead of 600) for sufficient contrast against dark surfaces. Shape/type\n * tokens are theme-independent and not repeated here.\n */\nexport const darkTokenValues: Record<string, string> = {\n \"--ui-primary\": \"#6366f1\", // indigo-500\n \"--ui-primary-hover\": \"#818cf8\", // indigo-400\n \"--ui-info\": \"#38bdf8\", // sky-400\n \"--ui-info-hover\": \"#7dd3fc\", // sky-300\n \"--ui-danger\": \"#ef4444\", // red-500\n \"--ui-danger-hover\": \"#f87171\", // red-400\n \"--ui-success\": \"#22c55e\", // green-500\n \"--ui-warning\": \"#f59e0b\", // amber-500\n \"--ui-warning-hover\": \"#fbbf24\", // amber-400\n \"--ui-on-accent\": \"#ffffff\",\n \"--ui-text\": \"#f1f5f9\", // slate-100\n \"--ui-text-muted\": \"#94a3b8\", // slate-400\n \"--ui-border\": \"#334155\", // slate-700\n \"--ui-surface\": \"#0f172a\", // slate-900\n \"--ui-surface-muted\": \"#1e293b\", // slate-800\n \"--ui-highlight\": \"#854d0e\", // amber-800 — transient \"just changed\" flash on dark\n \"--ui-tooltip\": \"#020617\", // slate-950\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.12)\",\n \"--ui-overlay\": \"rgb(2 6 23 / 0.6)\", // slate-950 / 60%\n \"--ui-focus-ring\": \"0 0 0 3px rgb(99 102 241 / 0.45)\",\n};\n\n/**\n * \"Gradient\" theme overrides, applied via `data-theme=\"gradient\"` on `<html>`\n * (see `generate-tokens-css.mjs`) — forces `color-scheme: light` like the\n * `\"light\"` override and layers a glossy gradient look on top of the flat\n * light palette, using exactly the `--ui-button-*`/`--ui-button-danger-*`/\n * `--ui-button-secondary-*` hooks `ui-button.ts` already reads (see that\n * file's doc comment), plus the `--ui-toast-*` hooks `toast-notification.ts`\n * reads (see its doc comment). Every other token (`--ui-text`, `--ui-surface`,\n * …) is left at its light-mode default — this theme only glosses buttons and\n * toasts by design. Each variant's gradient runs light-to-dark top-to-bottom\n * (`180deg`) across one Tailwind shade step lighter/darker than the flat\n * token so it still reads as \"the same color, glossy\" rather than a\n * different hue; `-hover` shifts the whole pair one shade lighter, `-active`\n * reverses the two stops for a pressed/\"indented\" look, and `-border` is a\n * shade darker than the gradient's dark stop for a defining edge.\n */\nexport const gradientTokenValues: Record<string, string> = {\n \"--ui-button-background\": \"linear-gradient(180deg, #6366f1 0%, #4f46e5 100%)\", // indigo-500 -> 600\n \"--ui-button-background-hover\": \"linear-gradient(180deg, #818cf8 0%, #6366f1 100%)\", // indigo-400 -> 500\n \"--ui-button-background-active\": \"linear-gradient(180deg, #4f46e5 0%, #6366f1 100%)\", // reversed 600 -> 500\n \"--ui-button-border\": \"#4338ca\", // indigo-700\n \"--ui-button-danger-background\": \"linear-gradient(180deg, #ef4444 0%, #dc2626 100%)\", // red-500 -> 600\n \"--ui-button-danger-background-hover\": \"linear-gradient(180deg, #f87171 0%, #ef4444 100%)\", // red-400 -> 500\n \"--ui-button-danger-background-active\": \"linear-gradient(180deg, #dc2626 0%, #ef4444 100%)\", // reversed 600 -> 500\n \"--ui-button-danger-border\": \"#b91c1c\", // red-700\n // Secondary stays neutral gray rather than a saturated hue, matching its\n // flat \"not the primary action\" role, but one shade darker than the\n // original white -> slate-50 pairing: at a small button size, that pair\n // read as flat white with no visible gradient at all. slate-50 -> 100\n // keeps enough contrast to actually look like a gradient while still\n // being clearly lighter/quieter than primary/danger. Border stays\n // slate-300 (a step past the flat slate-200) so its edge still reads\n // against the fill.\n \"--ui-button-secondary-background\": \"linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%)\", // slate-50 -> 100\n \"--ui-button-secondary-background-hover\": \"linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%)\", // slate-100 -> 200\n \"--ui-button-secondary-background-active\": \"linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%)\", // reversed 100 -> 50\n \"--ui-button-secondary-border\": \"#cbd5e1\", // slate-300\n \"--ui-button-secondary-border-hover\": \"#94a3b8\", // slate-400\n // button-group's unchecked segments, pagination-nav's prev/next buttons, and\n // radio-cards/radio-pills' checked background read this rather than\n // --ui-button-secondary-background (see tokens above). Left flat they were\n // the one \"secondary\" surface that stayed matte while every actual secondary\n // button turned glossy, so it tracks the hover gradient rather than a\n // separate literal that could drift out of step with it.\n \"--ui-button-secondary-surface-muted\": \"var(--ui-button-secondary-background-hover)\",\n \"--ui-button-highlight\": \"inset 0 1px 0 rgb(255 255 255 / 0.35)\", // glossy top edge\n \"--ui-button-text-shadow\": \"0 1px 1px rgb(0 0 0 / 0.25)\", // legibility on primary/danger\n \"--ui-button-accent\": \"#4338ca\", // indigo-700, matches --ui-button-border\n // toast-notification: same light-to-dark, one-shade-step gradient\n // convention as the button variants above; the bottom stop always matches\n // the flat --ui-success/--ui-danger/--ui-info/--ui-warning value exactly.\n \"--ui-toast-success-background\": \"linear-gradient(180deg, #22c55e 0%, #16a34a 100%)\", // green-500 -> 600\n \"--ui-toast-error-background\": \"linear-gradient(180deg, #ef4444 0%, #dc2626 100%)\", // red-500 -> 600\n \"--ui-toast-info-background\": \"linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%)\", // sky-400 -> 500\n \"--ui-toast-warning-background\": \"linear-gradient(180deg, #f59e0b 0%, #d97706 100%)\", // amber-500 -> 600\n \"--ui-toast-highlight\": \"inset 0 1px 0 rgb(255 255 255 / 0.35)\", // glossy top edge, same as --ui-button-highlight\n \"--ui-toast-text-shadow\": \"0 1px 1px rgb(0 0 0 / 0.25)\", // legibility, same as --ui-button-text-shadow\n};\n\n/**\n * \"Metro\" theme overrides, applied via `data-theme=\"metro\"` on `<html>` (see\n * `generate-tokens-css.mjs`) — forces `color-scheme: light` like the `\"light\"`\n * and `\"gradient\"` overrides, and strips the roundness and depth off the flat\n * light palette to leave hard-edged surfaces over a blue accent, after the\n * dense square-cornered look of the early social bookmarking sites.\n *\n * This is the first theme to override shape rather than only color, so the\n * \"shape/type tokens are theme-independent\" rule `darkTokenValues` notes above\n * holds for every theme except this one (see `docs/design-language.md`).\n * Squaring the design system means squaring the deliberate pill and circle\n * shapes too — chips, avatars, dots, slider thumbs — which is why those read\n * `--ui-radius-pill`/`--ui-radius-circle` rather than hardcoding `9999px`/`50%`\n * (a literal would silently opt that shape out of the theme).\n *\n * One residual is genuinely out of reach: `price-history-chart` rounds its bars\n * with an SVG `rx` presentation attribute, which cannot take a `var()`, so\n * those stay slightly rounded under metro.\n *\n * The shadows flatten to a hairline ring rather than to `none`. Dropping them\n * outright would leave `slide-panel` — the only overlay with no border of its\n * own — as an invisible white-on-white edge; every other consumer of\n * `--ui-shadow*` either pairs it with `1px solid var(--ui-border)` or applies\n * it on hover/active over an already-bordered control. A hard 1px ring keeps\n * that separation while removing the blur and the faked depth.\n */\nexport const metroTokenValues: Record<string, string> = {\n \"--ui-primary\": \"#3274d0\", // the del.icio.us blue; no Tailwind equivalent\n \"--ui-primary-hover\": \"#2559a8\",\n \"--ui-focus-ring\": \"0 0 0 2px #3274d0\", // solid and crisp, not the default 3px translucent ring\n \"--ui-radius\": \"0\",\n \"--ui-radius-sm\": \"0\",\n \"--ui-radius-pill\": \"0\",\n \"--ui-radius-circle\": \"0\",\n // Hairline rings (slate-900 at low alpha) rather than blurred drop shadows:\n // separation without depth. -lg is a touch stronger, matching the default\n // pair's relative weighting.\n \"--ui-shadow\": \"0 0 0 1px rgb(15 23 42 / 0.12)\",\n \"--ui-shadow-lg\": \"0 0 0 1px rgb(15 23 42 / 0.18)\",\n};\n\n/**\n * \"Blueprint\" theme overrides, applied via `data-theme=\"blueprint\"` on `<html>`\n * (see `generate-tokens-css.mjs`) — forces `color-scheme: light` like every\n * other non-dark theme, and restyles the light palette as a technical catalog\n * / spec sheet: warm near-black ink on white paper, one pure-blue accent,\n * square corners, and structure carried entirely by hairline rules instead of\n * shadows.\n *\n * It is the widest theme in the system, and the reason three token axes exist\n * that no earlier theme needed:\n *\n * - `--ui-font` is retargeted to a monospace stack. `darkTokenValues` notes\n * that shape and type tokens are theme-independent; `metro` already broke\n * that for shape, and this breaks it for the type *family* only. Type\n * *metrics* (size, weight, line height) remain unthemed in every theme —\n * they encode hierarchy, which is not a stylistic choice. \"Space Mono\"\n * leads the stack purely so a consumer who loads that webfont gets the\n * reference face automatically; with no external CSS at all it falls\n * straight through to the same system mono stack `--ui-font-mono` uses, so\n * the theme still renders correctly on its own.\n * - `--ui-border-width` goes to `1.5px`. Every border in this theme is doing\n * the work a shadow does elsewhere, and at 1px those rules read as a faint\n * table rather than as drawn structure.\n * - `--ui-label-transform` goes to `uppercase`, which is what makes chrome\n * micro-labels read as signage/spec-sheet keys. Only labels that name a\n * region or column carry this — never user content.\n * - `--ui-numeric` goes to `tabular-nums`, so figures line up in a column and\n * do not jitter as they change.\n *\n * Buttons are deliberately NOT the accent color. `--ui-primary` stays pure\n * blue because it drives accents everywhere else (active tab underlines,\n * selected states, links, the certification-style tints), but the primary\n * button fill is overridden to ink through the `--ui-button-*` hooks and only\n * turns blue on hover — a black-on-white CTA that lights up is the\n * catalog-print look, and a large pure-blue fill next to blue accents would\n * flatten the two roles into one. That split is exactly what those hooks\n * exist for (see `gradientTokenValues` above for the same technique).\n *\n * Semantic `danger`/`success`/`warning` keep their default hues: they encode\n * meaning rather than style, and the reference's blue-only restraint is an\n * editorial choice a component library cannot make on a consumer's behalf.\n * `--ui-info` is the exception — it is \"neutral notice\", which in this theme\n * is precisely the accent, and the default sky blue would otherwise sit a few\n * degrees off the pure blue beside it and read as a mistake.\n *\n * Shadows flatten to a hard ink ring rather than to `none`, for the same\n * reason `metro` does it: `slide-panel` has no border of its own and would\n * otherwise lose its edge entirely.\n */\nexport const blueprintTokenValues: Record<string, string> = {\n // Ink over paper. --ui-text-muted is the same ink at ~65% over white rather\n // than a neutral gray, so the quiet text stays in the same warm family\n // instead of turning blue-gray beside the accent.\n \"--ui-text\": \"#17160f\",\n \"--ui-text-muted\": \"#686763\",\n \"--ui-surface\": \"#ffffff\",\n \"--ui-surface-muted\": \"#f0f0f0\",\n // ~55% ink over white. Darker than it looks like it needs to be, because a\n // border is often the only thing bounding a white-on-white control, and\n // WCAG 1.4.11 wants 3:1 against both adjacent surfaces for that: this is\n // 3.55:1 on white and 3.12:1 on the muted surface. The lighter ~40% ink\n // (#a2a29f) reads better but only reaches 2.56:1, and 1.5px of extra weight\n // does not buy an exemption. Still short of fully black, which at this width\n // would turn every bordered surface into a hard box.\n \"--ui-border\": \"#898883\",\n \"--ui-tooltip\": \"#17160f\",\n \"--ui-overlay\": \"rgb(23 22 15 / 0.45)\",\n // The \"just changed\" flash tints toward the accent instead of amber, which\n // is the one warm hue this palette has no room for.\n \"--ui-highlight\": \"#dcdcff\",\n\n \"--ui-primary\": \"#0000ff\",\n \"--ui-primary-hover\": \"#0000cc\",\n \"--ui-info\": \"#0000ff\",\n \"--ui-info-hover\": \"#0000cc\",\n \"--ui-on-accent\": \"#ffffff\",\n // Solid and crisp at the reference's own 2px, not the default translucent\n // 3px halo — a blurred ring is the one soft edge this theme has nowhere to\n // put.\n \"--ui-focus-ring\": \"0 0 0 2px #0000ff\",\n\n // Ink CTA that lights up blue on hover, and inverts its two stops while\n // pressed. The border is ink at every state so the button keeps a defining\n // edge even once the fill goes blue.\n \"--ui-button-background\": \"#17160f\",\n \"--ui-button-background-hover\": \"#0000ff\",\n \"--ui-button-background-active\": \"#0000cc\",\n \"--ui-button-border\": \"#17160f\",\n \"--ui-button-danger-border\": \"#b91c1c\",\n // Secondary is the reference's ghost button: no fill, ink border, a paper\n // wash on hover and an accent border to echo the primary's hover.\n \"--ui-button-secondary-border\": \"#17160f\",\n \"--ui-button-secondary-border-hover\": \"#0000ff\",\n \"--ui-button-secondary-background-hover\": \"#f0f0f0\",\n \"--ui-button-secondary-surface-muted\": \"#f0f0f0\",\n // Non-button accents that can only take a plain color (a native input's\n // accent-color, range-slider's track/thumb) follow --ui-primary, not the\n // ink button fill — those are selection marks, not calls to action.\n \"--ui-button-accent\": \"#0000ff\",\n\n \"--ui-radius\": \"0\",\n \"--ui-radius-sm\": \"0\",\n \"--ui-radius-pill\": \"0\",\n \"--ui-radius-circle\": \"0\",\n \"--ui-shadow\": \"0 0 0 1.5px rgb(23 22 15 / 0.24)\",\n \"--ui-shadow-lg\": \"0 0 0 1.5px #17160f\",\n\n \"--ui-border-width\": \"1.5px\",\n \"--ui-label-transform\": \"uppercase\",\n \"--ui-numeric\": \"tabular-nums\",\n \"--ui-font\":\n '\"Space Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n};\n\n/**\n * \"Developer dark\" theme overrides, applied via `data-theme=\"developer-dark\"`\n * on `<html>` (see `generate-tokens-css.mjs`) — a true dark palette, not one\n * layered on the light palette, so it is handled like `\"dark\"` itself: its own\n * explicit `:root[data-theme=\"developer-dark\"]` block layered over\n * `darkTokenValues` (not the light palette), needing no dark-media-query\n * exclusion (see `scripts/tokens-css.mjs`'s `darkThemes` list, which merges\n * this map over `darkTokenValues` before emitting the block). Only tokens\n * that differ from `darkTokenValues` need to be listed here; anything not\n * repeated falls through to the same dark default `\"dark\"` itself uses, which\n * is why this list happens to repeat nearly all of `darkTokenValues`'s own\n * keys — a dark theme rarely agrees with the *other* dark theme's colors.\n * Shape/type tokens not present in `darkTokenValues` either (radius-pill,\n * shadow, border-width, label-transform) fall through one level further, to\n * the light palette's defaults, via the ordinary `:root` cascade.\n *\n * Modeled on a real reference (a monospace, editor/terminal-chrome developer\n * tool marketing page): near-black warm ink-well background, a warm off-white\n * foreground, and one accent green used for links, focus rings, and button\n * fills — with dark ink (not white) as the fill's foreground, since the\n * accent itself is light enough to carry dark text at high contrast (8.3:1),\n * matching the reference's own \"ink CTA that fills with the accent\" button.\n *\n * Like `blueprintTokenValues`, this is a \"wide\" theme that also retunes shape\n * and type: `--ui-font` retargets to a monospace stack (falls through to the\n * system mono stack with zero webfont, same technique as blueprint's \"Space\n * Mono\"), corners are small but not squared (2–4px, not 0 — this theme reads\n * as a dark code editor, not blueprint's flattened spec sheet), and\n * `--ui-numeric: tabular-nums` keeps the diff/stat figures from jittering.\n * Unlike `blueprint`, chrome labels stay sentence-case (`--ui-label-transform`\n * is left at its default) — the reference's own section labels are lowercase\n * `snake_case`, not shouted.\n */\nexport const developerDarkTokenValues: Record<string, string> = {\n \"--ui-primary\": \"#83c167\",\n \"--ui-primary-hover\": \"#a3d488\",\n \"--ui-info\": \"#e08a4a\",\n \"--ui-info-hover\": \"#e8a06a\",\n \"--ui-danger\": \"#e0705f\",\n \"--ui-danger-hover\": \"#e88b7d\",\n \"--ui-success\": \"#83c167\",\n \"--ui-warning\": \"#d8a657\",\n \"--ui-warning-hover\": \"#e0b877\",\n // Dark ink, not white — the accent itself is light enough (8.3:1 against\n // it) to carry dark text, and that ink-on-green fill is the reference's own\n // CTA look.\n \"--ui-on-accent\": \"#0e0d0b\",\n \"--ui-text\": \"#d8d3c5\",\n \"--ui-text-muted\": \"#8b8270\",\n \"--ui-border\": \"#211f19\",\n \"--ui-surface\": \"#0e0d0b\",\n // Lighter than --ui-surface, same direction as darkTokenValues' own\n // surface-muted (an elevated panel reads lighter, not darker, once the base\n // is already near-black).\n \"--ui-surface-muted\": \"#161410\",\n // A translucent accent wash rather than a hand-picked solid, so the flash\n // stays legible without depending on exactly which dark literal the surface\n // ends up at.\n \"--ui-highlight\": \"rgb(131 193 103 / 0.25)\",\n \"--ui-tooltip\": \"#050504\",\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.12)\",\n \"--ui-overlay\": \"rgb(5 4 4 / 0.6)\",\n \"--ui-focus-ring\": \"0 0 0 3px rgb(131 193 103 / 0.45)\",\n\n \"--ui-radius\": \"0.25rem\",\n \"--ui-radius-sm\": \"0.125rem\",\n \"--ui-numeric\": \"tabular-nums\",\n \"--ui-font\":\n '\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n};\n\n/**\n * \"Developer light\" theme overrides, applied via `data-theme=\"developer-light\"`\n * on `<html>` (see `generate-tokens-css.mjs`) — the light counterpart to\n * `developerDarkTokenValues` above. The reference this pair is modeled on\n * never shipped a light mode (its own light-mode toggle is a running joke\n * that refuses to switch); this theme exists anyway, built from the two\n * colors that joke's own tooltip already uses (a warm cream bubble with near-\n * black ink) — the closest thing the reference gives to \"what its light mode\n * would have looked like.\"\n *\n * Layered on the light palette like `gradient`/`metro`/`blueprint` (needs the\n * dark-media-query exclusion, hence `lightThemes` in `generate-tokens-css.mjs`\n * rather than `darkThemes`), so only the differences from `tokenValues` are\n * listed here — same convention as `blueprintTokenValues`.\n *\n * The accent green is darkened one step further than `developerDarkTokenValues`'s\n * brighter green — that brighter green fails contrast against a light paper\n * both as plain text (1.85:1) and as a white-on-fill button (2.15:1); this\n * darker step clears both (5.0:1 text, 5.8:1 white-on-fill), so this theme\n * keeps `--ui-on-accent` at its default white rather than reusing the dark\n * theme's ink-on-accent trick, which does not have enough contrast at this\n * darker shade (3.65:1 unbolded).\n */\nexport const developerLightTokenValues: Record<string, string> = {\n \"--ui-text\": \"#1a1813\",\n \"--ui-text-muted\": \"#6b6255\",\n \"--ui-surface\": \"#f3eee1\",\n \"--ui-surface-muted\": \"#e8e1cf\",\n \"--ui-border\": \"#d9d0ba\",\n \"--ui-tooltip\": \"#1a1813\",\n \"--ui-overlay\": \"rgb(26 24 19 / 0.45)\",\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.32)\",\n \"--ui-highlight\": \"#f0dfa0\",\n\n \"--ui-primary\": \"#457032\",\n \"--ui-primary-hover\": \"#3a6329\",\n \"--ui-info\": \"#8f5124\",\n \"--ui-info-hover\": \"#7a4420\",\n \"--ui-danger\": \"#a8402f\",\n \"--ui-danger-hover\": \"#8c3625\",\n \"--ui-success\": \"#457032\",\n \"--ui-warning\": \"#7c5d24\",\n \"--ui-warning-hover\": \"#5e4419\",\n \"--ui-focus-ring\": \"0 0 0 3px rgb(69 112 50 / 0.35)\",\n\n \"--ui-radius\": \"0.25rem\",\n \"--ui-radius-sm\": \"0.125rem\",\n \"--ui-numeric\": \"tabular-nums\",\n \"--ui-font\":\n '\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n};\n\n/**\n * Historically a shared `:host { --ui-x: var(--ui-x, fallback); } ` block,\n * re-declaring every token on each component's own host element as a\n * \"materialize the inherited value, or this fallback\" trick. That pattern\n * turned out to be a genuine bug, not a working default: browsers treat\n * `--ui-x: var(--ui-x, ...)` on `:host` as a self-referencing declaration\n * that computes to the guaranteed-invalid value REGARDLESS of what an\n * ancestor (e.g. `:root`) set — the host's own `:host` rule wins the cascade\n * over the ancestor's, so this dropped whatever the app actually set and\n * silently substituted the component's own fallback everywhere. It went\n * unnoticed because every component's fallback happened to equal the\n * intended light-mode value — dark mode (a real, different value at\n * `:root`) exposed it immediately (colors rendering as if no theme were\n * applied at all). Fix: don't redeclare tokens on `:host` — plain\n * inheritance already carries `:root`'s values into every shadow root\n * correctly, and every component already has its own `var(--ui-x, fallback)`\n * at each point of use, so nothing here is needed for the \"zero external\n * CSS\" default to keep working. Kept as an empty export so the existing\n * `static override styles = [tokens, css\\`...\\`]` import in every component\n * keeps compiling.\n */\nexport const tokens = css``;\n"]}
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAA2B;IACjD,SAAS;IACT,cAAc,EAAE,SAAS,EAAE,aAAa;IACxC,oBAAoB,EAAE,SAAS,EAAE,aAAa;IAC9C,4EAA4E;IAC5E,2EAA2E;IAC3E,0EAA0E;IAC1E,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,sEAAsE;IACtE,uEAAuE;IACvE,wEAAwE;IACxE,wEAAwE;IACxE,wBAAwB,EAAE,4BAA4B;IACtD,8BAA8B,EAAE,kCAAkC;IAClE,+BAA+B,EAAE,yDAAyD;IAC1F,oBAAoB,EAAE,aAAa;IACnC,0EAA0E;IAC1E,2EAA2E;IAC3E,4EAA4E;IAC5E,yEAAyE;IACzE,qEAAqE;IACrE,yEAAyE;IACzE,kBAAkB,EAAE,8BAA8B;IAClD,yBAAyB,EAAE,8BAA8B;IACzD,yEAAyE;IACzE,uEAAuE;IACvE,wEAAwE;IACxE,oEAAoE;IACpE,oEAAoE;IACpE,kEAAkE;IAClE,kCAAkC,EAAE,MAAM;IAC1C,wCAAwC,EAAE,MAAM;IAChD,yCAAyC,EAAE,6CAA6C;IACxF,8BAA8B,EAAE,2BAA2B;IAC3D,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;IAC5B,aAAa,EAAE,SAAS;IACxB,mBAAmB,EAAE,SAAS;IAC9B,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,SAAS;IACzB,oBAAoB,EAAE,SAAS;IAC/B,iBAAiB,EAAE,iCAAiC;IAEpD,aAAa,EAAE,SAAS;IACxB,gBAAgB,EAAE,UAAU;IAC5B,cAAc,EAAE,cAAc;IAC9B,WAAW,EACT,oFAAoF;CACvF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,EAAE,CAAC","sourcesContent":["import { css } from \"lit\";\n\n/**\n * Design token values, sourced from Tailwind v4's default theme palette.\n * Each entry maps a `--ui-*` custom property name to its default value.\n * These are the same values baked in as `var(--ui-*, <fallback>)` fallbacks\n * throughout component styles, so components render correctly with zero\n * external CSS. Consumers may override any of these by setting the custom\n * property on `:root` or an ancestor element (see `tokens.css`).\n */\nexport const tokenValues: Record<string, string> = {\n // Colors\n \"--ui-primary\": \"#4f46e5\", // indigo-600\n \"--ui-primary-hover\": \"#4338ca\", // indigo-700\n // Button-specific background/border hooks: default to the flat --ui-primary\n // / --ui-danger tokens above unchanged, so those stay the single source of\n // truth for every other component. Overriding just these lets a theme opt\n // ui-button into a gradient (or any other) background without touching\n // component markup; --ui-button-border/--ui-button-danger-border default\n // to transparent (today's look) and are meant to be paired with a shade\n // darker than the gradient's dark stop when one is set. The `-active`\n // variants default to whatever `-background` already resolved to (so a\n // solid override still applies while pressed) — a gradient theme should\n // set them to the same stops in reverse, for a pressed/\"indented\" look.\n \"--ui-button-background\": \"var(--ui-primary, #4f46e5)\",\n \"--ui-button-background-hover\": \"var(--ui-primary-hover, #4338ca)\",\n \"--ui-button-background-active\": \"var(--ui-button-background, var(--ui-primary, #4f46e5))\",\n \"--ui-button-border\": \"transparent\",\n // The primary/danger fill's own text color, split out from --ui-on-accent\n // (which every button used directly until now): --ui-on-accent means \"text\n // on any solid semantic fill\" and a theme may need to darken it for a light\n // accent color (see developerDarkTokenValues), but that darkening should\n // only reach the button itself if the theme wants it to. Defaults to\n // --ui-on-accent unchanged, so every existing theme renders identically.\n \"--ui-button-text\": \"var(--ui-on-accent, #ffffff)\",\n \"--ui-button-danger-text\": \"var(--ui-on-accent, #ffffff)\",\n // The bordered, transparent-background secondary variant's equivalents —\n // shared with confirm-dialog's Cancel button, which is the same visual\n // pattern. Defaults reproduce today's literal secondary styling exactly\n // (no background at any state, border colors matching --ui-border /\n // --ui-text-muted), so a theme only needs to override these to make\n // secondary/Cancel buttons match a primary/danger gradient theme.\n \"--ui-button-secondary-background\": \"none\",\n \"--ui-button-secondary-background-hover\": \"none\",\n \"--ui-button-secondary-background-active\": \"var(--ui-button-secondary-background, none)\",\n \"--ui-button-secondary-border\": \"var(--ui-border, #e2e8f0)\",\n \"--ui-button-secondary-border-hover\": \"var(--ui-text-muted, #64748b)\",\n // A muted-gray surface used wherever something already paints\n // --ui-surface-muted as a state indicator in flat mode — button-group's\n // unchecked-segment hover, pagination-nav's button hover, and\n // radio-cards/radio-pills' checked background — which is a genuinely\n // different default than secondary's borderless flat hover, so it can't\n // reuse --ui-button-secondary-background-hover's \"none\" default.\n \"--ui-button-secondary-surface-muted\": \"var(--ui-surface-muted, #f8fafc)\",\n // The secondary gloss as two plain stop colors, for SVG surfaces that act\n // as secondary buttons (dag-graph's nodes): SVG fills can't paint a CSS\n // linear-gradient, so they build an SVG gradient from these stops instead.\n // Both default to the flat --ui-surface, i.e. a solid fill; a gradient\n // theme sets them to its secondary background's stops.\n \"--ui-button-secondary-gloss-start\": \"var(--ui-surface, #ffffff)\",\n \"--ui-button-secondary-gloss-end\": \"var(--ui-surface, #ffffff)\",\n // Shared by both primary/danger — a purely cosmetic gloss/legibility pair,\n // not color-specific, so one token covers both variants. `-highlight` is a\n // full box-shadow value (e.g. `inset 0 1px 0 rgb(255 255 255 / 0.35)`) for\n // a glossy top edge, defaulting to a fully transparent (so invisible)\n // shadow rather than the keyword `none` — some usages combine it with\n // another literal shadow in a comma-separated list, where a bare `none`\n // item is invalid CSS and would zero out the *whole* declaration.\n // `-text-shadow` is a full text-shadow value for label legibility against\n // a gradient's lighter stop, always used standalone, so it keeps `none`.\n \"--ui-button-highlight\": \"0 0 0 0 transparent\",\n \"--ui-button-text-shadow\": \"none\",\n // A solid stand-in for the same accent, for spots that can't render a\n // background gradient at all — a native <input>'s accent-color only\n // accepts a plain color, and a hard-stop background gradient (e.g.\n // range-slider's filled track) can't nest another gradient inside its own\n // color-stop list. Consumers that theme the buttons into a gradient should\n // set this to the gradient's dark stop, so these non-button accents (radio\n // selection indicators, the range-slider track/thumb) stay visually\n // coordinated with it even though they can't literally paint a gradient.\n \"--ui-button-accent\": \"var(--ui-primary, #4f46e5)\",\n \"--ui-info\": \"#0ea5e9\", // sky-500\n \"--ui-info-hover\": \"#0284c7\", // sky-600\n \"--ui-danger\": \"#dc2626\", // red-600\n \"--ui-danger-hover\": \"#b91c1c\", // red-700\n \"--ui-button-danger-background\": \"var(--ui-danger, #dc2626)\",\n \"--ui-button-danger-background-hover\": \"var(--ui-danger-hover, #b91c1c)\",\n \"--ui-button-danger-background-active\":\n \"var(--ui-button-danger-background, var(--ui-danger, #dc2626))\",\n \"--ui-button-danger-border\": \"transparent\",\n \"--ui-success\": \"#16a34a\", // green-600\n \"--ui-warning\": \"#d97706\", // amber-600\n \"--ui-warning-hover\": \"#b45309\", // amber-700\n // toast-notification's per-variant background hooks: default to the flat\n // --ui-success/--ui-danger/--ui-info/--ui-warning tokens unchanged, so\n // those stay the single source of truth for every other component —\n // the same pattern as --ui-button-background/--ui-button-danger-background\n // above. `-highlight`/`-text-shadow` are the same glossy-top-edge /\n // legibility-shadow pair as --ui-button-highlight/--ui-button-text-shadow,\n // kept as separate tokens so a theme can gloss toasts and buttons\n // independently.\n \"--ui-toast-success-background\": \"var(--ui-success, #16a34a)\",\n \"--ui-toast-error-background\": \"var(--ui-danger, #dc2626)\",\n \"--ui-toast-info-background\": \"var(--ui-info, #0ea5e9)\",\n \"--ui-toast-warning-background\": \"var(--ui-warning, #d97706)\",\n \"--ui-toast-highlight\": \"0 0 0 0 transparent\",\n \"--ui-toast-text-shadow\": \"none\",\n // AI accent sweep — the four stops of the animated multi-hue ring\n // ui-button's `ai` modifier draws around a button (and the only place a\n // rainbow reads as meaning \"this action is AI-powered\" rather than a\n // semantic state). Ordered around the color wheel and looping back to\n // stop 1, so the sweep is seamless; --ui-ai-2 is --ui-primary's own\n // indigo, anchoring the ring to the rest of the palette. Overriding these\n // four retunes every AI button at once.\n \"--ui-ai-1\": \"#38bdf8\", // sky-400\n \"--ui-ai-2\": \"#6366f1\", // indigo-500\n \"--ui-ai-3\": \"#d946ef\", // fuchsia-500\n \"--ui-ai-4\": \"#fbbf24\", // amber-400\n \"--ui-on-accent\": \"#ffffff\",\n \"--ui-text\": \"#0f172a\", // slate-900\n \"--ui-text-muted\": \"#64748b\", // slate-500\n \"--ui-border\": \"#e2e8f0\", // slate-200\n \"--ui-surface\": \"#ffffff\", // white\n \"--ui-surface-muted\": \"#f8fafc\", // slate-50\n \"--ui-highlight\": \"#fde68a\", // amber-200 — transient \"just changed\" flash\n \"--ui-tooltip\": \"#0f172a\", // slate-900\n // The tooltip's own foreground, kept separate from --ui-on-accent: that\n // token means \"text on a solid *semantic* fill\" (a button, a toast), which\n // a theme may need to darken if it makes those fills light (see\n // developerDarkTokenValues). --ui-tooltip's own fill is a dedicated dark\n // surface in every theme regardless, so its text stays white unconditionally.\n \"--ui-tooltip-text\": \"#ffffff\",\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.32)\",\n \"--ui-overlay\": \"rgb(15 23 42 / 0.45)\", // slate-900 / 45%\n // Same reasoning as --ui-tooltip-text: a control drawn directly on the\n // --ui-overlay scrim (photo-gallery's arrow buttons) needs text/icon\n // contrast against that always-dark backdrop, not against whatever a theme\n // repoints --ui-on-accent to for its semantic fills.\n \"--ui-overlay-text\": \"#ffffff\",\n\n // Shape / depth\n \"--ui-radius\": \"0.5rem\", // rounded-lg\n \"--ui-radius-sm\": \"0.25rem\", // rounded\n // The width of a themeable surface/control border. Spacing is deliberately\n // untokenized, but a border is chrome rather than layout: the `blueprint`\n // theme's whole structure is carried by hairline rules instead of shadows,\n // and it needs those rules one step heavier than the default. Defaults to\n // the literal 1px every component used before, so nothing renders\n // differently until a theme overrides it. Only genuine surface/control\n // borders read this — forced-colors `CanvasText` borders and purely\n // decorative literals (a slider thumb's white ring, a tab's 2px underline)\n // keep their own widths, since those aren't the theme's structural rules.\n // Anything with a fixed height/width and a themeable border must also set\n // `box-sizing: border-box`, or a heavier border grows it past the shared\n // 2rem control target.\n \"--ui-border-width\": \"1px\",\n // Deliberate pill/circle shapes — a chip, an avatar, a slider thumb, a dot.\n // Tokenized rather than hardcoded so a theme that squares the design system\n // (metro) can reach them too; a literal 9999px/50% silently opts that shape\n // out of every theme. Use these only where the shape is the point, not as a\n // heavier --ui-radius.\n \"--ui-radius-pill\": \"9999px\",\n \"--ui-radius-circle\": \"50%\",\n \"--ui-shadow\":\n \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\", // shadow-md\n \"--ui-shadow-lg\":\n \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\", // shadow-xl\n \"--ui-focus-ring\": \"0 0 0 3px rgb(79 70 229 / 0.35)\",\n\n // Type\n \"--ui-font\":\n 'ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"',\n \"--ui-font-mono\":\n \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace\",\n \"--ui-font-size-lg\": \"1rem\", // text-base\n \"--ui-font-size\": \"0.875rem\", // text-sm\n \"--ui-font-size-sm\": \"0.75rem\", // text-xs\n \"--ui-font-size-xs\": \"0.6875rem\",\n\n // Font weights — the only four weights the system uses.\n \"--ui-font-weight-regular\": \"400\",\n \"--ui-font-weight-medium\": \"500\",\n \"--ui-font-weight-semibold\": \"600\",\n \"--ui-font-weight-bold\": \"700\",\n\n // Line heights — glyph (icon/marker box), tight (headings), normal (body).\n \"--ui-line-height-glyph\": \"1\",\n \"--ui-line-height-tight\": \"1.25\",\n \"--ui-line-height-normal\": \"1.5\",\n\n // Letter spacing / tracking — default and the single widened step.\n \"--ui-tracking-normal\": \"0\",\n \"--ui-tracking-wide\": \"0.04em\",\n\n // Casing of chrome micro-labels — the small, wide-tracked labels that name a\n // region rather than carry content (a `frame-box` legend, an `app-sidebar`\n // section heading, a `stat-meter` caption). Defaults to `none`, today's\n // sentence case, so nothing changes until a theme sets it; the `blueprint`\n // theme sets `uppercase`, where signage-style labels are the point. Never\n // apply this to user-supplied content — shouting someone's data is not a\n // theme's decision, and `text-transform` is a presentational lie that\n // survives copy/paste as the original casing anyway.\n \"--ui-label-transform\": \"none\",\n\n // Numeral rendering for figures that change in place or stack into a column\n // — a score, a page number, a running clock. Defaults to `normal`\n // (proportional, as before); `tabular-nums` stops digits from jittering\n // horizontally as they tick, which the `blueprint` theme's spec-sheet\n // aesthetic wants everywhere.\n \"--ui-numeric\": \"normal\",\n};\n\n/**\n * Dark-mode overrides for the same `--ui-*` custom properties, applied by\n * `tokens.css` via `@media (prefers-color-scheme: dark)` and `[data-theme]`\n * (see generate-tokens-css.mjs). Same Tailwind slate scale as the light\n * palette, inverted, with primary/danger/success lightened one step (500\n * instead of 600) for sufficient contrast against dark surfaces. Shape/type\n * tokens are theme-independent and not repeated here.\n */\nexport const darkTokenValues: Record<string, string> = {\n \"--ui-primary\": \"#6366f1\", // indigo-500\n \"--ui-primary-hover\": \"#818cf8\", // indigo-400\n \"--ui-info\": \"#38bdf8\", // sky-400\n \"--ui-info-hover\": \"#7dd3fc\", // sky-300\n \"--ui-danger\": \"#ef4444\", // red-500\n \"--ui-danger-hover\": \"#f87171\", // red-400\n \"--ui-success\": \"#22c55e\", // green-500\n \"--ui-warning\": \"#f59e0b\", // amber-500\n \"--ui-warning-hover\": \"#fbbf24\", // amber-400\n \"--ui-on-accent\": \"#ffffff\",\n \"--ui-text\": \"#f1f5f9\", // slate-100\n \"--ui-text-muted\": \"#94a3b8\", // slate-400\n \"--ui-border\": \"#334155\", // slate-700\n \"--ui-surface\": \"#0f172a\", // slate-900\n \"--ui-surface-muted\": \"#1e293b\", // slate-800\n \"--ui-highlight\": \"#854d0e\", // amber-800 — transient \"just changed\" flash on dark\n \"--ui-tooltip\": \"#020617\", // slate-950\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.12)\",\n \"--ui-overlay\": \"rgb(2 6 23 / 0.6)\", // slate-950 / 60%\n \"--ui-focus-ring\": \"0 0 0 3px rgb(99 102 241 / 0.45)\",\n};\n\n/**\n * \"Gradient\" theme overrides, applied via `data-theme=\"gradient\"` on `<html>`\n * (see `generate-tokens-css.mjs`) — forces `color-scheme: light` like the\n * `\"light\"` override and layers a glossy gradient look on top of the flat\n * light palette, using exactly the `--ui-button-*`/`--ui-button-danger-*`/\n * `--ui-button-secondary-*` hooks `ui-button.ts` already reads (see that\n * file's doc comment), plus the `--ui-toast-*` hooks `toast-notification.ts`\n * reads (see its doc comment). Every other token (`--ui-text`, `--ui-surface`,\n * …) is left at its light-mode default — this theme only glosses buttons and\n * toasts by design. Each variant's gradient runs light-to-dark top-to-bottom\n * (`180deg`) across one Tailwind shade step lighter/darker than the flat\n * token so it still reads as \"the same color, glossy\" rather than a\n * different hue; `-hover` shifts the whole pair one shade lighter, `-active`\n * reverses the two stops for a pressed/\"indented\" look, and `-border` is a\n * shade darker than the gradient's dark stop for a defining edge.\n */\nexport const gradientTokenValues: Record<string, string> = {\n \"--ui-button-background\": \"linear-gradient(180deg, #6366f1 0%, #4f46e5 100%)\", // indigo-500 -> 600\n \"--ui-button-background-hover\": \"linear-gradient(180deg, #818cf8 0%, #6366f1 100%)\", // indigo-400 -> 500\n \"--ui-button-background-active\": \"linear-gradient(180deg, #4f46e5 0%, #6366f1 100%)\", // reversed 600 -> 500\n \"--ui-button-border\": \"#4338ca\", // indigo-700\n \"--ui-button-danger-background\": \"linear-gradient(180deg, #ef4444 0%, #dc2626 100%)\", // red-500 -> 600\n \"--ui-button-danger-background-hover\": \"linear-gradient(180deg, #f87171 0%, #ef4444 100%)\", // red-400 -> 500\n \"--ui-button-danger-background-active\": \"linear-gradient(180deg, #dc2626 0%, #ef4444 100%)\", // reversed 600 -> 500\n \"--ui-button-danger-border\": \"#b91c1c\", // red-700\n // Secondary stays neutral gray rather than a saturated hue, matching its\n // flat \"not the primary action\" role, but one shade darker than the\n // original white -> slate-50 pairing: at a small button size, that pair\n // read as flat white with no visible gradient at all. slate-50 -> 100\n // keeps enough contrast to actually look like a gradient while still\n // being clearly lighter/quieter than primary/danger. Border stays\n // slate-300 (a step past the flat slate-200) so its edge still reads\n // against the fill.\n \"--ui-button-secondary-background\": \"linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%)\", // slate-50 -> 100\n \"--ui-button-secondary-background-hover\": \"linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%)\", // slate-100 -> 200\n \"--ui-button-secondary-background-active\": \"linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%)\", // reversed 100 -> 50\n \"--ui-button-secondary-border\": \"#cbd5e1\", // slate-300\n \"--ui-button-secondary-border-hover\": \"#94a3b8\", // slate-400\n // button-group's unchecked segments, pagination-nav's prev/next buttons, and\n // radio-cards/radio-pills' checked background read this rather than\n // --ui-button-secondary-background (see tokens above). Left flat they were\n // the one \"secondary\" surface that stayed matte while every actual secondary\n // button turned glossy, so it tracks the hover gradient rather than a\n // separate literal that could drift out of step with it.\n \"--ui-button-secondary-surface-muted\": \"var(--ui-button-secondary-background-hover)\",\n // Stops of --ui-button-secondary-background above, for SVG surfaces.\n \"--ui-button-secondary-gloss-start\": \"#f8fafc\", // slate-50\n \"--ui-button-secondary-gloss-end\": \"#f1f5f9\", // slate-100\n \"--ui-button-highlight\": \"inset 0 1px 0 rgb(255 255 255 / 0.35)\", // glossy top edge\n \"--ui-button-text-shadow\": \"0 1px 1px rgb(0 0 0 / 0.25)\", // legibility on primary/danger\n \"--ui-button-accent\": \"#4338ca\", // indigo-700, matches --ui-button-border\n // toast-notification: same light-to-dark, one-shade-step gradient\n // convention as the button variants above; the bottom stop always matches\n // the flat --ui-success/--ui-danger/--ui-info/--ui-warning value exactly.\n \"--ui-toast-success-background\": \"linear-gradient(180deg, #22c55e 0%, #16a34a 100%)\", // green-500 -> 600\n \"--ui-toast-error-background\": \"linear-gradient(180deg, #ef4444 0%, #dc2626 100%)\", // red-500 -> 600\n \"--ui-toast-info-background\": \"linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%)\", // sky-400 -> 500\n \"--ui-toast-warning-background\": \"linear-gradient(180deg, #f59e0b 0%, #d97706 100%)\", // amber-500 -> 600\n \"--ui-toast-highlight\": \"inset 0 1px 0 rgb(255 255 255 / 0.35)\", // glossy top edge, same as --ui-button-highlight\n \"--ui-toast-text-shadow\": \"0 1px 1px rgb(0 0 0 / 0.25)\", // legibility, same as --ui-button-text-shadow\n};\n\n/**\n * \"Metro\" theme overrides, applied via `data-theme=\"metro\"` on `<html>` (see\n * `generate-tokens-css.mjs`) — forces `color-scheme: light` like the `\"light\"`\n * and `\"gradient\"` overrides, and strips the roundness and depth off the flat\n * light palette to leave hard-edged surfaces over a blue accent, after the\n * dense square-cornered look of the early social bookmarking sites.\n *\n * This is the first theme to override shape rather than only color, so the\n * \"shape/type tokens are theme-independent\" rule `darkTokenValues` notes above\n * holds for every theme except this one (see `docs/design-language.md`).\n * Squaring the design system means squaring the deliberate pill and circle\n * shapes too — chips, avatars, dots, slider thumbs — which is why those read\n * `--ui-radius-pill`/`--ui-radius-circle` rather than hardcoding `9999px`/`50%`\n * (a literal would silently opt that shape out of the theme).\n *\n * One residual is genuinely out of reach: `price-history-chart` rounds its bars\n * with an SVG `rx` presentation attribute, which cannot take a `var()`, so\n * those stay slightly rounded under metro.\n *\n * The shadows flatten to a hairline ring rather than to `none`. Dropping them\n * outright would leave `slide-panel` — the only overlay with no border of its\n * own — as an invisible white-on-white edge; every other consumer of\n * `--ui-shadow*` either pairs it with `1px solid var(--ui-border)` or applies\n * it on hover/active over an already-bordered control. A hard 1px ring keeps\n * that separation while removing the blur and the faked depth.\n */\nexport const metroTokenValues: Record<string, string> = {\n \"--ui-primary\": \"#3274d0\", // the del.icio.us blue; no Tailwind equivalent\n \"--ui-primary-hover\": \"#2559a8\",\n \"--ui-focus-ring\": \"0 0 0 2px #3274d0\", // solid and crisp, not the default 3px translucent ring\n \"--ui-radius\": \"0\",\n \"--ui-radius-sm\": \"0\",\n \"--ui-radius-pill\": \"0\",\n \"--ui-radius-circle\": \"0\",\n // Hairline rings (slate-900 at low alpha) rather than blurred drop shadows:\n // separation without depth. -lg is a touch stronger, matching the default\n // pair's relative weighting.\n \"--ui-shadow\": \"0 0 0 1px rgb(15 23 42 / 0.12)\",\n \"--ui-shadow-lg\": \"0 0 0 1px rgb(15 23 42 / 0.18)\",\n};\n\n/**\n * \"Blueprint\" theme overrides, applied via `data-theme=\"blueprint\"` on `<html>`\n * (see `generate-tokens-css.mjs`) — forces `color-scheme: light` like every\n * other non-dark theme, and restyles the light palette as a technical catalog\n * / spec sheet: warm near-black ink on white paper, one pure-blue accent,\n * square corners, and structure carried entirely by hairline rules instead of\n * shadows.\n *\n * It is the widest theme in the system, and the reason three token axes exist\n * that no earlier theme needed:\n *\n * - `--ui-font` is retargeted to a monospace stack. `darkTokenValues` notes\n * that shape and type tokens are theme-independent; `metro` already broke\n * that for shape, and this breaks it for the type *family* only. Type\n * *metrics* (size, weight, line height) remain unthemed in every theme —\n * they encode hierarchy, which is not a stylistic choice. \"Space Mono\"\n * leads the stack purely so a consumer who loads that webfont gets the\n * reference face automatically; with no external CSS at all it falls\n * straight through to the same system mono stack `--ui-font-mono` uses, so\n * the theme still renders correctly on its own.\n * - `--ui-border-width` goes to `1.5px`. Every border in this theme is doing\n * the work a shadow does elsewhere, and at 1px those rules read as a faint\n * table rather than as drawn structure.\n * - `--ui-label-transform` goes to `uppercase`, which is what makes chrome\n * micro-labels read as signage/spec-sheet keys. Only labels that name a\n * region or column carry this — never user content.\n * - `--ui-numeric` goes to `tabular-nums`, so figures line up in a column and\n * do not jitter as they change.\n *\n * Buttons are deliberately NOT the accent color. `--ui-primary` stays pure\n * blue because it drives accents everywhere else (active tab underlines,\n * selected states, links, the certification-style tints), but the primary\n * button fill is overridden to ink through the `--ui-button-*` hooks and only\n * turns blue on hover — a black-on-white CTA that lights up is the\n * catalog-print look, and a large pure-blue fill next to blue accents would\n * flatten the two roles into one. That split is exactly what those hooks\n * exist for (see `gradientTokenValues` above for the same technique).\n *\n * Semantic `danger`/`success`/`warning` keep their default hues: they encode\n * meaning rather than style, and the reference's blue-only restraint is an\n * editorial choice a component library cannot make on a consumer's behalf.\n * `--ui-info` is the exception — it is \"neutral notice\", which in this theme\n * is precisely the accent, and the default sky blue would otherwise sit a few\n * degrees off the pure blue beside it and read as a mistake.\n *\n * Shadows flatten to a hard ink ring rather than to `none`, for the same\n * reason `metro` does it: `slide-panel` has no border of its own and would\n * otherwise lose its edge entirely.\n */\nexport const blueprintTokenValues: Record<string, string> = {\n // Ink over paper. --ui-text-muted is the same ink at ~65% over white rather\n // than a neutral gray, so the quiet text stays in the same warm family\n // instead of turning blue-gray beside the accent.\n \"--ui-text\": \"#17160f\",\n \"--ui-text-muted\": \"#686763\",\n \"--ui-surface\": \"#ffffff\",\n \"--ui-surface-muted\": \"#f0f0f0\",\n // ~55% ink over white. Darker than it looks like it needs to be, because a\n // border is often the only thing bounding a white-on-white control, and\n // WCAG 1.4.11 wants 3:1 against both adjacent surfaces for that: this is\n // 3.55:1 on white and 3.12:1 on the muted surface. The lighter ~40% ink\n // (#a2a29f) reads better but only reaches 2.56:1, and 1.5px of extra weight\n // does not buy an exemption. Still short of fully black, which at this width\n // would turn every bordered surface into a hard box.\n \"--ui-border\": \"#898883\",\n \"--ui-tooltip\": \"#17160f\",\n \"--ui-overlay\": \"rgb(23 22 15 / 0.45)\",\n // The \"just changed\" flash tints toward the accent instead of amber, which\n // is the one warm hue this palette has no room for.\n \"--ui-highlight\": \"#dcdcff\",\n\n \"--ui-primary\": \"#0000ff\",\n \"--ui-primary-hover\": \"#0000cc\",\n \"--ui-info\": \"#0000ff\",\n \"--ui-info-hover\": \"#0000cc\",\n \"--ui-on-accent\": \"#ffffff\",\n // Solid and crisp at the reference's own 2px, not the default translucent\n // 3px halo — a blurred ring is the one soft edge this theme has nowhere to\n // put.\n \"--ui-focus-ring\": \"0 0 0 2px #0000ff\",\n\n // Ink CTA that lights up blue on hover, and inverts its two stops while\n // pressed. The border is ink at every state so the button keeps a defining\n // edge even once the fill goes blue.\n \"--ui-button-background\": \"#17160f\",\n \"--ui-button-background-hover\": \"#0000ff\",\n \"--ui-button-background-active\": \"#0000cc\",\n \"--ui-button-border\": \"#17160f\",\n \"--ui-button-danger-border\": \"#b91c1c\",\n // Secondary is the reference's ghost button: no fill, ink border, a paper\n // wash on hover and an accent border to echo the primary's hover.\n \"--ui-button-secondary-border\": \"#17160f\",\n \"--ui-button-secondary-border-hover\": \"#0000ff\",\n \"--ui-button-secondary-background-hover\": \"#f0f0f0\",\n \"--ui-button-secondary-surface-muted\": \"#f0f0f0\",\n // Non-button accents that can only take a plain color (a native input's\n // accent-color, range-slider's track/thumb) follow --ui-primary, not the\n // ink button fill — those are selection marks, not calls to action.\n \"--ui-button-accent\": \"#0000ff\",\n\n \"--ui-radius\": \"0\",\n \"--ui-radius-sm\": \"0\",\n \"--ui-radius-pill\": \"0\",\n \"--ui-radius-circle\": \"0\",\n \"--ui-shadow\": \"0 0 0 1.5px rgb(23 22 15 / 0.24)\",\n \"--ui-shadow-lg\": \"0 0 0 1.5px #17160f\",\n\n \"--ui-border-width\": \"1.5px\",\n \"--ui-label-transform\": \"uppercase\",\n \"--ui-numeric\": \"tabular-nums\",\n \"--ui-font\":\n '\"Space Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n};\n\n/**\n * \"Developer dark\" theme overrides, applied via `data-theme=\"developer-dark\"`\n * on `<html>` (see `generate-tokens-css.mjs`) — a true dark palette, not one\n * layered on the light palette, so it is handled like `\"dark\"` itself: its own\n * explicit `:root[data-theme=\"developer-dark\"]` block layered over\n * `darkTokenValues` (not the light palette), needing no dark-media-query\n * exclusion (see `scripts/tokens-css.mjs`'s `darkThemes` list, which merges\n * this map over `darkTokenValues` before emitting the block). Only tokens\n * that differ from `darkTokenValues` need to be listed here; anything not\n * repeated falls through to the same dark default `\"dark\"` itself uses, which\n * is why this list happens to repeat nearly all of `darkTokenValues`'s own\n * keys — a dark theme rarely agrees with the *other* dark theme's colors.\n * Shape/type tokens not present in `darkTokenValues` either (radius-pill,\n * shadow, border-width, label-transform) fall through one level further, to\n * the light palette's defaults, via the ordinary `:root` cascade.\n *\n * Modeled on a real reference (a monospace, editor/terminal-chrome developer\n * tool marketing page): near-black warm ink-well background, a warm off-white\n * foreground, and one accent green used for links, focus rings, and button\n * fills — with dark ink (not white) as the fill's foreground, since the\n * accent itself is light enough to carry dark text at high contrast (8.3:1),\n * matching the reference's own \"ink CTA that fills with the accent\" button.\n *\n * Like `blueprintTokenValues`, this is a \"wide\" theme that also retunes shape\n * and type: `--ui-font` retargets to a monospace stack (falls through to the\n * system mono stack with zero webfont, same technique as blueprint's \"Space\n * Mono\"), corners are small but not squared (2–4px, not 0 — this theme reads\n * as a dark code editor, not blueprint's flattened spec sheet), and\n * `--ui-numeric: tabular-nums` keeps the diff/stat figures from jittering.\n * Unlike `blueprint`, chrome labels stay sentence-case (`--ui-label-transform`\n * is left at its default) — the reference's own section labels are lowercase\n * `snake_case`, not shouted.\n */\nexport const developerDarkTokenValues: Record<string, string> = {\n \"--ui-primary\": \"#83c167\",\n \"--ui-primary-hover\": \"#a3d488\",\n \"--ui-info\": \"#e08a4a\",\n \"--ui-info-hover\": \"#e8a06a\",\n \"--ui-danger\": \"#e0705f\",\n \"--ui-danger-hover\": \"#e88b7d\",\n \"--ui-success\": \"#83c167\",\n \"--ui-warning\": \"#d8a657\",\n \"--ui-warning-hover\": \"#e0b877\",\n // Dark ink, not white — the accent itself is light enough (8.3:1 against\n // it) to carry dark text, and that ink-on-green fill is the reference's own\n // CTA look.\n \"--ui-on-accent\": \"#0e0d0b\",\n \"--ui-text\": \"#d8d3c5\",\n \"--ui-text-muted\": \"#8b8270\",\n \"--ui-border\": \"#211f19\",\n \"--ui-surface\": \"#0e0d0b\",\n // Lighter than --ui-surface, same direction as darkTokenValues' own\n // surface-muted (an elevated panel reads lighter, not darker, once the base\n // is already near-black).\n \"--ui-surface-muted\": \"#161410\",\n // A translucent accent wash rather than a hand-picked solid, so the flash\n // stays legible without depending on exactly which dark literal the surface\n // ends up at.\n \"--ui-highlight\": \"rgb(131 193 103 / 0.25)\",\n \"--ui-tooltip\": \"#050504\",\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.12)\",\n \"--ui-overlay\": \"rgb(5 4 4 / 0.6)\",\n \"--ui-focus-ring\": \"0 0 0 3px rgb(131 193 103 / 0.45)\",\n\n \"--ui-radius\": \"0.25rem\",\n \"--ui-radius-sm\": \"0.125rem\",\n \"--ui-numeric\": \"tabular-nums\",\n \"--ui-font\":\n '\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n};\n\n/**\n * \"Developer light\" theme overrides, applied via `data-theme=\"developer-light\"`\n * on `<html>` (see `generate-tokens-css.mjs`) — the light counterpart to\n * `developerDarkTokenValues` above. The reference this pair is modeled on\n * never shipped a light mode (its own light-mode toggle is a running joke\n * that refuses to switch); this theme exists anyway, built from the two\n * colors that joke's own tooltip already uses (a warm cream bubble with near-\n * black ink) — the closest thing the reference gives to \"what its light mode\n * would have looked like.\"\n *\n * Layered on the light palette like `gradient`/`metro`/`blueprint` (needs the\n * dark-media-query exclusion, hence `lightThemes` in `generate-tokens-css.mjs`\n * rather than `darkThemes`), so only the differences from `tokenValues` are\n * listed here — same convention as `blueprintTokenValues`.\n *\n * The accent green is darkened one step further than `developerDarkTokenValues`'s\n * brighter green — that brighter green fails contrast against a light paper\n * both as plain text (1.85:1) and as a white-on-fill button (2.15:1); this\n * darker step clears both (5.0:1 text, 5.8:1 white-on-fill), so this theme\n * keeps `--ui-on-accent` at its default white rather than reusing the dark\n * theme's ink-on-accent trick, which does not have enough contrast at this\n * darker shade (3.65:1 unbolded).\n */\nexport const developerLightTokenValues: Record<string, string> = {\n \"--ui-text\": \"#1a1813\",\n \"--ui-text-muted\": \"#6b6255\",\n \"--ui-surface\": \"#f3eee1\",\n \"--ui-surface-muted\": \"#e8e1cf\",\n \"--ui-border\": \"#d9d0ba\",\n \"--ui-tooltip\": \"#1a1813\",\n \"--ui-overlay\": \"rgb(26 24 19 / 0.45)\",\n \"--ui-hover-overlay\": \"rgb(255 255 255 / 0.32)\",\n \"--ui-highlight\": \"#f0dfa0\",\n\n \"--ui-primary\": \"#457032\",\n \"--ui-primary-hover\": \"#3a6329\",\n \"--ui-info\": \"#8f5124\",\n \"--ui-info-hover\": \"#7a4420\",\n \"--ui-danger\": \"#a8402f\",\n \"--ui-danger-hover\": \"#8c3625\",\n \"--ui-success\": \"#457032\",\n \"--ui-warning\": \"#7c5d24\",\n \"--ui-warning-hover\": \"#5e4419\",\n \"--ui-focus-ring\": \"0 0 0 3px rgb(69 112 50 / 0.35)\",\n\n \"--ui-radius\": \"0.25rem\",\n \"--ui-radius-sm\": \"0.125rem\",\n \"--ui-numeric\": \"tabular-nums\",\n \"--ui-font\":\n '\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace',\n};\n\n/**\n * Historically a shared `:host { --ui-x: var(--ui-x, fallback); } ` block,\n * re-declaring every token on each component's own host element as a\n * \"materialize the inherited value, or this fallback\" trick. That pattern\n * turned out to be a genuine bug, not a working default: browsers treat\n * `--ui-x: var(--ui-x, ...)` on `:host` as a self-referencing declaration\n * that computes to the guaranteed-invalid value REGARDLESS of what an\n * ancestor (e.g. `:root`) set — the host's own `:host` rule wins the cascade\n * over the ancestor's, so this dropped whatever the app actually set and\n * silently substituted the component's own fallback everywhere. It went\n * unnoticed because every component's fallback happened to equal the\n * intended light-mode value — dark mode (a real, different value at\n * `:root`) exposed it immediately (colors rendering as if no theme were\n * applied at all). Fix: don't redeclare tokens on `:host` — plain\n * inheritance already carries `:root`'s values into every shadow root\n * correctly, and every component already has its own `var(--ui-x, fallback)`\n * at each point of use, so nothing here is needed for the \"zero external\n * CSS\" default to keep working. Kept as an empty export so the existing\n * `static override styles = [tokens, css\\`...\\`]` import in every component\n * keeps compiling.\n */\nexport const tokens = css``;\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Height of every node card, in pixels. */
|
|
2
|
+
export declare const DAG_NODE_HEIGHT = 24;
|
|
3
|
+
/** Space before a node's label: left padding, 14px icon, and gap. */
|
|
4
|
+
export declare const DAG_LABEL_OFFSET = 26;
|
|
5
|
+
/** Space before a node's label when it has no icon. */
|
|
6
|
+
export declare const DAG_LABEL_OFFSET_PLAIN = 8;
|
|
7
|
+
/** Narrowest node card, in pixels. */
|
|
8
|
+
export declare const DAG_MIN_NODE_WIDTH = 48;
|
|
9
|
+
/** Widest node card, in pixels; longer labels are shortened with an ellipsis. */
|
|
10
|
+
export declare const DAG_MAX_NODE_WIDTH = 200;
|
|
11
|
+
/** Flow direction of the layers: left to right or top to bottom. */
|
|
12
|
+
export type DagDirection = "LR" | "TB";
|
|
13
|
+
/** Returns the rendered width of a label in pixels. */
|
|
14
|
+
export type MeasureText = (text: string) => number;
|
|
15
|
+
/** Width estimate used when the browser cannot measure text (no 2D canvas). */
|
|
16
|
+
export declare const approximateTextWidth: MeasureText;
|
|
17
|
+
/** A point in layout coordinates. */
|
|
18
|
+
export interface DagPoint {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
}
|
|
22
|
+
/** One node to lay out. */
|
|
23
|
+
export interface DagLayoutInput {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
/** Whether the node shows an icon before its label. */
|
|
27
|
+
hasIcon: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** A positioned node: centered at `(x, y)` and sized to its (possibly shortened) label. */
|
|
30
|
+
export interface DagLayoutNode extends DagPoint {
|
|
31
|
+
id: string;
|
|
32
|
+
width: number;
|
|
33
|
+
label: string;
|
|
34
|
+
}
|
|
35
|
+
/** A routed edge; `backward` edges run against the flow direction and close a cycle. */
|
|
36
|
+
export interface DagLayoutEdge {
|
|
37
|
+
source: string;
|
|
38
|
+
target: string;
|
|
39
|
+
points: DagPoint[];
|
|
40
|
+
backward: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** Positioned nodes and routed edges, in input-independent order. */
|
|
43
|
+
export interface DagLayout {
|
|
44
|
+
nodes: DagLayoutNode[];
|
|
45
|
+
edges: DagLayoutEdge[];
|
|
46
|
+
}
|
|
47
|
+
/** Shortens `text` with an ellipsis until it fits `maxWidth`. */
|
|
48
|
+
export declare function fitLabel(text: string, maxWidth: number, measure: MeasureText): string;
|
|
49
|
+
/**
|
|
50
|
+
* Lays out a directed graph in layers (Sugiyama-style, via dagre) so every edge points along `direction`.
|
|
51
|
+
*
|
|
52
|
+
* Cycles are broken only to assign layers: every edge is returned, and the ones that close a cycle are marked
|
|
53
|
+
* `backward`. Edges whose endpoints are not both in `nodes`, self-edges, and duplicates are ignored. The result
|
|
54
|
+
* does not depend on input order.
|
|
55
|
+
*/
|
|
56
|
+
export declare function layoutDag(nodes: DagLayoutInput[], edges: Array<{
|
|
57
|
+
source: string;
|
|
58
|
+
target: string;
|
|
59
|
+
}>, direction?: DagDirection, measure?: MeasureText): DagLayout;
|
|
60
|
+
//# sourceMappingURL=dag-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag-layout.d.ts","sourceRoot":"","sources":["../../src/utils/dag-layout.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,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAKrF;AASD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,cAAc,EAAE,EACvB,KAAK,EAAE,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,EAChD,SAAS,GAAE,YAAmB,EAC9B,OAAO,GAAE,WAAkC,GAC1C,SAAS,CA2CX"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Graph, layout } from "@dagrejs/dagre";
|
|
2
|
+
/** Height of every node card, in pixels. */
|
|
3
|
+
export const DAG_NODE_HEIGHT = 24;
|
|
4
|
+
/** Space before a node's label: left padding, 14px icon, and gap. */
|
|
5
|
+
export const DAG_LABEL_OFFSET = 26;
|
|
6
|
+
/** Space before a node's label when it has no icon. */
|
|
7
|
+
export const DAG_LABEL_OFFSET_PLAIN = 8;
|
|
8
|
+
const LABEL_PADDING_END = 10;
|
|
9
|
+
/** Narrowest node card, in pixels. */
|
|
10
|
+
export const DAG_MIN_NODE_WIDTH = 48;
|
|
11
|
+
/** Widest node card, in pixels; longer labels are shortened with an ellipsis. */
|
|
12
|
+
export const DAG_MAX_NODE_WIDTH = 200;
|
|
13
|
+
const RANK_GAP = 90;
|
|
14
|
+
const NODE_GAP = 6;
|
|
15
|
+
const ELLIPSIS = "…";
|
|
16
|
+
/** Width estimate used when the browser cannot measure text (no 2D canvas). */
|
|
17
|
+
export const approximateTextWidth = (text) => text.length * 6.2;
|
|
18
|
+
/** Shortens `text` with an ellipsis until it fits `maxWidth`. */
|
|
19
|
+
export function fitLabel(text, maxWidth, measure) {
|
|
20
|
+
if (measure(text) <= maxWidth)
|
|
21
|
+
return text;
|
|
22
|
+
let end = text.length - 1;
|
|
23
|
+
while (end > 1 && measure(text.slice(0, end) + ELLIPSIS) > maxWidth)
|
|
24
|
+
end -= 1;
|
|
25
|
+
return text.slice(0, end) + ELLIPSIS;
|
|
26
|
+
}
|
|
27
|
+
function nodeSize(node, measure) {
|
|
28
|
+
const offset = node.hasIcon ? DAG_LABEL_OFFSET : DAG_LABEL_OFFSET_PLAIN;
|
|
29
|
+
const label = fitLabel(node.label, DAG_MAX_NODE_WIDTH - offset - LABEL_PADDING_END, measure);
|
|
30
|
+
const width = Math.ceil(offset + measure(label) + LABEL_PADDING_END);
|
|
31
|
+
return { label, width: Math.min(DAG_MAX_NODE_WIDTH, Math.max(DAG_MIN_NODE_WIDTH, width)) };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Lays out a directed graph in layers (Sugiyama-style, via dagre) so every edge points along `direction`.
|
|
35
|
+
*
|
|
36
|
+
* Cycles are broken only to assign layers: every edge is returned, and the ones that close a cycle are marked
|
|
37
|
+
* `backward`. Edges whose endpoints are not both in `nodes`, self-edges, and duplicates are ignored. The result
|
|
38
|
+
* does not depend on input order.
|
|
39
|
+
*/
|
|
40
|
+
export function layoutDag(nodes, edges, direction = "LR", measure = approximateTextWidth) {
|
|
41
|
+
if (nodes.length === 0)
|
|
42
|
+
return { nodes: [], edges: [] };
|
|
43
|
+
const graph = new Graph();
|
|
44
|
+
graph.setGraph({
|
|
45
|
+
rankdir: direction,
|
|
46
|
+
ranksep: RANK_GAP,
|
|
47
|
+
nodesep: NODE_GAP,
|
|
48
|
+
edgesep: 4,
|
|
49
|
+
marginx: 0,
|
|
50
|
+
marginy: 0,
|
|
51
|
+
});
|
|
52
|
+
graph.setDefaultEdgeLabel(() => ({}));
|
|
53
|
+
const sorted = [...nodes].sort((a, b) => a.id.localeCompare(b.id));
|
|
54
|
+
const sizes = new Map(sorted.map((node) => [node.id, nodeSize(node, measure)]));
|
|
55
|
+
for (const node of sorted) {
|
|
56
|
+
graph.setNode(node.id, { width: sizes.get(node.id).width, height: DAG_NODE_HEIGHT });
|
|
57
|
+
}
|
|
58
|
+
const known = new Set(sizes.keys());
|
|
59
|
+
const unique = new Map(edges
|
|
60
|
+
.filter((edge) => known.has(edge.source) && known.has(edge.target) && edge.source !== edge.target)
|
|
61
|
+
.map((edge) => [`${edge.source}\u0000${edge.target}`, { source: edge.source, target: edge.target }]));
|
|
62
|
+
const kept = [...unique.values()].sort((a, b) => a.source.localeCompare(b.source) || a.target.localeCompare(b.target));
|
|
63
|
+
for (const edge of kept)
|
|
64
|
+
graph.setEdge(edge.source, edge.target);
|
|
65
|
+
layout(graph);
|
|
66
|
+
const positioned = new Map(sorted.map((node) => {
|
|
67
|
+
const { x, y } = graph.node(node.id);
|
|
68
|
+
return [node.id, { id: node.id, x, y, ...sizes.get(node.id) }];
|
|
69
|
+
}));
|
|
70
|
+
const axis = direction === "LR" ? "x" : "y";
|
|
71
|
+
return {
|
|
72
|
+
nodes: [...positioned.values()],
|
|
73
|
+
edges: kept.map((edge) => ({
|
|
74
|
+
...edge,
|
|
75
|
+
points: graph.edge(edge.source, edge.target).points.map(({ x, y }) => ({ x, y })),
|
|
76
|
+
backward: positioned.get(edge.target)[axis] < positioned.get(edge.source)[axis],
|
|
77
|
+
})),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=dag-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag-layout.js","sourceRoot":"","sources":["../../src/utils/dag-layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE/C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,uDAAuD;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,sCAAsC;AACtC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,iFAAiF;A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AAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAE,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CACH,CAAC;IACF,MAAM,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,OAAO;QACL,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;QAC/B,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACzB,GAAG,IAAI;YACP,MAAM,EAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,MAAqB,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YACjG,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAE,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAE,CAAC,IAAI,CAAC;SAClF,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC","sourcesContent":["import { Graph, layout } from \"@dagrejs/dagre\";\n\n/** Height of every node card, in pixels. */\nexport const DAG_NODE_HEIGHT = 24;\n/** Space before a node's label: left padding, 14px icon, and gap. */\nexport const DAG_LABEL_OFFSET = 26;\n/** Space before a node's label when it has no icon. */\nexport const DAG_LABEL_OFFSET_PLAIN = 8;\nconst LABEL_PADDING_END = 10;\n/** Narrowest node card, in pixels. */\nexport const DAG_MIN_NODE_WIDTH = 48;\n/** Widest node card, in pixels; longer labels are shortened with an ellipsis. */\nexport const DAG_MAX_NODE_WIDTH = 200;\nconst RANK_GAP = 90;\nconst NODE_GAP = 6;\nconst ELLIPSIS = \"…\";\n\n/** Flow direction of the layers: left to right or top to bottom. */\nexport type DagDirection = \"LR\" | \"TB\";\n\n/** Returns the rendered width of a label in pixels. */\nexport type MeasureText = (text: string) => number;\n\n/** Width estimate used when the browser cannot measure text (no 2D canvas). */\nexport const approximateTextWidth: MeasureText = (text) => text.length * 6.2;\n\n/** A point in layout coordinates. */\nexport interface DagPoint {\n x: number;\n y: number;\n}\n\n/** One node to lay out. */\nexport interface DagLayoutInput {\n id: string;\n label: string;\n /** Whether the node shows an icon before its label. */\n hasIcon: boolean;\n}\n\n/** A positioned node: centered at `(x, y)` and sized to its (possibly shortened) label. */\nexport interface DagLayoutNode extends DagPoint {\n id: string;\n width: number;\n label: string;\n}\n\n/** A routed edge; `backward` edges run against the flow direction and close a cycle. */\nexport interface DagLayoutEdge {\n source: string;\n target: string;\n points: DagPoint[];\n backward: boolean;\n}\n\n/** Positioned nodes and routed edges, in input-independent order. */\nexport interface DagLayout {\n nodes: DagLayoutNode[];\n edges: DagLayoutEdge[];\n}\n\n/** Shortens `text` with an ellipsis until it fits `maxWidth`. */\nexport function fitLabel(text: string, maxWidth: number, measure: MeasureText): string {\n if (measure(text) <= maxWidth) return text;\n let end = text.length - 1;\n while (end > 1 && measure(text.slice(0, end) + ELLIPSIS) > maxWidth) end -= 1;\n return text.slice(0, end) + ELLIPSIS;\n}\n\nfunction nodeSize(node: DagLayoutInput, measure: MeasureText): { label: string; width: number } {\n const offset = node.hasIcon ? DAG_LABEL_OFFSET : DAG_LABEL_OFFSET_PLAIN;\n const label = fitLabel(node.label, DAG_MAX_NODE_WIDTH - offset - LABEL_PADDING_END, measure);\n const width = Math.ceil(offset + measure(label) + LABEL_PADDING_END);\n return { label, width: Math.min(DAG_MAX_NODE_WIDTH, Math.max(DAG_MIN_NODE_WIDTH, width)) };\n}\n\n/**\n * Lays out a directed graph in layers (Sugiyama-style, via dagre) so every edge points along `direction`.\n *\n * Cycles are broken only to assign layers: every edge is returned, and the ones that close a cycle are marked\n * `backward`. Edges whose endpoints are not both in `nodes`, self-edges, and duplicates are ignored. The result\n * does not depend on input order.\n */\nexport function layoutDag(\n nodes: DagLayoutInput[],\n edges: Array<{ source: string; target: string }>,\n direction: DagDirection = \"LR\",\n measure: MeasureText = approximateTextWidth,\n): DagLayout {\n if (nodes.length === 0) return { nodes: [], edges: [] };\n const graph = new Graph();\n graph.setGraph({\n rankdir: direction,\n ranksep: RANK_GAP,\n nodesep: NODE_GAP,\n edgesep: 4,\n marginx: 0,\n marginy: 0,\n });\n graph.setDefaultEdgeLabel(() => ({}));\n const sorted = [...nodes].sort((a, b) => a.id.localeCompare(b.id));\n const sizes = new Map(sorted.map((node) => [node.id, nodeSize(node, measure)]));\n for (const node of sorted) {\n graph.setNode(node.id, { width: sizes.get(node.id)!.width, height: DAG_NODE_HEIGHT });\n }\n const known = new Set(sizes.keys());\n const unique = new Map(\n edges\n .filter((edge) => known.has(edge.source) && known.has(edge.target) && edge.source !== edge.target)\n .map((edge) => [`${edge.source}\\u0000${edge.target}`, { source: edge.source, target: edge.target }]),\n );\n const kept = [...unique.values()].sort(\n (a, b) => a.source.localeCompare(b.source) || a.target.localeCompare(b.target),\n );\n for (const edge of kept) graph.setEdge(edge.source, edge.target);\n layout(graph);\n const positioned = new Map(\n sorted.map((node) => {\n const { x, y } = graph.node(node.id) as DagPoint;\n return [node.id, { id: node.id, x, y, ...sizes.get(node.id)! }];\n }),\n );\n const axis = direction === \"LR\" ? \"x\" : \"y\";\n return {\n nodes: [...positioned.values()],\n edges: kept.map((edge) => ({\n ...edge,\n points: (graph.edge(edge.source, edge.target).points as DagPoint[]).map(({ x, y }) => ({ x, y })),\n backward: positioned.get(edge.target)![axis] < positioned.get(edge.source)![axis],\n })),\n };\n}\n"]}
|