@dxos/ui-theme 0.0.0 → 0.8.4-main.59c2e9b
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/dist/lib/browser/index.mjs +3410 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +3412 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs +79 -0
- package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs.map +7 -0
- package/dist/plugin/node-cjs/chunk-ZVALPM6U.cjs +1619 -0
- package/dist/plugin/node-cjs/chunk-ZVALPM6U.cjs.map +7 -0
- package/dist/plugin/node-cjs/config/tailwind.cjs +29 -0
- package/dist/plugin/node-cjs/config/tailwind.cjs.map +7 -0
- package/dist/plugin/node-cjs/meta.json +1 -0
- package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs +90 -0
- package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs.map +7 -0
- package/dist/plugin/node-cjs/plugins/plugin.cjs +124 -0
- package/dist/plugin/node-cjs/plugins/plugin.cjs.map +7 -0
- package/dist/plugin/node-cjs/theme.css +1362 -0
- package/dist/plugin/node-cjs/theme.css.map +7 -0
- package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs +49 -0
- package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs.map +7 -0
- package/dist/plugin/node-esm/chunk-HJE6EZWE.mjs +1614 -0
- package/dist/plugin/node-esm/chunk-HJE6EZWE.mjs.map +7 -0
- package/dist/plugin/node-esm/config/tailwind.mjs +8 -0
- package/dist/plugin/node-esm/config/tailwind.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs +63 -0
- package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map +7 -0
- package/dist/plugin/node-esm/plugins/plugin.mjs +98 -0
- package/dist/plugin/node-esm/plugins/plugin.mjs.map +7 -0
- package/dist/plugin/node-esm/theme.css +1362 -0
- package/dist/plugin/node-esm/theme.css.map +7 -0
- package/dist/types/src/Tokens.stories.d.ts +10 -0
- package/dist/types/src/Tokens.stories.d.ts.map +1 -0
- package/dist/types/src/config/index.d.ts +3 -0
- package/dist/types/src/config/index.d.ts.map +1 -0
- package/dist/types/src/config/tailwind.d.ts +9 -0
- package/dist/types/src/config/tailwind.d.ts.map +1 -0
- package/dist/types/src/config/tokens/alias-colors.d.ts +21 -0
- package/dist/types/src/config/tokens/alias-colors.d.ts.map +1 -0
- package/dist/types/src/config/tokens/index.d.ts +486 -0
- package/dist/types/src/config/tokens/index.d.ts.map +1 -0
- package/dist/types/src/config/tokens/lengths.d.ts +139 -0
- package/dist/types/src/config/tokens/lengths.d.ts.map +1 -0
- package/dist/types/src/config/tokens/physical-colors.d.ts +23 -0
- package/dist/types/src/config/tokens/physical-colors.d.ts.map +1 -0
- package/dist/types/src/config/tokens/semantic-colors.d.ts +187 -0
- package/dist/types/src/config/tokens/semantic-colors.d.ts.map +1 -0
- package/dist/types/src/config/tokens/sememes-calls.d.ts +3 -0
- package/dist/types/src/config/tokens/sememes-calls.d.ts.map +1 -0
- package/dist/types/src/config/tokens/sememes-codemirror.d.ts +43 -0
- package/dist/types/src/config/tokens/sememes-codemirror.d.ts.map +1 -0
- package/dist/types/src/config/tokens/sememes-hue.d.ts +4 -0
- package/dist/types/src/config/tokens/sememes-hue.d.ts.map +1 -0
- package/dist/types/src/config/tokens/sememes-sheet.d.ts +58 -0
- package/dist/types/src/config/tokens/sememes-sheet.d.ts.map +1 -0
- package/dist/types/src/config/tokens/sememes-system.d.ts +99 -0
- package/dist/types/src/config/tokens/sememes-system.d.ts.map +1 -0
- package/dist/types/src/config/tokens/sizes.d.ts +7 -0
- package/dist/types/src/config/tokens/sizes.d.ts.map +1 -0
- package/dist/types/src/config/tokens/types.d.ts +5 -0
- package/dist/types/src/config/tokens/types.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +12 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/plugins/esbuild-plugin.d.ts +9 -0
- package/dist/types/src/plugins/esbuild-plugin.d.ts.map +1 -0
- package/dist/types/src/plugins/plugin.d.ts +20 -0
- package/dist/types/src/plugins/plugin.d.ts.map +1 -0
- package/dist/types/src/plugins/resolveContent.d.ts +2 -0
- package/dist/types/src/plugins/resolveContent.d.ts.map +1 -0
- package/dist/types/src/styles/components/anchored-overflow.d.ts +6 -0
- package/dist/types/src/styles/components/anchored-overflow.d.ts.map +1 -0
- package/dist/types/src/styles/components/avatar.d.ts +21 -0
- package/dist/types/src/styles/components/avatar.d.ts.map +1 -0
- package/dist/types/src/styles/components/breadcrumb.d.ts +9 -0
- package/dist/types/src/styles/components/breadcrumb.d.ts.map +1 -0
- package/dist/types/src/styles/components/button.d.ts +19 -0
- package/dist/types/src/styles/components/button.d.ts.map +1 -0
- package/dist/types/src/styles/components/dialog.d.ts +15 -0
- package/dist/types/src/styles/components/dialog.d.ts.map +1 -0
- package/dist/types/src/styles/components/icon-button.d.ts +8 -0
- package/dist/types/src/styles/components/icon-button.d.ts.map +1 -0
- package/dist/types/src/styles/components/icon.d.ts +7 -0
- package/dist/types/src/styles/components/icon.d.ts.map +1 -0
- package/dist/types/src/styles/components/index.d.ts +24 -0
- package/dist/types/src/styles/components/index.d.ts.map +1 -0
- package/dist/types/src/styles/components/input.d.ts +111 -0
- package/dist/types/src/styles/components/input.d.ts.map +1 -0
- package/dist/types/src/styles/components/link.d.ts +7 -0
- package/dist/types/src/styles/components/link.d.ts.map +1 -0
- package/dist/types/src/styles/components/list.d.ts +14 -0
- package/dist/types/src/styles/components/list.d.ts.map +1 -0
- package/dist/types/src/styles/components/main.d.ts +28 -0
- package/dist/types/src/styles/components/main.d.ts.map +1 -0
- package/dist/types/src/styles/components/menu.d.ts +13 -0
- package/dist/types/src/styles/components/menu.d.ts.map +1 -0
- package/dist/types/src/styles/components/message.d.ts +11 -0
- package/dist/types/src/styles/components/message.d.ts.map +1 -0
- package/dist/types/src/styles/components/popover.d.ts +11 -0
- package/dist/types/src/styles/components/popover.d.ts.map +1 -0
- package/dist/types/src/styles/components/scroll-area.d.ts +9 -0
- package/dist/types/src/styles/components/scroll-area.d.ts.map +1 -0
- package/dist/types/src/styles/components/select.d.ts +13 -0
- package/dist/types/src/styles/components/select.d.ts.map +1 -0
- package/dist/types/src/styles/components/separator.d.ts +8 -0
- package/dist/types/src/styles/components/separator.d.ts.map +1 -0
- package/dist/types/src/styles/components/status.d.ts +9 -0
- package/dist/types/src/styles/components/status.d.ts.map +1 -0
- package/dist/types/src/styles/components/tag.d.ts +7 -0
- package/dist/types/src/styles/components/tag.d.ts.map +1 -0
- package/dist/types/src/styles/components/toast.d.ts +12 -0
- package/dist/types/src/styles/components/toast.d.ts.map +1 -0
- package/dist/types/src/styles/components/toolbar.d.ts +11 -0
- package/dist/types/src/styles/components/toolbar.d.ts.map +1 -0
- package/dist/types/src/styles/components/tooltip.d.ts +8 -0
- package/dist/types/src/styles/components/tooltip.d.ts.map +1 -0
- package/dist/types/src/styles/components/treegrid.d.ts +10 -0
- package/dist/types/src/styles/components/treegrid.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/density.d.ts +13 -0
- package/dist/types/src/styles/fragments/density.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/dimension.d.ts +5 -0
- package/dist/types/src/styles/fragments/dimension.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/disabled.d.ts +3 -0
- package/dist/types/src/styles/fragments/disabled.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/elevation.d.ts +15 -0
- package/dist/types/src/styles/fragments/elevation.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/focus.d.ts +6 -0
- package/dist/types/src/styles/fragments/focus.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/group.d.ts +5 -0
- package/dist/types/src/styles/fragments/group.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/hover.d.ts +17 -0
- package/dist/types/src/styles/fragments/hover.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/index.d.ts +17 -0
- package/dist/types/src/styles/fragments/index.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/layout.d.ts +3 -0
- package/dist/types/src/styles/fragments/layout.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/motion.d.ts +2 -0
- package/dist/types/src/styles/fragments/motion.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/ornament.d.ts +5 -0
- package/dist/types/src/styles/fragments/ornament.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/selected.d.ts +13 -0
- package/dist/types/src/styles/fragments/selected.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/shimmer.d.ts +3 -0
- package/dist/types/src/styles/fragments/shimmer.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/size.d.ts +9 -0
- package/dist/types/src/styles/fragments/size.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/surface.d.ts +9 -0
- package/dist/types/src/styles/fragments/surface.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/text.d.ts +7 -0
- package/dist/types/src/styles/fragments/text.d.ts.map +1 -0
- package/dist/types/src/styles/fragments/valence.d.ts +13 -0
- package/dist/types/src/styles/fragments/valence.d.ts.map +1 -0
- package/dist/types/src/styles/index.d.ts +4 -0
- package/dist/types/src/styles/index.d.ts.map +1 -0
- package/dist/types/src/styles/theme.d.ts +5 -0
- package/dist/types/src/styles/theme.d.ts.map +1 -0
- package/dist/types/src/tailwind.d.ts +3 -0
- package/dist/types/src/tailwind.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +3 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/util/hash-styles.d.ts +15 -0
- package/dist/types/src/util/hash-styles.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/mx.d.ts +2 -0
- package/dist/types/src/util/mx.d.ts.map +1 -0
- package/dist/types/src/util/withLogical.d.ts +164 -0
- package/dist/types/src/util/withLogical.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +9 -5
- package/src/config/index.ts +1 -1
- package/src/config/tailwind.ts +78 -64
- package/src/config/tokens/lengths.ts +6 -6
- package/src/config/tokens/sizes.ts +5 -2
- package/src/index.ts +1 -1
- package/src/styles/components/dialog.ts +19 -3
- package/src/styles/fragments/motion.ts +1 -1
- package/src/styles/layers/dialog.css +53 -18
- package/src/styles/layers/size.css +19 -12
- package/src/styles/layers/typography.css +22 -2
- package/src/tailwind.ts +3 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/tailwind.ts", "../../../src/config/tokens/index.ts", "../../../src/config/tokens/physical-colors.ts", "../../../src/config/tokens/sememes-hue.ts", "../../../src/config/tokens/sememes-sheet.ts", "../../../src/config/tokens/sememes-system.ts", "../../../src/config/tokens/alias-colors.ts", "../../../src/config/tokens/sizes.ts", "../../../src/config/tokens/lengths.ts", "../../../src/config/tokens/sememes-calls.ts", "../../../src/config/tokens/sememes-codemirror.ts", "../../../src/config/tokens/semantic-colors.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport tailwindcssContainerQueries from '@tailwindcss/container-queries';\nimport tailwindcssForms from '@tailwindcss/forms';\nimport merge from 'lodash.merge';\nimport tailwindScrollbar from 'tailwind-scrollbar';\nimport defaultConfig from 'tailwindcss/stubs/config.full.js';\nimport { type Config, type ThemeConfig } from 'tailwindcss/types/config';\nimport tailwindcssLogical from 'tailwindcss-logical';\nimport tailwindcssRadix from 'tailwindcss-radix';\n\nimport { tokensTailwindConfig } from './tokens';\n\nexport type TailwindConfig = Config;\nexport type TailwindThemeConfig = ThemeConfig;\n\nconst { extend: extendTokens, ...overrideTokens } = tokensTailwindConfig;\n\nexport const tailwindConfig = ({\n env = 'production',\n content = [],\n extensions = [],\n}: {\n env?: string;\n content?: string[];\n extensions?: Partial<TailwindThemeConfig>[];\n}): TailwindConfig => ({\n darkMode: 'class',\n theme: {\n // Configure fonts in theme.css and package.json.\n fontFamily: {\n body: ['Inter Variable', ...defaultConfig.theme.fontFamily.sans],\n mono: ['JetBrains Mono Variable', ...defaultConfig.theme.fontFamily.mono],\n },\n extend: merge(\n {\n // Generates is-card-default-width, is-card-min-width, etc.\n spacing: {\n 'card-default-width': 'var(--dx-card-default-width)',\n 'card-min-width': 'var(--dx-card-min-width)',\n 'card-max-width': 'var(--dx-card-max-width)',\n 'container-max-width': 'var(--dx-container-max-width)',\n 'popover-max-width': 'var(--dx-popover-max-width)',\n 'prose-max-width': 'var(--dx-prose-max-width)',\n },\n backgroundImage: {\n 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',\n 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',\n },\n borderRadius: {\n none: '0',\n sm: '0.25rem',\n DEFAULT: '0.5rem',\n md: '0.75rem',\n lg: '1rem',\n },\n screens: {\n 'pointer-fine': { raw: '(pointer: fine)' },\n 'hover-hover': { raw: '(hover: hover)' },\n 'md': '768px',\n 'lg': '1024px',\n },\n fontSize: {\n // Base size 16px\n // Scale 1.125\n 'xs': ['0.790rem', { lineHeight: '1rem' }],\n 'sm': ['0.889rem', { lineHeight: '1.25rem' }],\n 'base': ['1rem', { lineHeight: '1.5rem' }],\n 'lg': ['1.125rem', { lineHeight: '1.75rem' }],\n 'xl': ['1.266rem', { lineHeight: '1.75rem' }],\n '2xl': ['1.424rem', { lineHeight: '2rem' }],\n '3xl': ['1.602rem', { lineHeight: '2.25rem' }],\n '4xl': ['1.802rem', { lineHeight: '2.5rem' }],\n '5xl': ['2.027rem', { lineHeight: '2.5rem' }],\n '6xl': ['2.281rem', { lineHeight: '2.5rem' }],\n '7xl': ['2.566rem', { lineHeight: '2.75rem' }],\n '8xl': ['2.887rem', { lineHeight: '3rem' }],\n '9xl': ['3.247rem', { lineHeight: '3.25rem' }],\n },\n boxShadow: {\n 'slider': '0 0 0 5px rgba(0, 0, 0, 0.3)',\n },\n transitionProperty: {\n 'max-height': 'max-height',\n },\n transitionTimingFunction: {\n 'in-out-symmetric': 'cubic-bezier(0.5, 0, 0.5, 1)',\n },\n keyframes: {\n // Fade\n 'fade-in': {\n from: { opacity: 0 },\n to: { opacity: 1 },\n },\n 'fade-out': {\n from: { opacity: 1 },\n to: { opacity: 0 },\n },\n\n // Popper chrome\n 'slide-down-and-fade': {\n from: { opacity: 1, transform: 'translateY(0)' },\n to: { opacity: 0, transform: 'translateY(16px)' },\n },\n 'slide-left-and-fade': {\n from: { opacity: 0, transform: 'translateX(-16px)' },\n to: { opacity: 1, transform: 'translateX(0)' },\n },\n 'slide-up-and-fade': {\n from: { opacity: 0, transform: 'translateY(16px)' },\n to: { opacity: 1, transform: 'translateY(0)' },\n },\n 'slide-right-and-fade': {\n from: { opacity: 0, transform: 'translateX(16px)' },\n to: { opacity: 1, transform: 'translateX(0)' },\n },\n\n // Toast\n 'toast-hide': {\n '0%': { opacity: '1' },\n '100%': { opacity: '0' },\n },\n 'toast-slide-in-right': {\n '0%': { transform: 'translateX(calc(100% + 1rem))' },\n '100%': { transform: 'translateX(0)' },\n },\n 'toast-slide-in-bottom': {\n '0%': { transform: 'translateY(calc(100% + 1rem))' },\n '100%': { transform: 'translateY(0)' },\n },\n 'toast-swipe-out': {\n '0%': {\n transform: 'translateX(var(--radix-toast-swipe-end-x))',\n },\n '100%': {\n transform: 'translateX(calc(100% + 1rem))',\n },\n },\n\n // Accordion\n 'slide-down': {\n from: { height: '0px' },\n to: { height: 'var(--radix-accordion-content-height)' },\n },\n 'slide-up': {\n from: { height: 'var(--radix-accordion-content-height)' },\n to: { height: '0px' },\n },\n\n // Shimmer\n 'shimmer-loop': {\n '100%': {\n transform: 'translateX(100%)',\n },\n },\n\n // HALO\n 'halo-pulse': {\n '0%': {\n opacity: 0.3,\n },\n '5%': {\n opacity: 1,\n },\n '100%': {\n opacity: 0.3,\n },\n },\n\n // Progress\n 'progress-indeterminate': {\n '0%': {\n left: 0,\n width: '0%',\n },\n '25%': {\n left: '25%',\n width: '50%',\n },\n '75%': {\n left: '50%',\n width: '100%',\n },\n '100%': {\n left: '100%',\n width: '0%',\n },\n },\n\n // Border trail effect\n 'trail': {\n to: { 'offset-distance': '100%' },\n },\n 'trail-offset': {\n '0%': { 'offset-distance': '50%' },\n '100%': { 'offset-distance': '150%' },\n },\n },\n animation: {\n // Fade\n 'fade-in': 'fade-in 200ms ease-out',\n 'fade-out': 'fade-out 400ms ease-out',\n\n // Popper chrome\n 'slide-down-and-fade': 'slide-down-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'slide-left-and-fade': 'slide-left-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'slide-up-and-fade': 'slide-up-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'slide-right-and-fade': 'slide-right-and-fade 400ms cubic-bezier(0.16, 1, 0.3, 1)',\n\n // Toast\n 'toast-hide': 'toast-hide 100ms ease-in forwards',\n 'toast-slide-in-right': 'toast-slide-in-right 150ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'toast-slide-in-bottom': 'toast-slide-in-bottom 150ms cubic-bezier(0.16, 1, 0.3, 1)',\n 'toast-swipe-out': 'toast-swipe-out 100ms ease-out forwards',\n\n // Accordion\n 'slide-down': 'slide-down 300ms cubic-bezier(0.87, 0, 0.13, 1)',\n 'slide-up': 'slide-up 300ms cubic-bezier(0.87, 0, 0.13, 1)',\n\n // Border trail effect\n 'trail': 'trail 6s linear infinite',\n 'trail-offset': 'trail-offset 6s linear infinite',\n\n // Progress effects\n 'spin': 'spin 1.5s linear infinite',\n 'spin-slow': 'spin 3s linear infinite',\n 'shimmer': 'shimmer-loop 2s infinite',\n 'halo-pulse': 'halo-pulse 2s ease-out infinite',\n 'progress-indeterminate': 'progress-indeterminate 2s ease-out infinite',\n 'progress-linear': 'progress-linear 2s ease-out infinite',\n },\n },\n extendTokens,\n ...extensions,\n ),\n ...overrideTokens,\n colors: {\n ...overrideTokens.colors,\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: 'black',\n white: 'white',\n },\n },\n plugins: [\n tailwindcssContainerQueries,\n tailwindcssForms,\n tailwindcssLogical,\n tailwindcssRadix(),\n // https://adoxography.github.io/tailwind-scrollbar/utilities\n tailwindScrollbar({\n nocompatible: true,\n preferredStrategy: 'pseudoelements',\n }),\n ],\n ...(env === 'development' && { mode: 'jit' }),\n content,\n future: {\n hoverOnlyWhenSupported: true,\n },\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type TailwindAdapterConfig } from '@ch-ui/tailwind-tokens';\nimport adapter from '@ch-ui/tailwind-tokens';\nimport { type TokenSet } from '@ch-ui/tokens';\n\nimport { aliasColors } from './alias-colors';\nimport { lengthsFacet, maxSizesFacet } from './lengths';\nimport { huePalettes, physicalColors } from './physical-colors';\nimport { semanticColors } from './semantic-colors';\nimport { systemAliases, systemSememes } from './sememes-system';\n\nexport * from './sizes';\n\nexport const hues = Object.keys(huePalettes);\n\nexport const tokenSet = {\n colors: {\n physical: physicalColors,\n semantic: semanticColors,\n alias: aliasColors,\n },\n lengths: lengthsFacet,\n maxSizes: maxSizesFacet,\n} satisfies TokenSet;\n\nconst adapterConfig: TailwindAdapterConfig = {\n colors: {\n facet: 'colors',\n disposition: 'overwrite',\n tokenization: 'recursive',\n },\n borderWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n ringWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n ringOffsetWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n outlineWidth: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'omit-series',\n },\n spacing: {\n facet: 'lengths',\n disposition: 'extend',\n tokenization: 'keep-series',\n },\n};\n\nexport const userDefaultTokenSet = {\n colors: {\n physical: {\n definitions: {\n series: {\n neutral: physicalColors.definitions!.series!.neutral,\n primary: physicalColors.definitions!.series!.primary,\n },\n accompanyingSeries: physicalColors.definitions!.accompanyingSeries,\n },\n conditions: physicalColors.conditions,\n series: {\n neutral: physicalColors.series.neutral,\n primary: physicalColors.series.primary,\n },\n namespace: physicalColors.namespace,\n },\n semantic: {\n conditions: semanticColors.conditions,\n sememes: systemSememes,\n namespace: semanticColors.namespace,\n },\n alias: {\n conditions: aliasColors.conditions,\n aliases: systemAliases,\n namespace: aliasColors.namespace,\n },\n },\n} satisfies TokenSet;\n\nexport const tokensTailwindConfig = adapter(tokenSet, adapterConfig);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { AccompanyingSeries, ColorsPhysicalLayer, Gamut, HelicalArcSeries, PhysicalSeries } from '@ch-ui/tokens';\n\nimport { type PhysicalPalette } from './types';\n\nconst reflectiveRelation = {\n initial: 1_000,\n slope: -1_000,\n method: 'floor',\n} satisfies AccompanyingSeries;\n\nconst gamuts: (Gamut & string)[] = ['srgb', 'p3', 'rec2020'];\n\nconst DEG_RAD = Math.PI / 180;\n\n/**\n * Creates a color palette configuration for a given hue value.\n *\n * @param hue - A number from 0-16 representing different hue angles\n * @returns A PhysicalPalette configuration with:\n * - keyPoint: [lightness, chroma, hue] in LCH color space\n * - lightness: Fixed at 0.5 (50%)\n * - chroma: Varies sinusoidally around 0.13 based on hue angle\n * - hue: Calculated by mapping input 0-16 to 26-386 degrees\n * - Control points and torsion for color interpolation\n */\nconst hueKeyPoint = (hue: number): PhysicalPalette => {\n const hueDeg = (360 * (hue / 17) + 26) % 360;\n return {\n keyPoint: [0.5, 0.13 + 0.024 * Math.sin((hueDeg - 15) * DEG_RAD), hueDeg],\n lowerCp: 1,\n upperCp: 1,\n torsion: 0,\n };\n};\n\nexport const huePalettes = {\n red: hueKeyPoint(0),\n orange: hueKeyPoint(1),\n amber: hueKeyPoint(2),\n yellow: hueKeyPoint(3),\n lime: hueKeyPoint(4),\n green: hueKeyPoint(5),\n emerald: hueKeyPoint(6),\n teal: hueKeyPoint(7),\n cyan: hueKeyPoint(8),\n sky: hueKeyPoint(9),\n blue: hueKeyPoint(10),\n indigo: hueKeyPoint(11),\n violet: hueKeyPoint(12),\n purple: hueKeyPoint(13),\n fuchsia: hueKeyPoint(14),\n pink: hueKeyPoint(15),\n rose: hueKeyPoint(16),\n};\n\n/**\n * The keyPoint represents the LCH value:\n * - Lightness: 0-1, should usually set the keyPoint at or near 0.5\n * - Chroma: min 0, max 0.08–0.5 depending on hue and gamut, theme will clamp final value to within gamut’s range\n * - Hue: 0-360 (~26 “red”, ~141 “green”, ~262 “blue”)\n *\n * NOTE: Rebuild the theme and restart the dev server to see changes.\n *\n * Theme references:\n * https://oklch.com\n * https://colorsublime.github.io\n * https://github.com/microsoft/vscode-docs/blob/main/api/extension-guides/color-theme.md#create-a-new-color-theme\n * https://raw.githubusercontent.com/microsoft/vscode/main/src/vs/workbench/services/themes/common/colorThemeSchema.ts\n * https://tailwindcss.com/docs/colors\n */\nconst systemPalettes = {\n neutral: {\n keyPoint: [0.5, 0.001, 260],\n lowerCp: 0,\n upperCp: 0,\n torsion: 0,\n // Values used directly.\n // TODO(burdon): Audit.\n values: [25, 50, 75, 100, 150, 200, 250, 300, 400, 500, 600, 700, 750, 800, 850, 900],\n } satisfies PhysicalPalette,\n\n // https://oklch.com/#0.5,0.2,260,100 (#0559d2)\n primary: {\n keyPoint: [0.5, 0.2, 260],\n lowerCp: 0.86,\n upperCp: 1,\n torsion: -30,\n // Values used directly.\n // TODO(burdon): Audit.\n values: [100, 150, 200, 350, 400, 450, 500, 750, 800, 850],\n } satisfies PhysicalPalette,\n};\n\nconst physicalSeries = {\n ...huePalettes,\n ...systemPalettes,\n};\n\nexport const physicalColors: ColorsPhysicalLayer = {\n namespace: 'dx-',\n definitions: {\n // @ts-ignore\n series: physicalSeries,\n accompanyingSeries: { reflectiveRelation },\n },\n conditions: {\n srgb: [':root, .dark'],\n p3: ['@media (color-gamut: p3)', ':root, .dark'],\n rec2020: ['@media (color-gamut: rec2020)', ':root, .dark'],\n },\n series: Object.entries(physicalSeries).reduce((acc: ColorsPhysicalLayer['series'], [id]) => {\n acc[id] = gamuts.reduce((acc: PhysicalSeries<Gamut & string, HelicalArcSeries>, gamut) => {\n acc[gamut] = {\n extends: id,\n physicalValueRelation: { extends: 'reflectiveRelation' },\n };\n return acc;\n }, {});\n return acc;\n }, {}),\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { huePalettes } from './physical-colors';\nimport { type ColorAliases, type ColorSememes } from './types';\n\nexport const hueSememes: ColorSememes = [...Object.keys(huePalettes), 'neutral', 'primary'].reduce(\n (acc: ColorSememes, palette) => {\n acc[`${palette}Cursor`] = {\n light: [palette, 400],\n dark: [palette, 300],\n };\n acc[`${palette}Text`] = {\n light: [palette, 550],\n dark: [palette, 300],\n };\n acc[`${palette}Fill`] = {\n light: [palette, 500],\n dark: [palette, 500],\n };\n acc[`${palette}Surface`] = {\n light: [palette, 200],\n dark: [palette, 700],\n };\n acc[`${palette}SurfaceText`] = {\n light: [palette, 700],\n dark: [palette, 200],\n };\n acc[`${palette}Screen`] = {\n light: [palette, 100],\n dark: [palette, 800],\n };\n return acc;\n },\n {},\n);\n\nconst valenceAliasSememeStems = ['Text', 'Surface', 'SurfaceText', 'Fill', 'Cursor'];\nconst valenceMapping = {\n emerald: ['success'],\n cyan: ['info'],\n amber: ['warning'],\n rose: ['error'],\n primary: ['current'],\n fuchsia: ['internal'],\n};\n\nexport const valenceAliases: ColorAliases = valenceAliasSememeStems.reduce((acc: ColorAliases, stem) => {\n return Object.entries(valenceMapping).reduce((acc: ColorAliases, [hue, valences]) => {\n acc[`${hue}${stem}`] = { root: valences.map((valence) => `${valence}${stem}`) };\n return acc;\n }, acc);\n}, {});\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { ColorAliases, ColorSememes } from './types';\n\nexport const sheetSememes = {\n // NOTE: background styles for the main content area must have transparency otherwise they will mask the selection.\n axisSurface: {\n light: ['neutral', 50],\n dark: ['neutral', 800],\n },\n axisText: {\n light: ['neutral', 800],\n dark: ['neutral', 200],\n },\n axisSelectedSurface: {\n light: ['neutral', 100],\n dark: ['neutral', 900],\n },\n axisSelectedText: {\n light: ['neutral', 100],\n dark: ['neutral', 900],\n },\n gridCell: {\n // TODO(thure): Why override only dark?\n light: ['neutral', '50/0'],\n dark: ['neutral', 850],\n },\n gridCellSelected: {\n // TODO(thure): Can this not just use `attention`?\n light: ['neutral', 50],\n dark: ['neutral', 800],\n },\n gridOverlay: {\n light: ['primary', '500/.5'],\n dark: ['primary', '500/.5'],\n },\n gridSelectionOverlay: {\n light: ['primary', '500/.2'],\n dark: ['primary', '500/.2'],\n },\n gridHighlight: {\n light: ['emerald', '500/.5'],\n dark: ['emerald', '500/.5'],\n },\n // TODO(burdon): Factor out def (in common with editor).\n gridCommented: {\n light: ['green', 200],\n dark: ['green', 600],\n },\n gridCommentedActive: {\n light: ['green', '200/.5'],\n dark: ['green', '600/.5'],\n },\n} satisfies ColorSememes;\n\nexport const sheetAliases = {\n activeSurface: { root: ['gridLine'] },\n accentFocusIndicator: { root: ['gridFocusIndicatorColor'] },\n neutralFocusIndicator: { gridFocusStack: ['gridFocusIndicatorColor'] },\n} satisfies ColorAliases;\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// TODO(thure): TS2742\n/* eslint-disable unused-imports/no-unused-imports */\nimport * as _colors from '@ch-ui/colors';\n\nimport { type ColorAliases, type ColorSememes } from './types';\n\n// TODO(burdon): Move to util.\nconst getMapValue = <T>(map: Record<string, T>, key: string, defaultValue: () => T): T => {\n let value = map[key];\n if (!value) {\n value = defaultValue();\n map[key] = value;\n }\n return value;\n};\n\ntype Sememe = ColorSememes[string];\n\nconst applyAlpha = (sememe: Sememe, alpha: number): Sememe => {\n if (alpha >= 1) {\n return sememe;\n } else {\n return {\n light: [sememe.light![0], `${sememe.light![1]}/${alpha}`],\n dark: [sememe.dark![0], `${sememe.dark![1]}/${alpha}`],\n };\n }\n};\n\n// Luminosity extrema and key points.\n\n// Both elevation cadences go from darker to lighter from “elevation” 0 to `ELEVATION_SCALE`,\n// whereas both contrast cadences go from highest contrast at 0 to lowest contrast at `CONTRAST_SCALE`.\n\nconst DARK_ELEVATION_MIN = 855;\nconst DARK_ELEVATION_MAX = 731;\n\nconst DARK_CONTRAST_MIN = 750;\nconst DARK_CONTRAST_MAX = 665;\n\nconst LIGHT_ELEVATION_MIN = 0;\nconst LIGHT_ELEVATION_MAX = 0;\n\nconst LIGHT_CONTRAST_MIN = 82;\nconst LIGHT_CONTRAST_MAX = 24;\n\nconst ELEVATION_SCALE = 2;\nconst CONTRAST_SCALE = 3;\n\nconst darkElevationCadence = (depth: number) =>\n Math.round(\n DARK_ELEVATION_MAX + (DARK_ELEVATION_MIN - DARK_ELEVATION_MAX) * ((ELEVATION_SCALE - depth) / ELEVATION_SCALE),\n );\nconst darkContrastCadence = (depth: number) =>\n Math.round(\n DARK_CONTRAST_MAX + (DARK_CONTRAST_MIN - DARK_CONTRAST_MAX) * ((ELEVATION_SCALE - depth) / ELEVATION_SCALE),\n );\n\nconst lightElevationCadence = (depth: number) =>\n Math.round(\n LIGHT_ELEVATION_MIN + (LIGHT_ELEVATION_MAX - LIGHT_ELEVATION_MIN) * ((CONTRAST_SCALE - depth) / CONTRAST_SCALE),\n );\nconst lightContrastCadence = (depth: number) =>\n Math.round(LIGHT_CONTRAST_MAX + (LIGHT_CONTRAST_MIN - LIGHT_CONTRAST_MAX) * (depth / CONTRAST_SCALE));\n\nconst elevationCadence = (lightDepth: number, darkDepth: number = lightDepth, alpha: number = 1): Sememe =>\n applyAlpha(\n {\n light: ['neutral', lightElevationCadence(lightDepth)],\n dark: ['neutral', darkElevationCadence(darkDepth)],\n },\n alpha,\n );\n\nconst contrastCadence = (lightDepth: number, darkDepth: number = lightDepth, alpha: number = 1): Sememe =>\n applyAlpha(\n {\n light: ['neutral', lightContrastCadence(lightDepth)],\n dark: ['neutral', darkContrastCadence(darkDepth)],\n },\n alpha,\n );\n\nexport const systemSememes = {\n //\n // Elevation cadence tokens\n //\n\n baseSurface: elevationCadence(0),\n groupSurface: elevationCadence(1),\n modalSurface: elevationCadence(2, 1.7),\n\n //\n // Contrast cadence tokens\n //\n\n textInputSurfaceBase: contrastCadence(0, 0),\n textInputSurfaceGroup: contrastCadence(0, 0.5),\n textInputSurfaceModal: contrastCadence(0, 1),\n\n inputSurfaceBase: contrastCadence(0.8, 0.33),\n inputSurfaceGroup: contrastCadence(0.8, 0.66),\n inputSurfaceModal: contrastCadence(0.8, 1),\n\n hoverSurfaceBase: contrastCadence(2, 1.5),\n hoverSurfaceGroup: contrastCadence(2, 2),\n hoverSurfaceModal: contrastCadence(2, 2.5),\n\n separatorBase: contrastCadence(3, 2),\n separatorGroup: contrastCadence(3, 2.5),\n separatorModal: contrastCadence(3, 3),\n\n subduedSeparator: contrastCadence(3, 1),\n\n unAccent: {\n light: ['neutral', 400],\n dark: ['neutral', 400],\n },\n unAccentHover: {\n light: ['neutral', 450],\n dark: ['neutral', 450],\n },\n hoverOverlay: {\n light: ['neutral', '450/.1'],\n dark: ['neutral', '450/.1'],\n },\n\n //\n // Special surfaces.\n //\n\n // Screen overlay for modal dialogs.\n scrimSurface: applyAlpha(\n {\n light: ['neutral', LIGHT_CONTRAST_MAX],\n dark: ['neutral', DARK_ELEVATION_MIN],\n },\n 0.65,\n ),\n\n // High contrast for focused interactive elements. (Technically this is part of the surface cadence, but the contrast cadence is on the opposite side of the elevation cadence as this point.)\n focusSurface: {\n light: ['neutral', 0],\n dark: ['neutral', 1000],\n },\n\n deckSurface: {\n light: ['neutral', 50],\n dark: ['neutral', 950],\n },\n\n // For tooltips only; the highest elevation from the opposite theme\n inverseSurface: {\n light: ['neutral', DARK_ELEVATION_MIN],\n dark: ['neutral', LIGHT_ELEVATION_MIN],\n },\n\n //\n // Accent surfaces\n //\n\n accentSurfaceRelated: {\n light: ['primary', '300/.1'],\n dark: ['primary', '400/.1'],\n },\n accentSurfaceHover: {\n light: ['primary', 600],\n dark: ['primary', 475],\n },\n accentSurface: {\n light: ['primary', 500],\n dark: ['primary', 500],\n },\n\n //\n // Text (text-) and other foregrounds\n // TODO(thure): Establish contrast-order cadence for text.\n //\n\n baseText: {\n light: ['neutral', 1000],\n dark: ['neutral', 50],\n },\n inverseSurfaceText: {\n light: ['neutral', 50],\n dark: ['neutral', 1000],\n },\n description: {\n light: ['neutral', 550],\n dark: ['neutral', 350],\n },\n subdued: {\n light: ['neutral', 700],\n dark: ['neutral', 300],\n },\n placeholder: {\n light: ['neutral', 500],\n dark: ['neutral', 500],\n },\n accentText: {\n light: ['primary', 550],\n dark: ['primary', 400],\n },\n accentSurfaceText: {\n light: ['neutral', 0],\n dark: ['neutral', 0],\n },\n accentTextHover: {\n light: ['primary', 500],\n dark: ['primary', 350],\n },\n accentFocusIndicator: {\n light: ['primary', 300],\n dark: ['primary', 450],\n },\n neutralFocusIndicator: {\n light: ['neutral', 300],\n dark: ['neutral', 550],\n },\n} satisfies ColorSememes;\n\ntype SememeName = keyof typeof systemSememes;\ntype SememeKey = 'root' | 'group' | 'modal';\n\n/**\n * Alias map.\n */\nconst aliasDefs: Record<string, Partial<Record<SememeKey, SememeName>>> = {\n // Selected items, current items, other surfaces needing special contrast against baseSurface.\n activeSurface: {\n root: 'inputSurfaceBase',\n },\n\n // Main sidebar panel.\n sidebarSurface: {\n root: 'groupSurface',\n },\n\n // Plank header.\n headerSurface: {\n root: 'groupSurface',\n },\n\n // Toolbars, table/sheet headers, etc.\n toolbarSurface: {\n root: 'groupSurface',\n },\n\n // Forms, cards, etc.\n cardSurface: {\n root: 'groupSurface',\n },\n\n // Secondary aliases.\n textInputSurface: {\n root: 'textInputSurfaceBase',\n group: 'textInputSurfaceGroup',\n modal: 'textInputSurfaceModal',\n },\n inputSurface: {\n root: 'inputSurfaceBase',\n group: 'inputSurfaceGroup',\n modal: 'inputSurfaceModal',\n },\n hoverSurface: {\n root: 'hoverSurfaceBase',\n group: 'hoverSurfaceGroup',\n modal: 'hoverSurfaceModal',\n },\n\n // TODO(thure): Rename uses of this token to `focusSurface` and remove this alias.\n attention: {\n root: 'focusSurface',\n },\n\n // In “master-detail” patterns, the background of the item in the list which is enumerated in the adjacent view.\n // TODO(burdon): Review tokens.\n currentRelated: {\n root: 'modalSurface',\n },\n\n // Borders and dividers.\n separator: {\n root: 'separatorBase',\n group: 'separatorGroup',\n modal: 'separatorModal',\n },\n};\n\nexport const systemAliases: ColorAliases = Object.entries(aliasDefs).reduce((aliases, [alias, values]) => {\n Object.entries(values).forEach(([key, sememe]) => {\n const record = getMapValue(aliases, sememe, () => ({}));\n const list = getMapValue<string[]>(record, key, () => []);\n list.push(alias);\n });\n\n return aliases;\n}, {} as ColorAliases);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AliasLayer } from '@ch-ui/tokens';\n\nimport { valenceAliases } from './sememes-hue';\nimport { sheetAliases } from './sememes-sheet';\nimport { systemAliases } from './sememes-system';\n\nconst groupAliases = ['groupSurface', ...(systemAliases.groupSurface?.root ?? [])];\nconst modalAliases = ['modalSurface', ...(systemAliases.modalSurface?.root ?? [])];\n\nexport const aliasColors = {\n conditions: {\n root: [':root, .dark'],\n group: [\n [\n '.sidebar-surface, .dark .sidebar-surface',\n ...groupAliases.map((alias) => `.bg-${alias}, .dark .bg-${alias}`),\n ].join(', '),\n ],\n modal: [\n [\n '.modal-surface, .dark .modal-surface',\n ...modalAliases.map((alias) => `.bg-${alias}, .dark .bg-${alias}`),\n //\n ].join(', '),\n ],\n gridFocusStack: ['[data-grid-focus-indicator-variant=\"stack\"]'],\n },\n aliases: {\n // TODO(thure): Aliases should be merged more elegantly, this causes overwrites.\n ...sheetAliases,\n ...systemAliases,\n ...valenceAliases,\n },\n namespace: 'dx-',\n} satisfies AliasLayer<string>;\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Cards should be no larger than 320px per WCAG 2.1 SC 1.4.10.\n */\nexport const cardMinInlineSize = 18;\nexport const cardDefaultInlineSize = 20; // 320px\nexport const cardMaxInlineSize = 22;\n", "//\n\n// Copyright 2025 DXOS.org\n//\n\nimport { type Facet, type LinearPhysicalLayer } from '@ch-ui/tokens';\n\nimport { cardDefaultInlineSize, cardMaxInlineSize, cardMinInlineSize } from './sizes';\n\nexport const lengthsFacet = {\n physical: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n series: {\n line: {\n root: {\n unit: 'px',\n initial: 0,\n slope: 1,\n },\n },\n // \"gap\"\n lacuna: {\n root: {\n unit: 'rem',\n initial: 0,\n slope: 0.125,\n },\n },\n },\n } satisfies LinearPhysicalLayer,\n\n semantic: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n sememes: {\n noLine: { root: ['line', 0] },\n hairLine: { root: ['line', 1] },\n thickLine: { root: ['line', 2] },\n trimXs: { root: ['lacuna', 3] },\n trimSm: { root: ['lacuna', 4] },\n trimMd: { root: ['lacuna', 6] },\n trimLg: { root: ['lacuna', 12] },\n inputFine: { root: ['lacuna', 3] },\n inputCoarse: { root: ['lacuna', 4] },\n },\n },\n\n alias: {\n namespace: 'dx-',\n conditions: {\n fine: [':root, .density-fine'],\n coarse: ['.density-coarse'],\n flush: ['.density-flush'],\n gridFocusStack: ['[data-grid-focus-indicator-variant=\"stack\"]'],\n },\n aliases: {\n noLine: { fine: ['focusOffset'] },\n hairLine: { fine: ['modalLine', 'landmarkLine', 'positionedLine', 'gridGap', 'gridFocusIndicatorWidth'] },\n thickLine: { fine: ['focusLine'], gridFocusStack: ['gridFocusIndicatorWidth'] },\n trimXs: { fine: ['cardSpacingChrome', 'labelSpacingBlock', 'inputSpacingBlock'] }, // TODO(burdon): Remove need for this.\n trimSm: { fine: ['cardSpacingInline', 'cardSpacingBlock', 'cardSpacingGap'] },\n trimMd: { coarse: ['cardSpacingInline', 'cardSpacingBlock', 'cardSpacingGap'] },\n inputFine: { fine: ['iconButtonPadding'] },\n inputCoarse: { coarse: ['iconButtonPadding'] },\n },\n },\n} satisfies Facet;\n\nexport const maxSizesFacet = {\n physical: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n series: {\n size: {\n root: {\n unit: 'rem',\n initial: 0,\n slope: 1,\n },\n },\n },\n } satisfies LinearPhysicalLayer,\n\n semantic: {\n namespace: 'dx-',\n conditions: { root: [':root'] },\n sememes: {\n 'prose-max-width': { root: ['size', 50] },\n 'container-max-width': { root: ['size', 50] },\n 'popover-max-width': { root: ['size', cardDefaultInlineSize] },\n 'card-default-width': { root: ['size', cardDefaultInlineSize] },\n 'card-min-width': { root: ['size', cardMinInlineSize] },\n 'card-max-width': { root: ['size', cardMaxInlineSize] },\n },\n },\n} satisfies Facet;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ColorSememes } from './types';\n\n// TODO(burdon): This should be broader than just calls.\nexport const callsSememes: ColorSememes = {\n callActive: {\n light: ['green', '500'],\n dark: ['green', '500'],\n },\n callAlert: {\n light: ['rose', '500'],\n dark: ['rose', '500'],\n },\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ColorSememes } from './types';\n\nexport const codemirrorSememes = {\n // NOTE: background styles for the main content area must have transparency otherwise they will mask the selection.\n cmCodeblock: {\n light: ['neutral', '500/.1'],\n dark: ['neutral', '500/.1'],\n },\n cmActiveLine: {\n light: ['neutral', '200/.5'],\n dark: ['neutral', '800/.5'],\n },\n cmSeparator: {\n light: ['primary', 500],\n dark: ['primary', 500],\n },\n cmCursor: {\n light: ['neutral', 900],\n dark: ['neutral', 100],\n },\n cmSelection: {\n light: ['primary', '400/.5'],\n dark: ['primary', '600/.5'],\n },\n cmFocusedSelection: {\n light: ['primary', 400],\n dark: ['primary', 600],\n },\n cmHighlight: {\n light: ['neutral', 950],\n dark: ['neutral', 50],\n },\n cmHighlightSurface: {\n light: ['sky', 200],\n dark: ['cyan', 600],\n },\n // TODO(burdon): Factor out defs in common with sheet.\n cmCommentText: {\n light: ['neutral', 50],\n dark: ['neutral', 950],\n },\n cmCommentSurface: {\n light: ['amber', 700],\n dark: ['amber', 200],\n },\n} satisfies ColorSememes;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { HelicalArcValue, SemanticLayer } from '@ch-ui/tokens';\n\nimport { callsSememes } from './sememes-calls';\nimport { codemirrorSememes } from './sememes-codemirror';\nimport { hueSememes } from './sememes-hue';\nimport { sheetSememes } from './sememes-sheet';\nimport { systemSememes } from './sememes-system';\n\nexport const semanticColors = {\n conditions: {\n light: [':root'],\n dark: ['.dark'],\n },\n sememes: {\n // Define each set of sememes in its own file.\n ...callsSememes,\n ...codemirrorSememes,\n ...hueSememes,\n ...sheetSememes,\n ...systemSememes,\n },\n namespace: 'dx-',\n} satisfies SemanticLayer<string, string, HelicalArcValue>;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,OAAOA,iCAAiC;AACxC,OAAOC,sBAAsB;AAC7B,OAAOC,WAAW;AAClB,OAAOC,uBAAuB;AAC9B,OAAOC,mBAAmB;AAE1B,OAAOC,wBAAwB;AAC/B,OAAOC,sBAAsB;;;ACN7B,OAAOC,aAAa;;;ACGpB,IAAMC,qBAAqB;EACzBC,SAAS;EACTC,OAAO;EACPC,QAAQ;AACV;AAEA,IAAMC,SAA6B;EAAC;EAAQ;EAAM;;AAElD,IAAMC,UAAUC,KAAKC,KAAK;AAa1B,IAAMC,cAAc,CAACC,QAAAA;AACnB,QAAMC,UAAU,OAAOD,MAAM,MAAM,MAAM;AACzC,SAAO;IACLE,UAAU;MAAC;MAAK,OAAO,QAAQL,KAAKM,KAAKF,SAAS,MAAML,OAAAA;MAAUK;;IAClEG,SAAS;IACTC,SAAS;IACTC,SAAS;EACX;AACF;AAEO,IAAMC,cAAc;EACzBC,KAAKT,YAAY,CAAA;EACjBU,QAAQV,YAAY,CAAA;EACpBW,OAAOX,YAAY,CAAA;EACnBY,QAAQZ,YAAY,CAAA;EAC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;IACF,GACAtC,cAAAA,GACGM,UAAAA;IAEL,GAAGL;IACHsC,QAAQ;MACN,GAAGtC,eAAesC;MAClBC,SAAS;MACTC,SAAS;MACTC,aAAa;MACbC,OAAO;MACPC,OAAO;IACT;EACF;EACAC,SAAS;IACPC;IACAC;IACAC;IACAC,iBAAAA;;IAEAC,kBAAkB;MAChBC,cAAc;MACdC,mBAAmB;IACrB,CAAA;;EAEF,GAAIhD,QAAQ,iBAAiB;IAAEiD,MAAM;EAAM;EAC3ChD;EACAiD,QAAQ;IACNC,wBAAwB;EAC1B;AACF;",
|
|
6
|
+
"names": ["tailwindcssContainerQueries", "tailwindcssForms", "merge", "tailwindScrollbar", "defaultConfig", "tailwindcssLogical", "tailwindcssRadix", "adapter", "reflectiveRelation", "initial", "slope", "method", "gamuts", "DEG_RAD", "Math", "PI", "hueKeyPoint", "hue", "hueDeg", "keyPoint", "sin", "lowerCp", "upperCp", "torsion", "huePalettes", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "systemPalettes", "neutral", "values", "primary", "physicalSeries", "physicalColors", "namespace", "definitions", "series", "accompanyingSeries", "conditions", "srgb", "p3", "rec2020", "Object", "entries", "reduce", "acc", "id", "gamut", "extends", "physicalValueRelation", "hueSememes", "Object", "keys", "huePalettes", "reduce", "acc", "palette", "light", "dark", "valenceAliasSememeStems", "valenceMapping", "emerald", "cyan", "amber", "rose", "primary", "fuchsia", "valenceAliases", "stem", "entries", "hue", "valences", "root", "map", "valence", "sheetSememes", "axisSurface", "light", "dark", "axisText", "axisSelectedSurface", "axisSelectedText", "gridCell", "gridCellSelected", "gridOverlay", "gridSelectionOverlay", "gridHighlight", "gridCommented", "gridCommentedActive", "sheetAliases", "activeSurface", "root", "accentFocusIndicator", "neutralFocusIndicator", "gridFocusStack", "getMapValue", "map", "key", "defaultValue", "value", "applyAlpha", "sememe", "alpha", "light", "dark", "DARK_ELEVATION_MIN", "DARK_ELEVATION_MAX", "DARK_CONTRAST_MIN", "DARK_CONTRAST_MAX", "LIGHT_ELEVATION_MIN", "LIGHT_ELEVATION_MAX", "LIGHT_CONTRAST_MIN", "LIGHT_CONTRAST_MAX", "ELEVATION_SCALE", "CONTRAST_SCALE", "darkElevationCadence", "depth", "Math", "round", "darkContrastCadence", "lightElevationCadence", "lightContrastCadence", "elevationCadence", "lightDepth", "darkDepth", "contrastCadence", "systemSememes", "baseSurface", "groupSurface", "modalSurface", "textInputSurfaceBase", "textInputSurfaceGroup", "textInputSurfaceModal", "inputSurfaceBase", "inputSurfaceGroup", "inputSurfaceModal", "hoverSurfaceBase", "hoverSurfaceGroup", "hoverSurfaceModal", "separatorBase", "separatorGroup", "separatorModal", "subduedSeparator", "unAccent", "unAccentHover", "hoverOverlay", "scrimSurface", "focusSurface", "deckSurface", "inverseSurface", "accentSurfaceRelated", "accentSurfaceHover", "accentSurface", "baseText", "inverseSurfaceText", "description", "subdued", "placeholder", "accentText", "accentSurfaceText", "accentTextHover", "accentFocusIndicator", "neutralFocusIndicator", "aliasDefs", "activeSurface", "root", "sidebarSurface", "headerSurface", "toolbarSurface", "cardSurface", "textInputSurface", "group", "modal", "inputSurface", "hoverSurface", "attention", "currentRelated", "separator", "systemAliases", "Object", "entries", "reduce", "aliases", "alias", "values", "forEach", "record", "list", "push", "groupAliases", "systemAliases", "groupSurface", "root", "modalAliases", "modalSurface", "aliasColors", "conditions", "group", "map", "alias", "join", "modal", "gridFocusStack", "aliases", "sheetAliases", "valenceAliases", "namespace", "cardMinInlineSize", "cardDefaultInlineSize", "cardMaxInlineSize", "lengthsFacet", "physical", "namespace", "conditions", "root", "series", "line", "unit", "initial", "slope", "lacuna", "semantic", "sememes", "noLine", "hairLine", "thickLine", "trimXs", "trimSm", "trimMd", "trimLg", "inputFine", "inputCoarse", "alias", "fine", "coarse", "flush", "gridFocusStack", "aliases", "maxSizesFacet", "size", "cardDefaultInlineSize", "cardMinInlineSize", "cardMaxInlineSize", "callsSememes", "callActive", "light", "dark", "callAlert", "codemirrorSememes", "cmCodeblock", "light", "dark", "cmActiveLine", "cmSeparator", "cmCursor", "cmSelection", "cmFocusedSelection", "cmHighlight", "cmHighlightSurface", "cmCommentText", "cmCommentSurface", "semanticColors", "conditions", "light", "dark", "sememes", "callsSememes", "codemirrorSememes", "hueSememes", "sheetSememes", "systemSememes", "namespace", "hues", "Object", "keys", "huePalettes", "tokenSet", "colors", "physical", "physicalColors", "semantic", "semanticColors", "alias", "aliasColors", "lengths", "lengthsFacet", "maxSizes", "maxSizesFacet", "adapterConfig", "facet", "disposition", "tokenization", "borderWidth", "ringWidth", "ringOffsetWidth", "outlineWidth", "spacing", "userDefaultTokenSet", "definitions", "series", "neutral", "primary", "accompanyingSeries", "conditions", "namespace", "sememes", "systemSememes", "aliases", "systemAliases", "tokensTailwindConfig", "adapter", "extend", "extendTokens", "overrideTokens", "tokensTailwindConfig", "tailwindConfig", "env", "content", "extensions", "darkMode", "theme", "fontFamily", "body", "defaultConfig", "sans", "mono", "merge", "spacing", "backgroundImage", "borderRadius", "none", "sm", "DEFAULT", "md", "lg", "screens", "raw", "fontSize", "lineHeight", "boxShadow", "transitionProperty", "transitionTimingFunction", "keyframes", "from", "opacity", "to", "transform", "height", "left", "width", "animation", "colors", "inherit", "current", "transparent", "black", "white", "plugins", "tailwindcssContainerQueries", "tailwindcssForms", "tailwindcssLogical", "tailwindcssRadix", "tailwindScrollbar", "nocompatible", "preferredStrategy", "mode", "future", "hoverOnlyWhenSupported"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/config/tokens/physical-colors.ts":{"bytes":12623,"imports":[],"format":"esm"},"src/config/tokens/sememes-hue.ts":{"bytes":6263,"imports":[{"path":"src/config/tokens/physical-colors.ts","kind":"import-statement","original":"./physical-colors"}],"format":"esm"},"src/config/tokens/sememes-sheet.ts":{"bytes":6787,"imports":[],"format":"esm"},"src/config/tokens/sememes-system.ts":{"bytes":27652,"imports":[],"format":"esm"},"src/config/tokens/alias-colors.ts":{"bytes":4192,"imports":[{"path":"src/config/tokens/sememes-hue.ts","kind":"import-statement","original":"./sememes-hue"},{"path":"src/config/tokens/sememes-sheet.ts","kind":"import-statement","original":"./sememes-sheet"},{"path":"src/config/tokens/sememes-system.ts","kind":"import-statement","original":"./sememes-system"}],"format":"esm"},"src/config/tokens/sizes.ts":{"bytes":1065,"imports":[],"format":"esm"},"src/config/tokens/lengths.ts":{"bytes":12611,"imports":[{"path":"src/config/tokens/sizes.ts","kind":"import-statement","original":"./sizes"}],"format":"esm"},"src/config/tokens/sememes-calls.ts":{"bytes":1537,"imports":[],"format":"esm"},"src/config/tokens/sememes-codemirror.ts":{"bytes":5062,"imports":[],"format":"esm"},"src/config/tokens/semantic-colors.ts":{"bytes":2635,"imports":[{"path":"src/config/tokens/sememes-calls.ts","kind":"import-statement","original":"./sememes-calls"},{"path":"src/config/tokens/sememes-codemirror.ts","kind":"import-statement","original":"./sememes-codemirror"},{"path":"src/config/tokens/sememes-hue.ts","kind":"import-statement","original":"./sememes-hue"},{"path":"src/config/tokens/sememes-sheet.ts","kind":"import-statement","original":"./sememes-sheet"},{"path":"src/config/tokens/sememes-system.ts","kind":"import-statement","original":"./sememes-system"}],"format":"esm"},"src/config/tokens/index.ts":{"bytes":8347,"imports":[{"path":"@ch-ui/tailwind-tokens","kind":"import-statement","external":true},{"path":"src/config/tokens/alias-colors.ts","kind":"import-statement","original":"./alias-colors"},{"path":"src/config/tokens/lengths.ts","kind":"import-statement","original":"./lengths"},{"path":"src/config/tokens/physical-colors.ts","kind":"import-statement","original":"./physical-colors"},{"path":"src/config/tokens/semantic-colors.ts","kind":"import-statement","original":"./semantic-colors"},{"path":"src/config/tokens/sememes-system.ts","kind":"import-statement","original":"./sememes-system"},{"path":"src/config/tokens/sizes.ts","kind":"import-statement","original":"./sizes"}],"format":"esm"},"src/config/tailwind.ts":{"bytes":32244,"imports":[{"path":"@tailwindcss/container-queries","kind":"import-statement","external":true},{"path":"@tailwindcss/forms","kind":"import-statement","external":true},{"path":"lodash.merge","kind":"import-statement","external":true},{"path":"tailwind-scrollbar","kind":"import-statement","external":true},{"path":"tailwindcss/stubs/config.full.js","kind":"import-statement","external":true},{"path":"tailwindcss-logical","kind":"import-statement","external":true},{"path":"tailwindcss-radix","kind":"import-statement","external":true},{"path":"src/config/tokens/index.ts","kind":"import-statement","original":"./tokens"}],"format":"esm"},"src/config/index.ts":{"bytes":540,"imports":[{"path":"src/config/tailwind.ts","kind":"import-statement","original":"./tailwind"},{"path":"src/config/tokens/index.ts","kind":"import-statement","original":"./tokens"}],"format":"esm"},"src/plugins/resolveContent.ts":{"bytes":6164,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"glob","kind":"import-statement","external":true}],"format":"esm"},"src/plugins/esbuild-plugin.ts":{"bytes":8467,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"esbuild-style-plugin","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true},{"path":"src/config/index.ts","kind":"import-statement","original":"../config"},{"path":"src/plugins/resolveContent.ts","kind":"import-statement","original":"./resolveContent"}],"format":"esm"},"src/plugins/plugin.ts":{"bytes":13024,"imports":[{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@ch-ui/tokens/postcss","kind":"import-statement","external":true},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"postcss","kind":"import-statement","external":true},{"path":"postcss-import","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true},{"path":"tailwindcss/nesting/index.js","kind":"import-statement","external":true},{"path":"src/config/index.ts","kind":"import-statement","original":"../config"},{"path":"src/plugins/resolveContent.ts","kind":"import-statement","original":"./resolveContent"}],"format":"esm"},"src/styles/layers/anchored-overflow.css":{"bytes":130,"imports":[]},"src/styles/layers/animation.css":{"bytes":210,"imports":[]},"src/styles/layers/attention.css":{"bytes":263,"imports":[]},"src/styles/layers/base.css":{"bytes":589,"imports":[]},"src/styles/layers/button.css":{"bytes":2198,"imports":[]},"src/styles/layers/can-scroll.css":{"bytes":612,"imports":[]},"src/styles/layers/checkbox.css":{"bytes":1630,"imports":[]},"src/styles/layers/dialog.css":{"bytes":1621,"imports":[]},"src/styles/layers/drag-preview.css":{"bytes":307,"imports":[]},"src/styles/layers/focus-ring.css":{"bytes":4800,"imports":[]},"src/styles/layers/hues.css":{"bytes":1948,"imports":[]},"src/styles/layers/positioning.css":{"bytes":467,"imports":[]},"src/styles/layers/main.css":{"bytes":5449,"imports":[]},"src/styles/layers/native.css":{"bytes":465,"imports":[]},"src/styles/layers/size.css":{"bytes":6059,"imports":[]},"src/styles/layers/surfaces.css":{"bytes":716,"imports":[]},"src/styles/layers/tag.css":{"bytes":2908,"imports":[]},"src/styles/layers/tldraw.css":{"bytes":3480,"imports":[]},"src/styles/layers/tokens.css":{"bytes":1560,"imports":[]},"src/styles/layers/typography.css":{"bytes":3283,"imports":[{"path":"@fontsource-variable/jetbrains-mono/wght-italic.css","kind":"import-rule","external":true},{"path":"@fontsource-variable/jetbrains-mono/wght.css","kind":"import-rule","external":true},{"path":"@fontsource/poiret-one","kind":"import-rule","external":true}]},"src/styles/layers/index.css":{"bytes":697,"imports":[{"path":"src/styles/layers/anchored-overflow.css","kind":"import-rule","original":"./anchored-overflow.css"},{"path":"src/styles/layers/animation.css","kind":"import-rule","original":"./animation.css"},{"path":"src/styles/layers/attention.css","kind":"import-rule","original":"./attention.css"},{"path":"src/styles/layers/base.css","kind":"import-rule","original":"./base.css"},{"path":"src/styles/layers/button.css","kind":"import-rule","original":"./button.css"},{"path":"src/styles/layers/can-scroll.css","kind":"import-rule","original":"./can-scroll.css"},{"path":"src/styles/layers/checkbox.css","kind":"import-rule","original":"./checkbox.css"},{"path":"src/styles/layers/dialog.css","kind":"import-rule","original":"./dialog.css"},{"path":"src/styles/layers/drag-preview.css","kind":"import-rule","original":"./drag-preview.css"},{"path":"src/styles/layers/focus-ring.css","kind":"import-rule","original":"./focus-ring.css"},{"path":"src/styles/layers/hues.css","kind":"import-rule","original":"./hues.css"},{"path":"src/styles/layers/positioning.css","kind":"import-rule","original":"./positioning.css"},{"path":"src/styles/layers/main.css","kind":"import-rule","original":"./main.css"},{"path":"src/styles/layers/native.css","kind":"import-rule","original":"./native.css"},{"path":"src/styles/layers/size.css","kind":"import-rule","original":"./size.css"},{"path":"src/styles/layers/surfaces.css","kind":"import-rule","original":"./surfaces.css"},{"path":"src/styles/layers/tag.css","kind":"import-rule","original":"./tag.css"},{"path":"src/styles/layers/tldraw.css","kind":"import-rule","original":"./tldraw.css"},{"path":"src/styles/layers/tokens.css","kind":"import-rule","original":"./tokens.css"},{"path":"src/styles/layers/typography.css","kind":"import-rule","original":"./typography.css"}]},"src/theme.css":{"bytes":193,"imports":[{"path":"tailwindcss/base","kind":"import-rule","external":true},{"path":"tailwindcss/utilities","kind":"import-rule","external":true},{"path":"tailwindcss/components","kind":"import-rule","external":true},{"path":"src/styles/layers/index.css","kind":"import-rule","original":"./styles/layers/index.css"}]}},"outputs":{"dist/plugin/node-esm/config/tailwind.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/plugin/node-esm/config/tailwind.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-HJE6EZWE.mjs","kind":"import-statement"}],"exports":["tailwindConfig"],"entryPoint":"src/config/tailwind.ts","inputs":{},"bytes":217},"dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4187},"dist/plugin/node-esm/plugins/esbuild-plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-AFRHJHP4.mjs","kind":"import-statement"},{"path":"dist/plugin/node-esm/chunk-HJE6EZWE.mjs","kind":"import-statement"},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"esbuild-style-plugin","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true}],"exports":["ThemePlugins"],"entryPoint":"src/plugins/esbuild-plugin.ts","inputs":{"src/plugins/esbuild-plugin.ts":{"bytesInOutput":2234}},"bytes":2550},"dist/plugin/node-esm/plugins/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6522},"dist/plugin/node-esm/plugins/plugin.mjs":{"imports":[{"path":"dist/plugin/node-esm/chunk-AFRHJHP4.mjs","kind":"import-statement"},{"path":"dist/plugin/node-esm/chunk-HJE6EZWE.mjs","kind":"import-statement"},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@ch-ui/tokens/postcss","kind":"import-statement","external":true},{"path":"autoprefixer","kind":"import-statement","external":true},{"path":"postcss","kind":"import-statement","external":true},{"path":"postcss-import","kind":"import-statement","external":true},{"path":"tailwindcss","kind":"import-statement","external":true},{"path":"tailwindcss/nesting/index.js","kind":"import-statement","external":true}],"exports":["ThemePlugin"],"entryPoint":"src/plugins/plugin.ts","inputs":{"src/plugins/plugin.ts":{"bytesInOutput":2620}},"bytes":2931},"dist/plugin/node-esm/chunk-AFRHJHP4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3231},"dist/plugin/node-esm/chunk-AFRHJHP4.mjs":{"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"glob","kind":"import-statement","external":true}],"exports":["resolveKnownPeers"],"inputs":{"src/plugins/resolveContent.ts":{"bytesInOutput":1417}},"bytes":1620},"dist/plugin/node-esm/chunk-HJE6EZWE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":53511},"dist/plugin/node-esm/chunk-HJE6EZWE.mjs":{"imports":[{"path":"@tailwindcss/container-queries","kind":"import-statement","external":true},{"path":"@tailwindcss/forms","kind":"import-statement","external":true},{"path":"lodash.merge","kind":"import-statement","external":true},{"path":"tailwind-scrollbar","kind":"import-statement","external":true},{"path":"tailwindcss/stubs/config.full.js","kind":"import-statement","external":true},{"path":"tailwindcss-logical","kind":"import-statement","external":true},{"path":"tailwindcss-radix","kind":"import-statement","external":true},{"path":"@ch-ui/tailwind-tokens","kind":"import-statement","external":true}],"exports":["tailwindConfig","tokenSet"],"inputs":{"src/config/tailwind.ts":{"bytesInOutput":9225},"src/config/tokens/index.ts":{"bytesInOutput":1754},"src/config/tokens/physical-colors.ts":{"bytesInOutput":2365},"src/config/tokens/sememes-hue.ts":{"bytesInOutput":1444},"src/config/tokens/sememes-sheet.ts":{"bytesInOutput":1874},"src/config/tokens/sememes-system.ts":{"bytesInOutput":7155},"src/config/tokens/alias-colors.ts":{"bytesInOutput":867},"src/config/tokens/sizes.ts":{"bytesInOutput":88},"src/config/tokens/lengths.ts":{"bytesInOutput":3617},"src/config/tokens/sememes-calls.ts":{"bytesInOutput":246},"src/config/tokens/sememes-codemirror.ts":{"bytesInOutput":1379},"src/config/tokens/semantic-colors.ts":{"bytesInOutput":309}},"bytes":31000},"dist/plugin/node-esm/theme.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":60809},"dist/plugin/node-esm/theme.css":{"imports":[{"path":"tailwindcss/base","kind":"import-rule","external":true},{"path":"tailwindcss/utilities","kind":"import-rule","external":true},{"path":"tailwindcss/components","kind":"import-rule","external":true},{"path":"@fontsource-variable/jetbrains-mono/wght-italic.css","kind":"import-rule","external":true},{"path":"@fontsource-variable/jetbrains-mono/wght.css","kind":"import-rule","external":true},{"path":"@fontsource/poiret-one","kind":"import-rule","external":true}],"entryPoint":"src/theme.css","inputs":{"src/styles/layers/anchored-overflow.css":{"bytesInOutput":129},"src/styles/layers/animation.css":{"bytesInOutput":197},"src/styles/layers/attention.css":{"bytesInOutput":170},"src/styles/layers/base.css":{"bytesInOutput":588},"src/styles/layers/button.css":{"bytesInOutput":1714},"src/styles/layers/can-scroll.css":{"bytesInOutput":605},"src/styles/layers/checkbox.css":{"bytesInOutput":1325},"src/styles/layers/dialog.css":{"bytesInOutput":1589},"src/styles/layers/drag-preview.css":{"bytesInOutput":307},"src/styles/layers/focus-ring.css":{"bytesInOutput":4720},"src/styles/layers/hues.css":{"bytesInOutput":1855},"src/styles/layers/positioning.css":{"bytesInOutput":466},"src/styles/layers/main.css":{"bytesInOutput":5353},"src/styles/layers/native.css":{"bytesInOutput":205},"src/styles/layers/size.css":{"bytesInOutput":5854},"src/styles/layers/surfaces.css":{"bytesInOutput":711},"src/styles/layers/tag.css":{"bytesInOutput":2705},"src/styles/layers/tldraw.css":{"bytesInOutput":553},"src/styles/layers/tokens.css":{"bytesInOutput":1279},"src/styles/layers/typography.css":{"bytesInOutput":2738},"src/styles/layers/index.css":{"bytesInOutput":90},"src/theme.css":{"bytesInOutput":0}},"bytes":34284}}}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
resolveKnownPeers
|
|
4
|
+
} from "../chunk-AFRHJHP4.mjs";
|
|
5
|
+
import {
|
|
6
|
+
tailwindConfig
|
|
7
|
+
} from "../chunk-HJE6EZWE.mjs";
|
|
8
|
+
|
|
9
|
+
// src/plugins/esbuild-plugin.ts
|
|
10
|
+
import { cp, mkdir } from "node:fs/promises";
|
|
11
|
+
import { basename, join, relative, resolve } from "node:path";
|
|
12
|
+
import autoprefixer from "autoprefixer";
|
|
13
|
+
import stylePlugin from "esbuild-style-plugin";
|
|
14
|
+
import tailwindcss from "tailwindcss";
|
|
15
|
+
var ThemePlugins = async (options) => {
|
|
16
|
+
const resolvedContent = options.root ? await resolveKnownPeers(options.content, options.root) : options.content;
|
|
17
|
+
return [
|
|
18
|
+
// TODO(thure): This really shouldn’t be this way, but after hours of searching for a reasonable way to do this I came up empty. The prior art I found was mainly this thread, though it’s only tangentially related: https://github.com/evanw/esbuild/issues/800#issuecomment-786151076
|
|
19
|
+
{
|
|
20
|
+
name: "esbuild-plugin-dxos-ui-theme-resolvers",
|
|
21
|
+
setup: async (build) => {
|
|
22
|
+
const fontsDir = join(options.outdir, "node_modules/@dxos/ui-theme/fonts");
|
|
23
|
+
try {
|
|
24
|
+
await mkdir(fontsDir);
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
build.onResolve({
|
|
28
|
+
filter: /\.woff2$/
|
|
29
|
+
}, async (args) => {
|
|
30
|
+
const depPath = resolve(args.resolveDir, args.path);
|
|
31
|
+
const destPath = join(fontsDir, basename(args.path));
|
|
32
|
+
try {
|
|
33
|
+
await cp(depPath, destPath);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
path: `./${relative(options.outdir, join("fonts", basename(args.path)))}`,
|
|
38
|
+
external: true
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
// TODO(thure): theme.css must be part of entryPoints in order to be processed with `stylePlugin`, but this should not be necessary. ESBuild would not load theme.css using stylePlugin if referenced within index.ts(x) as with the Vite plugin.
|
|
44
|
+
// TODO(thure): Note also that because it is an entryPoint, the developer has to reference the built theme.css from `index.html`, which is inflexible and possibly inconvenient.
|
|
45
|
+
// TODO(zhenyasav): autoprefixer version misalignment with esbuild-style-plugin requires the `as any`.
|
|
46
|
+
stylePlugin({
|
|
47
|
+
postcss: {
|
|
48
|
+
plugins: [
|
|
49
|
+
tailwindcss(tailwindConfig({
|
|
50
|
+
env: process.env.NODE_ENV,
|
|
51
|
+
content: resolvedContent,
|
|
52
|
+
extensions: options.extensions
|
|
53
|
+
})),
|
|
54
|
+
autoprefixer
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
ThemePlugins
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=esbuild-plugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/plugins/esbuild-plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nimport { cp, mkdir } from 'node:fs/promises';\nimport { basename, join, relative, resolve } from 'node:path';\n\nimport autoprefixer from 'autoprefixer';\nimport type { Plugin } from 'esbuild';\nimport stylePlugin from 'esbuild-style-plugin';\nimport tailwindcss from 'tailwindcss';\nimport type { ThemeConfig } from 'tailwindcss/types/config';\n\nimport { tailwindConfig } from '../config';\n\nimport { resolveKnownPeers } from './resolveContent';\n\nexport const ThemePlugins = async (options: {\n content: string[];\n root?: string;\n outdir: string;\n extensions?: Partial<ThemeConfig>[];\n}): Promise<Plugin[]> => {\n const resolvedContent = options.root ? await resolveKnownPeers(options.content, options.root) : options.content;\n return [\n // TODO(thure): This really shouldn’t be this way, but after hours of searching for a reasonable way to do this I came up empty. The prior art I found was mainly this thread, though it’s only tangentially related: https://github.com/evanw/esbuild/issues/800#issuecomment-786151076\n {\n name: 'esbuild-plugin-dxos-ui-theme-resolvers',\n setup: async (build) => {\n const fontsDir = join(options.outdir, 'node_modules/@dxos/ui-theme/fonts');\n try {\n await mkdir(fontsDir);\n } catch {}\n build.onResolve({ filter: /\\.woff2$/ }, async (args) => {\n const depPath = resolve(args.resolveDir, args.path);\n const destPath = join(fontsDir, basename(args.path));\n try {\n await cp(depPath, destPath);\n } catch {}\n return {\n path: `./${relative(options.outdir, join('fonts', basename(args.path)))}`,\n external: true,\n };\n });\n },\n },\n // TODO(thure): theme.css must be part of entryPoints in order to be processed with `stylePlugin`, but this should not be necessary. ESBuild would not load theme.css using stylePlugin if referenced within index.ts(x) as with the Vite plugin.\n // TODO(thure): Note also that because it is an entryPoint, the developer has to reference the built theme.css from `index.html`, which is inflexible and possibly inconvenient.\n // TODO(zhenyasav): autoprefixer version misalignment with esbuild-style-plugin requires the `as any`.\n stylePlugin({\n postcss: {\n plugins: [\n tailwindcss(\n tailwindConfig({\n env: process.env.NODE_ENV,\n content: resolvedContent,\n extensions: options.extensions,\n }),\n ),\n autoprefixer as any,\n ],\n },\n }),\n ];\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,SAASA,IAAIC,aAAa;AAC1B,SAASC,UAAUC,MAAMC,UAAUC,eAAe;AAElD,OAAOC,kBAAkB;AAEzB,OAAOC,iBAAiB;AACxB,OAAOC,iBAAiB;AAOjB,IAAMC,eAAe,OAAOC,YAAAA;AAMjC,QAAMC,kBAAkBD,QAAQE,OAAO,MAAMC,kBAAkBH,QAAQI,SAASJ,QAAQE,IAAI,IAAIF,QAAQI;AACxG,SAAO;;IAEL;MACEC,MAAM;MACNC,OAAO,OAAOC,UAAAA;AACZ,cAAMC,WAAWC,KAAKT,QAAQU,QAAQ,mCAAA;AACtC,YAAI;AACF,gBAAMC,MAAMH,QAAAA;QACd,QAAQ;QAAC;AACTD,cAAMK,UAAU;UAAEC,QAAQ;QAAW,GAAG,OAAOC,SAAAA;AAC7C,gBAAMC,UAAUC,QAAQF,KAAKG,YAAYH,KAAKI,IAAI;AAClD,gBAAMC,WAAWV,KAAKD,UAAUY,SAASN,KAAKI,IAAI,CAAA;AAClD,cAAI;AACF,kBAAMG,GAAGN,SAASI,QAAAA;UACpB,QAAQ;UAAC;AACT,iBAAO;YACLD,MAAM,KAAKI,SAAStB,QAAQU,QAAQD,KAAK,SAASW,SAASN,KAAKI,IAAI,CAAA,CAAA,CAAA;YACpEK,UAAU;UACZ;QACF,CAAA;MACF;IACF;;;;IAIAC,YAAY;MACVC,SAAS;QACPC,SAAS;UACPC,YACEC,eAAe;YACbC,KAAKC,QAAQD,IAAIE;YACjB3B,SAASH;YACT+B,YAAYhC,QAAQgC;UACtB,CAAA,CAAA;UAEFC;;MAEJ;IACF,CAAA;;AAEJ;",
|
|
6
|
+
"names": ["cp", "mkdir", "basename", "join", "relative", "resolve", "autoprefixer", "stylePlugin", "tailwindcss", "ThemePlugins", "options", "resolvedContent", "root", "resolveKnownPeers", "content", "name", "setup", "build", "fontsDir", "join", "outdir", "mkdir", "onResolve", "filter", "args", "depPath", "resolve", "resolveDir", "path", "destPath", "basename", "cp", "relative", "external", "stylePlugin", "postcss", "plugins", "tailwindcss", "tailwindConfig", "env", "process", "NODE_ENV", "extensions", "autoprefixer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
resolveKnownPeers
|
|
4
|
+
} from "../chunk-AFRHJHP4.mjs";
|
|
5
|
+
import {
|
|
6
|
+
tailwindConfig,
|
|
7
|
+
tokenSet
|
|
8
|
+
} from "../chunk-HJE6EZWE.mjs";
|
|
9
|
+
|
|
10
|
+
// src/plugins/plugin.ts
|
|
11
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
12
|
+
import { resolve } from "node:path";
|
|
13
|
+
import chTokens from "@ch-ui/tokens/postcss";
|
|
14
|
+
import autoprefixer from "autoprefixer";
|
|
15
|
+
import postcss from "postcss";
|
|
16
|
+
import postcssImport from "postcss-import";
|
|
17
|
+
import tailwindcss from "tailwindcss";
|
|
18
|
+
import nesting from "tailwindcss/nesting/index.js";
|
|
19
|
+
var environment;
|
|
20
|
+
var createPostCSSPipeline = (environment2, config) => [
|
|
21
|
+
// Handles @import statements in CSS.
|
|
22
|
+
postcssImport(),
|
|
23
|
+
// Processes CSS nesting syntax.
|
|
24
|
+
nesting,
|
|
25
|
+
// Processes custom design tokens.
|
|
26
|
+
chTokens({
|
|
27
|
+
config: () => tokenSet
|
|
28
|
+
}),
|
|
29
|
+
// Processes Tailwind directives and utilities.
|
|
30
|
+
tailwindcss(tailwindConfig({
|
|
31
|
+
env: environment2,
|
|
32
|
+
content: config.content,
|
|
33
|
+
extensions: config.extensions
|
|
34
|
+
})),
|
|
35
|
+
// Adds vendor prefixes.
|
|
36
|
+
autoprefixer
|
|
37
|
+
];
|
|
38
|
+
var ThemePlugin = (options) => {
|
|
39
|
+
const config = {
|
|
40
|
+
jit: true,
|
|
41
|
+
cssPath: resolve(import.meta.dirname, "../theme.css"),
|
|
42
|
+
srcCssPath: resolve(import.meta.dirname, "../../../../src/theme.css"),
|
|
43
|
+
virtualFileId: "@dxos-theme",
|
|
44
|
+
...options
|
|
45
|
+
};
|
|
46
|
+
if (process.env.DEBUG) {
|
|
47
|
+
console.log("ThemePlugin config:\n", JSON.stringify(config, null, 2));
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
name: "vite-plugin-dxos-ui-theme",
|
|
51
|
+
config: async ({ root }, env) => {
|
|
52
|
+
environment = env.mode;
|
|
53
|
+
const content = root ? await resolveKnownPeers(config.content ?? [], root) : config.content;
|
|
54
|
+
if (options.verbose) {
|
|
55
|
+
console.log("content", content);
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
css: {
|
|
59
|
+
postcss: {
|
|
60
|
+
plugins: createPostCSSPipeline(environment, config)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
resolveId: (id) => {
|
|
66
|
+
if (id === config.virtualFileId) {
|
|
67
|
+
return config.cssPath;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
handleHotUpdate: async ({ file, server }) => {
|
|
71
|
+
if (file.endsWith(".css") && file !== config.cssPath) {
|
|
72
|
+
try {
|
|
73
|
+
const module = server.moduleGraph.getModuleById(config.cssPath);
|
|
74
|
+
if (module) {
|
|
75
|
+
const css = await readFile(config.srcCssPath, "utf8");
|
|
76
|
+
const processor = postcss(createPostCSSPipeline(environment, config));
|
|
77
|
+
console.log("[theme-plugin] Reprocessing CSS with PostCSS.");
|
|
78
|
+
const result = await processor.process(css, {
|
|
79
|
+
from: config.srcCssPath,
|
|
80
|
+
to: config.cssPath
|
|
81
|
+
});
|
|
82
|
+
if (result.css) {
|
|
83
|
+
await writeFile(config.cssPath, result.css);
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
} catch (err) {
|
|
88
|
+
console.error("[theme-plugin] Error:", err);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
ThemePlugin.foo = "bar";
|
|
95
|
+
export {
|
|
96
|
+
ThemePlugin
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/plugins/plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\n\nimport chTokens from '@ch-ui/tokens/postcss';\nimport autoprefixer from 'autoprefixer';\nimport postcss from 'postcss';\nimport postcssImport from 'postcss-import';\nimport tailwindcss from 'tailwindcss';\nimport nesting from 'tailwindcss/nesting/index.js';\nimport { type ThemeConfig } from 'tailwindcss/types/config';\nimport { type Plugin, type UserConfig } from 'vite';\n\nimport { tailwindConfig, tokenSet } from '../config';\n\nimport { resolveKnownPeers } from './resolveContent';\n\nexport type ThemePluginOptions = {\n jit?: boolean;\n cssPath?: string;\n srcCssPath?: string;\n virtualFileId?: string;\n content?: string[];\n root?: string;\n verbose?: boolean;\n extensions?: Partial<ThemeConfig>[];\n};\n\nlet environment!: string;\n\n/**\n * Configures PostCSS pipeline for theme.css processing.\n * @param environment - The current environment (development/production).\n * @param config - Theme plugin configuration options.\n * @returns Array of PostCSS plugins.\n */\nconst createPostCSSPipeline = (environment: string, config: ThemePluginOptions): postcss.Transformer[] => [\n // Handles @import statements in CSS.\n postcssImport(),\n // Processes CSS nesting syntax.\n nesting,\n // Processes custom design tokens.\n chTokens({ config: () => tokenSet }),\n // Processes Tailwind directives and utilities.\n tailwindcss(\n tailwindConfig({\n env: environment,\n content: config.content,\n extensions: config.extensions,\n }),\n ),\n // Adds vendor prefixes.\n autoprefixer as any,\n];\n\n/**\n * Vite plugin to configure theme.\n */\nexport const ThemePlugin = (options: ThemePluginOptions): Plugin => {\n const config: ThemePluginOptions = {\n jit: true,\n cssPath: resolve(import.meta.dirname, '../theme.css'),\n srcCssPath: resolve(import.meta.dirname, '../../../../src/theme.css'),\n virtualFileId: '@dxos-theme',\n ...options,\n };\n\n if (process.env.DEBUG) {\n console.log('ThemePlugin config:\\n', JSON.stringify(config, null, 2));\n }\n\n return {\n name: 'vite-plugin-dxos-ui-theme',\n config: async ({ root }, env): Promise<UserConfig> => {\n environment = env.mode;\n const content = root ? await resolveKnownPeers(config.content ?? [], root) : config.content;\n if (options.verbose) {\n console.log('content', content);\n }\n\n return {\n css: {\n postcss: {\n plugins: createPostCSSPipeline(environment, config),\n },\n },\n };\n },\n resolveId: (id) => {\n if (id === config.virtualFileId) {\n return config.cssPath;\n }\n },\n handleHotUpdate: async ({ file, server }) => {\n // NOTE(ZaymonFC): Changes to *any* CSS file triggers this step. We might want to refine this.\n // Ignore the output file to prevent infinite loops.\n if (file.endsWith('.css') && file !== config.cssPath) {\n try {\n // Get reference to the theme virtual module.\n const module = server.moduleGraph.getModuleById(config.cssPath!);\n if (module) {\n // Read the source theme file that imports all other CSS files.\n const css = await readFile(config.srcCssPath!, 'utf8');\n const processor = postcss(createPostCSSPipeline(environment, config));\n console.log('[theme-plugin] Reprocessing CSS with PostCSS.');\n const result = await processor.process(css, {\n from: config.srcCssPath,\n to: config.cssPath,\n });\n\n if (result.css) {\n await writeFile(config.cssPath!, result.css);\n // Return the module to trigger HMR update.\n return [];\n }\n }\n } catch (err) {\n console.error('[theme-plugin] Error:', err);\n }\n }\n },\n };\n};\n\nThemePlugin.foo = 'bar';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAMA,SAASA,UAAUC,iBAAiB;AACpC,SAASC,eAAe;AAExB,OAAOC,cAAc;AACrB,OAAOC,kBAAkB;AACzB,OAAOC,aAAa;AACpB,OAAOC,mBAAmB;AAC1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AMT,MAAM,MAAMY,SAAS1C,OAAOiB,YAAa,MAAA;AAC/C,kBAAM0B,YAAYZ,QAAQhC,sBAAsBD,aAAaE,MAAAA,CAAAA;AAC7DqB,oBAAQC,IAAI,+CAAA;AACZ,kBAAMsB,SAAS,MAAMD,UAAUxB,QAAQW,KAAK;cAC1Ce,MAAM7C,OAAOiB;cACb6B,IAAI9C,OAAOc;YACb,CAAA;AAEA,gBAAI8B,OAAOd,KAAK;AACd,oBAAMiB,UAAU/C,OAAOc,SAAU8B,OAAOd,GAAG;AAE3C,qBAAO,CAAA;YACT;UACF;QACF,SAASkB,KAAK;AACZ3B,kBAAQ4B,MAAM,yBAAyBD,GAAAA;QACzC;MACF;IACF;EACF;AACF;AAEArC,YAAYuC,MAAM;",
|
|
6
|
+
"names": ["readFile", "writeFile", "resolve", "chTokens", "autoprefixer", "postcss", "postcssImport", "tailwindcss", "nesting", "environment", "createPostCSSPipeline", "config", "postcssImport", "nesting", "chTokens", "tokenSet", "tailwindcss", "tailwindConfig", "env", "content", "extensions", "autoprefixer", "ThemePlugin", "options", "jit", "cssPath", "resolve", "dirname", "srcCssPath", "virtualFileId", "process", "DEBUG", "console", "log", "JSON", "stringify", "name", "root", "mode", "resolveKnownPeers", "verbose", "css", "postcss", "plugins", "resolveId", "id", "handleHotUpdate", "file", "server", "endsWith", "module", "moduleGraph", "getModuleById", "readFile", "processor", "result", "from", "to", "writeFile", "err", "error", "foo"]
|
|
7
|
+
}
|