@yahoo/uds 3.116.0-beta.2 → 3.116.0
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/automated-config/dist/generated/autoVariants.cjs +0 -10
- package/dist/automated-config/dist/generated/autoVariants.d.cts +0 -10
- package/dist/automated-config/dist/generated/autoVariants.d.ts +0 -10
- package/dist/automated-config/dist/generated/autoVariants.js +0 -10
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +0 -1842
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +1 -194
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +1 -194
- package/dist/automated-config/dist/generated/generatedConfigs.js +1 -1842
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +0 -78
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +1 -2
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +1 -2
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +0 -78
- package/dist/cli/commands/sync.cjs +0 -6
- package/dist/cli/commands/sync.js +0 -6
- package/dist/components/client/Toast/Toast.cjs +3 -3
- package/dist/components/client/Toast/Toast.d.cts +1 -1
- package/dist/components/client/Toast/Toast.d.ts +1 -1
- package/dist/components/client/Toast/Toast.js +3 -3
- package/dist/components/client/Toast/UDSToastConfigProvider.d.cts +5 -5
- package/dist/components/client/Toast/UDSToastConfigProvider.d.ts +5 -5
- package/dist/components/client/Toast/index.d.cts +1 -1
- package/dist/components/client/Toast/index.d.ts +1 -1
- package/dist/components/client/Tooltip/Tooltip.cjs +6 -6
- package/dist/components/client/Tooltip/Tooltip.d.cts +1 -1
- package/dist/components/client/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/client/Tooltip/Tooltip.js +6 -6
- package/dist/components/client/Tooltip/TooltipContent.cjs +119 -55
- package/dist/components/client/Tooltip/TooltipContent.js +120 -56
- package/dist/components/client/Tooltip/tooltipContext.cjs +1 -0
- package/dist/components/client/Tooltip/tooltipContext.d.cts +2 -1
- package/dist/components/client/Tooltip/tooltipContext.d.ts +2 -1
- package/dist/components/client/Tooltip/tooltipContext.js +1 -0
- package/dist/{hooks/useSvgFloatingContent.cjs → components/client/Tooltip/useTooltipContent.cjs} +48 -81
- package/dist/components/client/Tooltip/useTooltipContent.d.cts +66 -0
- package/dist/components/client/Tooltip/useTooltipContent.d.ts +66 -0
- package/dist/{hooks/useSvgFloatingContent.js → components/client/Tooltip/useTooltipContent.js} +43 -76
- package/dist/components/client/Tooltip/util.cjs +248 -0
- package/dist/{utils/svgFloatingContentUtils.d.cts → components/client/Tooltip/util.d.cts} +62 -25
- package/dist/{utils/svgFloatingContentUtils.d.ts → components/client/Tooltip/util.d.ts} +62 -25
- package/dist/components/client/Tooltip/util.js +240 -0
- package/dist/components/client/index.cjs +0 -8
- package/dist/components/client/index.d.cts +5 -10
- package/dist/components/client/index.d.ts +5 -10
- package/dist/components/client/index.js +1 -5
- package/dist/components/client/providers/UDSConfigProvider.cjs +2 -6
- package/dist/components/client/providers/UDSConfigProvider.d.cts +1 -2
- package/dist/components/client/providers/UDSConfigProvider.d.ts +1 -2
- package/dist/components/client/providers/UDSConfigProvider.js +2 -6
- package/dist/components/experimental/client/{ExperimentalPopover.cjs → Popover.cjs} +1 -10
- package/dist/components/experimental/client/Popover.d.cts +29 -0
- package/dist/components/experimental/client/Popover.d.ts +29 -0
- package/dist/components/experimental/client/{ExperimentalPopover.js → Popover.js} +1 -10
- package/dist/components/experimental/client/index.cjs +10 -10
- package/dist/components/experimental/client/index.d.cts +2 -2
- package/dist/components/experimental/client/index.d.ts +2 -2
- package/dist/components/experimental/client/index.js +1 -1
- package/dist/components/experimental/index.cjs +19 -19
- package/dist/components/experimental/index.d.cts +2 -2
- package/dist/components/experimental/index.d.ts +2 -2
- package/dist/components/experimental/index.js +1 -1
- package/dist/components/index.cjs +0 -12
- package/dist/components/index.d.cts +5 -9
- package/dist/components/index.d.ts +5 -9
- package/dist/components/index.js +1 -9
- package/dist/config/dist/index.cjs +1 -79
- package/dist/config/dist/index.js +1 -79
- package/dist/index.cjs +10 -21
- package/dist/index.d.cts +10 -15
- package/dist/index.d.ts +10 -15
- package/dist/index.js +11 -16
- package/dist/runtime/index.cjs +0 -2
- package/dist/runtime/index.d.cts +2 -3
- package/dist/runtime/index.d.ts +2 -3
- package/dist/runtime/index.js +1 -2
- package/dist/runtime/udsConfig.cjs +1 -3
- package/dist/runtime/udsConfig.d.cts +1 -3
- package/dist/runtime/udsConfig.d.ts +1 -3
- package/dist/runtime/udsConfig.js +1 -3
- package/dist/styles/styler.d.cts +96 -106
- package/dist/styles/styler.d.ts +96 -106
- package/dist/styles/variants.d.cts +0 -30
- package/dist/styles/variants.d.ts +0 -30
- package/dist/tailwind/dist/commands/css.helpers.cjs +6 -2
- package/dist/tailwind/dist/commands/css.helpers.js +6 -2
- package/dist/tailwind/dist/commands/generateComponentData.cjs +2 -0
- package/dist/tailwind/dist/commands/generateComponentData.js +3 -1
- package/dist/tailwind/dist/commands/generatePurgeCSSData.cjs +3 -8
- package/dist/tailwind/dist/commands/generatePurgeCSSData.js +3 -8
- package/dist/tailwind/dist/commands/purge.cjs +2 -2
- package/dist/tailwind/dist/commands/purge.js +2 -2
- package/dist/tailwind/dist/css/generate.cjs +6 -4
- package/dist/tailwind/dist/css/generate.helpers.cjs +4 -1
- package/dist/tailwind/dist/css/generate.helpers.js +4 -1
- package/dist/tailwind/dist/css/generate.js +7 -5
- package/dist/tailwind/dist/css/nodeUtils.cjs +30 -2
- package/dist/tailwind/dist/css/nodeUtils.js +30 -3
- package/dist/tailwind/dist/css/runner.cjs +52 -19
- package/dist/tailwind/dist/css/runner.helpers.cjs +2 -2
- package/dist/tailwind/dist/css/runner.helpers.js +2 -2
- package/dist/tailwind/dist/css/runner.js +53 -20
- package/dist/tailwind/dist/css/theme.d.cts +2 -2
- package/dist/tailwind/dist/css/theme.d.ts +2 -2
- package/dist/tailwind/dist/purger/legacy/purgeCSS.cjs +19 -8
- package/dist/tailwind/dist/purger/legacy/purgeCSS.js +19 -8
- package/dist/tailwind/dist/purger/optimized/purge.cjs +2 -1
- package/dist/tailwind/dist/purger/optimized/purge.js +2 -1
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.cjs +22 -2
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.js +22 -2
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +5 -4
- package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +5 -4
- package/dist/tailwind/dist/purger/optimized/utils/files.cjs +12 -10
- package/dist/tailwind/dist/purger/optimized/utils/files.js +12 -9
- package/dist/tailwind/dist/tailwind/plugins/components.cjs +0 -1
- package/dist/tailwind/dist/tailwind/plugins/components.js +1 -2
- package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.cjs +294 -10
- package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js +294 -9
- package/dist/tailwind/dist/utils/entryPoints.cjs +63 -0
- package/dist/tailwind/dist/utils/entryPoints.js +55 -0
- package/dist/tokens/automation/configs/index.cjs +0 -1
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +0 -1
- package/dist/tokens/automation/index.d.cts +2 -2
- package/dist/tokens/automation/index.d.ts +2 -2
- package/dist/tokens/automation/index.js +2 -2
- package/dist/tokens/index.cjs +1 -2
- package/dist/tokens/index.d.cts +3 -3
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +1 -51
- package/dist/types/dist/index.d.ts +1 -51
- package/dist/uds/generated/componentData.cjs +887 -1029
- package/dist/uds/generated/componentData.js +840 -952
- package/dist/uds/generated/tailwindPurge.cjs +221 -247
- package/dist/uds/generated/tailwindPurge.js +221 -247
- package/dist/uds/package.cjs +1 -1
- package/dist/uds/package.js +1 -1
- package/generated/componentData.json +1195 -1337
- package/generated/tailwindPurge.ts +5 -4604
- package/package.json +2 -2
- package/dist/components/SvgFloatingOverlay.cjs +0 -122
- package/dist/components/SvgFloatingOverlay.d.cts +0 -42
- package/dist/components/SvgFloatingOverlay.d.ts +0 -42
- package/dist/components/SvgFloatingOverlay.js +0 -120
- package/dist/components/client/Popover/Popover.cjs +0 -96
- package/dist/components/client/Popover/Popover.d.cts +0 -55
- package/dist/components/client/Popover/Popover.d.ts +0 -55
- package/dist/components/client/Popover/Popover.js +0 -94
- package/dist/components/client/Popover/PopoverContent.cjs +0 -171
- package/dist/components/client/Popover/PopoverContent.d.cts +0 -26
- package/dist/components/client/Popover/PopoverContent.d.ts +0 -26
- package/dist/components/client/Popover/PopoverContent.js +0 -169
- package/dist/components/client/Popover/PopoverContext.cjs +0 -11
- package/dist/components/client/Popover/PopoverContext.d.cts +0 -21
- package/dist/components/client/Popover/PopoverContext.d.ts +0 -21
- package/dist/components/client/Popover/PopoverContext.js +0 -9
- package/dist/components/client/Popover/PopoverTrigger.cjs +0 -26
- package/dist/components/client/Popover/PopoverTrigger.d.cts +0 -14
- package/dist/components/client/Popover/PopoverTrigger.d.ts +0 -14
- package/dist/components/client/Popover/PopoverTrigger.js +0 -24
- package/dist/components/client/Popover/UDSPopoverConfigProvider.cjs +0 -40
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +0 -28
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +0 -28
- package/dist/components/client/Popover/UDSPopoverConfigProvider.js +0 -37
- package/dist/components/client/Popover/index.cjs +0 -12
- package/dist/components/client/Popover/index.d.cts +0 -7
- package/dist/components/client/Popover/index.d.ts +0 -7
- package/dist/components/client/Popover/index.js +0 -8
- package/dist/components/experimental/client/ExperimentalPopover.d.cts +0 -40
- package/dist/components/experimental/client/ExperimentalPopover.d.ts +0 -40
- package/dist/hooks/useSvgFloatingContent.d.cts +0 -74
- package/dist/hooks/useSvgFloatingContent.d.ts +0 -74
- package/dist/runtime/popoverConfig.cjs +0 -41
- package/dist/runtime/popoverConfig.d.cts +0 -24
- package/dist/runtime/popoverConfig.d.ts +0 -24
- package/dist/runtime/popoverConfig.js +0 -40
- package/dist/tailwind/dist/.prettierrc.cjs +0 -13
- package/dist/tailwind/dist/.prettierrc.js +0 -12
- package/dist/utils/parseShadow.cjs +0 -120
- package/dist/utils/parseShadow.d.cts +0 -33
- package/dist/utils/parseShadow.d.ts +0 -33
- package/dist/utils/parseShadow.js +0 -118
- package/dist/utils/svgFloatingContentUtils.cjs +0 -121
- package/dist/utils/svgFloatingContentUtils.js +0 -117
|
@@ -1,14 +1,304 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
const require_runtime = require('../../../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_index = require('../../../../config/dist/index.cjs');
|
|
4
3
|
const require_entries = require('../../utils/entries.cjs');
|
|
5
|
-
let node_module = require("node:module");
|
|
6
4
|
|
|
7
5
|
//#region ../tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js
|
|
8
6
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
9
7
|
const SPECTRUM_COLOR_PREFIX = "uds-spectrum-color";
|
|
10
8
|
const lightSpectrum = require_index.defaultTokensConfig.colorMode.light.spectrum;
|
|
11
|
-
const tailwindColorsConfig =
|
|
9
|
+
const tailwindColorsConfig = {
|
|
10
|
+
inherit: "inherit",
|
|
11
|
+
current: "currentColor",
|
|
12
|
+
transparent: "transparent",
|
|
13
|
+
black: "#000",
|
|
14
|
+
white: "#fff",
|
|
15
|
+
slate: {
|
|
16
|
+
50: "#f8fafc",
|
|
17
|
+
100: "#f1f5f9",
|
|
18
|
+
200: "#e2e8f0",
|
|
19
|
+
300: "#cbd5e1",
|
|
20
|
+
400: "#94a3b8",
|
|
21
|
+
500: "#64748b",
|
|
22
|
+
600: "#475569",
|
|
23
|
+
700: "#334155",
|
|
24
|
+
800: "#1e293b",
|
|
25
|
+
900: "#0f172a",
|
|
26
|
+
950: "#020617"
|
|
27
|
+
},
|
|
28
|
+
gray: {
|
|
29
|
+
50: "#f9fafb",
|
|
30
|
+
100: "#f3f4f6",
|
|
31
|
+
200: "#e5e7eb",
|
|
32
|
+
300: "#d1d5db",
|
|
33
|
+
400: "#9ca3af",
|
|
34
|
+
500: "#6b7280",
|
|
35
|
+
600: "#4b5563",
|
|
36
|
+
700: "#374151",
|
|
37
|
+
800: "#1f2937",
|
|
38
|
+
900: "#111827",
|
|
39
|
+
950: "#030712"
|
|
40
|
+
},
|
|
41
|
+
zinc: {
|
|
42
|
+
50: "#fafafa",
|
|
43
|
+
100: "#f4f4f5",
|
|
44
|
+
200: "#e4e4e7",
|
|
45
|
+
300: "#d4d4d8",
|
|
46
|
+
400: "#a1a1aa",
|
|
47
|
+
500: "#71717a",
|
|
48
|
+
600: "#52525b",
|
|
49
|
+
700: "#3f3f46",
|
|
50
|
+
800: "#27272a",
|
|
51
|
+
900: "#18181b",
|
|
52
|
+
950: "#09090b"
|
|
53
|
+
},
|
|
54
|
+
neutral: {
|
|
55
|
+
50: "#fafafa",
|
|
56
|
+
100: "#f5f5f5",
|
|
57
|
+
200: "#e5e5e5",
|
|
58
|
+
300: "#d4d4d4",
|
|
59
|
+
400: "#a3a3a3",
|
|
60
|
+
500: "#737373",
|
|
61
|
+
600: "#525252",
|
|
62
|
+
700: "#404040",
|
|
63
|
+
800: "#262626",
|
|
64
|
+
900: "#171717",
|
|
65
|
+
950: "#0a0a0a"
|
|
66
|
+
},
|
|
67
|
+
stone: {
|
|
68
|
+
50: "#fafaf9",
|
|
69
|
+
100: "#f5f5f4",
|
|
70
|
+
200: "#e7e5e4",
|
|
71
|
+
300: "#d6d3d1",
|
|
72
|
+
400: "#a8a29e",
|
|
73
|
+
500: "#78716c",
|
|
74
|
+
600: "#57534e",
|
|
75
|
+
700: "#44403c",
|
|
76
|
+
800: "#292524",
|
|
77
|
+
900: "#1c1917",
|
|
78
|
+
950: "#0c0a09"
|
|
79
|
+
},
|
|
80
|
+
red: {
|
|
81
|
+
50: "#fef2f2",
|
|
82
|
+
100: "#fee2e2",
|
|
83
|
+
200: "#fecaca",
|
|
84
|
+
300: "#fca5a5",
|
|
85
|
+
400: "#f87171",
|
|
86
|
+
500: "#ef4444",
|
|
87
|
+
600: "#dc2626",
|
|
88
|
+
700: "#b91c1c",
|
|
89
|
+
800: "#991b1b",
|
|
90
|
+
900: "#7f1d1d",
|
|
91
|
+
950: "#450a0a"
|
|
92
|
+
},
|
|
93
|
+
orange: {
|
|
94
|
+
50: "#fff7ed",
|
|
95
|
+
100: "#ffedd5",
|
|
96
|
+
200: "#fed7aa",
|
|
97
|
+
300: "#fdba74",
|
|
98
|
+
400: "#fb923c",
|
|
99
|
+
500: "#f97316",
|
|
100
|
+
600: "#ea580c",
|
|
101
|
+
700: "#c2410c",
|
|
102
|
+
800: "#9a3412",
|
|
103
|
+
900: "#7c2d12",
|
|
104
|
+
950: "#431407"
|
|
105
|
+
},
|
|
106
|
+
amber: {
|
|
107
|
+
50: "#fffbeb",
|
|
108
|
+
100: "#fef3c7",
|
|
109
|
+
200: "#fde68a",
|
|
110
|
+
300: "#fcd34d",
|
|
111
|
+
400: "#fbbf24",
|
|
112
|
+
500: "#f59e0b",
|
|
113
|
+
600: "#d97706",
|
|
114
|
+
700: "#b45309",
|
|
115
|
+
800: "#92400e",
|
|
116
|
+
900: "#78350f",
|
|
117
|
+
950: "#451a03"
|
|
118
|
+
},
|
|
119
|
+
yellow: {
|
|
120
|
+
50: "#fefce8",
|
|
121
|
+
100: "#fef9c3",
|
|
122
|
+
200: "#fef08a",
|
|
123
|
+
300: "#fde047",
|
|
124
|
+
400: "#facc15",
|
|
125
|
+
500: "#eab308",
|
|
126
|
+
600: "#ca8a04",
|
|
127
|
+
700: "#a16207",
|
|
128
|
+
800: "#854d0e",
|
|
129
|
+
900: "#713f12",
|
|
130
|
+
950: "#422006"
|
|
131
|
+
},
|
|
132
|
+
lime: {
|
|
133
|
+
50: "#f7fee7",
|
|
134
|
+
100: "#ecfccb",
|
|
135
|
+
200: "#d9f99d",
|
|
136
|
+
300: "#bef264",
|
|
137
|
+
400: "#a3e635",
|
|
138
|
+
500: "#84cc16",
|
|
139
|
+
600: "#65a30d",
|
|
140
|
+
700: "#4d7c0f",
|
|
141
|
+
800: "#3f6212",
|
|
142
|
+
900: "#365314",
|
|
143
|
+
950: "#1a2e05"
|
|
144
|
+
},
|
|
145
|
+
green: {
|
|
146
|
+
50: "#f0fdf4",
|
|
147
|
+
100: "#dcfce7",
|
|
148
|
+
200: "#bbf7d0",
|
|
149
|
+
300: "#86efac",
|
|
150
|
+
400: "#4ade80",
|
|
151
|
+
500: "#22c55e",
|
|
152
|
+
600: "#16a34a",
|
|
153
|
+
700: "#15803d",
|
|
154
|
+
800: "#166534",
|
|
155
|
+
900: "#14532d",
|
|
156
|
+
950: "#052e16"
|
|
157
|
+
},
|
|
158
|
+
emerald: {
|
|
159
|
+
50: "#ecfdf5",
|
|
160
|
+
100: "#d1fae5",
|
|
161
|
+
200: "#a7f3d0",
|
|
162
|
+
300: "#6ee7b7",
|
|
163
|
+
400: "#34d399",
|
|
164
|
+
500: "#10b981",
|
|
165
|
+
600: "#059669",
|
|
166
|
+
700: "#047857",
|
|
167
|
+
800: "#065f46",
|
|
168
|
+
900: "#064e3b",
|
|
169
|
+
950: "#022c22"
|
|
170
|
+
},
|
|
171
|
+
teal: {
|
|
172
|
+
50: "#f0fdfa",
|
|
173
|
+
100: "#ccfbf1",
|
|
174
|
+
200: "#99f6e4",
|
|
175
|
+
300: "#5eead4",
|
|
176
|
+
400: "#2dd4bf",
|
|
177
|
+
500: "#14b8a6",
|
|
178
|
+
600: "#0d9488",
|
|
179
|
+
700: "#0f766e",
|
|
180
|
+
800: "#115e59",
|
|
181
|
+
900: "#134e4a",
|
|
182
|
+
950: "#042f2e"
|
|
183
|
+
},
|
|
184
|
+
cyan: {
|
|
185
|
+
50: "#ecfeff",
|
|
186
|
+
100: "#cffafe",
|
|
187
|
+
200: "#a5f3fc",
|
|
188
|
+
300: "#67e8f9",
|
|
189
|
+
400: "#22d3ee",
|
|
190
|
+
500: "#06b6d4",
|
|
191
|
+
600: "#0891b2",
|
|
192
|
+
700: "#0e7490",
|
|
193
|
+
800: "#155e75",
|
|
194
|
+
900: "#164e63",
|
|
195
|
+
950: "#083344"
|
|
196
|
+
},
|
|
197
|
+
sky: {
|
|
198
|
+
50: "#f0f9ff",
|
|
199
|
+
100: "#e0f2fe",
|
|
200
|
+
200: "#bae6fd",
|
|
201
|
+
300: "#7dd3fc",
|
|
202
|
+
400: "#38bdf8",
|
|
203
|
+
500: "#0ea5e9",
|
|
204
|
+
600: "#0284c7",
|
|
205
|
+
700: "#0369a1",
|
|
206
|
+
800: "#075985",
|
|
207
|
+
900: "#0c4a6e",
|
|
208
|
+
950: "#082f49"
|
|
209
|
+
},
|
|
210
|
+
blue: {
|
|
211
|
+
50: "#eff6ff",
|
|
212
|
+
100: "#dbeafe",
|
|
213
|
+
200: "#bfdbfe",
|
|
214
|
+
300: "#93c5fd",
|
|
215
|
+
400: "#60a5fa",
|
|
216
|
+
500: "#3b82f6",
|
|
217
|
+
600: "#2563eb",
|
|
218
|
+
700: "#1d4ed8",
|
|
219
|
+
800: "#1e40af",
|
|
220
|
+
900: "#1e3a8a",
|
|
221
|
+
950: "#172554"
|
|
222
|
+
},
|
|
223
|
+
indigo: {
|
|
224
|
+
50: "#eef2ff",
|
|
225
|
+
100: "#e0e7ff",
|
|
226
|
+
200: "#c7d2fe",
|
|
227
|
+
300: "#a5b4fc",
|
|
228
|
+
400: "#818cf8",
|
|
229
|
+
500: "#6366f1",
|
|
230
|
+
600: "#4f46e5",
|
|
231
|
+
700: "#4338ca",
|
|
232
|
+
800: "#3730a3",
|
|
233
|
+
900: "#312e81",
|
|
234
|
+
950: "#1e1b4b"
|
|
235
|
+
},
|
|
236
|
+
violet: {
|
|
237
|
+
50: "#f5f3ff",
|
|
238
|
+
100: "#ede9fe",
|
|
239
|
+
200: "#ddd6fe",
|
|
240
|
+
300: "#c4b5fd",
|
|
241
|
+
400: "#a78bfa",
|
|
242
|
+
500: "#8b5cf6",
|
|
243
|
+
600: "#7c3aed",
|
|
244
|
+
700: "#6d28d9",
|
|
245
|
+
800: "#5b21b6",
|
|
246
|
+
900: "#4c1d95",
|
|
247
|
+
950: "#2e1065"
|
|
248
|
+
},
|
|
249
|
+
purple: {
|
|
250
|
+
50: "#faf5ff",
|
|
251
|
+
100: "#f3e8ff",
|
|
252
|
+
200: "#e9d5ff",
|
|
253
|
+
300: "#d8b4fe",
|
|
254
|
+
400: "#c084fc",
|
|
255
|
+
500: "#a855f7",
|
|
256
|
+
600: "#9333ea",
|
|
257
|
+
700: "#7e22ce",
|
|
258
|
+
800: "#6b21a8",
|
|
259
|
+
900: "#581c87",
|
|
260
|
+
950: "#3b0764"
|
|
261
|
+
},
|
|
262
|
+
fuchsia: {
|
|
263
|
+
50: "#fdf4ff",
|
|
264
|
+
100: "#fae8ff",
|
|
265
|
+
200: "#f5d0fe",
|
|
266
|
+
300: "#f0abfc",
|
|
267
|
+
400: "#e879f9",
|
|
268
|
+
500: "#d946ef",
|
|
269
|
+
600: "#c026d3",
|
|
270
|
+
700: "#a21caf",
|
|
271
|
+
800: "#86198f",
|
|
272
|
+
900: "#701a75",
|
|
273
|
+
950: "#4a044e"
|
|
274
|
+
},
|
|
275
|
+
pink: {
|
|
276
|
+
50: "#fdf2f8",
|
|
277
|
+
100: "#fce7f3",
|
|
278
|
+
200: "#fbcfe8",
|
|
279
|
+
300: "#f9a8d4",
|
|
280
|
+
400: "#f472b6",
|
|
281
|
+
500: "#ec4899",
|
|
282
|
+
600: "#db2777",
|
|
283
|
+
700: "#be185d",
|
|
284
|
+
800: "#9d174d",
|
|
285
|
+
900: "#831843",
|
|
286
|
+
950: "#500724"
|
|
287
|
+
},
|
|
288
|
+
rose: {
|
|
289
|
+
50: "#fff1f2",
|
|
290
|
+
100: "#ffe4e6",
|
|
291
|
+
200: "#fecdd3",
|
|
292
|
+
300: "#fda4af",
|
|
293
|
+
400: "#fb7185",
|
|
294
|
+
500: "#f43f5e",
|
|
295
|
+
600: "#e11d48",
|
|
296
|
+
700: "#be123c",
|
|
297
|
+
800: "#9f1239",
|
|
298
|
+
900: "#881337",
|
|
299
|
+
950: "#4c0519"
|
|
300
|
+
}
|
|
301
|
+
};
|
|
12
302
|
const udsLightColors = flattenSpectrumToRgbRecord(lightSpectrum);
|
|
13
303
|
/**
|
|
14
304
|
* Iterates the two-level spectrum structure directly instead of using
|
|
@@ -55,13 +345,7 @@ const getClosestUdsColor = (targetColor) => {
|
|
|
55
345
|
function getTailwindAsUdsColors() {
|
|
56
346
|
const tailwindColorsAsUds = {};
|
|
57
347
|
/** Avoid logging deprecation warnings */
|
|
58
|
-
|
|
59
|
-
delete tailwindColorsConfig["warmGray"];
|
|
60
|
-
delete tailwindColorsConfig["trueGray"];
|
|
61
|
-
delete tailwindColorsConfig["coolGray"];
|
|
62
|
-
delete tailwindColorsConfig["blueGray"];
|
|
63
|
-
for (const [name, colorOrConfig] of require_entries.entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") if (name === "lightBlue" || name === "warmGray" || name === "trueGray" || name === "coolGray" || name === "blueGray") continue;
|
|
64
|
-
else {
|
|
348
|
+
for (const [name, colorOrConfig] of require_entries.entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") {
|
|
65
349
|
for (const [shade, color] of require_entries.entries(colorOrConfig)) {
|
|
66
350
|
if (!tailwindColorsAsUds[name]) tailwindColorsAsUds[name] = {};
|
|
67
351
|
tailwindColorsAsUds[name][shade] = getClosestUdsColor(color);
|
|
@@ -1,13 +1,304 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
import { defaultTokensConfig } from "../../../../config/dist/index.js";
|
|
3
3
|
import { entries } from "../../utils/entries.js";
|
|
4
|
-
import { createRequire } from "node:module";
|
|
5
4
|
|
|
6
5
|
//#region ../tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js
|
|
7
6
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
8
7
|
const SPECTRUM_COLOR_PREFIX = "uds-spectrum-color";
|
|
9
8
|
const lightSpectrum = defaultTokensConfig.colorMode.light.spectrum;
|
|
10
|
-
const tailwindColorsConfig =
|
|
9
|
+
const tailwindColorsConfig = {
|
|
10
|
+
inherit: "inherit",
|
|
11
|
+
current: "currentColor",
|
|
12
|
+
transparent: "transparent",
|
|
13
|
+
black: "#000",
|
|
14
|
+
white: "#fff",
|
|
15
|
+
slate: {
|
|
16
|
+
50: "#f8fafc",
|
|
17
|
+
100: "#f1f5f9",
|
|
18
|
+
200: "#e2e8f0",
|
|
19
|
+
300: "#cbd5e1",
|
|
20
|
+
400: "#94a3b8",
|
|
21
|
+
500: "#64748b",
|
|
22
|
+
600: "#475569",
|
|
23
|
+
700: "#334155",
|
|
24
|
+
800: "#1e293b",
|
|
25
|
+
900: "#0f172a",
|
|
26
|
+
950: "#020617"
|
|
27
|
+
},
|
|
28
|
+
gray: {
|
|
29
|
+
50: "#f9fafb",
|
|
30
|
+
100: "#f3f4f6",
|
|
31
|
+
200: "#e5e7eb",
|
|
32
|
+
300: "#d1d5db",
|
|
33
|
+
400: "#9ca3af",
|
|
34
|
+
500: "#6b7280",
|
|
35
|
+
600: "#4b5563",
|
|
36
|
+
700: "#374151",
|
|
37
|
+
800: "#1f2937",
|
|
38
|
+
900: "#111827",
|
|
39
|
+
950: "#030712"
|
|
40
|
+
},
|
|
41
|
+
zinc: {
|
|
42
|
+
50: "#fafafa",
|
|
43
|
+
100: "#f4f4f5",
|
|
44
|
+
200: "#e4e4e7",
|
|
45
|
+
300: "#d4d4d8",
|
|
46
|
+
400: "#a1a1aa",
|
|
47
|
+
500: "#71717a",
|
|
48
|
+
600: "#52525b",
|
|
49
|
+
700: "#3f3f46",
|
|
50
|
+
800: "#27272a",
|
|
51
|
+
900: "#18181b",
|
|
52
|
+
950: "#09090b"
|
|
53
|
+
},
|
|
54
|
+
neutral: {
|
|
55
|
+
50: "#fafafa",
|
|
56
|
+
100: "#f5f5f5",
|
|
57
|
+
200: "#e5e5e5",
|
|
58
|
+
300: "#d4d4d4",
|
|
59
|
+
400: "#a3a3a3",
|
|
60
|
+
500: "#737373",
|
|
61
|
+
600: "#525252",
|
|
62
|
+
700: "#404040",
|
|
63
|
+
800: "#262626",
|
|
64
|
+
900: "#171717",
|
|
65
|
+
950: "#0a0a0a"
|
|
66
|
+
},
|
|
67
|
+
stone: {
|
|
68
|
+
50: "#fafaf9",
|
|
69
|
+
100: "#f5f5f4",
|
|
70
|
+
200: "#e7e5e4",
|
|
71
|
+
300: "#d6d3d1",
|
|
72
|
+
400: "#a8a29e",
|
|
73
|
+
500: "#78716c",
|
|
74
|
+
600: "#57534e",
|
|
75
|
+
700: "#44403c",
|
|
76
|
+
800: "#292524",
|
|
77
|
+
900: "#1c1917",
|
|
78
|
+
950: "#0c0a09"
|
|
79
|
+
},
|
|
80
|
+
red: {
|
|
81
|
+
50: "#fef2f2",
|
|
82
|
+
100: "#fee2e2",
|
|
83
|
+
200: "#fecaca",
|
|
84
|
+
300: "#fca5a5",
|
|
85
|
+
400: "#f87171",
|
|
86
|
+
500: "#ef4444",
|
|
87
|
+
600: "#dc2626",
|
|
88
|
+
700: "#b91c1c",
|
|
89
|
+
800: "#991b1b",
|
|
90
|
+
900: "#7f1d1d",
|
|
91
|
+
950: "#450a0a"
|
|
92
|
+
},
|
|
93
|
+
orange: {
|
|
94
|
+
50: "#fff7ed",
|
|
95
|
+
100: "#ffedd5",
|
|
96
|
+
200: "#fed7aa",
|
|
97
|
+
300: "#fdba74",
|
|
98
|
+
400: "#fb923c",
|
|
99
|
+
500: "#f97316",
|
|
100
|
+
600: "#ea580c",
|
|
101
|
+
700: "#c2410c",
|
|
102
|
+
800: "#9a3412",
|
|
103
|
+
900: "#7c2d12",
|
|
104
|
+
950: "#431407"
|
|
105
|
+
},
|
|
106
|
+
amber: {
|
|
107
|
+
50: "#fffbeb",
|
|
108
|
+
100: "#fef3c7",
|
|
109
|
+
200: "#fde68a",
|
|
110
|
+
300: "#fcd34d",
|
|
111
|
+
400: "#fbbf24",
|
|
112
|
+
500: "#f59e0b",
|
|
113
|
+
600: "#d97706",
|
|
114
|
+
700: "#b45309",
|
|
115
|
+
800: "#92400e",
|
|
116
|
+
900: "#78350f",
|
|
117
|
+
950: "#451a03"
|
|
118
|
+
},
|
|
119
|
+
yellow: {
|
|
120
|
+
50: "#fefce8",
|
|
121
|
+
100: "#fef9c3",
|
|
122
|
+
200: "#fef08a",
|
|
123
|
+
300: "#fde047",
|
|
124
|
+
400: "#facc15",
|
|
125
|
+
500: "#eab308",
|
|
126
|
+
600: "#ca8a04",
|
|
127
|
+
700: "#a16207",
|
|
128
|
+
800: "#854d0e",
|
|
129
|
+
900: "#713f12",
|
|
130
|
+
950: "#422006"
|
|
131
|
+
},
|
|
132
|
+
lime: {
|
|
133
|
+
50: "#f7fee7",
|
|
134
|
+
100: "#ecfccb",
|
|
135
|
+
200: "#d9f99d",
|
|
136
|
+
300: "#bef264",
|
|
137
|
+
400: "#a3e635",
|
|
138
|
+
500: "#84cc16",
|
|
139
|
+
600: "#65a30d",
|
|
140
|
+
700: "#4d7c0f",
|
|
141
|
+
800: "#3f6212",
|
|
142
|
+
900: "#365314",
|
|
143
|
+
950: "#1a2e05"
|
|
144
|
+
},
|
|
145
|
+
green: {
|
|
146
|
+
50: "#f0fdf4",
|
|
147
|
+
100: "#dcfce7",
|
|
148
|
+
200: "#bbf7d0",
|
|
149
|
+
300: "#86efac",
|
|
150
|
+
400: "#4ade80",
|
|
151
|
+
500: "#22c55e",
|
|
152
|
+
600: "#16a34a",
|
|
153
|
+
700: "#15803d",
|
|
154
|
+
800: "#166534",
|
|
155
|
+
900: "#14532d",
|
|
156
|
+
950: "#052e16"
|
|
157
|
+
},
|
|
158
|
+
emerald: {
|
|
159
|
+
50: "#ecfdf5",
|
|
160
|
+
100: "#d1fae5",
|
|
161
|
+
200: "#a7f3d0",
|
|
162
|
+
300: "#6ee7b7",
|
|
163
|
+
400: "#34d399",
|
|
164
|
+
500: "#10b981",
|
|
165
|
+
600: "#059669",
|
|
166
|
+
700: "#047857",
|
|
167
|
+
800: "#065f46",
|
|
168
|
+
900: "#064e3b",
|
|
169
|
+
950: "#022c22"
|
|
170
|
+
},
|
|
171
|
+
teal: {
|
|
172
|
+
50: "#f0fdfa",
|
|
173
|
+
100: "#ccfbf1",
|
|
174
|
+
200: "#99f6e4",
|
|
175
|
+
300: "#5eead4",
|
|
176
|
+
400: "#2dd4bf",
|
|
177
|
+
500: "#14b8a6",
|
|
178
|
+
600: "#0d9488",
|
|
179
|
+
700: "#0f766e",
|
|
180
|
+
800: "#115e59",
|
|
181
|
+
900: "#134e4a",
|
|
182
|
+
950: "#042f2e"
|
|
183
|
+
},
|
|
184
|
+
cyan: {
|
|
185
|
+
50: "#ecfeff",
|
|
186
|
+
100: "#cffafe",
|
|
187
|
+
200: "#a5f3fc",
|
|
188
|
+
300: "#67e8f9",
|
|
189
|
+
400: "#22d3ee",
|
|
190
|
+
500: "#06b6d4",
|
|
191
|
+
600: "#0891b2",
|
|
192
|
+
700: "#0e7490",
|
|
193
|
+
800: "#155e75",
|
|
194
|
+
900: "#164e63",
|
|
195
|
+
950: "#083344"
|
|
196
|
+
},
|
|
197
|
+
sky: {
|
|
198
|
+
50: "#f0f9ff",
|
|
199
|
+
100: "#e0f2fe",
|
|
200
|
+
200: "#bae6fd",
|
|
201
|
+
300: "#7dd3fc",
|
|
202
|
+
400: "#38bdf8",
|
|
203
|
+
500: "#0ea5e9",
|
|
204
|
+
600: "#0284c7",
|
|
205
|
+
700: "#0369a1",
|
|
206
|
+
800: "#075985",
|
|
207
|
+
900: "#0c4a6e",
|
|
208
|
+
950: "#082f49"
|
|
209
|
+
},
|
|
210
|
+
blue: {
|
|
211
|
+
50: "#eff6ff",
|
|
212
|
+
100: "#dbeafe",
|
|
213
|
+
200: "#bfdbfe",
|
|
214
|
+
300: "#93c5fd",
|
|
215
|
+
400: "#60a5fa",
|
|
216
|
+
500: "#3b82f6",
|
|
217
|
+
600: "#2563eb",
|
|
218
|
+
700: "#1d4ed8",
|
|
219
|
+
800: "#1e40af",
|
|
220
|
+
900: "#1e3a8a",
|
|
221
|
+
950: "#172554"
|
|
222
|
+
},
|
|
223
|
+
indigo: {
|
|
224
|
+
50: "#eef2ff",
|
|
225
|
+
100: "#e0e7ff",
|
|
226
|
+
200: "#c7d2fe",
|
|
227
|
+
300: "#a5b4fc",
|
|
228
|
+
400: "#818cf8",
|
|
229
|
+
500: "#6366f1",
|
|
230
|
+
600: "#4f46e5",
|
|
231
|
+
700: "#4338ca",
|
|
232
|
+
800: "#3730a3",
|
|
233
|
+
900: "#312e81",
|
|
234
|
+
950: "#1e1b4b"
|
|
235
|
+
},
|
|
236
|
+
violet: {
|
|
237
|
+
50: "#f5f3ff",
|
|
238
|
+
100: "#ede9fe",
|
|
239
|
+
200: "#ddd6fe",
|
|
240
|
+
300: "#c4b5fd",
|
|
241
|
+
400: "#a78bfa",
|
|
242
|
+
500: "#8b5cf6",
|
|
243
|
+
600: "#7c3aed",
|
|
244
|
+
700: "#6d28d9",
|
|
245
|
+
800: "#5b21b6",
|
|
246
|
+
900: "#4c1d95",
|
|
247
|
+
950: "#2e1065"
|
|
248
|
+
},
|
|
249
|
+
purple: {
|
|
250
|
+
50: "#faf5ff",
|
|
251
|
+
100: "#f3e8ff",
|
|
252
|
+
200: "#e9d5ff",
|
|
253
|
+
300: "#d8b4fe",
|
|
254
|
+
400: "#c084fc",
|
|
255
|
+
500: "#a855f7",
|
|
256
|
+
600: "#9333ea",
|
|
257
|
+
700: "#7e22ce",
|
|
258
|
+
800: "#6b21a8",
|
|
259
|
+
900: "#581c87",
|
|
260
|
+
950: "#3b0764"
|
|
261
|
+
},
|
|
262
|
+
fuchsia: {
|
|
263
|
+
50: "#fdf4ff",
|
|
264
|
+
100: "#fae8ff",
|
|
265
|
+
200: "#f5d0fe",
|
|
266
|
+
300: "#f0abfc",
|
|
267
|
+
400: "#e879f9",
|
|
268
|
+
500: "#d946ef",
|
|
269
|
+
600: "#c026d3",
|
|
270
|
+
700: "#a21caf",
|
|
271
|
+
800: "#86198f",
|
|
272
|
+
900: "#701a75",
|
|
273
|
+
950: "#4a044e"
|
|
274
|
+
},
|
|
275
|
+
pink: {
|
|
276
|
+
50: "#fdf2f8",
|
|
277
|
+
100: "#fce7f3",
|
|
278
|
+
200: "#fbcfe8",
|
|
279
|
+
300: "#f9a8d4",
|
|
280
|
+
400: "#f472b6",
|
|
281
|
+
500: "#ec4899",
|
|
282
|
+
600: "#db2777",
|
|
283
|
+
700: "#be185d",
|
|
284
|
+
800: "#9d174d",
|
|
285
|
+
900: "#831843",
|
|
286
|
+
950: "#500724"
|
|
287
|
+
},
|
|
288
|
+
rose: {
|
|
289
|
+
50: "#fff1f2",
|
|
290
|
+
100: "#ffe4e6",
|
|
291
|
+
200: "#fecdd3",
|
|
292
|
+
300: "#fda4af",
|
|
293
|
+
400: "#fb7185",
|
|
294
|
+
500: "#f43f5e",
|
|
295
|
+
600: "#e11d48",
|
|
296
|
+
700: "#be123c",
|
|
297
|
+
800: "#9f1239",
|
|
298
|
+
900: "#881337",
|
|
299
|
+
950: "#4c0519"
|
|
300
|
+
}
|
|
301
|
+
};
|
|
11
302
|
const udsLightColors = flattenSpectrumToRgbRecord(lightSpectrum);
|
|
12
303
|
/**
|
|
13
304
|
* Iterates the two-level spectrum structure directly instead of using
|
|
@@ -54,13 +345,7 @@ const getClosestUdsColor = (targetColor) => {
|
|
|
54
345
|
function getTailwindAsUdsColors() {
|
|
55
346
|
const tailwindColorsAsUds = {};
|
|
56
347
|
/** Avoid logging deprecation warnings */
|
|
57
|
-
|
|
58
|
-
delete tailwindColorsConfig["warmGray"];
|
|
59
|
-
delete tailwindColorsConfig["trueGray"];
|
|
60
|
-
delete tailwindColorsConfig["coolGray"];
|
|
61
|
-
delete tailwindColorsConfig["blueGray"];
|
|
62
|
-
for (const [name, colorOrConfig] of entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") if (name === "lightBlue" || name === "warmGray" || name === "trueGray" || name === "coolGray" || name === "blueGray") continue;
|
|
63
|
-
else {
|
|
348
|
+
for (const [name, colorOrConfig] of entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") {
|
|
64
349
|
for (const [shade, color] of entries(colorOrConfig)) {
|
|
65
350
|
if (!tailwindColorsAsUds[name]) tailwindColorsAsUds[name] = {};
|
|
66
351
|
tailwindColorsAsUds[name][shade] = getClosestUdsColor(color);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
node_path = require_runtime.__toESM(node_path);
|
|
5
|
+
let node_fs = require("node:fs");
|
|
6
|
+
node_fs = require_runtime.__toESM(node_fs);
|
|
7
|
+
|
|
8
|
+
//#region ../tailwind/dist/utils/entryPoints.js
|
|
9
|
+
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
10
|
+
const ALLOWED_ENTRY_FILE_EXTENSIONS = [".tsx"];
|
|
11
|
+
const DEFAULT_ENTRY = "./src";
|
|
12
|
+
const getAllowedEntryFileGlobPatterns = (prefix = "**/*") => ALLOWED_ENTRY_FILE_EXTENSIONS.map((extension) => `${prefix}${extension}`);
|
|
13
|
+
const hasAllowedEntryFileExtension = (entryPath) => ALLOWED_ENTRY_FILE_EXTENSIONS.includes(node_path.default.extname(entryPath));
|
|
14
|
+
const stripAllowedEntryFileExtension = (entryPath) => {
|
|
15
|
+
const extension = ALLOWED_ENTRY_FILE_EXTENSIONS.find((candidate) => entryPath.endsWith(candidate));
|
|
16
|
+
return extension ? entryPath.slice(0, -extension.length) : entryPath;
|
|
17
|
+
};
|
|
18
|
+
const formatAllowedEntryFileExtensions = () => ALLOWED_ENTRY_FILE_EXTENSIONS.join(", ");
|
|
19
|
+
const createUnsupportedEntryExtensionError = (entryPath) => /* @__PURE__ */ new Error(`Unsupported entry file extension for ${entryPath}. File entries must use one of: ${formatAllowedEntryFileExtensions()}.`);
|
|
20
|
+
const createMissingEntryPathError = (entryPath) => /* @__PURE__ */ new Error(`Entry path not found: ${entryPath}.`);
|
|
21
|
+
const isExistingDirectory = (entryPath) => {
|
|
22
|
+
if (!node_fs.default.existsSync(entryPath)) return false;
|
|
23
|
+
return node_fs.default.statSync(entryPath).isDirectory();
|
|
24
|
+
};
|
|
25
|
+
const toAbsoluteEntryPath = (entryPath, workspaceDir) => node_path.default.isAbsolute(entryPath) ? entryPath : node_path.default.join(workspaceDir, entryPath);
|
|
26
|
+
const resolveEntryPath = (entryPath, workspaceDir) => {
|
|
27
|
+
const absolutePath = toAbsoluteEntryPath(entryPath, workspaceDir);
|
|
28
|
+
if (node_fs.default.existsSync(absolutePath)) {
|
|
29
|
+
const stats = node_fs.default.statSync(absolutePath);
|
|
30
|
+
if (stats.isDirectory()) return {
|
|
31
|
+
originalPath: entryPath,
|
|
32
|
+
absolutePath,
|
|
33
|
+
kind: "directory",
|
|
34
|
+
watchDirectory: absolutePath
|
|
35
|
+
};
|
|
36
|
+
if (stats.isFile()) {
|
|
37
|
+
if (!hasAllowedEntryFileExtension(absolutePath)) throw createUnsupportedEntryExtensionError(entryPath);
|
|
38
|
+
return {
|
|
39
|
+
originalPath: entryPath,
|
|
40
|
+
absolutePath,
|
|
41
|
+
kind: "file",
|
|
42
|
+
watchDirectory: node_path.default.dirname(absolutePath),
|
|
43
|
+
fileName: node_path.default.basename(absolutePath)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (node_path.default.extname(entryPath) && isExistingDirectory(node_path.default.dirname(absolutePath)) && !hasAllowedEntryFileExtension(entryPath)) throw createUnsupportedEntryExtensionError(entryPath);
|
|
48
|
+
throw createMissingEntryPathError(entryPath);
|
|
49
|
+
};
|
|
50
|
+
const normalizeEntryPaths = (entry, defaultEntry = DEFAULT_ENTRY) => {
|
|
51
|
+
const normalized = (Array.isArray(entry) ? entry : [entry]).filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
52
|
+
return normalized.length > 0 ? [...new Set(normalized)] : [defaultEntry];
|
|
53
|
+
};
|
|
54
|
+
const formatEntryValue = (entry) => Array.isArray(entry) ? `[${entry.map((value) => `'${value}'`).join(", ")}]` : `'${entry}'`;
|
|
55
|
+
const resolveEntryPaths = (entry, workspaceDir, defaultEntry = DEFAULT_ENTRY) => normalizeEntryPaths(entry, defaultEntry).map((entryPath) => resolveEntryPath(entryPath, workspaceDir));
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
exports.DEFAULT_ENTRY = DEFAULT_ENTRY;
|
|
59
|
+
exports.formatEntryValue = formatEntryValue;
|
|
60
|
+
exports.getAllowedEntryFileGlobPatterns = getAllowedEntryFileGlobPatterns;
|
|
61
|
+
exports.hasAllowedEntryFileExtension = hasAllowedEntryFileExtension;
|
|
62
|
+
exports.resolveEntryPaths = resolveEntryPaths;
|
|
63
|
+
exports.stripAllowedEntryFileExtension = stripAllowedEntryFileExtension;
|