@opencode/ui 0.0.0-reserved → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/actions/button/button.d.ts +10 -0
- package/dist/actions/icon-button/icon-button.d.ts +11 -0
- package/dist/actions/split-button/split-button.d.ts +5 -0
- package/dist/components/animated-number.d.ts +4 -0
- package/dist/components/app-icon.d.ts +6 -0
- package/dist/components/app-icons/types.d.ts +2 -0
- package/dist/components/card.d.ts +22 -0
- package/dist/components/collapsible.d.ts +17 -0
- package/dist/components/context-menu.d.ts +80 -0
- package/dist/components/dock-surface.d.ts +7 -0
- package/dist/components/favicon.d.ts +1 -0
- package/dist/components/file-icon.d.ts +12 -0
- package/dist/components/file-icons/types.d.ts +2 -0
- package/dist/components/font.d.ts +1 -0
- package/dist/components/hover-card.d.ts +9 -0
- package/dist/components/image-preview.d.ts +5 -0
- package/dist/components/list.d.ts +45 -0
- package/dist/components/logo.d.ts +8 -0
- package/dist/components/motion-spring.d.ts +4 -0
- package/dist/components/popover.d.ts +14 -0
- package/dist/components/progress.d.ts +7 -0
- package/dist/components/provider-icon.d.ts +5 -0
- package/dist/components/provider-icons/types.d.ts +2 -0
- package/dist/components/resize-handle.d.ts +14 -0
- package/dist/components/scroll-view.d.ts +42 -0
- package/dist/components/spinner.d.ts +6 -0
- package/dist/components/sticky-accordion-header.d.ts +5 -0
- package/dist/components/text-field.d.ts +13 -0
- package/dist/components/text-reveal.d.ts +13 -0
- package/dist/components/text-strikethrough.d.ts +11 -0
- package/dist/components/typewriter.d.ts +6 -0
- package/dist/context/dialog.d.ts +18 -0
- package/dist/context/file.d.ts +5 -0
- package/dist/context/helper.d.ts +14 -0
- package/dist/context/i18n.d.ts +24 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/marked-base.d.ts +3 -0
- package/dist/context/marked-parser.d.ts +1 -0
- package/dist/context/marked-theme-register.d.ts +1 -0
- package/dist/context/marked-theme.d.ts +2 -0
- package/dist/context/marked.d.ts +2 -0
- package/dist/context/worker-pool.d.ts +9 -0
- package/dist/data-display/accordion/accordion.d.ts +24 -0
- package/dist/data-display/avatar/avatar.d.ts +11 -0
- package/dist/data-display/badge/badge.d.ts +7 -0
- package/dist/data-display/diff-changes/diff-changes.d.ts +12 -0
- package/dist/data-display/keybind/keybind.d.ts +7 -0
- package/dist/data-display/line-comment/line-comment.d.ts +32 -0
- package/dist/data-display/project-avatar/project-avatar.d.ts +12 -0
- package/dist/feedback/loader/loader.d.ts +3 -0
- package/dist/feedback/progress-circle/progress-circle.d.ts +9 -0
- package/dist/feedback/toast/toast.d.ts +57 -0
- package/dist/forms/checkbox/checkbox.d.ts +8 -0
- package/dist/forms/field/field.d.ts +22 -0
- package/dist/forms/inline-input/inline-input.d.ts +5 -0
- package/dist/forms/radio/radio.d.ts +16 -0
- package/dist/forms/select/select.d.ts +23 -0
- package/dist/forms/switch/switch.d.ts +9 -0
- package/dist/forms/text-input/text-input.d.ts +24 -0
- package/dist/forms/textarea/textarea.d.ts +7 -0
- package/dist/hooks/create-auto-scroll.d.ts +17 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use-filtered-list.d.ts +48 -0
- package/dist/i18n/am.d.ts +1 -0
- package/dist/i18n/ar.d.ts +209 -0
- package/dist/i18n/az.d.ts +1 -0
- package/dist/i18n/bg.d.ts +193 -0
- package/dist/i18n/bn.d.ts +1 -0
- package/dist/i18n/br.d.ts +197 -0
- package/dist/i18n/bs.d.ts +197 -0
- package/dist/i18n/ca.d.ts +1 -0
- package/dist/i18n/cs.d.ts +1 -0
- package/dist/i18n/da.d.ts +193 -0
- package/dist/i18n/de.d.ts +193 -0
- package/dist/i18n/dv.d.ts +1 -0
- package/dist/i18n/dz.d.ts +1 -0
- package/dist/i18n/el.d.ts +1 -0
- package/dist/i18n/en.d.ts +251 -0
- package/dist/i18n/es.d.ts +197 -0
- package/dist/i18n/et.d.ts +1 -0
- package/dist/i18n/fa.d.ts +1 -0
- package/dist/i18n/fi.d.ts +1 -0
- package/dist/i18n/fo.d.ts +1 -0
- package/dist/i18n/fr.d.ts +197 -0
- package/dist/i18n/he.d.ts +197 -0
- package/dist/i18n/hi.d.ts +1 -0
- package/dist/i18n/hr.d.ts +1 -0
- package/dist/i18n/hu.d.ts +1 -0
- package/dist/i18n/hy.d.ts +1 -0
- package/dist/i18n/id.d.ts +1 -0
- package/dist/i18n/is.d.ts +1 -0
- package/dist/i18n/it.d.ts +1 -0
- package/dist/i18n/ja.d.ts +193 -0
- package/dist/i18n/ka.d.ts +1 -0
- package/dist/i18n/km.d.ts +193 -0
- package/dist/i18n/ko.d.ts +193 -0
- package/dist/i18n/lo.d.ts +193 -0
- package/dist/i18n/lt.d.ts +1 -0
- package/dist/i18n/lv.d.ts +1 -0
- package/dist/i18n/mk.d.ts +193 -0
- package/dist/i18n/mn.d.ts +193 -0
- package/dist/i18n/ms.d.ts +1 -0
- package/dist/i18n/my.d.ts +193 -0
- package/dist/i18n/ne.d.ts +1 -0
- package/dist/i18n/nl.d.ts +1 -0
- package/dist/i18n/no.d.ts +4 -0
- package/dist/i18n/pa.d.ts +1 -0
- package/dist/i18n/pl.d.ts +201 -0
- package/dist/i18n/ro.d.ts +1 -0
- package/dist/i18n/ru.d.ts +201 -0
- package/dist/i18n/si.d.ts +1 -0
- package/dist/i18n/sk.d.ts +1 -0
- package/dist/i18n/sl.d.ts +1 -0
- package/dist/i18n/sq.d.ts +1 -0
- package/dist/i18n/sr.d.ts +197 -0
- package/dist/i18n/sv.d.ts +1 -0
- package/dist/i18n/tg.d.ts +193 -0
- package/dist/i18n/th.d.ts +193 -0
- package/dist/i18n/tk.d.ts +1 -0
- package/dist/i18n/tr.d.ts +193 -0
- package/dist/i18n/uk.d.ts +1 -0
- package/dist/i18n/ur.d.ts +1 -0
- package/dist/i18n/uz.d.ts +1 -0
- package/dist/i18n/vi.d.ts +1 -0
- package/dist/i18n/zh.d.ts +193 -0
- package/dist/i18n/zht.d.ts +193 -0
- package/dist/icons/icon/additional-icons.d.ts +105 -0
- package/dist/icons/icon/icon.d.ts +228 -0
- package/dist/layout/divider/divider.d.ts +5 -0
- package/dist/navigation/menu/menu.d.ts +59 -0
- package/dist/navigation/segmented-control/segmented-control.d.ts +21 -0
- package/dist/navigation/tab-state-indicator.d.ts +2 -0
- package/dist/navigation/tabs/tabs.d.ts +39 -0
- package/dist/overlays/dialog/dialog.d.ts +26 -0
- package/dist/overlays/tooltip/tooltip.d.ts +15 -0
- package/dist/storybook/fixtures.d.ts +19 -0
- package/dist/storybook/scaffold.d.ts +16 -0
- package/dist/theme/color.d.ts +30 -0
- package/dist/theme/context.d.ts +21 -0
- package/dist/theme/default-themes.d.ts +39 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/loader.d.ts +6 -0
- package/dist/theme/resolve.d.ts +7 -0
- package/dist/theme/types.d.ts +56 -0
- package/dist/theme/v2/avatar.d.ts +5 -0
- package/dist/theme/v2/default-primitives.d.ts +3 -0
- package/dist/theme/v2/foreground.d.ts +2 -0
- package/dist/theme/v2/mapping.d.ts +3 -0
- package/dist/theme/v2/resolve.d.ts +9 -0
- package/dist/typography/text-shimmer/text-shimmer.d.ts +9 -0
- package/dist/typography/wordmark/wordmark.d.ts +5 -0
- package/package.json +252 -6
- package/src/actions/button/button.css +294 -0
- package/src/actions/button/button.tsx +42 -0
- package/src/actions/icon-button/icon-button.css +124 -0
- package/src/actions/icon-button/icon-button.tsx +32 -0
- package/src/actions/split-button/split-button.css +95 -0
- package/src/actions/split-button/split-button.tsx +48 -0
- package/src/actions/submit.css +74 -0
- package/src/assets/audio/alert-01.aac +0 -0
- package/src/assets/audio/alert-01.mp3 +0 -0
- package/src/assets/audio/alert-02.aac +0 -0
- package/src/assets/audio/alert-02.mp3 +0 -0
- package/src/assets/audio/alert-03.aac +0 -0
- package/src/assets/audio/alert-03.mp3 +0 -0
- package/src/assets/audio/alert-04.aac +0 -0
- package/src/assets/audio/alert-04.mp3 +0 -0
- package/src/assets/audio/alert-05.aac +0 -0
- package/src/assets/audio/alert-05.mp3 +0 -0
- package/src/assets/audio/alert-06.aac +0 -0
- package/src/assets/audio/alert-06.mp3 +0 -0
- package/src/assets/audio/alert-07.aac +0 -0
- package/src/assets/audio/alert-07.mp3 +0 -0
- package/src/assets/audio/alert-08.aac +0 -0
- package/src/assets/audio/alert-08.mp3 +0 -0
- package/src/assets/audio/alert-09.aac +0 -0
- package/src/assets/audio/alert-09.mp3 +0 -0
- package/src/assets/audio/alert-10.aac +0 -0
- package/src/assets/audio/alert-10.mp3 +0 -0
- package/src/assets/audio/bip-bop-01.aac +0 -0
- package/src/assets/audio/bip-bop-01.mp3 +0 -0
- package/src/assets/audio/bip-bop-02.aac +0 -0
- package/src/assets/audio/bip-bop-02.mp3 +0 -0
- package/src/assets/audio/bip-bop-03.aac +0 -0
- package/src/assets/audio/bip-bop-03.mp3 +0 -0
- package/src/assets/audio/bip-bop-04.aac +0 -0
- package/src/assets/audio/bip-bop-04.mp3 +0 -0
- package/src/assets/audio/bip-bop-05.aac +0 -0
- package/src/assets/audio/bip-bop-05.mp3 +0 -0
- package/src/assets/audio/bip-bop-06.aac +0 -0
- package/src/assets/audio/bip-bop-06.mp3 +0 -0
- package/src/assets/audio/bip-bop-07.aac +0 -0
- package/src/assets/audio/bip-bop-07.mp3 +0 -0
- package/src/assets/audio/bip-bop-08.aac +0 -0
- package/src/assets/audio/bip-bop-08.mp3 +0 -0
- package/src/assets/audio/bip-bop-09.aac +0 -0
- package/src/assets/audio/bip-bop-09.mp3 +0 -0
- package/src/assets/audio/bip-bop-10.aac +0 -0
- package/src/assets/audio/bip-bop-10.mp3 +0 -0
- package/src/assets/audio/nope-01.aac +0 -0
- package/src/assets/audio/nope-01.mp3 +0 -0
- package/src/assets/audio/nope-02.aac +0 -0
- package/src/assets/audio/nope-02.mp3 +0 -0
- package/src/assets/audio/nope-03.aac +0 -0
- package/src/assets/audio/nope-03.mp3 +0 -0
- package/src/assets/audio/nope-04.aac +0 -0
- package/src/assets/audio/nope-04.mp3 +0 -0
- package/src/assets/audio/nope-05.aac +0 -0
- package/src/assets/audio/nope-05.mp3 +0 -0
- package/src/assets/audio/nope-06.aac +0 -0
- package/src/assets/audio/nope-06.mp3 +0 -0
- package/src/assets/audio/nope-07.aac +0 -0
- package/src/assets/audio/nope-07.mp3 +0 -0
- package/src/assets/audio/nope-08.aac +0 -0
- package/src/assets/audio/nope-08.mp3 +0 -0
- package/src/assets/audio/nope-09.aac +0 -0
- package/src/assets/audio/nope-09.mp3 +0 -0
- package/src/assets/audio/nope-10.aac +0 -0
- package/src/assets/audio/nope-10.mp3 +0 -0
- package/src/assets/audio/nope-11.aac +0 -0
- package/src/assets/audio/nope-11.mp3 +0 -0
- package/src/assets/audio/nope-12.aac +0 -0
- package/src/assets/audio/nope-12.mp3 +0 -0
- package/src/assets/audio/staplebops-01.aac +0 -0
- package/src/assets/audio/staplebops-01.mp3 +0 -0
- package/src/assets/audio/staplebops-02.aac +0 -0
- package/src/assets/audio/staplebops-02.mp3 +0 -0
- package/src/assets/audio/staplebops-03.aac +0 -0
- package/src/assets/audio/staplebops-03.mp3 +0 -0
- package/src/assets/audio/staplebops-04.aac +0 -0
- package/src/assets/audio/staplebops-04.mp3 +0 -0
- package/src/assets/audio/staplebops-05.aac +0 -0
- package/src/assets/audio/staplebops-05.mp3 +0 -0
- package/src/assets/audio/staplebops-06.aac +0 -0
- package/src/assets/audio/staplebops-06.mp3 +0 -0
- package/src/assets/audio/staplebops-07.aac +0 -0
- package/src/assets/audio/staplebops-07.mp3 +0 -0
- package/src/assets/audio/yup-01.aac +0 -0
- package/src/assets/audio/yup-01.mp3 +0 -0
- package/src/assets/audio/yup-02.aac +0 -0
- package/src/assets/audio/yup-02.mp3 +0 -0
- package/src/assets/audio/yup-03.aac +0 -0
- package/src/assets/audio/yup-03.mp3 +0 -0
- package/src/assets/audio/yup-04.aac +0 -0
- package/src/assets/audio/yup-04.mp3 +0 -0
- package/src/assets/audio/yup-05.aac +0 -0
- package/src/assets/audio/yup-05.mp3 +0 -0
- package/src/assets/audio/yup-06.aac +0 -0
- package/src/assets/audio/yup-06.mp3 +0 -0
- package/src/assets/fonts/Inter.ttf +0 -0
- package/src/assets/fonts/JetBrainsMonoNerdFontMono-Regular.woff2 +0 -0
- package/src/assets/icons/app/android-studio.svg +369 -0
- package/src/assets/icons/app/antigravity.svg +97 -0
- package/src/assets/icons/app/cursor.svg +16 -0
- package/src/assets/icons/app/file-explorer.svg +20 -0
- package/src/assets/icons/app/finder.png +0 -0
- package/src/assets/icons/app/ghostty.svg +13 -0
- package/src/assets/icons/app/iterm2.svg +13 -0
- package/src/assets/icons/app/powershell.svg +14 -0
- package/src/assets/icons/app/sublimetext.svg +17 -0
- package/src/assets/icons/app/terminal.png +0 -0
- package/src/assets/icons/app/textmate.png +0 -0
- package/src/assets/icons/app/vscode.svg +39 -0
- package/src/assets/icons/app/warp.png +0 -0
- package/src/assets/icons/app/xcode.png +0 -0
- package/src/assets/icons/app/zed-dark.svg +15 -0
- package/src/assets/icons/app/zed.svg +15 -0
- package/src/components/animated-number.css +93 -0
- package/src/components/animated-number.tsx +109 -0
- package/src/components/app-icon.css +5 -0
- package/src/components/app-icon.tsx +85 -0
- package/src/components/app-icons/sprite.svg +114 -0
- package/src/components/app-icons/types.ts +21 -0
- package/src/components/card.css +94 -0
- package/src/components/card.tsx +123 -0
- package/src/components/collapsible.css +154 -0
- package/src/components/collapsible.tsx +48 -0
- package/src/components/context-menu.css +134 -0
- package/src/components/context-menu.tsx +308 -0
- package/src/components/dock-surface.css +30 -0
- package/src/components/dock-surface.tsx +54 -0
- package/src/components/favicon.tsx +13 -0
- package/src/components/file-icon.css +26 -0
- package/src/components/file-icon.tsx +588 -0
- package/src/components/file-icons/sprite.svg +11707 -0
- package/src/components/file-icons/types.ts +1095 -0
- package/src/components/font.tsx +1 -0
- package/src/components/hover-card.css +61 -0
- package/src/components/hover-card.tsx +32 -0
- package/src/components/image-preview.css +63 -0
- package/src/components/image-preview.tsx +33 -0
- package/src/components/list.css +331 -0
- package/src/components/list.tsx +396 -0
- package/src/components/logo.css +4 -0
- package/src/components/logo.tsx +62 -0
- package/src/components/motion-spring.tsx +58 -0
- package/src/components/popover.css +98 -0
- package/src/components/popover.tsx +154 -0
- package/src/components/progress.css +63 -0
- package/src/components/progress.tsx +39 -0
- package/src/components/provider-icon.css +5 -0
- package/src/components/provider-icon.tsx +25 -0
- package/src/components/provider-icons/sprite.svg +1110 -0
- package/src/components/provider-icons/types.ts +105 -0
- package/src/components/resize-handle.css +70 -0
- package/src/components/resize-handle.tsx +102 -0
- package/src/components/scroll-view.css +99 -0
- package/src/components/scroll-view.tsx +453 -0
- package/src/components/spinner.css +6 -0
- package/src/components/spinner.tsx +52 -0
- package/src/components/sticky-accordion-header.css +6 -0
- package/src/components/sticky-accordion-header.tsx +18 -0
- package/src/components/text-field.css +134 -0
- package/src/components/text-field.tsx +136 -0
- package/src/components/text-reveal.css +150 -0
- package/src/components/text-reveal.tsx +143 -0
- package/src/components/text-strikethrough.css +27 -0
- package/src/components/text-strikethrough.tsx +84 -0
- package/src/components/typewriter.css +14 -0
- package/src/components/typewriter.tsx +55 -0
- package/src/context/dialog.tsx +198 -0
- package/src/context/file.tsx +10 -0
- package/src/context/helper.tsx +38 -0
- package/src/context/i18n.tsx +77 -0
- package/src/context/index.ts +4 -0
- package/src/context/marked-base.tsx +55 -0
- package/src/context/marked-parser.tsx +58 -0
- package/src/context/marked-theme-register.tsx +10 -0
- package/src/context/marked-theme.tsx +372 -0
- package/src/context/marked.tsx +28 -0
- package/src/context/worker-pool.tsx +20 -0
- package/src/custom-elements.d.ts +17 -0
- package/src/data-display/accordion/accordion.css +121 -0
- package/src/data-display/accordion/accordion.tsx +92 -0
- package/src/data-display/avatar/avatar.css +70 -0
- package/src/data-display/avatar/avatar.tsx +59 -0
- package/src/data-display/badge/badge.css +52 -0
- package/src/data-display/badge/badge.tsx +25 -0
- package/src/data-display/diff-changes/diff-changes.css +47 -0
- package/src/data-display/diff-changes/diff-changes.tsx +33 -0
- package/src/data-display/keybind/keybind.css +76 -0
- package/src/data-display/keybind/keybind.tsx +30 -0
- package/src/data-display/line-comment/line-comment.css +258 -0
- package/src/data-display/line-comment/line-comment.tsx +308 -0
- package/src/data-display/project-avatar/project-avatar.css +132 -0
- package/src/data-display/project-avatar/project-avatar.tsx +66 -0
- package/src/feedback/loader/loader.css +32 -0
- package/src/feedback/loader/loader.tsx +31 -0
- package/src/feedback/progress-circle/progress-circle.css +28 -0
- package/src/feedback/progress-circle/progress-circle.tsx +64 -0
- package/src/feedback/toast/toast.css +225 -0
- package/src/feedback/toast/toast.tsx +283 -0
- package/src/forms/checkbox/checkbox.css +125 -0
- package/src/forms/checkbox/checkbox.tsx +43 -0
- package/src/forms/field/field.css +94 -0
- package/src/forms/field/field.tsx +263 -0
- package/src/forms/inline-input/inline-input.css +17 -0
- package/src/forms/inline-input/inline-input.tsx +22 -0
- package/src/forms/radio/radio.css +202 -0
- package/src/forms/radio/radio.tsx +82 -0
- package/src/forms/select/select.css +290 -0
- package/src/forms/select/select.tsx +219 -0
- package/src/forms/switch/switch.css +272 -0
- package/src/forms/switch/switch.tsx +34 -0
- package/src/forms/text-input/text-input.css +181 -0
- package/src/forms/text-input/text-input.tsx +99 -0
- package/src/forms/textarea/textarea.css +78 -0
- package/src/forms/textarea/textarea.tsx +31 -0
- package/src/hooks/create-auto-scroll.tsx +257 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-filtered-list.tsx +134 -0
- package/src/i18n/am.ts +194 -0
- package/src/i18n/ar.ts +231 -0
- package/src/i18n/az.ts +195 -0
- package/src/i18n/bg.ts +195 -0
- package/src/i18n/bn.ts +197 -0
- package/src/i18n/br.ts +219 -0
- package/src/i18n/bs.ts +223 -0
- package/src/i18n/ca.ts +199 -0
- package/src/i18n/cs.ts +203 -0
- package/src/i18n/da.ts +214 -0
- package/src/i18n/de.ts +219 -0
- package/src/i18n/dv.ts +196 -0
- package/src/i18n/dz.ts +197 -0
- package/src/i18n/el.ts +195 -0
- package/src/i18n/en.ts +276 -0
- package/src/i18n/es.ts +219 -0
- package/src/i18n/et.ts +195 -0
- package/src/i18n/fa.ts +195 -0
- package/src/i18n/fi.ts +195 -0
- package/src/i18n/fo.ts +195 -0
- package/src/i18n/fr.ts +221 -0
- package/src/i18n/he.ts +199 -0
- package/src/i18n/hi.ts +197 -0
- package/src/i18n/hr.ts +200 -0
- package/src/i18n/hu.ts +197 -0
- package/src/i18n/hy.ts +195 -0
- package/src/i18n/id.ts +217 -0
- package/src/i18n/is.ts +195 -0
- package/src/i18n/it.ts +200 -0
- package/src/i18n/ja.ts +214 -0
- package/src/i18n/ka.ts +195 -0
- package/src/i18n/km.ts +196 -0
- package/src/i18n/ko.ts +216 -0
- package/src/i18n/lo.ts +195 -0
- package/src/i18n/lt.ts +203 -0
- package/src/i18n/lv.ts +199 -0
- package/src/i18n/mk.ts +195 -0
- package/src/i18n/mn.ts +195 -0
- package/src/i18n/ms.ts +195 -0
- package/src/i18n/my.ts +196 -0
- package/src/i18n/ne.ts +197 -0
- package/src/i18n/nl.ts +195 -0
- package/src/i18n/no.ts +219 -0
- package/src/i18n/pa.ts +196 -0
- package/src/i18n/pl.ts +223 -0
- package/src/i18n/ro.ts +199 -0
- package/src/i18n/ru.ts +222 -0
- package/src/i18n/si.ts +195 -0
- package/src/i18n/sk.ts +203 -0
- package/src/i18n/sl.ts +204 -0
- package/src/i18n/sq.ts +195 -0
- package/src/i18n/sr.ts +200 -0
- package/src/i18n/sv.ts +195 -0
- package/src/i18n/tg.ts +195 -0
- package/src/i18n/th.ts +215 -0
- package/src/i18n/tk.ts +195 -0
- package/src/i18n/tr.ts +221 -0
- package/src/i18n/uk.ts +226 -0
- package/src/i18n/ur.ts +196 -0
- package/src/i18n/uz.ts +198 -0
- package/src/i18n/vi.ts +195 -0
- package/src/i18n/zh.ts +217 -0
- package/src/i18n/zht.ts +217 -0
- package/src/icons/icon/additional-icons.ts +115 -0
- package/src/icons/icon/icon.css +3 -0
- package/src/icons/icon/icon.tsx +305 -0
- package/src/layout/divider/divider.css +11 -0
- package/src/layout/divider/divider.tsx +20 -0
- package/src/navigation/menu/menu.css +311 -0
- package/src/navigation/menu/menu.tsx +289 -0
- package/src/navigation/segmented-control/segmented-control.css +80 -0
- package/src/navigation/segmented-control/segmented-control.tsx +209 -0
- package/src/navigation/tab-state-indicator.tsx +37 -0
- package/src/navigation/tabs/tabs-current.css +239 -0
- package/src/navigation/tabs/tabs.css +710 -0
- package/src/navigation/tabs/tabs.tsx +194 -0
- package/src/overlays/dialog/dialog.css +180 -0
- package/src/overlays/dialog/dialog.tsx +115 -0
- package/src/overlays/tooltip/tooltip.css +102 -0
- package/src/overlays/tooltip/tooltip.tsx +154 -0
- package/src/storybook/fixtures.ts +51 -0
- package/src/storybook/scaffold.tsx +62 -0
- package/src/styles/animations.css +141 -0
- package/src/styles/base.css +409 -0
- package/src/styles/colors.css +772 -0
- package/src/styles/file-tree.css +202 -0
- package/src/styles/index.css +37 -0
- package/src/styles/tailwind/colors.css +288 -0
- package/src/styles/tailwind/index.css +95 -0
- package/src/styles/tailwind/utilities.css +131 -0
- package/src/styles/theme.css +631 -0
- package/src/styles/tokens/colors.css +172 -0
- package/src/styles/tokens/index.css +2 -0
- package/src/styles/tokens/theme.css +510 -0
- package/src/styles/utilities.css +118 -0
- package/src/theme/color.ts +299 -0
- package/src/theme/context.tsx +381 -0
- package/src/theme/default-themes.ts +116 -0
- package/src/theme/index.ts +78 -0
- package/src/theme/loader.ts +112 -0
- package/src/theme/resolve.ts +540 -0
- package/src/theme/themes/amoled.json +49 -0
- package/src/theme/themes/aura.json +51 -0
- package/src/theme/themes/ayu.json +51 -0
- package/src/theme/themes/carbonfox.json +53 -0
- package/src/theme/themes/catppuccin-frappe.json +85 -0
- package/src/theme/themes/catppuccin-macchiato.json +85 -0
- package/src/theme/themes/catppuccin.json +45 -0
- package/src/theme/themes/cobalt2.json +87 -0
- package/src/theme/themes/cursor.json +91 -0
- package/src/theme/themes/dracula.json +49 -0
- package/src/theme/themes/everforest.json +89 -0
- package/src/theme/themes/flexoki.json +86 -0
- package/src/theme/themes/github.json +85 -0
- package/src/theme/themes/gruvbox.json +45 -0
- package/src/theme/themes/kanagawa.json +89 -0
- package/src/theme/themes/lucent-orng.json +87 -0
- package/src/theme/themes/material.json +87 -0
- package/src/theme/themes/matrix.json +113 -0
- package/src/theme/themes/mercury.json +86 -0
- package/src/theme/themes/monokai.json +49 -0
- package/src/theme/themes/nightowl.json +46 -0
- package/src/theme/themes/nord.json +46 -0
- package/src/theme/themes/oc-2.json +507 -0
- package/src/theme/themes/one-dark.json +89 -0
- package/src/theme/themes/onedarkpro.json +45 -0
- package/src/theme/themes/opencode.json +89 -0
- package/src/theme/themes/orng.json +87 -0
- package/src/theme/themes/osaka-jade.json +88 -0
- package/src/theme/themes/palenight.json +85 -0
- package/src/theme/themes/rosepine.json +85 -0
- package/src/theme/themes/shadesofpurple.json +51 -0
- package/src/theme/themes/solarized.json +49 -0
- package/src/theme/themes/synthwave84.json +87 -0
- package/src/theme/themes/tokyonight.json +47 -0
- package/src/theme/themes/vercel.json +90 -0
- package/src/theme/themes/vesper.json +51 -0
- package/src/theme/themes/zenburn.json +87 -0
- package/src/theme/types.ts +75 -0
- package/src/theme/v2/avatar.ts +48 -0
- package/src/theme/v2/default-primitives.ts +114 -0
- package/src/theme/v2/foreground.ts +61 -0
- package/src/theme/v2/mapping.ts +176 -0
- package/src/theme/v2/resolve.ts +153 -0
- package/src/typography/text-shimmer/text-shimmer.css +120 -0
- package/src/typography/text-shimmer/text-shimmer.tsx +63 -0
- package/src/typography/wordmark/wordmark.tsx +39 -0
- package/README.md +0 -5
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import type { ThemeRegistrationResolved } from "@pierre/diffs"
|
|
2
|
+
|
|
3
|
+
export const OpenCodeTheme = {
|
|
4
|
+
name: "OpenCode",
|
|
5
|
+
bg: "var(--color-background-stronger)",
|
|
6
|
+
fg: "var(--text-base)",
|
|
7
|
+
colors: {
|
|
8
|
+
"editor.background": "var(--color-background-stronger)",
|
|
9
|
+
"editor.foreground": "var(--text-base)",
|
|
10
|
+
"gitDecoration.addedResourceForeground": "var(--syntax-diff-add)",
|
|
11
|
+
"gitDecoration.deletedResourceForeground": "var(--syntax-diff-delete)",
|
|
12
|
+
"gitDecoration.modifiedResourceForeground": "var(--syntax-diff-unknown)",
|
|
13
|
+
// "gitDecoration.conflictingResourceForeground": "#ffca00",
|
|
14
|
+
// "gitDecoration.modifiedResourceForeground": "#1a76d4",
|
|
15
|
+
// "gitDecoration.untrackedResourceForeground": "#00cab1",
|
|
16
|
+
// "gitDecoration.ignoredResourceForeground": "#84848A",
|
|
17
|
+
// "terminal.titleForeground": "#adadb1",
|
|
18
|
+
// "terminal.titleInactiveForeground": "#84848A",
|
|
19
|
+
// "terminal.background": "#141415",
|
|
20
|
+
// "terminal.foreground": "#adadb1",
|
|
21
|
+
// "terminal.ansiBlack": "#141415",
|
|
22
|
+
// "terminal.ansiRed": "#ff2e3f",
|
|
23
|
+
// "terminal.ansiGreen": "#0dbe4e",
|
|
24
|
+
// "terminal.ansiYellow": "#ffca00",
|
|
25
|
+
// "terminal.ansiBlue": "#008cff",
|
|
26
|
+
// "terminal.ansiMagenta": "#c635e4",
|
|
27
|
+
// "terminal.ansiCyan": "#08c0ef",
|
|
28
|
+
// "terminal.ansiWhite": "#c6c6c8",
|
|
29
|
+
// "terminal.ansiBrightBlack": "#141415",
|
|
30
|
+
// "terminal.ansiBrightRed": "#ff2e3f",
|
|
31
|
+
// "terminal.ansiBrightGreen": "#0dbe4e",
|
|
32
|
+
// "terminal.ansiBrightYellow": "#ffca00",
|
|
33
|
+
// "terminal.ansiBrightBlue": "#008cff",
|
|
34
|
+
// "terminal.ansiBrightMagenta": "#c635e4",
|
|
35
|
+
// "terminal.ansiBrightCyan": "#08c0ef",
|
|
36
|
+
// "terminal.ansiBrightWhite": "#c6c6c8",
|
|
37
|
+
},
|
|
38
|
+
tokenColors: [
|
|
39
|
+
{
|
|
40
|
+
scope: ["comment", "punctuation.definition.comment", "string.comment"],
|
|
41
|
+
settings: {
|
|
42
|
+
foreground: "var(--syntax-comment)",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
scope: ["entity.other.attribute-name"],
|
|
47
|
+
settings: {
|
|
48
|
+
foreground: "var(--syntax-property)", // maybe attribute
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
scope: ["constant", "entity.name.constant", "variable.other.constant", "variable.language", "entity"],
|
|
53
|
+
settings: {
|
|
54
|
+
foreground: "var(--syntax-constant)",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
scope: ["entity.name", "meta.export.default", "meta.definition.variable"],
|
|
59
|
+
settings: {
|
|
60
|
+
foreground: "var(--syntax-type)",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
scope: ["meta.object.member"],
|
|
65
|
+
settings: {
|
|
66
|
+
foreground: "var(--syntax-primitive)",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
scope: [
|
|
71
|
+
"variable.parameter.function",
|
|
72
|
+
"meta.jsx.children",
|
|
73
|
+
"meta.block",
|
|
74
|
+
"meta.tag.attributes",
|
|
75
|
+
"entity.name.constant",
|
|
76
|
+
"meta.embedded.expression",
|
|
77
|
+
"meta.template.expression",
|
|
78
|
+
"string.other.begin.yaml",
|
|
79
|
+
"string.other.end.yaml",
|
|
80
|
+
],
|
|
81
|
+
settings: {
|
|
82
|
+
foreground: "var(--syntax-punctuation)",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
scope: ["entity.name.function", "support.type.primitive"],
|
|
87
|
+
settings: {
|
|
88
|
+
foreground: "var(--syntax-primitive)",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
scope: ["support.class.component"],
|
|
93
|
+
settings: {
|
|
94
|
+
foreground: "var(--syntax-type)",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
scope: "keyword",
|
|
99
|
+
settings: {
|
|
100
|
+
foreground: "var(--syntax-keyword)",
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
scope: [
|
|
105
|
+
"keyword.operator",
|
|
106
|
+
"storage.type.function.arrow",
|
|
107
|
+
"punctuation.separator.key-value.css",
|
|
108
|
+
"entity.name.tag.yaml",
|
|
109
|
+
"punctuation.separator.key-value.mapping.yaml",
|
|
110
|
+
],
|
|
111
|
+
settings: {
|
|
112
|
+
foreground: "var(--syntax-operator)",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
scope: ["storage", "storage.type"],
|
|
117
|
+
settings: {
|
|
118
|
+
foreground: "var(--syntax-keyword)",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
scope: ["storage.modifier.package", "storage.modifier.import", "storage.type.java"],
|
|
123
|
+
settings: {
|
|
124
|
+
foreground: "var(--syntax-primitive)",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
scope: [
|
|
129
|
+
"string",
|
|
130
|
+
"punctuation.definition.string",
|
|
131
|
+
"string punctuation.section.embedded source",
|
|
132
|
+
"entity.name.tag",
|
|
133
|
+
],
|
|
134
|
+
settings: {
|
|
135
|
+
foreground: "var(--syntax-string)",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
scope: "support",
|
|
140
|
+
settings: {
|
|
141
|
+
foreground: "var(--syntax-primitive)",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
scope: ["support.type.object.module", "variable.other.object", "support.type.property-name.css"],
|
|
146
|
+
settings: {
|
|
147
|
+
foreground: "var(--syntax-object)",
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
scope: "meta.property-name",
|
|
152
|
+
settings: {
|
|
153
|
+
foreground: "var(--syntax-property)",
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
scope: "variable",
|
|
158
|
+
settings: {
|
|
159
|
+
foreground: "var(--syntax-variable)",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
scope: "variable.other",
|
|
164
|
+
settings: {
|
|
165
|
+
foreground: "var(--syntax-variable)",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
scope: [
|
|
170
|
+
"invalid.broken",
|
|
171
|
+
"invalid.illegal",
|
|
172
|
+
"invalid.unimplemented",
|
|
173
|
+
"invalid.deprecated",
|
|
174
|
+
"message.error",
|
|
175
|
+
"markup.deleted",
|
|
176
|
+
"meta.diff.header.from-file",
|
|
177
|
+
"punctuation.definition.deleted",
|
|
178
|
+
"brackethighlighter.unmatched",
|
|
179
|
+
"token.error-token",
|
|
180
|
+
],
|
|
181
|
+
settings: {
|
|
182
|
+
foreground: "var(--syntax-critical)",
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
scope: "carriage-return",
|
|
187
|
+
settings: {
|
|
188
|
+
foreground: "var(--syntax-keyword)",
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
scope: "string source",
|
|
193
|
+
settings: {
|
|
194
|
+
foreground: "var(--syntax-variable)",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
scope: "string variable",
|
|
199
|
+
settings: {
|
|
200
|
+
foreground: "var(--syntax-constant)",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
scope: [
|
|
205
|
+
"source.regexp",
|
|
206
|
+
"string.regexp",
|
|
207
|
+
"string.regexp.character-class",
|
|
208
|
+
"string.regexp constant.character.escape",
|
|
209
|
+
"string.regexp source.ruby.embedded",
|
|
210
|
+
"string.regexp string.regexp.arbitrary-repitition",
|
|
211
|
+
"string.regexp constant.character.escape",
|
|
212
|
+
],
|
|
213
|
+
settings: {
|
|
214
|
+
foreground: "var(--syntax-regexp)",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
scope: "support.constant",
|
|
219
|
+
settings: {
|
|
220
|
+
foreground: "var(--syntax-primitive)",
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
scope: "support.variable",
|
|
225
|
+
settings: {
|
|
226
|
+
foreground: "var(--syntax-variable)",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
scope: "meta.module-reference",
|
|
231
|
+
settings: {
|
|
232
|
+
foreground: "var(--syntax-info)",
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
scope: "punctuation.definition.list.begin.markdown",
|
|
237
|
+
settings: {
|
|
238
|
+
foreground: "var(--syntax-punctuation)",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
scope: ["markup.heading", "markup.heading entity.name"],
|
|
243
|
+
settings: {
|
|
244
|
+
fontStyle: "bold",
|
|
245
|
+
foreground: "var(--syntax-info)",
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
scope: "markup.quote",
|
|
250
|
+
settings: {
|
|
251
|
+
foreground: "var(--syntax-info)",
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
scope: "markup.italic",
|
|
256
|
+
settings: {
|
|
257
|
+
fontStyle: "italic",
|
|
258
|
+
// foreground: "",
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
scope: "markup.bold",
|
|
263
|
+
settings: {
|
|
264
|
+
fontStyle: "bold",
|
|
265
|
+
foreground: "var(--text-strong)",
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
scope: [
|
|
270
|
+
"markup.raw",
|
|
271
|
+
"markup.inserted",
|
|
272
|
+
"meta.diff.header.to-file",
|
|
273
|
+
"punctuation.definition.inserted",
|
|
274
|
+
"markup.changed",
|
|
275
|
+
"punctuation.definition.changed",
|
|
276
|
+
"markup.ignored",
|
|
277
|
+
"markup.untracked",
|
|
278
|
+
],
|
|
279
|
+
settings: {
|
|
280
|
+
foreground: "var(--text-base)",
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
scope: "meta.diff.range",
|
|
285
|
+
settings: {
|
|
286
|
+
fontStyle: "bold",
|
|
287
|
+
foreground: "var(--syntax-unknown)",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
scope: "meta.diff.header",
|
|
292
|
+
settings: {
|
|
293
|
+
foreground: "var(--syntax-unknown)",
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
scope: "meta.separator",
|
|
298
|
+
settings: {
|
|
299
|
+
fontStyle: "bold",
|
|
300
|
+
foreground: "var(--syntax-unknown)",
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
scope: "meta.output",
|
|
305
|
+
settings: {
|
|
306
|
+
foreground: "var(--syntax-unknown)",
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
scope: "meta.export.default",
|
|
311
|
+
settings: {
|
|
312
|
+
foreground: "var(--syntax-unknown)",
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
scope: [
|
|
317
|
+
"brackethighlighter.tag",
|
|
318
|
+
"brackethighlighter.curly",
|
|
319
|
+
"brackethighlighter.round",
|
|
320
|
+
"brackethighlighter.square",
|
|
321
|
+
"brackethighlighter.angle",
|
|
322
|
+
"brackethighlighter.quote",
|
|
323
|
+
],
|
|
324
|
+
settings: {
|
|
325
|
+
foreground: "var(--syntax-unknown)",
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
scope: ["constant.other.reference.link", "string.other.link"],
|
|
330
|
+
settings: {
|
|
331
|
+
fontStyle: "underline",
|
|
332
|
+
foreground: "var(--syntax-unknown)",
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
scope: "token.info-token",
|
|
337
|
+
settings: {
|
|
338
|
+
foreground: "var(--syntax-info)",
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
scope: "token.warn-token",
|
|
343
|
+
settings: {
|
|
344
|
+
foreground: "var(--syntax-warning)",
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
scope: "token.debug-token",
|
|
349
|
+
settings: {
|
|
350
|
+
foreground: "var(--syntax-info)",
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
semanticTokenColors: {
|
|
355
|
+
comment: "var(--syntax-comment)",
|
|
356
|
+
string: "var(--syntax-string)",
|
|
357
|
+
number: "var(--syntax-constant)",
|
|
358
|
+
regexp: "var(--syntax-regexp)",
|
|
359
|
+
keyword: "var(--syntax-keyword)",
|
|
360
|
+
variable: "var(--syntax-variable)",
|
|
361
|
+
parameter: "var(--syntax-variable)",
|
|
362
|
+
property: "var(--syntax-property)",
|
|
363
|
+
function: "var(--syntax-primitive)",
|
|
364
|
+
method: "var(--syntax-primitive)",
|
|
365
|
+
type: "var(--syntax-type)",
|
|
366
|
+
class: "var(--syntax-type)",
|
|
367
|
+
namespace: "var(--syntax-type)",
|
|
368
|
+
enumMember: "var(--syntax-primitive)",
|
|
369
|
+
"variable.constant": "var(--syntax-constant)",
|
|
370
|
+
"variable.defaultLibrary": "var(--syntax-unknown)",
|
|
371
|
+
},
|
|
372
|
+
} as unknown as ThemeRegistrationResolved
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getSharedHighlighter } from "@pierre/diffs"
|
|
2
|
+
import { bundledLanguages, type BundledLanguage } from "shiki"
|
|
3
|
+
import { createSimpleContext } from "./helper"
|
|
4
|
+
import { createMarkdownParser } from "./marked-parser"
|
|
5
|
+
import { registerOpenCodeTheme } from "./marked-theme-register"
|
|
6
|
+
|
|
7
|
+
export { OpenCodeTheme } from "./marked-theme"
|
|
8
|
+
|
|
9
|
+
registerOpenCodeTheme()
|
|
10
|
+
|
|
11
|
+
export const { use: useMarked, provider: MarkedProvider } = createSimpleContext({
|
|
12
|
+
name: "Marked",
|
|
13
|
+
init: () =>
|
|
14
|
+
createMarkdownParser(async (code, language) => {
|
|
15
|
+
const highlighter = await getSharedHighlighter({
|
|
16
|
+
themes: ["OpenCode"],
|
|
17
|
+
langs: [],
|
|
18
|
+
preferredHighlighter: "shiki-wasm",
|
|
19
|
+
})
|
|
20
|
+
const name = language in bundledLanguages ? language : "text"
|
|
21
|
+
if (!highlighter.getLoadedLanguages().includes(name)) await highlighter.loadLanguage(name as BundledLanguage)
|
|
22
|
+
return highlighter.codeToHtml(code, {
|
|
23
|
+
lang: name,
|
|
24
|
+
theme: "OpenCode",
|
|
25
|
+
tabindex: false,
|
|
26
|
+
})
|
|
27
|
+
}),
|
|
28
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkerPoolManager } from "@pierre/diffs/worker"
|
|
2
|
+
import { createSimpleContext } from "./helper"
|
|
3
|
+
|
|
4
|
+
export type WorkerPools = {
|
|
5
|
+
unified: WorkerPoolManager | undefined
|
|
6
|
+
split: WorkerPoolManager | undefined
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ctx = createSimpleContext<WorkerPools, { pools: WorkerPools }>({
|
|
10
|
+
name: "WorkerPool",
|
|
11
|
+
init: (props) => props.pools,
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export const WorkerPoolProvider = ctx.provider
|
|
15
|
+
|
|
16
|
+
export function useWorkerPool(diffStyle: "unified" | "split" | undefined) {
|
|
17
|
+
const pools = ctx.use()
|
|
18
|
+
if (diffStyle === "split") return pools.split
|
|
19
|
+
return pools.unified
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DIFFS_TAG_NAME } from "@pierre/diffs"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript declaration for the <diffs-container> custom element.
|
|
5
|
+
* This tells TypeScript that <diffs-container> is a valid JSX element in SolidJS.
|
|
6
|
+
* Required for using the @pierre/diffs web component in .tsx files.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
declare module "solid-js" {
|
|
10
|
+
namespace JSX {
|
|
11
|
+
interface IntrinsicElements {
|
|
12
|
+
[DIFFS_TAG_NAME]: HTMLAttributes<HTMLElement>
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
[data-component="accordion"] {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-start;
|
|
5
|
+
gap: 0px;
|
|
6
|
+
align-self: stretch;
|
|
7
|
+
|
|
8
|
+
[data-slot="accordion-item"] {
|
|
9
|
+
width: 100%;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
align-self: stretch;
|
|
14
|
+
overflow: visible;
|
|
15
|
+
|
|
16
|
+
& + [data-slot="accordion-item"] {
|
|
17
|
+
margin-top: -1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-slot="accordion-header"] {
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
|
|
27
|
+
[data-slot="accordion-trigger"] {
|
|
28
|
+
width: 100%;
|
|
29
|
+
display: flex;
|
|
30
|
+
height: 32px;
|
|
31
|
+
padding: 8px 12px;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
align-items: center;
|
|
34
|
+
align-self: stretch;
|
|
35
|
+
cursor: default;
|
|
36
|
+
user-select: none;
|
|
37
|
+
|
|
38
|
+
background-color: var(--v2-background-bg-base);
|
|
39
|
+
border: 1px solid var(--v2-border-border-base);
|
|
40
|
+
border-radius: 0;
|
|
41
|
+
box-shadow: none;
|
|
42
|
+
overflow: clip;
|
|
43
|
+
color: var(--v2-text-text-base);
|
|
44
|
+
transition: background-color 0.15s ease;
|
|
45
|
+
|
|
46
|
+
font-family: var(--font-family-sans);
|
|
47
|
+
font-size: var(--font-size-small);
|
|
48
|
+
font-style: normal;
|
|
49
|
+
font-weight: var(--font-weight-regular);
|
|
50
|
+
line-height: var(--line-height-large);
|
|
51
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
52
|
+
|
|
53
|
+
@media (hover: hover) {
|
|
54
|
+
&:hover:not([data-disabled]) {
|
|
55
|
+
background-color: var(--v2-overlay-simple-overlay-hover);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline: none;
|
|
60
|
+
}
|
|
61
|
+
&[data-disabled] {
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:first-child {
|
|
68
|
+
[data-slot="accordion-header"] [data-slot="accordion-trigger"] {
|
|
69
|
+
border-top-left-radius: var(--radius-lg);
|
|
70
|
+
border-top-right-radius: var(--radius-lg);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:last-child:not([data-expanded]) {
|
|
75
|
+
[data-slot="accordion-header"] [data-slot="accordion-trigger"] {
|
|
76
|
+
border-bottom-left-radius: var(--radius-lg);
|
|
77
|
+
border-bottom-right-radius: var(--radius-lg);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[data-expanded] {
|
|
82
|
+
[data-slot="accordion-content"] {
|
|
83
|
+
border: 1px solid var(--v2-border-border-base);
|
|
84
|
+
border-top: 0;
|
|
85
|
+
background-color: var(--v2-background-bg-layer-01);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:last-child[data-expanded] {
|
|
90
|
+
[data-slot="accordion-content"] {
|
|
91
|
+
border-bottom-left-radius: var(--radius-lg);
|
|
92
|
+
border-bottom-right-radius: var(--radius-lg);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-slot="accordion-content"] {
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
width: 100%;
|
|
99
|
+
border: 0;
|
|
100
|
+
background-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@keyframes slideDown {
|
|
106
|
+
from {
|
|
107
|
+
height: 0;
|
|
108
|
+
}
|
|
109
|
+
to {
|
|
110
|
+
height: var(--kb-accordion-content-height);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@keyframes slideUp {
|
|
115
|
+
from {
|
|
116
|
+
height: var(--kb-accordion-content-height);
|
|
117
|
+
}
|
|
118
|
+
to {
|
|
119
|
+
height: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Content, Header, Item, Root, Trigger } from "@kobalte/core/accordion"
|
|
2
|
+
import { splitProps } from "solid-js"
|
|
3
|
+
import type { ComponentProps, ParentProps } from "solid-js"
|
|
4
|
+
|
|
5
|
+
export interface AccordionProps extends ComponentProps<typeof Root> {}
|
|
6
|
+
export interface AccordionItemProps extends ComponentProps<typeof Item> {}
|
|
7
|
+
export interface AccordionHeaderProps extends ComponentProps<typeof Header> {}
|
|
8
|
+
export interface AccordionTriggerProps extends ComponentProps<typeof Trigger> {}
|
|
9
|
+
export interface AccordionContentProps extends ComponentProps<typeof Content> {}
|
|
10
|
+
|
|
11
|
+
function AccordionRoot(props: AccordionProps) {
|
|
12
|
+
const [split, rest] = splitProps(props, ["class", "classList"])
|
|
13
|
+
return (
|
|
14
|
+
<Root
|
|
15
|
+
{...rest}
|
|
16
|
+
data-component="accordion"
|
|
17
|
+
classList={{
|
|
18
|
+
...split.classList,
|
|
19
|
+
[split.class ?? ""]: !!split.class,
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function AccordionItem(props: AccordionItemProps) {
|
|
26
|
+
const [split, rest] = splitProps(props, ["class", "classList"])
|
|
27
|
+
return (
|
|
28
|
+
<Item
|
|
29
|
+
{...rest}
|
|
30
|
+
data-slot="accordion-item"
|
|
31
|
+
classList={{
|
|
32
|
+
...split.classList,
|
|
33
|
+
[split.class ?? ""]: !!split.class,
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function AccordionHeader(props: ParentProps<AccordionHeaderProps>) {
|
|
40
|
+
const [split, rest] = splitProps(props, ["class", "classList", "children"])
|
|
41
|
+
return (
|
|
42
|
+
<Header
|
|
43
|
+
{...rest}
|
|
44
|
+
data-slot="accordion-header"
|
|
45
|
+
classList={{
|
|
46
|
+
...split.classList,
|
|
47
|
+
[split.class ?? ""]: !!split.class,
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{split.children}
|
|
51
|
+
</Header>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function AccordionTrigger(props: ParentProps<AccordionTriggerProps>) {
|
|
56
|
+
const [split, rest] = splitProps(props, ["class", "classList", "children"])
|
|
57
|
+
return (
|
|
58
|
+
<Trigger
|
|
59
|
+
{...rest}
|
|
60
|
+
data-slot="accordion-trigger"
|
|
61
|
+
classList={{
|
|
62
|
+
...split.classList,
|
|
63
|
+
[split.class ?? ""]: !!split.class,
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{split.children}
|
|
67
|
+
</Trigger>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function AccordionContent(props: ParentProps<AccordionContentProps>) {
|
|
72
|
+
const [split, rest] = splitProps(props, ["class", "classList", "children"])
|
|
73
|
+
return (
|
|
74
|
+
<Content
|
|
75
|
+
{...rest}
|
|
76
|
+
data-slot="accordion-content"
|
|
77
|
+
classList={{
|
|
78
|
+
...split.classList,
|
|
79
|
+
[split.class ?? ""]: !!split.class,
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
{split.children}
|
|
83
|
+
</Content>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const Accordion = Object.assign(AccordionRoot, {
|
|
88
|
+
Item: AccordionItem,
|
|
89
|
+
Header: AccordionHeader,
|
|
90
|
+
Trigger: AccordionTrigger,
|
|
91
|
+
Content: AccordionContent,
|
|
92
|
+
})
|