@yahoo/uds 3.147.0-beta.1 → 3.147.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/cli/commands/sync.cjs +13 -13
- package/dist/cli/commands/sync.js +13 -13
- package/dist/css/dist/packages/fixtures/dist/index.cjs +14 -0
- package/dist/css/dist/packages/fixtures/dist/index.js +14 -0
- package/dist/fixtures/dist/index.cjs +8 -1
- package/dist/fixtures/dist/index.d.cts +1 -1
- package/dist/fixtures/dist/index.d.ts +1 -1
- package/dist/fixtures/dist/index.js +8 -1
- package/dist/styles/styler.d.cts +43 -43
- package/dist/styles/styler.d.ts +43 -43
- package/dist/tailwind/utils/index.d.cts +2 -2
- package/dist/tailwind/utils/index.d.ts +2 -2
- package/dist/tailwind-internal/dist/base/addFontFaceDeclarations.cjs +2 -2
- package/dist/tailwind-internal/dist/base/addFontFaceDeclarations.js +2 -2
- package/dist/tailwind-internal/dist/base/addFontVars.cjs +2 -2
- package/dist/tailwind-internal/dist/base/addFontVars.js +2 -2
- package/dist/tailwind-internal/dist/index.d.cts +1 -1
- package/dist/tailwind-internal/dist/index.d.ts +1 -1
- package/dist/tailwind-internal/dist/packages/fixtures/dist/index.cjs +14 -0
- package/dist/tailwind-internal/dist/packages/fixtures/dist/index.js +14 -0
- package/dist/tailwind-internal/dist/plugins/typography.cjs +3 -3
- package/dist/tailwind-internal/dist/plugins/typography.js +3 -3
- package/dist/tailwind-internal/dist/utils/addFontsPlugin.cjs +2 -2
- package/dist/tailwind-internal/dist/utils/addFontsPlugin.d.cts +0 -6
- package/dist/tailwind-internal/dist/utils/addFontsPlugin.d.ts +0 -6
- package/dist/tailwind-internal/dist/utils/addFontsPlugin.js +2 -2
- package/dist/tailwind-internal/dist/utils/composeTailwindPlugins.d.cts +0 -7
- package/dist/tailwind-internal/dist/utils/composeTailwindPlugins.d.ts +0 -7
- package/dist/tailwind-internal/dist/utils/getFontFaceDeclarations.cjs +2 -3
- package/dist/tailwind-internal/dist/utils/getFontFaceDeclarations.d.cts +58 -59
- package/dist/tailwind-internal/dist/utils/getFontFaceDeclarations.d.ts +58 -59
- package/dist/tailwind-internal/dist/utils/getFontFaceDeclarations.js +2 -3
- package/dist/tailwind-internal/dist/utils/getFontStyles.cjs +2 -2
- package/dist/tailwind-internal/dist/utils/getFontStyles.d.cts +1 -2
- package/dist/tailwind-internal/dist/utils/getFontStyles.d.ts +1 -2
- package/dist/tailwind-internal/dist/utils/getFontStyles.js +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/uds/generated/componentData.cjs +1595 -1595
- package/dist/uds/generated/componentData.js +1595 -1595
- package/dist/utils/dist/serializeToJS.cjs +72 -0
- package/dist/utils/dist/serializeToJS.js +72 -0
- package/generated/componentData.json +2197 -2197
- package/package.json +1 -1
- package/dist/utils/dist/sortKeys.cjs +0 -21
- package/dist/utils/dist/sortKeys.js +0 -21
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
//#region ../utils/dist/serializeToJS.js
|
|
3
|
+
/*! © 2026 Yahoo, Inc. UDS Utils v0.0.0-development */
|
|
4
|
+
const VALID_IDENTIFIER = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
5
|
+
function escapeString(str) {
|
|
6
|
+
return str.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
7
|
+
}
|
|
8
|
+
function serializeKey(key) {
|
|
9
|
+
if (VALID_IDENTIFIER.test(key)) return key;
|
|
10
|
+
return `'${escapeString(key)}'`;
|
|
11
|
+
}
|
|
12
|
+
const RGB_KEY_ORDER = [
|
|
13
|
+
"type",
|
|
14
|
+
"r",
|
|
15
|
+
"g",
|
|
16
|
+
"b"
|
|
17
|
+
];
|
|
18
|
+
const BREAKPOINT_ORDER = {
|
|
19
|
+
sm: 0,
|
|
20
|
+
md: 1,
|
|
21
|
+
lg: 2,
|
|
22
|
+
xl: 3,
|
|
23
|
+
"2xl": 4
|
|
24
|
+
};
|
|
25
|
+
function isBreakpointObject(keys) {
|
|
26
|
+
return keys.length > 0 && keys.every((k) => k in BREAKPOINT_ORDER);
|
|
27
|
+
}
|
|
28
|
+
function sortObjectKeys(obj) {
|
|
29
|
+
const keys = Object.keys(obj);
|
|
30
|
+
if (obj.type === "rgb") {
|
|
31
|
+
const ordered = RGB_KEY_ORDER.filter((k) => keys.includes(k));
|
|
32
|
+
const remaining = keys.filter((k) => !RGB_KEY_ORDER.includes(k));
|
|
33
|
+
remaining.sort((a, b) => a.localeCompare(b, void 0, { numeric: true }));
|
|
34
|
+
return [...ordered, ...remaining];
|
|
35
|
+
}
|
|
36
|
+
if (isBreakpointObject(keys)) return keys.sort((a, b) => BREAKPOINT_ORDER[a] - BREAKPOINT_ORDER[b]);
|
|
37
|
+
keys.sort((a, b) => a.localeCompare(b, void 0, { numeric: true }));
|
|
38
|
+
if (keys.includes("type")) return ["type", ...keys.filter((k) => k !== "type")];
|
|
39
|
+
return keys;
|
|
40
|
+
}
|
|
41
|
+
function serializeValue(value, indent, baseIndent) {
|
|
42
|
+
if (value === null) return "null";
|
|
43
|
+
switch (typeof value) {
|
|
44
|
+
case "string": return `'${escapeString(value)}'`;
|
|
45
|
+
case "number":
|
|
46
|
+
case "boolean": return String(value);
|
|
47
|
+
}
|
|
48
|
+
const nextIndent = indent + baseIndent;
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
if (value.length === 0) return "[]";
|
|
51
|
+
return `[\n${value.map((item) => `${nextIndent}${serializeValue(item, nextIndent, baseIndent)},`).join("\n")}\n${indent}]`;
|
|
52
|
+
}
|
|
53
|
+
const obj = value;
|
|
54
|
+
const keys = sortObjectKeys(obj);
|
|
55
|
+
if (keys.length === 0) return "{}";
|
|
56
|
+
return `{\n${keys.map((key) => `${nextIndent}${serializeKey(key)}: ${serializeValue(obj[key], nextIndent, baseIndent)},`).join("\n")}\n${indent}}`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Serializes a JSON-serializable value to JS source code with:
|
|
60
|
+
* - Single quotes for strings
|
|
61
|
+
* - Trailing commas on every property and array element
|
|
62
|
+
* - 2-space indentation
|
|
63
|
+
* - Alphabetically sorted object keys at all nesting levels
|
|
64
|
+
*
|
|
65
|
+
* The output matches the repo's Prettier config (singleQuote, trailingComma: "all")
|
|
66
|
+
* so that running Prettier on the result is a no-op.
|
|
67
|
+
*/
|
|
68
|
+
function serializeToJS(value) {
|
|
69
|
+
return serializeValue(value, "", " ");
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
exports.serializeToJS = serializeToJS;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
//#region ../utils/dist/serializeToJS.js
|
|
3
|
+
/*! © 2026 Yahoo, Inc. UDS Utils v0.0.0-development */
|
|
4
|
+
const VALID_IDENTIFIER = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
5
|
+
function escapeString(str) {
|
|
6
|
+
return str.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
7
|
+
}
|
|
8
|
+
function serializeKey(key) {
|
|
9
|
+
if (VALID_IDENTIFIER.test(key)) return key;
|
|
10
|
+
return `'${escapeString(key)}'`;
|
|
11
|
+
}
|
|
12
|
+
const RGB_KEY_ORDER = [
|
|
13
|
+
"type",
|
|
14
|
+
"r",
|
|
15
|
+
"g",
|
|
16
|
+
"b"
|
|
17
|
+
];
|
|
18
|
+
const BREAKPOINT_ORDER = {
|
|
19
|
+
sm: 0,
|
|
20
|
+
md: 1,
|
|
21
|
+
lg: 2,
|
|
22
|
+
xl: 3,
|
|
23
|
+
"2xl": 4
|
|
24
|
+
};
|
|
25
|
+
function isBreakpointObject(keys) {
|
|
26
|
+
return keys.length > 0 && keys.every((k) => k in BREAKPOINT_ORDER);
|
|
27
|
+
}
|
|
28
|
+
function sortObjectKeys(obj) {
|
|
29
|
+
const keys = Object.keys(obj);
|
|
30
|
+
if (obj.type === "rgb") {
|
|
31
|
+
const ordered = RGB_KEY_ORDER.filter((k) => keys.includes(k));
|
|
32
|
+
const remaining = keys.filter((k) => !RGB_KEY_ORDER.includes(k));
|
|
33
|
+
remaining.sort((a, b) => a.localeCompare(b, void 0, { numeric: true }));
|
|
34
|
+
return [...ordered, ...remaining];
|
|
35
|
+
}
|
|
36
|
+
if (isBreakpointObject(keys)) return keys.sort((a, b) => BREAKPOINT_ORDER[a] - BREAKPOINT_ORDER[b]);
|
|
37
|
+
keys.sort((a, b) => a.localeCompare(b, void 0, { numeric: true }));
|
|
38
|
+
if (keys.includes("type")) return ["type", ...keys.filter((k) => k !== "type")];
|
|
39
|
+
return keys;
|
|
40
|
+
}
|
|
41
|
+
function serializeValue(value, indent, baseIndent) {
|
|
42
|
+
if (value === null) return "null";
|
|
43
|
+
switch (typeof value) {
|
|
44
|
+
case "string": return `'${escapeString(value)}'`;
|
|
45
|
+
case "number":
|
|
46
|
+
case "boolean": return String(value);
|
|
47
|
+
}
|
|
48
|
+
const nextIndent = indent + baseIndent;
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
if (value.length === 0) return "[]";
|
|
51
|
+
return `[\n${value.map((item) => `${nextIndent}${serializeValue(item, nextIndent, baseIndent)},`).join("\n")}\n${indent}]`;
|
|
52
|
+
}
|
|
53
|
+
const obj = value;
|
|
54
|
+
const keys = sortObjectKeys(obj);
|
|
55
|
+
if (keys.length === 0) return "{}";
|
|
56
|
+
return `{\n${keys.map((key) => `${nextIndent}${serializeKey(key)}: ${serializeValue(obj[key], nextIndent, baseIndent)},`).join("\n")}\n${indent}}`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Serializes a JSON-serializable value to JS source code with:
|
|
60
|
+
* - Single quotes for strings
|
|
61
|
+
* - Trailing commas on every property and array element
|
|
62
|
+
* - 2-space indentation
|
|
63
|
+
* - Alphabetically sorted object keys at all nesting levels
|
|
64
|
+
*
|
|
65
|
+
* The output matches the repo's Prettier config (singleQuote, trailingComma: "all")
|
|
66
|
+
* so that running Prettier on the result is a no-op.
|
|
67
|
+
*/
|
|
68
|
+
function serializeToJS(value) {
|
|
69
|
+
return serializeValue(value, "", " ");
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { serializeToJS };
|