@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,+BAAwC;AACxC,mBAA6B;AAC7B,oBAAkB;AAClB,gCAA8B;AAC9B,yBAA0B;AAE1B,iCAA+B;AAC/B,+BAA6B;ACN7B,6BAAoB;ACGpB,IAAMA,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;EACpBa,MAAMb,YAAY,CA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BAAqB;QACrB,wBAAwB;;QAGxB,cAAc;QACd,wBAAwB;QACxB,yBAAyB;QACzB,mBAAmB;;QAGnB,cAAc;QACd,YAAY;;QAGZ,SAAS;QACT,gBAAgB;;QAGhB,QAAQ;QACR,aAAa;QACb,WAAW;QACX,cAAc;QACd,0BAA0B;QAC1B,mBAAmB;MACrB;IACF,GACApC,cAAAA,GACGK,UAAAA;IAEL,GAAGJ;IACHjB,QAAQ;MACN,GAAGiB,eAAejB;MAClBqD,SAAS;MACTC,SAAS;MACTC,aAAa;MACbC,OAAO;MACPC,OAAO;IACT;EACF;EACAC,SAAS;IACPC,yBAAAA;IACAC,aAAAA;IACAC,2BAAAA;QACAC,yBAAAA,SAAAA;;QAEAC,0BAAAA,SAAkB;MAChBC,cAAc;MACdC,mBAAmB;IACrB,CAAA;;EAEF,GAAI9C,QAAQ,iBAAiB;IAAE+C,MAAM;EAAM;EAC3C9C;EACA+C,QAAQ;IACNC,wBAAwB;EAC1B;AACF;",
|
|
6
|
+
"names": ["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", "keys", "palette", "light", "dark", "valenceAliasSememeStems", "valenceMapping", "valenceAliases", "stem", "valences", "root", "map", "valence", "sheetSememes", "axisSurface", "axisText", "axisSelectedSurface", "axisSelectedText", "gridCell", "gridCellSelected", "gridOverlay", "gridSelectionOverlay", "gridHighlight", "gridCommented", "gridCommentedActive", "sheetAliases", "activeSurface", "accentFocusIndicator", "neutralFocusIndicator", "gridFocusStack", "getMapValue", "key", "defaultValue", "value", "applyAlpha", "sememe", "alpha", "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", "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", "aliasDefs", "sidebarSurface", "headerSurface", "toolbarSurface", "cardSurface", "textInputSurface", "group", "modal", "inputSurface", "hoverSurface", "attention", "currentRelated", "separator", "systemAliases", "aliases", "alias", "forEach", "record", "list", "push", "groupAliases", "modalAliases", "aliasColors", "join", "cardMinInlineSize", "cardDefaultInlineSize", "cardMaxInlineSize", "lengthsFacet", "physical", "line", "unit", "lacuna", "semantic", "sememes", "noLine", "hairLine", "thickLine", "trimXs", "trimSm", "trimMd", "trimLg", "inputFine", "inputCoarse", "fine", "coarse", "flush", "maxSizesFacet", "size", "callsSememes", "callActive", "callAlert", "codemirrorSememes", "cmCodeblock", "cmActiveLine", "cmSeparator", "cmCursor", "cmSelection", "cmFocusedSelection", "cmHighlight", "cmHighlightSurface", "cmCommentText", "cmCommentSurface", "semanticColors", "hues", "tokenSet", "colors", "lengths", "maxSizes", "adapterConfig", "facet", "disposition", "tokenization", "borderWidth", "ringWidth", "ringOffsetWidth", "outlineWidth", "spacing", "userDefaultTokenSet", "tokensTailwindConfig", "adapter", "extend", "extendTokens", "overrideTokens", "tailwindConfig", "env", "content", "extensions", "darkMode", "theme", "fontFamily", "body", "defaultConfig", "sans", "mono", "merge", "backgroundImage", "borderRadius", "none", "sm", "DEFAULT", "md", "lg", "screens", "raw", "fontSize", "lineHeight", "boxShadow", "transitionProperty", "transitionTimingFunction", "keyframes", "from", "opacity", "to", "transform", "height", "left", "width", "animation", "inherit", "current", "transparent", "black", "white", "plugins", "tailwindcssContainerQueries", "tailwindcssForms", "tailwindcssLogical", "tailwindcssRadix", "tailwindScrollbar", "nocompatible", "preferredStrategy", "mode", "future", "hoverOnlyWhenSupported"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var tailwind_exports = {};
|
|
20
|
+
__export(tailwind_exports, {
|
|
21
|
+
tailwindConfig: () => import_chunk_ZVALPM6U.tailwindConfig
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(tailwind_exports);
|
|
24
|
+
var import_chunk_ZVALPM6U = require("../chunk-ZVALPM6U.cjs");
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
27
|
+
tailwindConfig
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=tailwind.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["tailwind.cjs"],
|
|
4
|
+
"sourcesContent": ["import {\n tailwindConfig\n} from \"../chunk-ZVALPM6U.cjs\";\nexport {\n tailwindConfig\n};\n//# sourceMappingURL=tailwind.cjs.map\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAEO;",
|
|
6
|
+
"names": []
|
|
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-cjs/config/tailwind.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/plugin/node-cjs/config/tailwind.cjs":{"imports":[{"path":"dist/plugin/node-cjs/chunk-ZVALPM6U.cjs","kind":"import-statement"}],"exports":["tailwindConfig"],"entryPoint":"src/config/tailwind.ts","inputs":{},"bytes":125},"dist/plugin/node-cjs/plugins/esbuild-plugin.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4186},"dist/plugin/node-cjs/plugins/esbuild-plugin.cjs":{"imports":[{"path":"dist/plugin/node-cjs/chunk-UUMDOU7E.cjs","kind":"import-statement"},{"path":"dist/plugin/node-cjs/chunk-ZVALPM6U.cjs","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":2458},"dist/plugin/node-cjs/plugins/plugin.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6500},"dist/plugin/node-cjs/plugins/plugin.cjs":{"imports":[{"path":"dist/plugin/node-cjs/chunk-UUMDOU7E.cjs","kind":"import-statement"},{"path":"dist/plugin/node-cjs/chunk-ZVALPM6U.cjs","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":2600}},"bytes":2819},"dist/plugin/node-cjs/chunk-UUMDOU7E.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3229},"dist/plugin/node-cjs/chunk-UUMDOU7E.cjs":{"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":1527},"dist/plugin/node-cjs/chunk-ZVALPM6U.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":53509},"dist/plugin/node-cjs/chunk-ZVALPM6U.cjs":{"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":30907},"dist/plugin/node-cjs/theme.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":60809},"dist/plugin/node-cjs/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,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var esbuild_plugin_exports = {};
|
|
30
|
+
__export(esbuild_plugin_exports, {
|
|
31
|
+
ThemePlugins: () => ThemePlugins
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(esbuild_plugin_exports);
|
|
34
|
+
var import_chunk_UUMDOU7E = require("../chunk-UUMDOU7E.cjs");
|
|
35
|
+
var import_chunk_ZVALPM6U = require("../chunk-ZVALPM6U.cjs");
|
|
36
|
+
var import_promises = require("node:fs/promises");
|
|
37
|
+
var import_node_path = require("node:path");
|
|
38
|
+
var import_autoprefixer = __toESM(require("autoprefixer"));
|
|
39
|
+
var import_esbuild_style_plugin = __toESM(require("esbuild-style-plugin"));
|
|
40
|
+
var import_tailwindcss = __toESM(require("tailwindcss"));
|
|
41
|
+
var ThemePlugins = async (options) => {
|
|
42
|
+
const resolvedContent = options.root ? await (0, import_chunk_UUMDOU7E.resolveKnownPeers)(options.content, options.root) : options.content;
|
|
43
|
+
return [
|
|
44
|
+
// 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
|
|
45
|
+
{
|
|
46
|
+
name: "esbuild-plugin-dxos-ui-theme-resolvers",
|
|
47
|
+
setup: async (build) => {
|
|
48
|
+
const fontsDir = (0, import_node_path.join)(options.outdir, "node_modules/@dxos/ui-theme/fonts");
|
|
49
|
+
try {
|
|
50
|
+
await (0, import_promises.mkdir)(fontsDir);
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
build.onResolve({
|
|
54
|
+
filter: /\.woff2$/
|
|
55
|
+
}, async (args) => {
|
|
56
|
+
const depPath = (0, import_node_path.resolve)(args.resolveDir, args.path);
|
|
57
|
+
const destPath = (0, import_node_path.join)(fontsDir, (0, import_node_path.basename)(args.path));
|
|
58
|
+
try {
|
|
59
|
+
await (0, import_promises.cp)(depPath, destPath);
|
|
60
|
+
} catch {
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
path: `./${(0, import_node_path.relative)(options.outdir, (0, import_node_path.join)("fonts", (0, import_node_path.basename)(args.path)))}`,
|
|
64
|
+
external: true
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
// 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.
|
|
70
|
+
// 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.
|
|
71
|
+
// TODO(zhenyasav): autoprefixer version misalignment with esbuild-style-plugin requires the `as any`.
|
|
72
|
+
(0, import_esbuild_style_plugin.default)({
|
|
73
|
+
postcss: {
|
|
74
|
+
plugins: [
|
|
75
|
+
(0, import_tailwindcss.default)((0, import_chunk_ZVALPM6U.tailwindConfig)({
|
|
76
|
+
env: process.env.NODE_ENV,
|
|
77
|
+
content: resolvedContent,
|
|
78
|
+
extensions: options.extensions
|
|
79
|
+
})),
|
|
80
|
+
import_autoprefixer.default
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
];
|
|
85
|
+
};
|
|
86
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
+
0 && (module.exports = {
|
|
88
|
+
ThemePlugins
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=esbuild-plugin.cjs.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,sBAA0B;AAC1B,uBAAkD;AAElD,0BAAyB;AAEzB,kCAAwB;AACxB,yBAAwB;AAOjB,IAAMA,eAAe,OAAOC,YAAAA;AAMjC,QAAMC,kBAAkBD,QAAQE,OAAO,UAAMC,yCAAkBH,QAAQI,SAASJ,QAAQE,IAAI,IAAIF,QAAQI;AACxG,SAAO;;IAEL;MACEC,MAAM;MACNC,OAAO,OAAOC,UAAAA;AACZ,cAAMC,eAAWC,uBAAKT,QAAQU,QAAQ,mCAAA;AACtC,YAAI;AACF,oBAAMC,uBAAMH,QAAAA;QACd,QAAQ;QAAC;AACTD,cAAMK,UAAU;UAAEC,QAAQ;QAAW,GAAG,OAAOC,SAAAA;AAC7C,gBAAMC,cAAUC,0BAAQF,KAAKG,YAAYH,KAAKI,IAAI;AAClD,gBAAMC,eAAWV,uBAAKD,cAAUY,2BAASN,KAAKI,IAAI,CAAA;AAClD,cAAI;AACF,sBAAMG,oBAAGN,SAASI,QAAAA;UACpB,QAAQ;UAAC;AACT,iBAAO;YACLD,MAAM,SAAKI,2BAAStB,QAAQU,YAAQD,uBAAK,aAASW,2BAASN,KAAKI,IAAI,CAAA,CAAA,CAAA;YACpEK,UAAU;UACZ;QACF,CAAA;MACF;IACF;;;;QAIAC,4BAAAA,SAAY;MACVC,SAAS;QACPC,SAAS;cACPC,mBAAAA,aACEC,sCAAe;YACbC,KAAKC,QAAQD,IAAIE;YACjB3B,SAASH;YACT+B,YAAYhC,QAAQgC;UACtB,CAAA,CAAA;UAEFC,oBAAAA;;MAEJ;IACF,CAAA;;AAEJ;",
|
|
6
|
+
"names": ["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,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var plugin_exports = {};
|
|
30
|
+
__export(plugin_exports, {
|
|
31
|
+
ThemePlugin: () => ThemePlugin
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
34
|
+
var import_chunk_UUMDOU7E = require("../chunk-UUMDOU7E.cjs");
|
|
35
|
+
var import_chunk_ZVALPM6U = require("../chunk-ZVALPM6U.cjs");
|
|
36
|
+
var import_promises = require("node:fs/promises");
|
|
37
|
+
var import_node_path = require("node:path");
|
|
38
|
+
var import_postcss = __toESM(require("@ch-ui/tokens/postcss"));
|
|
39
|
+
var import_autoprefixer = __toESM(require("autoprefixer"));
|
|
40
|
+
var import_postcss2 = __toESM(require("postcss"));
|
|
41
|
+
var import_postcss_import = __toESM(require("postcss-import"));
|
|
42
|
+
var import_tailwindcss = __toESM(require("tailwindcss"));
|
|
43
|
+
var import_nesting = __toESM(require("tailwindcss/nesting/index.js"));
|
|
44
|
+
var environment;
|
|
45
|
+
var createPostCSSPipeline = (environment2, config) => [
|
|
46
|
+
// Handles @import statements in CSS.
|
|
47
|
+
(0, import_postcss_import.default)(),
|
|
48
|
+
// Processes CSS nesting syntax.
|
|
49
|
+
import_nesting.default,
|
|
50
|
+
// Processes custom design tokens.
|
|
51
|
+
(0, import_postcss.default)({
|
|
52
|
+
config: () => import_chunk_ZVALPM6U.tokenSet
|
|
53
|
+
}),
|
|
54
|
+
// Processes Tailwind directives and utilities.
|
|
55
|
+
(0, import_tailwindcss.default)((0, import_chunk_ZVALPM6U.tailwindConfig)({
|
|
56
|
+
env: environment2,
|
|
57
|
+
content: config.content,
|
|
58
|
+
extensions: config.extensions
|
|
59
|
+
})),
|
|
60
|
+
// Adds vendor prefixes.
|
|
61
|
+
import_autoprefixer.default
|
|
62
|
+
];
|
|
63
|
+
var ThemePlugin = (options) => {
|
|
64
|
+
const config = {
|
|
65
|
+
jit: true,
|
|
66
|
+
cssPath: (0, import_node_path.resolve)(__dirname, "../theme.css"),
|
|
67
|
+
srcCssPath: (0, import_node_path.resolve)(__dirname, "../../../../src/theme.css"),
|
|
68
|
+
virtualFileId: "@dxos-theme",
|
|
69
|
+
...options
|
|
70
|
+
};
|
|
71
|
+
if (process.env.DEBUG) {
|
|
72
|
+
console.log("ThemePlugin config:\n", JSON.stringify(config, null, 2));
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
name: "vite-plugin-dxos-ui-theme",
|
|
76
|
+
config: async ({ root }, env) => {
|
|
77
|
+
environment = env.mode;
|
|
78
|
+
const content = root ? await (0, import_chunk_UUMDOU7E.resolveKnownPeers)(config.content ?? [], root) : config.content;
|
|
79
|
+
if (options.verbose) {
|
|
80
|
+
console.log("content", content);
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
css: {
|
|
84
|
+
postcss: {
|
|
85
|
+
plugins: createPostCSSPipeline(environment, config)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
resolveId: (id) => {
|
|
91
|
+
if (id === config.virtualFileId) {
|
|
92
|
+
return config.cssPath;
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
handleHotUpdate: async ({ file, server }) => {
|
|
96
|
+
if (file.endsWith(".css") && file !== config.cssPath) {
|
|
97
|
+
try {
|
|
98
|
+
const module2 = server.moduleGraph.getModuleById(config.cssPath);
|
|
99
|
+
if (module2) {
|
|
100
|
+
const css = await (0, import_promises.readFile)(config.srcCssPath, "utf8");
|
|
101
|
+
const processor = (0, import_postcss2.default)(createPostCSSPipeline(environment, config));
|
|
102
|
+
console.log("[theme-plugin] Reprocessing CSS with PostCSS.");
|
|
103
|
+
const result = await processor.process(css, {
|
|
104
|
+
from: config.srcCssPath,
|
|
105
|
+
to: config.cssPath
|
|
106
|
+
});
|
|
107
|
+
if (result.css) {
|
|
108
|
+
await (0, import_promises.writeFile)(config.cssPath, result.css);
|
|
109
|
+
return [];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} catch (err) {
|
|
113
|
+
console.error("[theme-plugin] Error:", err);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
ThemePlugin.foo = "bar";
|
|
120
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
121
|
+
0 && (module.exports = {
|
|
122
|
+
ThemePlugin
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=plugin.cjs.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,sBAAoC;AACpC,uBAAwB;AAExB,qBAAqB;AACrB,0BAAyB;AACzB,IAAAA,kBAAoB;AACpB,4BAA0B;AAC1B,yBAAwB;AACxB,qBAAoB;AAmBpB,IAAIC;AAQJ,IAAMC,wBAAwB,CAACD,cAAqBE,WAAsD;;MAExGC,sBAAAA,SAAAA;;EAEAC,eAAAA;;MAEAC,eAAAA,SAAS;IAAEH,QAAQ,MAAMI;EAAS,CAAA;;MAElCC,mBAAAA,aACEC,sCAAe;IACbC,KAAKT;IACLU,SAASR,OAAOQ;IAChBC,YAA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B,IAAI7C,OAAOc;YACb,CAAA;AAEA,gBAAI6B,OAAOd,KAAK;AACd,wBAAMiB,2BAAU9C,OAAOc,SAAU6B,OAAOd,GAAG;AAE3C,qBAAO,CAAA;YACT;UACF;QACF,SAASkB,KAAK;AACZ3B,kBAAQ4B,MAAM,yBAAyBD,GAAAA;QACzC;MACF;IACF;EACF;AACF;AAEApC,YAAYsC,MAAM;",
|
|
6
|
+
"names": ["import_postcss", "environment", "createPostCSSPipeline", "config", "postcssImport", "nesting", "chTokens", "tokenSet", "tailwindcss", "tailwindConfig", "env", "content", "extensions", "autoprefixer", "ThemePlugin", "options", "jit", "cssPath", "resolve", "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
|
+
}
|