@yahoo/uds-create-cli 5.99.3 → 5.100.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/package.json +11 -11
- package/subprocess/transform-runner.mjs +442 -415
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yahoo/uds-create-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.100.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
33
33
|
"@orpc/client": "^1.13.9",
|
|
34
34
|
"@orpc/contract": "^1.13.9",
|
|
35
|
-
"@yahoo/uds-create-config": "5.
|
|
36
|
-
"@yahoo/uds-create-loader": "5.
|
|
37
|
-
"@yahoo/uds-create-types": "5.
|
|
38
|
-
"@yahoo/uds-create-utils": "5.
|
|
35
|
+
"@yahoo/uds-create-config": "5.100.0",
|
|
36
|
+
"@yahoo/uds-create-loader": "5.100.0",
|
|
37
|
+
"@yahoo/uds-create-types": "5.100.0",
|
|
38
|
+
"@yahoo/uds-create-utils": "5.100.0",
|
|
39
39
|
"esbuild": "^0.27.4",
|
|
40
40
|
"ts-morph": "^27.0.2",
|
|
41
41
|
"get-tsconfig": "^4.10.0",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
},
|
|
55
55
|
"udsSchemaVersion": 20261113131930,
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@yahoo/uds-create-cli-darwin-arm64": "5.
|
|
58
|
-
"@yahoo/uds-create-cli-darwin-x64": "5.
|
|
59
|
-
"@yahoo/uds-create-cli-linux-arm64": "5.
|
|
60
|
-
"@yahoo/uds-create-cli-linux-x64": "5.
|
|
61
|
-
"@yahoo/uds-create-cli-linux-arm64-musl": "5.
|
|
62
|
-
"@yahoo/uds-create-cli-linux-x64-musl": "5.
|
|
57
|
+
"@yahoo/uds-create-cli-darwin-arm64": "5.100.0",
|
|
58
|
+
"@yahoo/uds-create-cli-darwin-x64": "5.100.0",
|
|
59
|
+
"@yahoo/uds-create-cli-linux-arm64": "5.100.0",
|
|
60
|
+
"@yahoo/uds-create-cli-linux-x64": "5.100.0",
|
|
61
|
+
"@yahoo/uds-create-cli-linux-arm64-musl": "5.100.0",
|
|
62
|
+
"@yahoo/uds-create-cli-linux-x64-musl": "5.100.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -73682,191 +73682,6 @@ function moduleViewOf(config2) {
|
|
|
73682
73682
|
return links.get(config2);
|
|
73683
73683
|
}
|
|
73684
73684
|
|
|
73685
|
-
// ../config/dist/entities/system/Font.js
|
|
73686
|
-
var FontFileDefinition = defineSubEntity({
|
|
73687
|
-
name: "file",
|
|
73688
|
-
label: "Font file",
|
|
73689
|
-
labelPlural: "Files",
|
|
73690
|
-
fields: external_exports.object({
|
|
73691
|
-
src: external_exports.string(),
|
|
73692
|
-
format: external_exports.string().optional(),
|
|
73693
|
-
/** `400`, or a RANGE (`'100 900'`) for a variable font's single file. */
|
|
73694
|
-
weight: external_exports.union([external_exports.number(), external_exports.string()]).refine(isFontFaceWeight, { error: "an `@font-face` font-weight: `auto`, `normal`, `bold`, or a number from 1 to 1000, or two of those as a range (`100 900`)." }).optional(),
|
|
73695
|
-
style: external_exports.string().refine(isFontFaceStyle, { error: "an `@font-face` font-style: `auto`, `normal`, `italic`, or `oblique` with up to two angles (`oblique 10deg`)." }).optional(),
|
|
73696
|
-
postscriptName: external_exports.string().optional()
|
|
73697
|
-
})
|
|
73698
|
-
});
|
|
73699
|
-
var FONT_WEIGHT_PART = /^(normal|bold|\d+(\.\d+)?)$/i;
|
|
73700
|
-
var FONT_STYLE = /^(auto|normal|italic|oblique(\s+-?\d+(\.\d+)?deg){0,2})$/i;
|
|
73701
|
-
function isFontFaceWeight(value) {
|
|
73702
|
-
const text = String(value).trim();
|
|
73703
|
-
if (/^auto$/i.test(text)) return true;
|
|
73704
|
-
const parts = text.split(/\s+/);
|
|
73705
|
-
return parts.length <= 2 && parts.every((part) => {
|
|
73706
|
-
if (!FONT_WEIGHT_PART.test(part)) return false;
|
|
73707
|
-
const number5 = Number(part);
|
|
73708
|
-
return Number.isNaN(number5) || number5 >= 1 && number5 <= 1e3;
|
|
73709
|
-
});
|
|
73710
|
-
}
|
|
73711
|
-
function isFontFaceStyle(value) {
|
|
73712
|
-
return FONT_STYLE.test(value.trim());
|
|
73713
|
-
}
|
|
73714
|
-
var FontFile = FontFileDefinition;
|
|
73715
|
-
var Font = defineEntity({
|
|
73716
|
-
kind: "font",
|
|
73717
|
-
label: "Font",
|
|
73718
|
-
labelPlural: "Fonts",
|
|
73719
|
-
fields: external_exports.strictObject({
|
|
73720
|
-
/** The CSS-facing family name (`'YA Sans'`) — required; a family without one can't be used. */
|
|
73721
|
-
fontFamily: external_exports.string().describe("The CSS family name, such as `'YA Sans'`."),
|
|
73722
|
-
/** One entry per font file. */
|
|
73723
|
-
files: FontFile.optional().describe("One entry per font file, keyed by any name (`'400-normal'`)."),
|
|
73724
|
-
/** Families to fall back to after this one, for a `font-family` stack. */
|
|
73725
|
-
fallbackStack: external_exports.array(external_exports.string()).optional().describe("Families to fall back to, in order."),
|
|
73726
|
-
/**
|
|
73727
|
-
* A CSS custom property the HOST publishes the loaded face's family under — `next/font`'s
|
|
73728
|
-
* `variable` option (`--uds-font-family-inter`), or any loader that hands the page a variable
|
|
73729
|
-
* rather than a `@font-face`. When set, the family's stack reads the property first and falls
|
|
73730
|
-
* back to the family by name: `var(--uds-font-family-inter, "Inter", ui-sans-serif, …)`. That
|
|
73731
|
-
* is how a token can be `Font.ref(…)` to such a family and still render the host's face, whose
|
|
73732
|
-
* real family name (`__Inter_a1b2c3`) nothing in a config can know.
|
|
73733
|
-
*/
|
|
73734
|
-
variable: external_exports.string().regex(/^--[A-Za-z0-9_-]+$/, "a CSS custom property name: `--name`").optional().describe("A CSS custom property the host publishes the loaded face under, such as `next/font`'s `variable`. Must look like `--name`."),
|
|
73735
|
-
/** Set explicitly; otherwise inferred from a file declaring a weight RANGE. */
|
|
73736
|
-
isVariableFont: external_exports.boolean().optional().describe("Set explicitly, or inferred from a file that declares a weight range.")
|
|
73737
|
-
}),
|
|
73738
|
-
groupFields: external_exports.strictObject({ version: external_exports.string().optional().describe("The version of the family the group ships.") }),
|
|
73739
|
-
subEntities: { files: FontFile }
|
|
73740
|
-
});
|
|
73741
|
-
function cssString(value) {
|
|
73742
|
-
return `"${value.replace(/["\\\n\r\f<]/g, (char) => char === '"' || char === "\\" ? `\\${char}` : `\\${char.charCodeAt(0).toString(16)} `)}"`;
|
|
73743
|
-
}
|
|
73744
|
-
function fontFamilyStack(font) {
|
|
73745
|
-
const family = cssString(font.fontFamily.replace(/^['"]|['"]$/g, ""));
|
|
73746
|
-
const fallbacks = (font.fallbackStack ?? []).map((name) => name.trim()).filter((name) => name.length > 0);
|
|
73747
|
-
const named = fallbacks.length > 0 ? `${family}, ${fallbacks.join(", ")}` : family;
|
|
73748
|
-
return font.variable ? `var(${font.variable}, ${named})` : named;
|
|
73749
|
-
}
|
|
73750
|
-
|
|
73751
|
-
// ../config/dist/entities/system/linked-flex-values.js
|
|
73752
|
-
var nativeFlexValue = external_exports.strictObject({
|
|
73753
|
-
flexGrow: external_exports.number().nonnegative(),
|
|
73754
|
-
flexShrink: external_exports.number().nonnegative(),
|
|
73755
|
-
flexBasis: external_exports.union([
|
|
73756
|
-
external_exports.number().nonnegative(),
|
|
73757
|
-
external_exports.literal("auto"),
|
|
73758
|
-
external_exports.string().regex(/^(?:\d+(?:\.\d+)?|\.\d+)%$/)
|
|
73759
|
-
])
|
|
73760
|
-
});
|
|
73761
|
-
function isNativeFlexValue(value) {
|
|
73762
|
-
return typeof value === "object" && value !== null && "flexGrow" in value && nativeFlexValue.safeParse(value).success;
|
|
73763
|
-
}
|
|
73764
|
-
var NUMBER2 = /^(?:\d+(?:\.\d+)?|\.\d+)$/;
|
|
73765
|
-
function webFlexToNative(value, remBase) {
|
|
73766
|
-
const text = String(value).trim();
|
|
73767
|
-
if (text === "none") return {
|
|
73768
|
-
flexGrow: 0,
|
|
73769
|
-
flexShrink: 0,
|
|
73770
|
-
flexBasis: "auto"
|
|
73771
|
-
};
|
|
73772
|
-
if (text === "auto") return {
|
|
73773
|
-
flexGrow: 1,
|
|
73774
|
-
flexShrink: 1,
|
|
73775
|
-
flexBasis: "auto"
|
|
73776
|
-
};
|
|
73777
|
-
if (text === "initial") return {
|
|
73778
|
-
flexGrow: 0,
|
|
73779
|
-
flexShrink: 1,
|
|
73780
|
-
flexBasis: "auto"
|
|
73781
|
-
};
|
|
73782
|
-
const parts = text.split(/\s+/);
|
|
73783
|
-
let grow = 1;
|
|
73784
|
-
let shrink = 1;
|
|
73785
|
-
let basis = "0%";
|
|
73786
|
-
if (parts.length <= 3 && NUMBER2.test(parts[0] ?? "")) {
|
|
73787
|
-
grow = Number(parts.shift());
|
|
73788
|
-
if (parts.length && NUMBER2.test(parts[0] ?? "")) shrink = Number(parts.shift());
|
|
73789
|
-
if (parts.length === 1) basis = parts.shift() ?? "";
|
|
73790
|
-
} else if (parts.length === 1) basis = parts.shift() ?? "";
|
|
73791
|
-
if (parts.length === 0) {
|
|
73792
|
-
if (basis === "auto" || /^(?:\d+(?:\.\d+)?|\.\d+)%$/.test(basis)) return {
|
|
73793
|
-
flexGrow: grow,
|
|
73794
|
-
flexShrink: shrink,
|
|
73795
|
-
flexBasis: basis
|
|
73796
|
-
};
|
|
73797
|
-
const length = /^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(basis);
|
|
73798
|
-
if (length && (length[2] || Number(length[1]) === 0)) {
|
|
73799
|
-
if (length[2] !== "rem" || remBase !== void 0) return {
|
|
73800
|
-
flexGrow: grow,
|
|
73801
|
-
flexShrink: shrink,
|
|
73802
|
-
flexBasis: Number(length[1]) * (length[2] === "rem" ? remBase : 1)
|
|
73803
|
-
};
|
|
73804
|
-
}
|
|
73805
|
-
}
|
|
73806
|
-
throw new Error(`[uds] Cannot translate Web flex ${JSON.stringify(value)} to native. Use none, auto, initial, or numeric grow/shrink with an auto, percentage, px, or fixed-rem basis.`);
|
|
73807
|
-
}
|
|
73808
|
-
function nativeFlexToWeb(value) {
|
|
73809
|
-
const { flexGrow, flexShrink, flexBasis } = typeof value !== "number" ? value : value > 0 ? {
|
|
73810
|
-
flexGrow: value,
|
|
73811
|
-
flexShrink: 0,
|
|
73812
|
-
flexBasis: 0
|
|
73813
|
-
} : {
|
|
73814
|
-
flexGrow: 0,
|
|
73815
|
-
flexShrink: -value,
|
|
73816
|
-
flexBasis: "auto"
|
|
73817
|
-
};
|
|
73818
|
-
return `${flexGrow} ${flexShrink} ${typeof flexBasis === "number" ? `${flexBasis}px` : flexBasis}`;
|
|
73819
|
-
}
|
|
73820
|
-
|
|
73821
|
-
// ../config/dist/entities/system/linked-line-height-values.js
|
|
73822
|
-
var relativeLineHeightValue = external_exports.strictObject({ fontSizeMultiplier: external_exports.number().nonnegative() });
|
|
73823
|
-
function isRelativeLineHeightValue(value) {
|
|
73824
|
-
return typeof value === "object" && value !== null && "fontSizeMultiplier" in value && relativeLineHeightValue.safeParse(value).success;
|
|
73825
|
-
}
|
|
73826
|
-
function webLineHeightToNative(value, remBase) {
|
|
73827
|
-
if (typeof value === "number" && Number.isFinite(value) && value >= 0) return { fontSizeMultiplier: value };
|
|
73828
|
-
const text = String(value).trim();
|
|
73829
|
-
const match = /^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(text);
|
|
73830
|
-
if (match && Number.isFinite(Number(match[1]))) {
|
|
73831
|
-
const number5 = Number(match[1]);
|
|
73832
|
-
if (!match[2]) return { fontSizeMultiplier: number5 };
|
|
73833
|
-
if (match[2] === "px") return number5;
|
|
73834
|
-
if (remBase !== void 0) return number5 * remBase;
|
|
73835
|
-
}
|
|
73836
|
-
throw new Error(`[uds] Cannot translate Web line-height ${JSON.stringify(value)} to native. Use a non-negative ratio, a px length, or a rem length with a fixed root font size.`);
|
|
73837
|
-
}
|
|
73838
|
-
function nativeLineHeightToWeb(value) {
|
|
73839
|
-
return isRelativeLineHeightValue(value) ? value.fontSizeMultiplier : `${value}px`;
|
|
73840
|
-
}
|
|
73841
|
-
|
|
73842
|
-
// ../config/dist/css/value-type.js
|
|
73843
|
-
function isLengthUnit(unit) {
|
|
73844
|
-
return LENGTH_UNITS2.includes(unit);
|
|
73845
|
-
}
|
|
73846
|
-
var LENGTH_UNITS2 = [
|
|
73847
|
-
"ch",
|
|
73848
|
-
"cm",
|
|
73849
|
-
"dvh",
|
|
73850
|
-
"dvw",
|
|
73851
|
-
"em",
|
|
73852
|
-
"ex",
|
|
73853
|
-
"in",
|
|
73854
|
-
"lvh",
|
|
73855
|
-
"lvw",
|
|
73856
|
-
"mm",
|
|
73857
|
-
"pc",
|
|
73858
|
-
"pt",
|
|
73859
|
-
"px",
|
|
73860
|
-
"q",
|
|
73861
|
-
"rem",
|
|
73862
|
-
"svh",
|
|
73863
|
-
"svw",
|
|
73864
|
-
"vh",
|
|
73865
|
-
"vmax",
|
|
73866
|
-
"vmin",
|
|
73867
|
-
"vw"
|
|
73868
|
-
];
|
|
73869
|
-
|
|
73870
73685
|
// ../../node_modules/css-tree/lib/utils/List.js
|
|
73871
73686
|
var releasedCursors = null;
|
|
73872
73687
|
var List = class _List {
|
|
@@ -74206,71 +74021,6 @@ var List = class _List {
|
|
|
74206
74021
|
}
|
|
74207
74022
|
};
|
|
74208
74023
|
|
|
74209
|
-
// ../../node_modules/css-tree/lib/utils/create-custom-error.js
|
|
74210
|
-
function createCustomError(name, message) {
|
|
74211
|
-
const error61 = Object.create(SyntaxError.prototype);
|
|
74212
|
-
const errorStack = new Error();
|
|
74213
|
-
return Object.assign(error61, {
|
|
74214
|
-
name,
|
|
74215
|
-
message,
|
|
74216
|
-
get stack() {
|
|
74217
|
-
return (errorStack.stack || "").replace(/^(.+\n){1,3}/, `${name}: ${message}
|
|
74218
|
-
`);
|
|
74219
|
-
}
|
|
74220
|
-
});
|
|
74221
|
-
}
|
|
74222
|
-
|
|
74223
|
-
// ../../node_modules/css-tree/lib/parser/SyntaxError.js
|
|
74224
|
-
var MAX_LINE_LENGTH = 100;
|
|
74225
|
-
var OFFSET_CORRECTION = 60;
|
|
74226
|
-
var TAB_REPLACEMENT = " ";
|
|
74227
|
-
function sourceFragment({ source, line, column, baseLine, baseColumn }, extraLines) {
|
|
74228
|
-
function processLines(start, end) {
|
|
74229
|
-
return lines.slice(start, end).map(
|
|
74230
|
-
(line2, idx) => String(start + idx + 1).padStart(maxNumLength) + " |" + line2
|
|
74231
|
-
).join("\n");
|
|
74232
|
-
}
|
|
74233
|
-
const prelines = "\n".repeat(Math.max(baseLine - 1, 0));
|
|
74234
|
-
const precolumns = " ".repeat(Math.max(baseColumn - 1, 0));
|
|
74235
|
-
const lines = (prelines + precolumns + source).split(/\r\n?|\n|\f/);
|
|
74236
|
-
const startLine = Math.max(1, line - extraLines) - 1;
|
|
74237
|
-
const endLine = Math.min(line + extraLines, lines.length + 1);
|
|
74238
|
-
const maxNumLength = Math.max(4, String(endLine).length) + 1;
|
|
74239
|
-
let cutLeft = 0;
|
|
74240
|
-
column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length;
|
|
74241
|
-
if (column > MAX_LINE_LENGTH) {
|
|
74242
|
-
cutLeft = column - OFFSET_CORRECTION + 3;
|
|
74243
|
-
column = OFFSET_CORRECTION - 2;
|
|
74244
|
-
}
|
|
74245
|
-
for (let i = startLine; i <= endLine; i++) {
|
|
74246
|
-
if (i >= 0 && i < lines.length) {
|
|
74247
|
-
lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
|
|
74248
|
-
lines[i] = (cutLeft > 0 && lines[i].length > cutLeft ? "\u2026" : "") + lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) + (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? "\u2026" : "");
|
|
74249
|
-
}
|
|
74250
|
-
}
|
|
74251
|
-
return [
|
|
74252
|
-
processLines(startLine, line),
|
|
74253
|
-
new Array(column + maxNumLength + 2).join("-") + "^",
|
|
74254
|
-
processLines(line, endLine)
|
|
74255
|
-
].filter(Boolean).join("\n").replace(/^(\s+\d+\s+\|\n)+/, "").replace(/\n(\s+\d+\s+\|)+$/, "");
|
|
74256
|
-
}
|
|
74257
|
-
function SyntaxError2(message, source, offset, line, column, baseLine = 1, baseColumn = 1) {
|
|
74258
|
-
const error61 = Object.assign(createCustomError("SyntaxError", message), {
|
|
74259
|
-
source,
|
|
74260
|
-
offset,
|
|
74261
|
-
line,
|
|
74262
|
-
column,
|
|
74263
|
-
sourceFragment(extraLines) {
|
|
74264
|
-
return sourceFragment({ source, line, column, baseLine, baseColumn }, isNaN(extraLines) ? 0 : extraLines);
|
|
74265
|
-
},
|
|
74266
|
-
get formattedMessage() {
|
|
74267
|
-
return `Parse error: ${message}
|
|
74268
|
-
` + sourceFragment({ source, line, column, baseLine, baseColumn }, 2);
|
|
74269
|
-
}
|
|
74270
|
-
});
|
|
74271
|
-
return error61;
|
|
74272
|
-
}
|
|
74273
|
-
|
|
74274
74024
|
// ../../node_modules/css-tree/lib/tokenizer/types.js
|
|
74275
74025
|
var types_exports = {};
|
|
74276
74026
|
__export(types_exports, {
|
|
@@ -75245,8 +74995,429 @@ function tokenize(source, onToken) {
|
|
|
75245
74995
|
type = Delim;
|
|
75246
74996
|
offset++;
|
|
75247
74997
|
}
|
|
75248
|
-
onToken(type, start, start = offset);
|
|
74998
|
+
onToken(type, start, start = offset);
|
|
74999
|
+
}
|
|
75000
|
+
}
|
|
75001
|
+
|
|
75002
|
+
// ../../node_modules/css-tree/lib/utils/names.js
|
|
75003
|
+
var HYPHENMINUS = 45;
|
|
75004
|
+
function isCustomProperty(str, offset) {
|
|
75005
|
+
offset = offset || 0;
|
|
75006
|
+
return str.length - offset >= 2 && str.charCodeAt(offset) === HYPHENMINUS && str.charCodeAt(offset + 1) === HYPHENMINUS;
|
|
75007
|
+
}
|
|
75008
|
+
|
|
75009
|
+
// ../../node_modules/css-tree/lib/utils/string.js
|
|
75010
|
+
var string_exports = {};
|
|
75011
|
+
__export(string_exports, {
|
|
75012
|
+
decode: () => decode3,
|
|
75013
|
+
encode: () => encode3
|
|
75014
|
+
});
|
|
75015
|
+
var REVERSE_SOLIDUS = 92;
|
|
75016
|
+
var QUOTATION_MARK = 34;
|
|
75017
|
+
var APOSTROPHE = 39;
|
|
75018
|
+
function decode3(str) {
|
|
75019
|
+
const len = str.length;
|
|
75020
|
+
const firstChar = str.charCodeAt(0);
|
|
75021
|
+
const start = firstChar === QUOTATION_MARK || firstChar === APOSTROPHE ? 1 : 0;
|
|
75022
|
+
const end = start === 1 && len > 1 && str.charCodeAt(len - 1) === firstChar ? len - 2 : len - 1;
|
|
75023
|
+
let decoded = "";
|
|
75024
|
+
for (let i = start; i <= end; i++) {
|
|
75025
|
+
let code2 = str.charCodeAt(i);
|
|
75026
|
+
if (code2 === REVERSE_SOLIDUS) {
|
|
75027
|
+
if (i === end) {
|
|
75028
|
+
if (i !== len - 1) {
|
|
75029
|
+
decoded = str.substr(i + 1);
|
|
75030
|
+
}
|
|
75031
|
+
break;
|
|
75032
|
+
}
|
|
75033
|
+
code2 = str.charCodeAt(++i);
|
|
75034
|
+
if (isValidEscape(REVERSE_SOLIDUS, code2)) {
|
|
75035
|
+
const escapeStart = i - 1;
|
|
75036
|
+
const escapeEnd = consumeEscaped(str, escapeStart);
|
|
75037
|
+
i = escapeEnd - 1;
|
|
75038
|
+
decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
|
|
75039
|
+
} else {
|
|
75040
|
+
if (code2 === 13 && str.charCodeAt(i + 1) === 10) {
|
|
75041
|
+
i++;
|
|
75042
|
+
}
|
|
75043
|
+
}
|
|
75044
|
+
} else {
|
|
75045
|
+
decoded += str[i];
|
|
75046
|
+
}
|
|
75047
|
+
}
|
|
75048
|
+
return decoded;
|
|
75049
|
+
}
|
|
75050
|
+
function encode3(str, apostrophe) {
|
|
75051
|
+
const quote = apostrophe ? "'" : '"';
|
|
75052
|
+
const quoteCode = apostrophe ? APOSTROPHE : QUOTATION_MARK;
|
|
75053
|
+
let encoded = "";
|
|
75054
|
+
let wsBeforeHexIsNeeded = false;
|
|
75055
|
+
for (let i = 0; i < str.length; i++) {
|
|
75056
|
+
const code2 = str.charCodeAt(i);
|
|
75057
|
+
if (code2 === 0) {
|
|
75058
|
+
encoded += "\uFFFD";
|
|
75059
|
+
continue;
|
|
75060
|
+
}
|
|
75061
|
+
if (code2 <= 31 || code2 === 127) {
|
|
75062
|
+
encoded += "\\" + code2.toString(16);
|
|
75063
|
+
wsBeforeHexIsNeeded = true;
|
|
75064
|
+
continue;
|
|
75065
|
+
}
|
|
75066
|
+
if (code2 === quoteCode || code2 === REVERSE_SOLIDUS) {
|
|
75067
|
+
encoded += "\\" + str.charAt(i);
|
|
75068
|
+
wsBeforeHexIsNeeded = false;
|
|
75069
|
+
} else {
|
|
75070
|
+
if (wsBeforeHexIsNeeded && (isHexDigit(code2) || isWhiteSpace(code2))) {
|
|
75071
|
+
encoded += " ";
|
|
75072
|
+
}
|
|
75073
|
+
encoded += str.charAt(i);
|
|
75074
|
+
wsBeforeHexIsNeeded = false;
|
|
75075
|
+
}
|
|
75076
|
+
}
|
|
75077
|
+
return quote + encoded + quote;
|
|
75078
|
+
}
|
|
75079
|
+
|
|
75080
|
+
// ../../node_modules/css-tree/lib/utils/url.js
|
|
75081
|
+
var SPACE = 32;
|
|
75082
|
+
var REVERSE_SOLIDUS2 = 92;
|
|
75083
|
+
var QUOTATION_MARK2 = 34;
|
|
75084
|
+
var APOSTROPHE2 = 39;
|
|
75085
|
+
var LEFTPARENTHESIS = 40;
|
|
75086
|
+
var RIGHTPARENTHESIS = 41;
|
|
75087
|
+
function decode4(str) {
|
|
75088
|
+
const len = str.length;
|
|
75089
|
+
let start = 4;
|
|
75090
|
+
let end = str.charCodeAt(len - 1) === RIGHTPARENTHESIS ? len - 2 : len - 1;
|
|
75091
|
+
let decoded = "";
|
|
75092
|
+
while (start < end && isWhiteSpace(str.charCodeAt(start))) {
|
|
75093
|
+
start++;
|
|
75094
|
+
}
|
|
75095
|
+
while (start < end && isWhiteSpace(str.charCodeAt(end))) {
|
|
75096
|
+
end--;
|
|
75097
|
+
}
|
|
75098
|
+
for (let i = start; i <= end; i++) {
|
|
75099
|
+
let code2 = str.charCodeAt(i);
|
|
75100
|
+
if (code2 === REVERSE_SOLIDUS2) {
|
|
75101
|
+
if (i === end) {
|
|
75102
|
+
if (i !== len - 1) {
|
|
75103
|
+
decoded = str.substr(i + 1);
|
|
75104
|
+
}
|
|
75105
|
+
break;
|
|
75106
|
+
}
|
|
75107
|
+
code2 = str.charCodeAt(++i);
|
|
75108
|
+
if (isValidEscape(REVERSE_SOLIDUS2, code2)) {
|
|
75109
|
+
const escapeStart = i - 1;
|
|
75110
|
+
const escapeEnd = consumeEscaped(str, escapeStart);
|
|
75111
|
+
i = escapeEnd - 1;
|
|
75112
|
+
decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
|
|
75113
|
+
} else {
|
|
75114
|
+
if (code2 === 13 && str.charCodeAt(i + 1) === 10) {
|
|
75115
|
+
i++;
|
|
75116
|
+
}
|
|
75117
|
+
}
|
|
75118
|
+
} else {
|
|
75119
|
+
decoded += str[i];
|
|
75120
|
+
}
|
|
75121
|
+
}
|
|
75122
|
+
return decoded;
|
|
75123
|
+
}
|
|
75124
|
+
function encode4(str) {
|
|
75125
|
+
let encoded = "";
|
|
75126
|
+
let wsBeforeHexIsNeeded = false;
|
|
75127
|
+
for (let i = 0; i < str.length; i++) {
|
|
75128
|
+
const code2 = str.charCodeAt(i);
|
|
75129
|
+
if (code2 === 0) {
|
|
75130
|
+
encoded += "\uFFFD";
|
|
75131
|
+
continue;
|
|
75132
|
+
}
|
|
75133
|
+
if (code2 <= 31 || code2 === 127) {
|
|
75134
|
+
encoded += "\\" + code2.toString(16);
|
|
75135
|
+
wsBeforeHexIsNeeded = true;
|
|
75136
|
+
continue;
|
|
75137
|
+
}
|
|
75138
|
+
if (code2 === SPACE || code2 === REVERSE_SOLIDUS2 || code2 === QUOTATION_MARK2 || code2 === APOSTROPHE2 || code2 === LEFTPARENTHESIS || code2 === RIGHTPARENTHESIS) {
|
|
75139
|
+
encoded += "\\" + str.charAt(i);
|
|
75140
|
+
wsBeforeHexIsNeeded = false;
|
|
75141
|
+
} else {
|
|
75142
|
+
if (wsBeforeHexIsNeeded && isHexDigit(code2)) {
|
|
75143
|
+
encoded += " ";
|
|
75144
|
+
}
|
|
75145
|
+
encoded += str.charAt(i);
|
|
75146
|
+
wsBeforeHexIsNeeded = false;
|
|
75147
|
+
}
|
|
75148
|
+
}
|
|
75149
|
+
return "url(" + encoded + ")";
|
|
75150
|
+
}
|
|
75151
|
+
|
|
75152
|
+
// ../config/dist/entities/system/Font.js
|
|
75153
|
+
var FontFileDefinition = defineSubEntity({
|
|
75154
|
+
name: "file",
|
|
75155
|
+
label: "Font file",
|
|
75156
|
+
labelPlural: "Files",
|
|
75157
|
+
fields: external_exports.object({
|
|
75158
|
+
src: external_exports.string(),
|
|
75159
|
+
format: external_exports.string().optional(),
|
|
75160
|
+
/** `400`, or a RANGE (`'100 900'`) for a variable font's single file. */
|
|
75161
|
+
weight: external_exports.union([external_exports.number(), external_exports.string()]).refine(isFontFaceWeight, { error: "an `@font-face` font-weight: `auto`, `normal`, `bold`, or a number from 1 to 1000, or two of those as a range (`100 900`)." }).optional(),
|
|
75162
|
+
style: external_exports.string().refine(isFontFaceStyle, { error: "an `@font-face` font-style: `auto`, `normal`, `italic`, or `oblique` with up to two angles (`oblique 10deg`)." }).optional(),
|
|
75163
|
+
postscriptName: external_exports.string().optional()
|
|
75164
|
+
})
|
|
75165
|
+
});
|
|
75166
|
+
var FONT_WEIGHT_PART = /^(normal|bold|\d+(\.\d+)?)$/i;
|
|
75167
|
+
var FONT_STYLE = /^(auto|normal|italic|oblique(\s+-?\d+(\.\d+)?deg){0,2})$/i;
|
|
75168
|
+
function isFontFaceWeight(value) {
|
|
75169
|
+
const text = String(value).trim();
|
|
75170
|
+
if (/^auto$/i.test(text)) return true;
|
|
75171
|
+
const parts = text.split(/\s+/);
|
|
75172
|
+
return parts.length <= 2 && parts.every((part) => {
|
|
75173
|
+
if (!FONT_WEIGHT_PART.test(part)) return false;
|
|
75174
|
+
const number5 = Number(part);
|
|
75175
|
+
return Number.isNaN(number5) || number5 >= 1 && number5 <= 1e3;
|
|
75176
|
+
});
|
|
75177
|
+
}
|
|
75178
|
+
function isFontFaceStyle(value) {
|
|
75179
|
+
return FONT_STYLE.test(value.trim());
|
|
75180
|
+
}
|
|
75181
|
+
var FontFile = FontFileDefinition;
|
|
75182
|
+
var Font = defineEntity({
|
|
75183
|
+
kind: "font",
|
|
75184
|
+
label: "Font",
|
|
75185
|
+
labelPlural: "Fonts",
|
|
75186
|
+
fields: external_exports.strictObject({
|
|
75187
|
+
/** The CSS-facing family name (`'YA Sans'`) — required; a family without one can't be used. */
|
|
75188
|
+
fontFamily: external_exports.string().describe("The CSS family name, such as `'YA Sans'`."),
|
|
75189
|
+
/** One entry per font file. */
|
|
75190
|
+
files: FontFile.optional().describe("One entry per font file, keyed by any name (`'400-normal'`)."),
|
|
75191
|
+
/** Families to fall back to after this one, for a `font-family` stack. */
|
|
75192
|
+
fallbackStack: external_exports.array(external_exports.string()).optional().describe("Families to fall back to, in order."),
|
|
75193
|
+
/**
|
|
75194
|
+
* A CSS custom property the HOST publishes the loaded face's family under — `next/font`'s
|
|
75195
|
+
* `variable` option (`--uds-font-family-inter`), or any loader that hands the page a variable
|
|
75196
|
+
* rather than a `@font-face`. When set, the family's stack reads the property first and falls
|
|
75197
|
+
* back to the family by name: `var(--uds-font-family-inter, "Inter", ui-sans-serif, …)`. That
|
|
75198
|
+
* is how a token can be `Font.ref(…)` to such a family and still render the host's face, whose
|
|
75199
|
+
* real family name (`__Inter_a1b2c3`) nothing in a config can know.
|
|
75200
|
+
*/
|
|
75201
|
+
variable: external_exports.string().regex(/^--[A-Za-z0-9_-]+$/, "a CSS custom property name: `--name`").optional().describe("A CSS custom property the host publishes the loaded face under, such as `next/font`'s `variable`. Must look like `--name`."),
|
|
75202
|
+
/** Set explicitly; otherwise inferred from a file declaring a weight RANGE. */
|
|
75203
|
+
isVariableFont: external_exports.boolean().optional().describe("Set explicitly, or inferred from a file that declares a weight range.")
|
|
75204
|
+
}),
|
|
75205
|
+
groupFields: external_exports.strictObject({ version: external_exports.string().optional().describe("The version of the family the group ships.") }),
|
|
75206
|
+
subEntities: { files: FontFile }
|
|
75207
|
+
});
|
|
75208
|
+
function cssString(value) {
|
|
75209
|
+
return `"${value.replace(/["\\\n\r\f<]/g, (char) => char === '"' || char === "\\" ? `\\${char}` : `\\${char.charCodeAt(0).toString(16)} `)}"`;
|
|
75210
|
+
}
|
|
75211
|
+
var GENERIC_FAMILIES = /* @__PURE__ */ new Set([
|
|
75212
|
+
"serif",
|
|
75213
|
+
"sans-serif",
|
|
75214
|
+
"monospace",
|
|
75215
|
+
"cursive",
|
|
75216
|
+
"fantasy",
|
|
75217
|
+
"system-ui",
|
|
75218
|
+
"ui-serif",
|
|
75219
|
+
"ui-sans-serif",
|
|
75220
|
+
"ui-monospace",
|
|
75221
|
+
"ui-rounded",
|
|
75222
|
+
"emoji",
|
|
75223
|
+
"math",
|
|
75224
|
+
"fangsong",
|
|
75225
|
+
"-apple-system",
|
|
75226
|
+
"blinkmacsystemfont"
|
|
75227
|
+
]);
|
|
75228
|
+
function fallbackFamily(name) {
|
|
75229
|
+
if (GENERIC_FAMILIES.has(name.toLowerCase())) return name;
|
|
75230
|
+
return cssString(name.length >= 2 && (name.startsWith('"') && name.endsWith('"') || name.startsWith("'") && name.endsWith("'")) ? string_exports.decode(name) : name);
|
|
75231
|
+
}
|
|
75232
|
+
function fontFamilyStack(font) {
|
|
75233
|
+
const family = cssString(font.fontFamily.replace(/^['"]|['"]$/g, ""));
|
|
75234
|
+
const fallbacks = (font.fallbackStack ?? []).map((name) => name.trim()).filter((name) => name.length > 0).map(fallbackFamily);
|
|
75235
|
+
const named = fallbacks.length > 0 ? `${family}, ${fallbacks.join(", ")}` : family;
|
|
75236
|
+
return font.variable ? `var(${font.variable}, ${named})` : named;
|
|
75237
|
+
}
|
|
75238
|
+
|
|
75239
|
+
// ../config/dist/entities/system/linked-flex-values.js
|
|
75240
|
+
var nativeFlexValue = external_exports.strictObject({
|
|
75241
|
+
flexGrow: external_exports.number().nonnegative(),
|
|
75242
|
+
flexShrink: external_exports.number().nonnegative(),
|
|
75243
|
+
flexBasis: external_exports.union([
|
|
75244
|
+
external_exports.number().nonnegative(),
|
|
75245
|
+
external_exports.literal("auto"),
|
|
75246
|
+
external_exports.string().regex(/^(?:\d+(?:\.\d+)?|\.\d+)%$/)
|
|
75247
|
+
])
|
|
75248
|
+
});
|
|
75249
|
+
function isNativeFlexValue(value) {
|
|
75250
|
+
return typeof value === "object" && value !== null && "flexGrow" in value && nativeFlexValue.safeParse(value).success;
|
|
75251
|
+
}
|
|
75252
|
+
var NUMBER2 = /^(?:\d+(?:\.\d+)?|\.\d+)$/;
|
|
75253
|
+
function webFlexToNative(value, remBase) {
|
|
75254
|
+
const text = String(value).trim();
|
|
75255
|
+
if (text === "none") return {
|
|
75256
|
+
flexGrow: 0,
|
|
75257
|
+
flexShrink: 0,
|
|
75258
|
+
flexBasis: "auto"
|
|
75259
|
+
};
|
|
75260
|
+
if (text === "auto") return {
|
|
75261
|
+
flexGrow: 1,
|
|
75262
|
+
flexShrink: 1,
|
|
75263
|
+
flexBasis: "auto"
|
|
75264
|
+
};
|
|
75265
|
+
if (text === "initial") return {
|
|
75266
|
+
flexGrow: 0,
|
|
75267
|
+
flexShrink: 1,
|
|
75268
|
+
flexBasis: "auto"
|
|
75269
|
+
};
|
|
75270
|
+
const parts = text.split(/\s+/);
|
|
75271
|
+
let grow = 1;
|
|
75272
|
+
let shrink = 1;
|
|
75273
|
+
let basis = "0%";
|
|
75274
|
+
if (parts.length <= 3 && NUMBER2.test(parts[0] ?? "")) {
|
|
75275
|
+
grow = Number(parts.shift());
|
|
75276
|
+
if (parts.length && NUMBER2.test(parts[0] ?? "")) shrink = Number(parts.shift());
|
|
75277
|
+
if (parts.length === 1) basis = parts.shift() ?? "";
|
|
75278
|
+
} else if (parts.length === 1) basis = parts.shift() ?? "";
|
|
75279
|
+
if (parts.length === 0) {
|
|
75280
|
+
if (basis === "auto" || /^(?:\d+(?:\.\d+)?|\.\d+)%$/.test(basis)) return {
|
|
75281
|
+
flexGrow: grow,
|
|
75282
|
+
flexShrink: shrink,
|
|
75283
|
+
flexBasis: basis
|
|
75284
|
+
};
|
|
75285
|
+
const length = /^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(basis);
|
|
75286
|
+
if (length && (length[2] || Number(length[1]) === 0)) {
|
|
75287
|
+
if (length[2] !== "rem" || remBase !== void 0) return {
|
|
75288
|
+
flexGrow: grow,
|
|
75289
|
+
flexShrink: shrink,
|
|
75290
|
+
flexBasis: Number(length[1]) * (length[2] === "rem" ? remBase : 1)
|
|
75291
|
+
};
|
|
75292
|
+
}
|
|
75293
|
+
}
|
|
75294
|
+
throw new Error(`[uds] Cannot translate Web flex ${JSON.stringify(value)} to native. Use none, auto, initial, or numeric grow/shrink with an auto, percentage, px, or fixed-rem basis.`);
|
|
75295
|
+
}
|
|
75296
|
+
function nativeFlexToWeb(value) {
|
|
75297
|
+
const { flexGrow, flexShrink, flexBasis } = typeof value !== "number" ? value : value > 0 ? {
|
|
75298
|
+
flexGrow: value,
|
|
75299
|
+
flexShrink: 0,
|
|
75300
|
+
flexBasis: 0
|
|
75301
|
+
} : {
|
|
75302
|
+
flexGrow: 0,
|
|
75303
|
+
flexShrink: -value,
|
|
75304
|
+
flexBasis: "auto"
|
|
75305
|
+
};
|
|
75306
|
+
return `${flexGrow} ${flexShrink} ${typeof flexBasis === "number" ? `${flexBasis}px` : flexBasis}`;
|
|
75307
|
+
}
|
|
75308
|
+
|
|
75309
|
+
// ../config/dist/entities/system/linked-line-height-values.js
|
|
75310
|
+
var relativeLineHeightValue = external_exports.strictObject({ fontSizeMultiplier: external_exports.number().nonnegative() });
|
|
75311
|
+
function isRelativeLineHeightValue(value) {
|
|
75312
|
+
return typeof value === "object" && value !== null && "fontSizeMultiplier" in value && relativeLineHeightValue.safeParse(value).success;
|
|
75313
|
+
}
|
|
75314
|
+
function webLineHeightToNative(value, remBase) {
|
|
75315
|
+
if (typeof value === "number" && Number.isFinite(value) && value >= 0) return { fontSizeMultiplier: value };
|
|
75316
|
+
const text = String(value).trim();
|
|
75317
|
+
const match = /^(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(text);
|
|
75318
|
+
if (match && Number.isFinite(Number(match[1]))) {
|
|
75319
|
+
const number5 = Number(match[1]);
|
|
75320
|
+
if (!match[2]) return { fontSizeMultiplier: number5 };
|
|
75321
|
+
if (match[2] === "px") return number5;
|
|
75322
|
+
if (remBase !== void 0) return number5 * remBase;
|
|
75323
|
+
}
|
|
75324
|
+
throw new Error(`[uds] Cannot translate Web line-height ${JSON.stringify(value)} to native. Use a non-negative ratio, a px length, or a rem length with a fixed root font size.`);
|
|
75325
|
+
}
|
|
75326
|
+
function nativeLineHeightToWeb(value) {
|
|
75327
|
+
return isRelativeLineHeightValue(value) ? value.fontSizeMultiplier : `${value}px`;
|
|
75328
|
+
}
|
|
75329
|
+
|
|
75330
|
+
// ../config/dist/css/value-type.js
|
|
75331
|
+
function isLengthUnit(unit) {
|
|
75332
|
+
return LENGTH_UNITS2.includes(unit);
|
|
75333
|
+
}
|
|
75334
|
+
var LENGTH_UNITS2 = [
|
|
75335
|
+
"ch",
|
|
75336
|
+
"cm",
|
|
75337
|
+
"dvh",
|
|
75338
|
+
"dvw",
|
|
75339
|
+
"em",
|
|
75340
|
+
"ex",
|
|
75341
|
+
"in",
|
|
75342
|
+
"lvh",
|
|
75343
|
+
"lvw",
|
|
75344
|
+
"mm",
|
|
75345
|
+
"pc",
|
|
75346
|
+
"pt",
|
|
75347
|
+
"px",
|
|
75348
|
+
"q",
|
|
75349
|
+
"rem",
|
|
75350
|
+
"svh",
|
|
75351
|
+
"svw",
|
|
75352
|
+
"vh",
|
|
75353
|
+
"vmax",
|
|
75354
|
+
"vmin",
|
|
75355
|
+
"vw"
|
|
75356
|
+
];
|
|
75357
|
+
|
|
75358
|
+
// ../../node_modules/css-tree/lib/utils/create-custom-error.js
|
|
75359
|
+
function createCustomError(name, message) {
|
|
75360
|
+
const error61 = Object.create(SyntaxError.prototype);
|
|
75361
|
+
const errorStack = new Error();
|
|
75362
|
+
return Object.assign(error61, {
|
|
75363
|
+
name,
|
|
75364
|
+
message,
|
|
75365
|
+
get stack() {
|
|
75366
|
+
return (errorStack.stack || "").replace(/^(.+\n){1,3}/, `${name}: ${message}
|
|
75367
|
+
`);
|
|
75368
|
+
}
|
|
75369
|
+
});
|
|
75370
|
+
}
|
|
75371
|
+
|
|
75372
|
+
// ../../node_modules/css-tree/lib/parser/SyntaxError.js
|
|
75373
|
+
var MAX_LINE_LENGTH = 100;
|
|
75374
|
+
var OFFSET_CORRECTION = 60;
|
|
75375
|
+
var TAB_REPLACEMENT = " ";
|
|
75376
|
+
function sourceFragment({ source, line, column, baseLine, baseColumn }, extraLines) {
|
|
75377
|
+
function processLines(start, end) {
|
|
75378
|
+
return lines.slice(start, end).map(
|
|
75379
|
+
(line2, idx) => String(start + idx + 1).padStart(maxNumLength) + " |" + line2
|
|
75380
|
+
).join("\n");
|
|
75381
|
+
}
|
|
75382
|
+
const prelines = "\n".repeat(Math.max(baseLine - 1, 0));
|
|
75383
|
+
const precolumns = " ".repeat(Math.max(baseColumn - 1, 0));
|
|
75384
|
+
const lines = (prelines + precolumns + source).split(/\r\n?|\n|\f/);
|
|
75385
|
+
const startLine = Math.max(1, line - extraLines) - 1;
|
|
75386
|
+
const endLine = Math.min(line + extraLines, lines.length + 1);
|
|
75387
|
+
const maxNumLength = Math.max(4, String(endLine).length) + 1;
|
|
75388
|
+
let cutLeft = 0;
|
|
75389
|
+
column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length;
|
|
75390
|
+
if (column > MAX_LINE_LENGTH) {
|
|
75391
|
+
cutLeft = column - OFFSET_CORRECTION + 3;
|
|
75392
|
+
column = OFFSET_CORRECTION - 2;
|
|
75393
|
+
}
|
|
75394
|
+
for (let i = startLine; i <= endLine; i++) {
|
|
75395
|
+
if (i >= 0 && i < lines.length) {
|
|
75396
|
+
lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
|
|
75397
|
+
lines[i] = (cutLeft > 0 && lines[i].length > cutLeft ? "\u2026" : "") + lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) + (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? "\u2026" : "");
|
|
75398
|
+
}
|
|
75249
75399
|
}
|
|
75400
|
+
return [
|
|
75401
|
+
processLines(startLine, line),
|
|
75402
|
+
new Array(column + maxNumLength + 2).join("-") + "^",
|
|
75403
|
+
processLines(line, endLine)
|
|
75404
|
+
].filter(Boolean).join("\n").replace(/^(\s+\d+\s+\|\n)+/, "").replace(/\n(\s+\d+\s+\|)+$/, "");
|
|
75405
|
+
}
|
|
75406
|
+
function SyntaxError2(message, source, offset, line, column, baseLine = 1, baseColumn = 1) {
|
|
75407
|
+
const error61 = Object.assign(createCustomError("SyntaxError", message), {
|
|
75408
|
+
source,
|
|
75409
|
+
offset,
|
|
75410
|
+
line,
|
|
75411
|
+
column,
|
|
75412
|
+
sourceFragment(extraLines) {
|
|
75413
|
+
return sourceFragment({ source, line, column, baseLine, baseColumn }, isNaN(extraLines) ? 0 : extraLines);
|
|
75414
|
+
},
|
|
75415
|
+
get formattedMessage() {
|
|
75416
|
+
return `Parse error: ${message}
|
|
75417
|
+
` + sourceFragment({ source, line, column, baseLine, baseColumn }, 2);
|
|
75418
|
+
}
|
|
75419
|
+
});
|
|
75420
|
+
return error61;
|
|
75250
75421
|
}
|
|
75251
75422
|
|
|
75252
75423
|
// ../../node_modules/css-tree/lib/parser/sequence.js
|
|
@@ -75606,7 +75777,7 @@ __export(scope_exports, {
|
|
|
75606
75777
|
var NUMBERSIGN2 = 35;
|
|
75607
75778
|
var ASTERISK = 42;
|
|
75608
75779
|
var PLUSSIGN = 43;
|
|
75609
|
-
var
|
|
75780
|
+
var HYPHENMINUS2 = 45;
|
|
75610
75781
|
var SOLIDUS = 47;
|
|
75611
75782
|
var U = 117;
|
|
75612
75783
|
function defaultRecognizer(context) {
|
|
@@ -75639,7 +75810,7 @@ function defaultRecognizer(context) {
|
|
|
75639
75810
|
}
|
|
75640
75811
|
case Delim: {
|
|
75641
75812
|
const code2 = this.charCodeAt(this.tokenStart);
|
|
75642
|
-
if (code2 === SOLIDUS || code2 === ASTERISK || code2 === PLUSSIGN || code2 ===
|
|
75813
|
+
if (code2 === SOLIDUS || code2 === ASTERISK || code2 === PLUSSIGN || code2 === HYPHENMINUS2) {
|
|
75643
75814
|
return this.Operator();
|
|
75644
75815
|
}
|
|
75645
75816
|
if (code2 === NUMBERSIGN2) {
|
|
@@ -76121,14 +76292,14 @@ __export(index_parse_exports, {
|
|
|
76121
76292
|
|
|
76122
76293
|
// ../../node_modules/css-tree/lib/syntax/node/AnPlusB.js
|
|
76123
76294
|
var PLUSSIGN3 = 43;
|
|
76124
|
-
var
|
|
76295
|
+
var HYPHENMINUS3 = 45;
|
|
76125
76296
|
var N2 = 110;
|
|
76126
76297
|
var DISALLOW_SIGN = true;
|
|
76127
76298
|
var ALLOW_SIGN = false;
|
|
76128
76299
|
function checkInteger(offset, disallowSign) {
|
|
76129
76300
|
let pos = this.tokenStart + offset;
|
|
76130
76301
|
const code2 = this.charCodeAt(pos);
|
|
76131
|
-
if (code2 === PLUSSIGN3 || code2 ===
|
|
76302
|
+
if (code2 === PLUSSIGN3 || code2 === HYPHENMINUS3) {
|
|
76132
76303
|
if (disallowSign) {
|
|
76133
76304
|
this.error("Number sign is not allowed");
|
|
76134
76305
|
}
|
|
@@ -76150,7 +76321,7 @@ function expectCharCode(offset, code2) {
|
|
|
76150
76321
|
case N2:
|
|
76151
76322
|
msg = "N is expected";
|
|
76152
76323
|
break;
|
|
76153
|
-
case
|
|
76324
|
+
case HYPHENMINUS3:
|
|
76154
76325
|
msg = "HyphenMinus is expected";
|
|
76155
76326
|
break;
|
|
76156
76327
|
}
|
|
@@ -76165,8 +76336,8 @@ function consumeB() {
|
|
|
76165
76336
|
type = this.lookupType(++offset);
|
|
76166
76337
|
}
|
|
76167
76338
|
if (type !== Number2) {
|
|
76168
|
-
if (this.isDelim(PLUSSIGN3, offset) || this.isDelim(
|
|
76169
|
-
sign = this.isDelim(PLUSSIGN3, offset) ? PLUSSIGN3 :
|
|
76339
|
+
if (this.isDelim(PLUSSIGN3, offset) || this.isDelim(HYPHENMINUS3, offset)) {
|
|
76340
|
+
sign = this.isDelim(PLUSSIGN3, offset) ? PLUSSIGN3 : HYPHENMINUS3;
|
|
76170
76341
|
do {
|
|
76171
76342
|
type = this.lookupType(++offset);
|
|
76172
76343
|
} while (type === WhiteSpace || type === Comment);
|
|
@@ -76183,12 +76354,12 @@ function consumeB() {
|
|
|
76183
76354
|
}
|
|
76184
76355
|
if (sign === 0) {
|
|
76185
76356
|
type = this.charCodeAt(this.tokenStart);
|
|
76186
|
-
if (type !== PLUSSIGN3 && type !==
|
|
76357
|
+
if (type !== PLUSSIGN3 && type !== HYPHENMINUS3) {
|
|
76187
76358
|
this.error("Number sign is expected");
|
|
76188
76359
|
}
|
|
76189
76360
|
}
|
|
76190
76361
|
checkTokenIsInteger.call(this, sign !== 0);
|
|
76191
|
-
return sign ===
|
|
76362
|
+
return sign === HYPHENMINUS3 ? "-" + this.consume(Number2) : this.consume(Number2);
|
|
76192
76363
|
}
|
|
76193
76364
|
function parse3() {
|
|
76194
76365
|
const start = this.tokenStart;
|
|
@@ -76197,7 +76368,7 @@ function parse3() {
|
|
|
76197
76368
|
if (this.tokenType === Number2) {
|
|
76198
76369
|
checkTokenIsInteger.call(this, ALLOW_SIGN);
|
|
76199
76370
|
b = this.consume(Number2);
|
|
76200
|
-
} else if (this.tokenType === Ident && this.cmpChar(this.tokenStart,
|
|
76371
|
+
} else if (this.tokenType === Ident && this.cmpChar(this.tokenStart, HYPHENMINUS3)) {
|
|
76201
76372
|
a = "-1";
|
|
76202
76373
|
expectCharCode.call(this, 1, N2);
|
|
76203
76374
|
switch (this.tokenEnd - this.tokenStart) {
|
|
@@ -76210,7 +76381,7 @@ function parse3() {
|
|
|
76210
76381
|
break;
|
|
76211
76382
|
// -n- <signless-integer>
|
|
76212
76383
|
case 3:
|
|
76213
|
-
expectCharCode.call(this, 2,
|
|
76384
|
+
expectCharCode.call(this, 2, HYPHENMINUS3);
|
|
76214
76385
|
this.next();
|
|
76215
76386
|
this.skipSC();
|
|
76216
76387
|
checkTokenIsInteger.call(this, DISALLOW_SIGN);
|
|
@@ -76218,7 +76389,7 @@ function parse3() {
|
|
|
76218
76389
|
break;
|
|
76219
76390
|
// <dashndashdigit-ident>
|
|
76220
76391
|
default:
|
|
76221
|
-
expectCharCode.call(this, 2,
|
|
76392
|
+
expectCharCode.call(this, 2, HYPHENMINUS3);
|
|
76222
76393
|
checkInteger.call(this, 3, DISALLOW_SIGN);
|
|
76223
76394
|
this.next();
|
|
76224
76395
|
b = this.substrToCursor(start + 2);
|
|
@@ -76241,7 +76412,7 @@ function parse3() {
|
|
|
76241
76412
|
break;
|
|
76242
76413
|
// '+'? n- <signless-integer>
|
|
76243
76414
|
case 2:
|
|
76244
|
-
expectCharCode.call(this, 1,
|
|
76415
|
+
expectCharCode.call(this, 1, HYPHENMINUS3);
|
|
76245
76416
|
this.next();
|
|
76246
76417
|
this.skipSC();
|
|
76247
76418
|
checkTokenIsInteger.call(this, DISALLOW_SIGN);
|
|
@@ -76249,14 +76420,14 @@ function parse3() {
|
|
|
76249
76420
|
break;
|
|
76250
76421
|
// '+'? <ndashdigit-ident>
|
|
76251
76422
|
default:
|
|
76252
|
-
expectCharCode.call(this, 1,
|
|
76423
|
+
expectCharCode.call(this, 1, HYPHENMINUS3);
|
|
76253
76424
|
checkInteger.call(this, 2, DISALLOW_SIGN);
|
|
76254
76425
|
this.next();
|
|
76255
76426
|
b = this.substrToCursor(start + sign + 1);
|
|
76256
76427
|
}
|
|
76257
76428
|
} else if (this.tokenType === Dimension) {
|
|
76258
76429
|
const code2 = this.charCodeAt(this.tokenStart);
|
|
76259
|
-
const sign = code2 === PLUSSIGN3 || code2 ===
|
|
76430
|
+
const sign = code2 === PLUSSIGN3 || code2 === HYPHENMINUS3;
|
|
76260
76431
|
let i = this.tokenStart + sign;
|
|
76261
76432
|
for (; i < this.tokenEnd; i++) {
|
|
76262
76433
|
if (!isDigit2(this.charCodeAt(i))) {
|
|
@@ -76272,7 +76443,7 @@ function parse3() {
|
|
|
76272
76443
|
this.next();
|
|
76273
76444
|
b = consumeB.call(this);
|
|
76274
76445
|
} else {
|
|
76275
|
-
expectCharCode.call(this, i - this.tokenStart + 1,
|
|
76446
|
+
expectCharCode.call(this, i - this.tokenStart + 1, HYPHENMINUS3);
|
|
76276
76447
|
if (i + 2 === this.tokenEnd) {
|
|
76277
76448
|
this.next();
|
|
76278
76449
|
this.skipSC();
|
|
@@ -76776,13 +76947,6 @@ function generate12(node2) {
|
|
|
76776
76947
|
});
|
|
76777
76948
|
}
|
|
76778
76949
|
|
|
76779
|
-
// ../../node_modules/css-tree/lib/utils/names.js
|
|
76780
|
-
var HYPHENMINUS3 = 45;
|
|
76781
|
-
function isCustomProperty(str, offset) {
|
|
76782
|
-
offset = offset || 0;
|
|
76783
|
-
return str.length - offset >= 2 && str.charCodeAt(offset) === HYPHENMINUS3 && str.charCodeAt(offset + 1) === HYPHENMINUS3;
|
|
76784
|
-
}
|
|
76785
|
-
|
|
76786
76950
|
// ../../node_modules/css-tree/lib/syntax/node/Declaration.js
|
|
76787
76951
|
var EXCLAMATIONMARK2 = 33;
|
|
76788
76952
|
var NUMBERSIGN4 = 35;
|
|
@@ -77775,72 +77939,6 @@ function generate41(node2) {
|
|
|
77775
77939
|
this.children(node2, () => this.token(Comma, ","));
|
|
77776
77940
|
}
|
|
77777
77941
|
|
|
77778
|
-
// ../../node_modules/css-tree/lib/utils/string.js
|
|
77779
|
-
var REVERSE_SOLIDUS = 92;
|
|
77780
|
-
var QUOTATION_MARK = 34;
|
|
77781
|
-
var APOSTROPHE = 39;
|
|
77782
|
-
function decode3(str) {
|
|
77783
|
-
const len = str.length;
|
|
77784
|
-
const firstChar = str.charCodeAt(0);
|
|
77785
|
-
const start = firstChar === QUOTATION_MARK || firstChar === APOSTROPHE ? 1 : 0;
|
|
77786
|
-
const end = start === 1 && len > 1 && str.charCodeAt(len - 1) === firstChar ? len - 2 : len - 1;
|
|
77787
|
-
let decoded = "";
|
|
77788
|
-
for (let i = start; i <= end; i++) {
|
|
77789
|
-
let code2 = str.charCodeAt(i);
|
|
77790
|
-
if (code2 === REVERSE_SOLIDUS) {
|
|
77791
|
-
if (i === end) {
|
|
77792
|
-
if (i !== len - 1) {
|
|
77793
|
-
decoded = str.substr(i + 1);
|
|
77794
|
-
}
|
|
77795
|
-
break;
|
|
77796
|
-
}
|
|
77797
|
-
code2 = str.charCodeAt(++i);
|
|
77798
|
-
if (isValidEscape(REVERSE_SOLIDUS, code2)) {
|
|
77799
|
-
const escapeStart = i - 1;
|
|
77800
|
-
const escapeEnd = consumeEscaped(str, escapeStart);
|
|
77801
|
-
i = escapeEnd - 1;
|
|
77802
|
-
decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
|
|
77803
|
-
} else {
|
|
77804
|
-
if (code2 === 13 && str.charCodeAt(i + 1) === 10) {
|
|
77805
|
-
i++;
|
|
77806
|
-
}
|
|
77807
|
-
}
|
|
77808
|
-
} else {
|
|
77809
|
-
decoded += str[i];
|
|
77810
|
-
}
|
|
77811
|
-
}
|
|
77812
|
-
return decoded;
|
|
77813
|
-
}
|
|
77814
|
-
function encode3(str, apostrophe) {
|
|
77815
|
-
const quote = apostrophe ? "'" : '"';
|
|
77816
|
-
const quoteCode = apostrophe ? APOSTROPHE : QUOTATION_MARK;
|
|
77817
|
-
let encoded = "";
|
|
77818
|
-
let wsBeforeHexIsNeeded = false;
|
|
77819
|
-
for (let i = 0; i < str.length; i++) {
|
|
77820
|
-
const code2 = str.charCodeAt(i);
|
|
77821
|
-
if (code2 === 0) {
|
|
77822
|
-
encoded += "\uFFFD";
|
|
77823
|
-
continue;
|
|
77824
|
-
}
|
|
77825
|
-
if (code2 <= 31 || code2 === 127) {
|
|
77826
|
-
encoded += "\\" + code2.toString(16);
|
|
77827
|
-
wsBeforeHexIsNeeded = true;
|
|
77828
|
-
continue;
|
|
77829
|
-
}
|
|
77830
|
-
if (code2 === quoteCode || code2 === REVERSE_SOLIDUS) {
|
|
77831
|
-
encoded += "\\" + str.charAt(i);
|
|
77832
|
-
wsBeforeHexIsNeeded = false;
|
|
77833
|
-
} else {
|
|
77834
|
-
if (wsBeforeHexIsNeeded && (isHexDigit(code2) || isWhiteSpace(code2))) {
|
|
77835
|
-
encoded += " ";
|
|
77836
|
-
}
|
|
77837
|
-
encoded += str.charAt(i);
|
|
77838
|
-
wsBeforeHexIsNeeded = false;
|
|
77839
|
-
}
|
|
77840
|
-
}
|
|
77841
|
-
return quote + encoded + quote;
|
|
77842
|
-
}
|
|
77843
|
-
|
|
77844
77942
|
// ../../node_modules/css-tree/lib/syntax/node/String.js
|
|
77845
77943
|
function parse44() {
|
|
77846
77944
|
return {
|
|
@@ -78047,78 +78145,6 @@ function generate46(node2) {
|
|
|
78047
78145
|
this.tokenize(node2.value);
|
|
78048
78146
|
}
|
|
78049
78147
|
|
|
78050
|
-
// ../../node_modules/css-tree/lib/utils/url.js
|
|
78051
|
-
var SPACE = 32;
|
|
78052
|
-
var REVERSE_SOLIDUS2 = 92;
|
|
78053
|
-
var QUOTATION_MARK2 = 34;
|
|
78054
|
-
var APOSTROPHE2 = 39;
|
|
78055
|
-
var LEFTPARENTHESIS = 40;
|
|
78056
|
-
var RIGHTPARENTHESIS = 41;
|
|
78057
|
-
function decode4(str) {
|
|
78058
|
-
const len = str.length;
|
|
78059
|
-
let start = 4;
|
|
78060
|
-
let end = str.charCodeAt(len - 1) === RIGHTPARENTHESIS ? len - 2 : len - 1;
|
|
78061
|
-
let decoded = "";
|
|
78062
|
-
while (start < end && isWhiteSpace(str.charCodeAt(start))) {
|
|
78063
|
-
start++;
|
|
78064
|
-
}
|
|
78065
|
-
while (start < end && isWhiteSpace(str.charCodeAt(end))) {
|
|
78066
|
-
end--;
|
|
78067
|
-
}
|
|
78068
|
-
for (let i = start; i <= end; i++) {
|
|
78069
|
-
let code2 = str.charCodeAt(i);
|
|
78070
|
-
if (code2 === REVERSE_SOLIDUS2) {
|
|
78071
|
-
if (i === end) {
|
|
78072
|
-
if (i !== len - 1) {
|
|
78073
|
-
decoded = str.substr(i + 1);
|
|
78074
|
-
}
|
|
78075
|
-
break;
|
|
78076
|
-
}
|
|
78077
|
-
code2 = str.charCodeAt(++i);
|
|
78078
|
-
if (isValidEscape(REVERSE_SOLIDUS2, code2)) {
|
|
78079
|
-
const escapeStart = i - 1;
|
|
78080
|
-
const escapeEnd = consumeEscaped(str, escapeStart);
|
|
78081
|
-
i = escapeEnd - 1;
|
|
78082
|
-
decoded += decodeEscaped(str.substring(escapeStart + 1, escapeEnd));
|
|
78083
|
-
} else {
|
|
78084
|
-
if (code2 === 13 && str.charCodeAt(i + 1) === 10) {
|
|
78085
|
-
i++;
|
|
78086
|
-
}
|
|
78087
|
-
}
|
|
78088
|
-
} else {
|
|
78089
|
-
decoded += str[i];
|
|
78090
|
-
}
|
|
78091
|
-
}
|
|
78092
|
-
return decoded;
|
|
78093
|
-
}
|
|
78094
|
-
function encode4(str) {
|
|
78095
|
-
let encoded = "";
|
|
78096
|
-
let wsBeforeHexIsNeeded = false;
|
|
78097
|
-
for (let i = 0; i < str.length; i++) {
|
|
78098
|
-
const code2 = str.charCodeAt(i);
|
|
78099
|
-
if (code2 === 0) {
|
|
78100
|
-
encoded += "\uFFFD";
|
|
78101
|
-
continue;
|
|
78102
|
-
}
|
|
78103
|
-
if (code2 <= 31 || code2 === 127) {
|
|
78104
|
-
encoded += "\\" + code2.toString(16);
|
|
78105
|
-
wsBeforeHexIsNeeded = true;
|
|
78106
|
-
continue;
|
|
78107
|
-
}
|
|
78108
|
-
if (code2 === SPACE || code2 === REVERSE_SOLIDUS2 || code2 === QUOTATION_MARK2 || code2 === APOSTROPHE2 || code2 === LEFTPARENTHESIS || code2 === RIGHTPARENTHESIS) {
|
|
78109
|
-
encoded += "\\" + str.charAt(i);
|
|
78110
|
-
wsBeforeHexIsNeeded = false;
|
|
78111
|
-
} else {
|
|
78112
|
-
if (wsBeforeHexIsNeeded && isHexDigit(code2)) {
|
|
78113
|
-
encoded += " ";
|
|
78114
|
-
}
|
|
78115
|
-
encoded += str.charAt(i);
|
|
78116
|
-
wsBeforeHexIsNeeded = false;
|
|
78117
|
-
}
|
|
78118
|
-
}
|
|
78119
|
-
return "url(" + encoded + ")";
|
|
78120
|
-
}
|
|
78121
|
-
|
|
78122
78148
|
// ../../node_modules/css-tree/lib/syntax/node/Url.js
|
|
78123
78149
|
function parse49() {
|
|
78124
78150
|
const start = this.tokenStart;
|
|
@@ -100948,8 +100974,8 @@ function vendorModifierMappingProblems({ config: config2, slug: slug2 }) {
|
|
|
100948
100974
|
for (const mapping of modifierMappings({
|
|
100949
100975
|
config: config2,
|
|
100950
100976
|
slug: slug2
|
|
100951
|
-
})) if (!mapping.ours) problems.push(`${mapping.at} maps the vendor's modifier to "${mapping.target}", which isn't a modifier of this system.`);
|
|
100952
|
-
else if (activationOf(mapping.ours).type === "composite") problems.push(`${mapping.at} maps the vendor's modifier to "${mapping.ours.path}", which asks whether an element sits on a surface. Only a selector or a query can stand in for the vendor's.`);
|
|
100977
|
+
})) if (!mapping.ours && !mapping.held) problems.push(`${mapping.at} maps the vendor's modifier to "${mapping.target}", which isn't a modifier of this system.`);
|
|
100978
|
+
else if (mapping.ours && activationOf(mapping.ours).type === "composite") problems.push(`${mapping.at} maps the vendor's modifier to "${mapping.ours.path}", which asks whether an element sits on a surface. Only a selector or a query can stand in for the vendor's.`);
|
|
100953
100979
|
return problems;
|
|
100954
100980
|
}
|
|
100955
100981
|
function modifierMappings({ config: config2, slug: slug2 }) {
|
|
@@ -100964,7 +100990,8 @@ function modifierMappings({ config: config2, slug: slug2 }) {
|
|
|
100964
100990
|
vendor: mapping.vendor,
|
|
100965
100991
|
at: `Link "${slug2}": options.${accessor}["${mapping.vendor}"]`,
|
|
100966
100992
|
target: pathOf2(target2),
|
|
100967
|
-
ours: sourceOf2(target2) === void 0 ? config2.resolve("modifier", pathOf2(target2)) : void 0
|
|
100993
|
+
ours: sourceOf2(target2) === void 0 ? config2.resolve("modifier", pathOf2(target2)) : void 0,
|
|
100994
|
+
held: sourceOf2(target2) === void 0 && config2.storedBody("modifier", pathOf2(target2)) !== void 0
|
|
100968
100995
|
}];
|
|
100969
100996
|
});
|
|
100970
100997
|
}
|