@max-ts/svelte 1.0.3 → 1.0.6

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.
Files changed (108) hide show
  1. package/dist/assets/{styles.css.ts.vanilla-CRRIM3FB.css → styles.css.ts.vanilla-BTOQ-HsW.css} +2 -2
  2. package/dist/assets/styles.css.ts.vanilla-CLnCzIMF.css +8 -0
  3. package/dist/components/Accordion/Content/Content.svelte.d.ts +1 -1
  4. package/dist/components/Accordion/Trigger/Trigger.svelte.d.ts +1 -1
  5. package/dist/components/Accordion/index.d.ts +1 -1
  6. package/dist/components/Alert/Alert.svelte.d.ts +1 -1
  7. package/dist/components/Alert/Description/Description.svelte.d.ts +1 -1
  8. package/dist/components/Alert/Title/Title.svelte.d.ts +1 -1
  9. package/dist/components/Alert/index.d.ts +2 -2
  10. package/dist/components/Calendar/Calendar.svelte.d.ts +2 -18
  11. package/dist/components/Calendar/Month/Month.svelte.d.ts +1 -1
  12. package/dist/components/Calendar/Months/Months.svelte.d.ts +1 -1
  13. package/dist/components/Calendar/Nav/Nav.svelte.d.ts +1 -1
  14. package/dist/components/Calendar/NextButton/NextButton.svelte.d.ts +1 -1
  15. package/dist/components/Calendar/PrevButton/PrevButton.svelte.d.ts +1 -1
  16. package/dist/components/Calendar/index.d.ts +1 -0
  17. package/dist/components/Calendar/types.d.ts +17 -0
  18. package/dist/components/Card/Action/Action.svelte.d.ts +1 -1
  19. package/dist/components/Card/Card.svelte.d.ts +1 -1
  20. package/dist/components/Card/Content/Content.svelte.d.ts +1 -1
  21. package/dist/components/Card/Description/Description.svelte.d.ts +1 -1
  22. package/dist/components/Card/Footer/Footer.svelte.d.ts +1 -1
  23. package/dist/components/Card/Header/Header.svelte.d.ts +1 -1
  24. package/dist/components/Card/Title/Title.svelte.d.ts +1 -1
  25. package/dist/components/Card/index.d.ts +7 -7
  26. package/dist/components/Checkbox/index.d.ts +1 -2
  27. package/dist/components/Checkbox/styles.css.js +1 -1
  28. package/dist/components/ContentState/ContentState.js +109 -0
  29. package/dist/components/ContentState/ContentState.svelte.d.ts +4 -0
  30. package/dist/components/ContentState/index.d.ts +2 -0
  31. package/dist/components/ContentState/styles.css.d.ts +4 -0
  32. package/dist/components/ContentState/styles.css.js +8 -0
  33. package/dist/components/ContentState/types.d.ts +55 -0
  34. package/dist/components/DataGrid/Cell/Cell.js +1 -1
  35. package/dist/components/DropdownMenu/CheckboxItem/CheckboxItem.svelte.d.ts +1 -1
  36. package/dist/components/DropdownMenu/Content/Content.svelte.d.ts +1 -1
  37. package/dist/components/DropdownMenu/Label/Label.svelte.d.ts +1 -1
  38. package/dist/components/DropdownMenu/Shortcut/Shortcut.svelte.d.ts +1 -1
  39. package/dist/components/DropdownMenu/index.d.ts +19 -126
  40. package/dist/components/DropdownMenu/types.d.ts +3 -0
  41. package/dist/components/Field/Content/Content.svelte.d.ts +1 -1
  42. package/dist/components/Field/Description/Description.svelte.d.ts +1 -1
  43. package/dist/components/Field/Field.svelte.d.ts +1 -1
  44. package/dist/components/Field/FieldError/FieldError.svelte.d.ts +1 -1
  45. package/dist/components/Field/FieldSet/FieldSet.svelte.d.ts +1 -1
  46. package/dist/components/Field/Group/Group.svelte.d.ts +1 -1
  47. package/dist/components/Field/Label/Label.js +1 -1
  48. package/dist/components/Field/Label/Label.svelte.d.ts +1 -1
  49. package/dist/components/Field/Legend/Legend.svelte.d.ts +1 -1
  50. package/dist/components/Field/Separator/Separator.js +1 -1
  51. package/dist/components/Field/Separator/Separator.svelte.d.ts +2 -2
  52. package/dist/components/Field/Title/Title.svelte.d.ts +1 -1
  53. package/dist/components/Field/index.d.ts +5 -5
  54. package/dist/components/Field/types.d.ts +1 -1
  55. package/dist/components/Input/types.d.ts +1 -1
  56. package/dist/components/Select/Content/Content.svelte.d.ts +1 -1
  57. package/dist/components/Select/Label/Label.svelte.d.ts +1 -1
  58. package/dist/components/Select/Trigger/Trigger.svelte.d.ts +1 -1
  59. package/dist/components/Select/index.d.ts +2 -2
  60. package/dist/components/Tooltip/Content/Content.svelte.d.ts +1 -1
  61. package/dist/components/Typography/styles.css.d.ts +1 -1
  62. package/dist/components/index.d.ts +20 -19
  63. package/dist/components.d.ts +56 -0
  64. package/dist/components.js +39 -0
  65. package/dist/stories/Accordion.stories.svelte.d.ts +0 -1
  66. package/dist/stories/Alert.stories.svelte.d.ts +1 -1
  67. package/dist/stories/Calendar.stories.svelte.d.ts +1 -1
  68. package/dist/stories/Card.stories.svelte.d.ts +1 -1
  69. package/dist/stories/CircularProgress.stories.svelte.d.ts +0 -1
  70. package/dist/stories/DataGrid.stories.svelte.d.ts +1 -1
  71. package/dist/stories/DropdownMenu.stories.svelte.d.ts +1 -1
  72. package/dist/stories/Field.stories.svelte.d.ts +1 -1
  73. package/dist/stories/Input.stories.svelte.d.ts +0 -1
  74. package/dist/stories/Label.stories.svelte.d.ts +1 -1
  75. package/dist/stories/Select.stories.svelte.d.ts +1 -1
  76. package/dist/stories/Tooltip.stories.svelte.d.ts +1 -1
  77. package/dist/stories/Typography.stories.svelte.d.ts +0 -1
  78. package/dist/{styles/theme.css.d.ts → theme.css.d.ts} +1 -0
  79. package/dist/theme.d.ts +91 -0
  80. package/dist/{styles/theme.css.js → theme.js} +2 -2
  81. package/dist/{styles/types.d.ts → types.d.ts} +0 -1
  82. package/dist/{styles/utils.d.ts → utils.d.ts} +1 -3
  83. package/dist/{styles/utils.js → utils.js} +2 -2
  84. package/package.json +115 -9
  85. package/dist/_virtual/rolldown_runtime.js +0 -29
  86. package/dist/components/DropdownMenu/index.js +0 -41
  87. package/dist/index.d.ts +0 -3
  88. package/dist/index.js +0 -24
  89. package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -24
  90. package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/adapter/dist/vanilla-extract-css-adapter.browser.esm.js +0 -43
  91. package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/dist/taggedTemplateLiteral-8e47dbd7.browser.esm.js +0 -8
  92. package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/dist/transformCss-20240126.browser.esm.js +0 -767
  93. package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.browser.esm.js +0 -297
  94. package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.browser.esm.js +0 -18
  95. package/dist/node_modules/.pnpm/@vanilla-extract_css@1.18.0/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.browser.esm.js +0 -19
  96. package/dist/node_modules/.pnpm/@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js +0 -29
  97. package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/parse.js +0 -314
  98. package/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/types.js +0 -29
  99. package/dist/node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js +0 -67
  100. package/dist/node_modules/.pnpm/dedent@1.7.1/node_modules/dedent/dist/dedent.js +0 -104
  101. package/dist/node_modules/.pnpm/deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/diff.js +0 -29
  102. package/dist/node_modules/.pnpm/deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/utils.js +0 -10
  103. package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +0 -88
  104. package/dist/node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js +0 -1155
  105. package/dist/node_modules/.pnpm/media-query-parser@2.0.2/node_modules/media-query-parser/dist/media-query-parser.esm.js +0 -940
  106. package/dist/node_modules/.pnpm/modern-ahocorasick@1.1.0/node_modules/modern-ahocorasick/dist/index.js +0 -81
  107. package/dist/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js +0 -59
  108. package/dist/styles/index.d.ts +0 -4
@@ -1,297 +0,0 @@
1
- import { __toESM } from "../../../../../../../_virtual/rolldown_runtime.js";
2
- import { injectStyles } from "../injectStyles/dist/vanilla-extract-css-injectStyles.browser.esm.js";
3
- import { get, walkObject } from "../../../../../@vanilla-extract_private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js";
4
- import { require_cssesc } from "../../../../../cssesc@3.0.0/node_modules/cssesc/cssesc.js";
5
- import { appendCss, getIdentOption, markCompositionUsed, registerClassName, registerComposition, setAdapterIfNotSet } from "../adapter/dist/vanilla-extract-css-adapter.browser.esm.js";
6
- import "./taggedTemplateLiteral-8e47dbd7.browser.esm.js";
7
- import "../../../../../dedent@1.7.1/node_modules/dedent/dist/dedent.js";
8
- import { _objectSpread2, _objectWithoutProperties, dedupeAndJoinClassList, transformCss } from "./transformCss-20240126.browser.esm.js";
9
- import { murmur2 } from "../../../../../@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js";
10
- import { getAndIncrementRefCounter, getFileScope } from "../fileScope/dist/vanilla-extract-css-fileScope.browser.esm.js";
11
- import { LRUCache } from "../../../../../lru-cache@10.4.3/node_modules/lru-cache/dist/esm/index.js";
12
- import diff_default from "../../../../../deep-object-diff@1.1.9/node_modules/deep-object-diff/mjs/diff.js";
13
- import { require_picocolors_browser } from "../../../../../picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js";
14
- import { require_cjs } from "../../../../../deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js";
15
-
16
- //#region node_modules/.pnpm/@vanilla-extract+css@1.18.0/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.browser.esm.js
17
- var import_cssesc = /* @__PURE__ */ __toESM(require_cssesc());
18
- var import_picocolors_browser = /* @__PURE__ */ __toESM(require_picocolors_browser());
19
- var import_cjs = /* @__PURE__ */ __toESM(require_cjs());
20
- var localClassNames = /* @__PURE__ */ new Set();
21
- var composedClassLists = [];
22
- var bufferedCSSObjs = [];
23
- setAdapterIfNotSet({
24
- appendCss: (cssObj) => {
25
- bufferedCSSObjs.push(cssObj);
26
- },
27
- registerClassName: (className) => {
28
- localClassNames.add(className);
29
- },
30
- registerComposition: (composition) => {
31
- composedClassLists.push(composition);
32
- },
33
- markCompositionUsed: () => {},
34
- onEndFileScope: (fileScope) => {
35
- injectStyles({
36
- fileScope,
37
- css: transformCss({
38
- localClassNames: Array.from(localClassNames),
39
- composedClassLists,
40
- cssObjs: bufferedCSSObjs
41
- }).join("\n")
42
- });
43
- bufferedCSSObjs = [];
44
- },
45
- getIdentOption: () => "debug"
46
- });
47
- var getLastSlashBeforeIndex = (path, index) => {
48
- var pathIndex = index - 1;
49
- while (pathIndex >= 0) {
50
- if (path[pathIndex] === "/") return pathIndex;
51
- pathIndex--;
52
- }
53
- return -1;
54
- };
55
- /**
56
- * Assumptions:
57
- * - The path is always normalized to use posix file separators (/) (see `addFileScope`)
58
- * - The path is always relative to the project root, i.e. there will never be a leading slash (see `addFileScope`)
59
- * - As long as `.css` is there, we have a valid `.css.*` file path, because otherwise there wouldn't
60
- * be a file scope to begin with
61
- *
62
- * The LRU cache we use can't cache undefined/null values, so we opt to return an empty string,
63
- * rather than using a custom Symbol or something similar.
64
- */
65
- var _getDebugFileName = (path) => {
66
- var file;
67
- var lastIndexOfDotCss = path.lastIndexOf(".css");
68
- if (lastIndexOfDotCss === -1) return "";
69
- var lastSlashIndex = getLastSlashBeforeIndex(path, lastIndexOfDotCss);
70
- file = path.slice(lastSlashIndex + 1, lastIndexOfDotCss);
71
- if (lastSlashIndex === -1) return file;
72
- var secondLastSlashIndex = getLastSlashBeforeIndex(path, lastSlashIndex - 1);
73
- var dir = path.slice(secondLastSlashIndex + 1, lastSlashIndex);
74
- return file !== "index" ? file : dir;
75
- };
76
- var memoizedGetDebugFileName = () => {
77
- var cache = new LRUCache({ max: 500 });
78
- return (path) => {
79
- var cachedResult = cache.get(path);
80
- if (cachedResult) return cachedResult;
81
- var result = _getDebugFileName(path);
82
- cache.set(path, result);
83
- return result;
84
- };
85
- };
86
- var getDebugFileName = memoizedGetDebugFileName();
87
- function getDevPrefix(_ref) {
88
- var { debugId, debugFileName } = _ref;
89
- var parts = debugId ? [debugId.replace(/\s/g, "_")] : [];
90
- if (debugFileName) {
91
- var { filePath } = getFileScope();
92
- var _debugFileName = getDebugFileName(filePath);
93
- if (_debugFileName) parts.unshift(_debugFileName);
94
- }
95
- return parts.join("_");
96
- }
97
- function normalizeIdentifier(identifier) {
98
- return identifier.match(/^[0-9]/) ? "_".concat(identifier) : identifier;
99
- }
100
- function generateIdentifier(arg) {
101
- var identOption = getIdentOption();
102
- var { debugId, debugFileName = true } = _objectSpread2(_objectSpread2({}, typeof arg === "string" ? { debugId: arg } : null), typeof arg === "object" ? arg : null);
103
- var refCount = getAndIncrementRefCounter().toString(36);
104
- var { filePath, packageName } = getFileScope();
105
- var fileScopeHash = murmur2(packageName ? "".concat(packageName).concat(filePath) : filePath);
106
- var identifier = "".concat(fileScopeHash).concat(refCount);
107
- if (identOption === "debug") {
108
- var devPrefix = getDevPrefix({
109
- debugId,
110
- debugFileName
111
- });
112
- if (devPrefix) identifier = "".concat(devPrefix, "__").concat(identifier);
113
- return normalizeIdentifier(identifier);
114
- }
115
- if (typeof identOption === "function") {
116
- identifier = identOption({
117
- hash: identifier,
118
- debugId,
119
- filePath,
120
- packageName
121
- });
122
- if (!identifier.match(/^[A-Z_][0-9A-Z_-]+$/i)) throw new Error("Identifier function returned invalid indentifier: \"".concat(identifier, "\""));
123
- return identifier;
124
- }
125
- return normalizeIdentifier(identifier);
126
- }
127
- var normaliseObject = (obj) => walkObject(obj, () => "");
128
- function validateContract(contract, tokens) {
129
- var theDiff = diff_default(normaliseObject(contract), normaliseObject(tokens));
130
- var valid = Object.keys(theDiff).length === 0;
131
- return {
132
- valid,
133
- diffString: valid ? "" : renderDiff(contract, theDiff)
134
- };
135
- }
136
- function diffLine(value, nesting, type) {
137
- var whitespace = [...Array(nesting).keys()].map(() => " ").join("");
138
- var line = "".concat(type ? type : " ").concat(whitespace).concat(value);
139
- if (type === "-") return import_picocolors_browser.default.red(line);
140
- if (type === "+") return import_picocolors_browser.default.green(line);
141
- return line;
142
- }
143
- function renderDiff(orig, diff) {
144
- var nesting = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
145
- var lines = [];
146
- if (nesting === 0) lines.push(diffLine("{", 0));
147
- var innerNesting = nesting + 1;
148
- for (var key of Object.keys(diff).sort()) {
149
- var value = diff[key];
150
- if (!(key in orig)) lines.push(diffLine("".concat(key, ": ...,"), innerNesting, "+"));
151
- else if (typeof value === "object") {
152
- lines.push(diffLine("".concat(key, ": {"), innerNesting));
153
- lines.push(renderDiff(orig[key], diff[key], innerNesting));
154
- lines.push(diffLine("}", innerNesting));
155
- } else lines.push(diffLine("".concat(key, ": ...,"), innerNesting, "-"));
156
- }
157
- if (nesting === 0) lines.push(diffLine("}", 0));
158
- return lines.join("\n");
159
- }
160
- var buildPropertyRule = (_ref) => {
161
- var { syntax, inherits, initialValue } = _ref;
162
- return _objectSpread2({
163
- syntax: "\"".concat(Array.isArray(syntax) ? syntax.join(" | ") : syntax, "\""),
164
- inherits: inherits ? "true" : "false"
165
- }, initialValue != null ? { initialValue } : {});
166
- };
167
- function createVar(debugIdOrDeclaration, debugId) {
168
- var cssVarName = (0, import_cssesc.default)(generateIdentifier({
169
- debugId: typeof debugIdOrDeclaration === "string" ? debugIdOrDeclaration : debugId,
170
- debugFileName: false
171
- }), { isIdentifier: true });
172
- if (debugIdOrDeclaration && typeof debugIdOrDeclaration === "object") appendCss({
173
- type: "property",
174
- name: "--".concat(cssVarName),
175
- rule: buildPropertyRule(debugIdOrDeclaration)
176
- }, getFileScope());
177
- return "var(--".concat(cssVarName, ")");
178
- }
179
- function assignVars(varContract, tokens) {
180
- var varSetters = {};
181
- var { valid, diffString } = validateContract(varContract, tokens);
182
- if (!valid) throw new Error("Tokens don't match contract.\n".concat(diffString));
183
- walkObject(tokens, (value, path) => {
184
- varSetters[get(varContract, path)] = String(value);
185
- });
186
- return varSetters;
187
- }
188
- function createThemeContract(tokens) {
189
- return walkObject(tokens, (_value, path) => {
190
- return createVar(path.join("-"));
191
- });
192
- }
193
- var _excluded = ["@layer"];
194
- function createGlobalTheme(selector, arg2, arg3) {
195
- var themeContractProvided = Boolean(arg3);
196
- var { layerName, tokens } = extractLayerFromTokens(themeContractProvided ? arg3 : arg2);
197
- var themeContract = themeContractProvided ? arg2 : createThemeContract(tokens);
198
- var rule = { vars: assignVars(themeContract, tokens) };
199
- if (layerName) rule = { "@layer": { [layerName]: rule } };
200
- appendCss({
201
- type: "global",
202
- selector,
203
- rule
204
- }, getFileScope());
205
- if (!themeContractProvided) return themeContract;
206
- }
207
- function createTheme(arg1, arg2, arg3) {
208
- var themeClassName = generateIdentifier(typeof arg2 === "object" ? arg3 : arg2);
209
- registerClassName(themeClassName, getFileScope());
210
- var vars = typeof arg2 === "object" ? createGlobalTheme(themeClassName, arg1, arg2) : createGlobalTheme(themeClassName, arg1);
211
- return vars ? [themeClassName, vars] : themeClassName;
212
- }
213
- function extractLayerFromTokens(tokens) {
214
- if ("@layer" in tokens) {
215
- var { "@layer": layerName } = tokens;
216
- return {
217
- layerName,
218
- tokens: _objectWithoutProperties(tokens, _excluded)
219
- };
220
- }
221
- return { tokens };
222
- }
223
- function composedStyle(rules, debugId) {
224
- var className = generateIdentifier(debugId);
225
- registerClassName(className, getFileScope());
226
- var classList = [];
227
- var styleRules = [];
228
- for (var rule of rules) if (typeof rule === "string") classList.push(rule);
229
- else styleRules.push(rule);
230
- var result = className;
231
- if (classList.length > 0) {
232
- result = "".concat(className, " ").concat(dedupeAndJoinClassList(classList));
233
- registerComposition({
234
- identifier: className,
235
- classList: result
236
- }, getFileScope());
237
- if (styleRules.length > 0) markCompositionUsed(className);
238
- }
239
- if (styleRules.length > 0) appendCss({
240
- type: "local",
241
- selector: className,
242
- rule: import_cjs.default.all(styleRules, { arrayMerge: (_, sourceArray) => sourceArray })
243
- }, getFileScope());
244
- return result;
245
- }
246
- function style(rule, debugId) {
247
- if (Array.isArray(rule)) return composedStyle(rule, debugId);
248
- var className = generateIdentifier(debugId);
249
- registerClassName(className, getFileScope());
250
- appendCss({
251
- type: "local",
252
- selector: className,
253
- rule
254
- }, getFileScope());
255
- return className;
256
- }
257
- function globalStyle(selector, rule) {
258
- appendCss({
259
- type: "global",
260
- selector,
261
- rule
262
- }, getFileScope());
263
- }
264
- function keyframes(rule, debugId) {
265
- var name = (0, import_cssesc.default)(generateIdentifier(debugId), { isIdentifier: true });
266
- appendCss({
267
- type: "keyframes",
268
- name,
269
- rule
270
- }, getFileScope());
271
- return name;
272
- }
273
- function globalKeyframes(name, rule) {
274
- appendCss({
275
- type: "keyframes",
276
- name,
277
- rule
278
- }, getFileScope());
279
- }
280
- function styleVariants() {
281
- if (typeof (arguments.length <= 1 ? void 0 : arguments[1]) === "function") {
282
- var _data = arguments.length <= 0 ? void 0 : arguments[0];
283
- var _mapData = arguments.length <= 1 ? void 0 : arguments[1];
284
- var _debugId = arguments.length <= 2 ? void 0 : arguments[2];
285
- var _classMap = {};
286
- for (var _key2 in _data) _classMap[_key2] = style(_mapData(_data[_key2], _key2), _debugId ? "".concat(_debugId, "_").concat(_key2) : _key2);
287
- return _classMap;
288
- }
289
- var styleMap = arguments.length <= 0 ? void 0 : arguments[0];
290
- var debugId = arguments.length <= 1 ? void 0 : arguments[1];
291
- var classMap = {};
292
- for (var _key3 in styleMap) classMap[_key3] = style(styleMap[_key3], debugId ? "".concat(debugId, "_").concat(_key3) : _key3);
293
- return classMap;
294
- }
295
-
296
- //#endregion
297
- export { createTheme, globalKeyframes, globalStyle, keyframes, style, styleVariants };
@@ -1,18 +0,0 @@
1
- import "../../adapter/dist/vanilla-extract-css-adapter.browser.esm.js";
2
- import { _taggedTemplateLiteral } from "../../dist/taggedTemplateLiteral-8e47dbd7.browser.esm.js";
3
- import dedent_default from "../../../../../../dedent@1.7.1/node_modules/dedent/dist/dedent.js";
4
-
5
- //#region node_modules/.pnpm/@vanilla-extract+css@1.18.0/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.browser.esm.js
6
- var _templateObject;
7
- var refCounter = 0;
8
- var fileScopes = [];
9
- function getFileScope() {
10
- if (fileScopes.length === 0) throw new Error(dedent_default(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Styles were unable to be assigned to a file. This is generally caused by one of the following:\n\n - You may have created styles outside of a '.css.ts' context\n - You may have incorrect configuration. See https://vanilla-extract.style/documentation/getting-started\n "]))));
11
- return fileScopes[0];
12
- }
13
- function getAndIncrementRefCounter() {
14
- return refCounter++;
15
- }
16
-
17
- //#endregion
18
- export { getAndIncrementRefCounter, getFileScope };
@@ -1,19 +0,0 @@
1
- //#region node_modules/.pnpm/@vanilla-extract+css@1.18.0/node_modules/@vanilla-extract/css/injectStyles/dist/vanilla-extract-css-injectStyles.browser.esm.js
2
- var stylesheets = {};
3
- var injectStyles = (_ref) => {
4
- var { fileScope, css } = _ref;
5
- var fileScopeId = fileScope.packageName ? [fileScope.packageName, fileScope.filePath].join("/") : fileScope.filePath;
6
- var stylesheet = stylesheets[fileScopeId];
7
- if (!stylesheet) {
8
- var styleEl = document.createElement("style");
9
- if (fileScope.packageName) styleEl.setAttribute("data-package", fileScope.packageName);
10
- styleEl.setAttribute("data-file", fileScope.filePath);
11
- styleEl.setAttribute("type", "text/css");
12
- stylesheet = stylesheets[fileScopeId] = styleEl;
13
- document.head.appendChild(styleEl);
14
- }
15
- stylesheet.innerHTML = css;
16
- };
17
-
18
- //#endregion
19
- export { injectStyles };
@@ -1,29 +0,0 @@
1
- //#region node_modules/.pnpm/@vanilla-extract+private@1.0.9/node_modules/@vanilla-extract/private/dist/vanilla-extract-private.esm.js
2
- function getVarName(variable) {
3
- var matches = variable.match(/^var\((.*)\)$/);
4
- if (matches) return matches[1];
5
- return variable;
6
- }
7
- function get(obj, path) {
8
- var result = obj;
9
- for (var key of path) {
10
- if (!(key in result)) throw new Error("Path ".concat(path.join(" -> "), " does not exist in object"));
11
- result = result[key];
12
- }
13
- return result;
14
- }
15
- function walkObject(obj, fn) {
16
- var path = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
17
- var clone = {};
18
- for (var key in obj) {
19
- var _value = obj[key];
20
- var currentPath = [...path, key];
21
- if (typeof _value === "string" || typeof _value === "number" || _value == null) clone[key] = fn(_value, currentPath);
22
- else if (typeof _value === "object" && !Array.isArray(_value)) clone[key] = walkObject(_value, fn, currentPath);
23
- else console.warn("Skipping invalid key \"".concat(currentPath.join("."), "\". Should be a string, number, null or object. Received: \"").concat(Array.isArray(_value) ? "Array" : typeof _value, "\""));
24
- }
25
- return clone;
26
- }
27
-
28
- //#endregion
29
- export { get, getVarName, walkObject };
@@ -1,314 +0,0 @@
1
- import { AttributeAction, SelectorType } from "./types.js";
2
-
3
- //#region node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/es/parse.js
4
- const reName = /^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/;
5
- const reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi;
6
- const actionTypes = new Map([
7
- [126, AttributeAction.Element],
8
- [94, AttributeAction.Start],
9
- [36, AttributeAction.End],
10
- [42, AttributeAction.Any],
11
- [33, AttributeAction.Not],
12
- [124, AttributeAction.Hyphen]
13
- ]);
14
- const unpackPseudos = new Set([
15
- "has",
16
- "not",
17
- "matches",
18
- "is",
19
- "where",
20
- "host",
21
- "host-context"
22
- ]);
23
- /**
24
- * Checks whether a specific selector is a traversal.
25
- * This is useful eg. in swapping the order of elements that
26
- * are not traversals.
27
- *
28
- * @param selector Selector to check.
29
- */
30
- function isTraversal(selector) {
31
- switch (selector.type) {
32
- case SelectorType.Adjacent:
33
- case SelectorType.Child:
34
- case SelectorType.Descendant:
35
- case SelectorType.Parent:
36
- case SelectorType.Sibling:
37
- case SelectorType.ColumnCombinator: return true;
38
- default: return false;
39
- }
40
- }
41
- const stripQuotesFromPseudos = new Set(["contains", "icontains"]);
42
- function funescape(_, escaped, escapedWhitespace) {
43
- const high = parseInt(escaped, 16) - 65536;
44
- return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
45
- }
46
- function unescapeCSS(str) {
47
- return str.replace(reEscape, funescape);
48
- }
49
- function isQuote(c) {
50
- return c === 39 || c === 34;
51
- }
52
- function isWhitespace(c) {
53
- return c === 32 || c === 9 || c === 10 || c === 12 || c === 13;
54
- }
55
- /**
56
- * Parses `selector`, optionally with the passed `options`.
57
- *
58
- * @param selector Selector to parse.
59
- * @param options Options for parsing.
60
- * @returns Returns a two-dimensional array.
61
- * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),
62
- * the second contains the relevant tokens for that selector.
63
- */
64
- function parse(selector) {
65
- const subselects = [];
66
- const endIndex = parseSelector(subselects, `${selector}`, 0);
67
- if (endIndex < selector.length) throw new Error(`Unmatched selector: ${selector.slice(endIndex)}`);
68
- return subselects;
69
- }
70
- function parseSelector(subselects, selector, selectorIndex) {
71
- let tokens = [];
72
- function getName(offset) {
73
- const match = selector.slice(selectorIndex + offset).match(reName);
74
- if (!match) throw new Error(`Expected name, found ${selector.slice(selectorIndex)}`);
75
- const [name] = match;
76
- selectorIndex += offset + name.length;
77
- return unescapeCSS(name);
78
- }
79
- function stripWhitespace(offset) {
80
- selectorIndex += offset;
81
- while (selectorIndex < selector.length && isWhitespace(selector.charCodeAt(selectorIndex))) selectorIndex++;
82
- }
83
- function readValueWithParenthesis() {
84
- selectorIndex += 1;
85
- const start = selectorIndex;
86
- let counter = 1;
87
- for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) if (selector.charCodeAt(selectorIndex) === 40 && !isEscaped(selectorIndex)) counter++;
88
- else if (selector.charCodeAt(selectorIndex) === 41 && !isEscaped(selectorIndex)) counter--;
89
- if (counter) throw new Error("Parenthesis not matched");
90
- return unescapeCSS(selector.slice(start, selectorIndex - 1));
91
- }
92
- function isEscaped(pos) {
93
- let slashCount = 0;
94
- while (selector.charCodeAt(--pos) === 92) slashCount++;
95
- return (slashCount & 1) === 1;
96
- }
97
- function ensureNotTraversal() {
98
- if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) throw new Error("Did not expect successive traversals.");
99
- }
100
- function addTraversal(type) {
101
- if (tokens.length > 0 && tokens[tokens.length - 1].type === SelectorType.Descendant) {
102
- tokens[tokens.length - 1].type = type;
103
- return;
104
- }
105
- ensureNotTraversal();
106
- tokens.push({ type });
107
- }
108
- function addSpecialAttribute(name, action) {
109
- tokens.push({
110
- type: SelectorType.Attribute,
111
- name,
112
- action,
113
- value: getName(1),
114
- namespace: null,
115
- ignoreCase: "quirks"
116
- });
117
- }
118
- /**
119
- * We have finished parsing the current part of the selector.
120
- *
121
- * Remove descendant tokens at the end if they exist,
122
- * and return the last index, so that parsing can be
123
- * picked up from here.
124
- */
125
- function finalizeSubselector() {
126
- if (tokens.length && tokens[tokens.length - 1].type === SelectorType.Descendant) tokens.pop();
127
- if (tokens.length === 0) throw new Error("Empty sub-selector");
128
- subselects.push(tokens);
129
- }
130
- stripWhitespace(0);
131
- if (selector.length === selectorIndex) return selectorIndex;
132
- loop: while (selectorIndex < selector.length) {
133
- const firstChar = selector.charCodeAt(selectorIndex);
134
- switch (firstChar) {
135
- case 32:
136
- case 9:
137
- case 10:
138
- case 12:
139
- case 13:
140
- if (tokens.length === 0 || tokens[0].type !== SelectorType.Descendant) {
141
- ensureNotTraversal();
142
- tokens.push({ type: SelectorType.Descendant });
143
- }
144
- stripWhitespace(1);
145
- break;
146
- case 62:
147
- addTraversal(SelectorType.Child);
148
- stripWhitespace(1);
149
- break;
150
- case 60:
151
- addTraversal(SelectorType.Parent);
152
- stripWhitespace(1);
153
- break;
154
- case 126:
155
- addTraversal(SelectorType.Sibling);
156
- stripWhitespace(1);
157
- break;
158
- case 43:
159
- addTraversal(SelectorType.Adjacent);
160
- stripWhitespace(1);
161
- break;
162
- case 46:
163
- addSpecialAttribute("class", AttributeAction.Element);
164
- break;
165
- case 35:
166
- addSpecialAttribute("id", AttributeAction.Equals);
167
- break;
168
- case 91: {
169
- stripWhitespace(1);
170
- let name;
171
- let namespace = null;
172
- if (selector.charCodeAt(selectorIndex) === 124) name = getName(1);
173
- else if (selector.startsWith("*|", selectorIndex)) {
174
- namespace = "*";
175
- name = getName(2);
176
- } else {
177
- name = getName(0);
178
- if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 61) {
179
- namespace = name;
180
- name = getName(1);
181
- }
182
- }
183
- stripWhitespace(0);
184
- let action = AttributeAction.Exists;
185
- const possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex));
186
- if (possibleAction) {
187
- action = possibleAction;
188
- if (selector.charCodeAt(selectorIndex + 1) !== 61) throw new Error("Expected `=`");
189
- stripWhitespace(2);
190
- } else if (selector.charCodeAt(selectorIndex) === 61) {
191
- action = AttributeAction.Equals;
192
- stripWhitespace(1);
193
- }
194
- let value = "";
195
- let ignoreCase = null;
196
- if (action !== "exists") {
197
- if (isQuote(selector.charCodeAt(selectorIndex))) {
198
- const quote = selector.charCodeAt(selectorIndex);
199
- let sectionEnd = selectorIndex + 1;
200
- while (sectionEnd < selector.length && (selector.charCodeAt(sectionEnd) !== quote || isEscaped(sectionEnd))) sectionEnd += 1;
201
- if (selector.charCodeAt(sectionEnd) !== quote) throw new Error("Attribute value didn't end");
202
- value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd));
203
- selectorIndex = sectionEnd + 1;
204
- } else {
205
- const valueStart = selectorIndex;
206
- while (selectorIndex < selector.length && (!isWhitespace(selector.charCodeAt(selectorIndex)) && selector.charCodeAt(selectorIndex) !== 93 || isEscaped(selectorIndex))) selectorIndex += 1;
207
- value = unescapeCSS(selector.slice(valueStart, selectorIndex));
208
- }
209
- stripWhitespace(0);
210
- const forceIgnore = selector.charCodeAt(selectorIndex) | 32;
211
- if (forceIgnore === 115) {
212
- ignoreCase = false;
213
- stripWhitespace(1);
214
- } else if (forceIgnore === 105) {
215
- ignoreCase = true;
216
- stripWhitespace(1);
217
- }
218
- }
219
- if (selector.charCodeAt(selectorIndex) !== 93) throw new Error("Attribute selector didn't terminate");
220
- selectorIndex += 1;
221
- const attributeSelector = {
222
- type: SelectorType.Attribute,
223
- name,
224
- action,
225
- value,
226
- namespace,
227
- ignoreCase
228
- };
229
- tokens.push(attributeSelector);
230
- break;
231
- }
232
- case 58: {
233
- if (selector.charCodeAt(selectorIndex + 1) === 58) {
234
- tokens.push({
235
- type: SelectorType.PseudoElement,
236
- name: getName(2).toLowerCase(),
237
- data: selector.charCodeAt(selectorIndex) === 40 ? readValueWithParenthesis() : null
238
- });
239
- continue;
240
- }
241
- const name = getName(1).toLowerCase();
242
- let data = null;
243
- if (selector.charCodeAt(selectorIndex) === 40) if (unpackPseudos.has(name)) {
244
- if (isQuote(selector.charCodeAt(selectorIndex + 1))) throw new Error(`Pseudo-selector ${name} cannot be quoted`);
245
- data = [];
246
- selectorIndex = parseSelector(data, selector, selectorIndex + 1);
247
- if (selector.charCodeAt(selectorIndex) !== 41) throw new Error(`Missing closing parenthesis in :${name} (${selector})`);
248
- selectorIndex += 1;
249
- } else {
250
- data = readValueWithParenthesis();
251
- if (stripQuotesFromPseudos.has(name)) {
252
- const quot = data.charCodeAt(0);
253
- if (quot === data.charCodeAt(data.length - 1) && isQuote(quot)) data = data.slice(1, -1);
254
- }
255
- data = unescapeCSS(data);
256
- }
257
- tokens.push({
258
- type: SelectorType.Pseudo,
259
- name,
260
- data
261
- });
262
- break;
263
- }
264
- case 44:
265
- finalizeSubselector();
266
- tokens = [];
267
- stripWhitespace(1);
268
- break;
269
- default: {
270
- if (selector.startsWith("/*", selectorIndex)) {
271
- const endIndex = selector.indexOf("*/", selectorIndex + 2);
272
- if (endIndex < 0) throw new Error("Comment was not terminated");
273
- selectorIndex = endIndex + 2;
274
- if (tokens.length === 0) stripWhitespace(0);
275
- break;
276
- }
277
- let namespace = null;
278
- let name;
279
- if (firstChar === 42) {
280
- selectorIndex += 1;
281
- name = "*";
282
- } else if (firstChar === 124) {
283
- name = "";
284
- if (selector.charCodeAt(selectorIndex + 1) === 124) {
285
- addTraversal(SelectorType.ColumnCombinator);
286
- stripWhitespace(2);
287
- break;
288
- }
289
- } else if (reName.test(selector.slice(selectorIndex))) name = getName(0);
290
- else break loop;
291
- if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 124) {
292
- namespace = name;
293
- if (selector.charCodeAt(selectorIndex + 1) === 42) {
294
- name = "*";
295
- selectorIndex += 2;
296
- } else name = getName(1);
297
- }
298
- tokens.push(name === "*" ? {
299
- type: SelectorType.Universal,
300
- namespace
301
- } : {
302
- type: SelectorType.Tag,
303
- name,
304
- namespace
305
- });
306
- }
307
- }
308
- }
309
- finalizeSubselector();
310
- return selectorIndex;
311
- }
312
-
313
- //#endregion
314
- export { parse };