@farming-labs/theme 0.0.24 → 0.0.26

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 (53) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +26 -1
  2. package/dist/docs-api.mjs +3 -1
  3. package/dist/docs-layout.mjs +9 -4
  4. package/dist/get-app-dir.d.mts +9 -0
  5. package/dist/get-app-dir.mjs +16 -0
  6. package/dist/get-app-dir.test.d.mts +1 -0
  7. package/dist/get-app-dir.test.mjs +41 -0
  8. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +77 -0
  9. package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.mjs +1356 -0
  10. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.mjs +1119 -0
  11. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.mjs +1091 -0
  12. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.mjs +4 -0
  13. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/utils.mjs +3 -0
  14. package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.mjs +1821 -0
  15. package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.mjs +171 -0
  16. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs +124 -0
  17. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.mjs +1334 -0
  18. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.mjs +105 -0
  19. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.mjs +118 -0
  20. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.mjs +455 -0
  21. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.mjs +168 -0
  22. package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.mjs +3087 -0
  23. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.mjs +384 -0
  24. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.mjs +11 -0
  25. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.mjs +16 -0
  26. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.mjs +11 -0
  27. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.mjs +15 -0
  28. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.mjs +13 -0
  29. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.mjs +34 -0
  30. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.mjs +12 -0
  31. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.mjs +122 -0
  32. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.mjs +39 -0
  33. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.mjs +99 -0
  34. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.mjs +25 -0
  35. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.mjs +14 -0
  36. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.mjs +21 -0
  37. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.mjs +5 -0
  38. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.mjs +12 -0
  39. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.mjs +18 -0
  40. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.mjs +25 -0
  41. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.mjs +8 -0
  42. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.mjs +30 -0
  43. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +939 -0
  44. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +81 -0
  45. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs +51 -0
  46. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.mjs +81 -0
  47. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.mjs +9 -0
  48. package/dist/node_modules/.pnpm/tinyspy@4.0.4/node_modules/tinyspy/dist/index.mjs +125 -0
  49. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@22.19.11_jiti@2.6.1_lightningcss@1.30.2_terser@5.46.0_yaml@2.8.2/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.mjs +8 -0
  50. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@22.19.11_jiti@2.6.1_lightningcss@1.30.2_terser@5.46.0_yaml@2.8.2/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.mjs +50 -0
  51. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@22.19.11_jiti@2.6.1_lightningcss@1.30.2_terser@5.46.0_yaml@2.8.2/node_modules/vitest/dist/chunks/utils.XdZDrNZV.mjs +48 -0
  52. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@22.19.11_jiti@2.6.1_lightningcss@1.30.2_terser@5.46.0_yaml@2.8.2/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.mjs +2613 -0
  53. package/package.json +6 -3
@@ -0,0 +1,99 @@
1
+ import { normaliseOptions } from "./helpers.mjs";
2
+ import inspectArray from "./array.mjs";
3
+ import inspectTypedArray from "./typedarray.mjs";
4
+ import inspectDate from "./date.mjs";
5
+ import inspectFunction from "./function.mjs";
6
+ import inspectMap from "./map.mjs";
7
+ import inspectNumber from "./number.mjs";
8
+ import inspectBigInt from "./bigint.mjs";
9
+ import inspectRegExp from "./regexp.mjs";
10
+ import inspectSet from "./set.mjs";
11
+ import inspectString from "./string.mjs";
12
+ import inspectSymbol from "./symbol.mjs";
13
+ import getPromiseValue from "./promise.mjs";
14
+ import inspectObject from "./object.mjs";
15
+ import inspectClass from "./class.mjs";
16
+ import inspectArguments from "./arguments.mjs";
17
+ import inspectObject$1 from "./error.mjs";
18
+ import inspectHTML, { inspectNodeCollection } from "./html.mjs";
19
+
20
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js
21
+ const chaiInspect = typeof Symbol === "function" && typeof Symbol.for === "function" ? Symbol.for("chai/inspect") : "@@chai/inspect";
22
+ const nodeInspect = Symbol.for("nodejs.util.inspect.custom");
23
+ const constructorMap = /* @__PURE__ */ new WeakMap();
24
+ const stringTagMap = {};
25
+ const baseTypesMap = {
26
+ undefined: (value, options) => options.stylize("undefined", "undefined"),
27
+ null: (value, options) => options.stylize("null", "null"),
28
+ boolean: (value, options) => options.stylize(String(value), "boolean"),
29
+ Boolean: (value, options) => options.stylize(String(value), "boolean"),
30
+ number: inspectNumber,
31
+ Number: inspectNumber,
32
+ bigint: inspectBigInt,
33
+ BigInt: inspectBigInt,
34
+ string: inspectString,
35
+ String: inspectString,
36
+ function: inspectFunction,
37
+ Function: inspectFunction,
38
+ symbol: inspectSymbol,
39
+ Symbol: inspectSymbol,
40
+ Array: inspectArray,
41
+ Date: inspectDate,
42
+ Map: inspectMap,
43
+ Set: inspectSet,
44
+ RegExp: inspectRegExp,
45
+ Promise: getPromiseValue,
46
+ WeakSet: (value, options) => options.stylize("WeakSet{…}", "special"),
47
+ WeakMap: (value, options) => options.stylize("WeakMap{…}", "special"),
48
+ Arguments: inspectArguments,
49
+ Int8Array: inspectTypedArray,
50
+ Uint8Array: inspectTypedArray,
51
+ Uint8ClampedArray: inspectTypedArray,
52
+ Int16Array: inspectTypedArray,
53
+ Uint16Array: inspectTypedArray,
54
+ Int32Array: inspectTypedArray,
55
+ Uint32Array: inspectTypedArray,
56
+ Float32Array: inspectTypedArray,
57
+ Float64Array: inspectTypedArray,
58
+ Generator: () => "",
59
+ DataView: () => "",
60
+ ArrayBuffer: () => "",
61
+ Error: inspectObject$1,
62
+ HTMLCollection: inspectNodeCollection,
63
+ NodeList: inspectNodeCollection
64
+ };
65
+ const inspectCustom = (value, options, type, inspectFn) => {
66
+ if (chaiInspect in value && typeof value[chaiInspect] === "function") return value[chaiInspect](options);
67
+ if (nodeInspect in value && typeof value[nodeInspect] === "function") return value[nodeInspect](options.depth, options, inspectFn);
68
+ if ("inspect" in value && typeof value.inspect === "function") return value.inspect(options.depth, options);
69
+ if ("constructor" in value && constructorMap.has(value.constructor)) return constructorMap.get(value.constructor)(value, options);
70
+ if (stringTagMap[type]) return stringTagMap[type](value, options);
71
+ return "";
72
+ };
73
+ const toString = Object.prototype.toString;
74
+ function inspect(value, opts = {}) {
75
+ const options = normaliseOptions(opts, inspect);
76
+ const { customInspect } = options;
77
+ let type = value === null ? "null" : typeof value;
78
+ if (type === "object") type = toString.call(value).slice(8, -1);
79
+ if (type in baseTypesMap) return baseTypesMap[type](value, options);
80
+ if (customInspect && value) {
81
+ const output = inspectCustom(value, options, type, inspect);
82
+ if (output) {
83
+ if (typeof output === "string") return output;
84
+ return inspect(output, options);
85
+ }
86
+ }
87
+ const proto = value ? Object.getPrototypeOf(value) : false;
88
+ if (proto === Object.prototype || proto === null) return inspectObject(value, options);
89
+ if (value && typeof HTMLElement === "function" && value instanceof HTMLElement) return inspectHTML(value, options);
90
+ if ("constructor" in value) {
91
+ if (value.constructor !== Object) return inspectClass(value, options);
92
+ return inspectObject(value, options);
93
+ }
94
+ if (value === Object(value)) return inspectObject(value, options);
95
+ return options.stylize(String(value), type);
96
+ }
97
+
98
+ //#endregion
99
+ export { inspect as default };
@@ -0,0 +1,25 @@
1
+ import { inspectList } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js
4
+ function inspectMapEntry([key, value], options) {
5
+ options.truncate -= 4;
6
+ key = options.inspect(key, options);
7
+ options.truncate -= key.length;
8
+ value = options.inspect(value, options);
9
+ return `${key} => ${value}`;
10
+ }
11
+ function mapToEntries(map) {
12
+ const entries = [];
13
+ map.forEach((value, key) => {
14
+ entries.push([key, value]);
15
+ });
16
+ return entries;
17
+ }
18
+ function inspectMap(map, options) {
19
+ if (map.size === 0) return "Map{}";
20
+ options.truncate -= 7;
21
+ return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
22
+ }
23
+
24
+ //#endregion
25
+ export { inspectMap as default };
@@ -0,0 +1,14 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js
4
+ const isNaN = Number.isNaN || ((i) => i !== i);
5
+ function inspectNumber(number, options) {
6
+ if (isNaN(number)) return options.stylize("NaN", "number");
7
+ if (number === Infinity) return options.stylize("Infinity", "number");
8
+ if (number === -Infinity) return options.stylize("-Infinity", "number");
9
+ if (number === 0) return options.stylize(1 / number === Infinity ? "+0" : "-0", "number");
10
+ return options.stylize(truncate(String(number), options.truncate), "number");
11
+ }
12
+
13
+ //#endregion
14
+ export { inspectNumber as default };
@@ -0,0 +1,21 @@
1
+ import { inspectList, inspectProperty } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js
4
+ function inspectObject(object, options) {
5
+ const properties = Object.getOwnPropertyNames(object);
6
+ const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
7
+ if (properties.length === 0 && symbols.length === 0) return "{}";
8
+ options.truncate -= 4;
9
+ options.seen = options.seen || [];
10
+ if (options.seen.includes(object)) return "[Circular]";
11
+ options.seen.push(object);
12
+ const propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty);
13
+ const symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty);
14
+ options.seen.pop();
15
+ let sep = "";
16
+ if (propertyContents && symbolContents) sep = ", ";
17
+ return `{ ${propertyContents}${sep}${symbolContents} }`;
18
+ }
19
+
20
+ //#endregion
21
+ export { inspectObject as default };
@@ -0,0 +1,5 @@
1
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js
2
+ const getPromiseValue = () => "Promise{…}";
3
+
4
+ //#endregion
5
+ export { getPromiseValue as default };
@@ -0,0 +1,12 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js
4
+ function inspectRegExp(value, options) {
5
+ const flags = value.toString().split("/")[2];
6
+ const sourceLength = options.truncate - (2 + flags.length);
7
+ const source = value.source;
8
+ return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
9
+ }
10
+
11
+ //#endregion
12
+ export { inspectRegExp as default };
@@ -0,0 +1,18 @@
1
+ import { inspectList } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js
4
+ function arrayFromSet(set) {
5
+ const values = [];
6
+ set.forEach((value) => {
7
+ values.push(value);
8
+ });
9
+ return values;
10
+ }
11
+ function inspectSet(set, options) {
12
+ if (set.size === 0) return "Set{}";
13
+ options.truncate -= 7;
14
+ return `Set{ ${inspectList(arrayFromSet(set), options)} }`;
15
+ }
16
+
17
+ //#endregion
18
+ export { inspectSet as default };
@@ -0,0 +1,25 @@
1
+ import { truncate } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js
4
+ const stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g");
5
+ const escapeCharacters = {
6
+ "\b": "\\b",
7
+ " ": "\\t",
8
+ "\n": "\\n",
9
+ "\f": "\\f",
10
+ "\r": "\\r",
11
+ "'": "\\'",
12
+ "\\": "\\\\"
13
+ };
14
+ const hex = 16;
15
+ const unicodeLength = 4;
16
+ function escape(char) {
17
+ return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`;
18
+ }
19
+ function inspectString(string, options) {
20
+ if (stringEscapeChars.test(string)) string = string.replace(stringEscapeChars, escape);
21
+ return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
22
+ }
23
+
24
+ //#endregion
25
+ export { inspectString as default };
@@ -0,0 +1,8 @@
1
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js
2
+ function inspectSymbol(value) {
3
+ if ("description" in Symbol.prototype) return value.description ? `Symbol(${value.description})` : "Symbol()";
4
+ return value.toString();
5
+ }
6
+
7
+ //#endregion
8
+ export { inspectSymbol as default };
@@ -0,0 +1,30 @@
1
+ import { inspectList, inspectProperty, truncate, truncator } from "./helpers.mjs";
2
+
3
+ //#region ../../node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js
4
+ const getArrayName = (array) => {
5
+ if (typeof Buffer === "function" && array instanceof Buffer) return "Buffer";
6
+ if (array[Symbol.toStringTag]) return array[Symbol.toStringTag];
7
+ return array.constructor.name;
8
+ };
9
+ function inspectTypedArray(array, options) {
10
+ const name = getArrayName(array);
11
+ options.truncate -= name.length + 4;
12
+ const nonIndexProperties = Object.keys(array).slice(array.length);
13
+ if (!array.length && !nonIndexProperties.length) return `${name}[]`;
14
+ let output = "";
15
+ for (let i = 0; i < array.length; i++) {
16
+ const string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`;
17
+ options.truncate -= string.length;
18
+ if (array[i] !== array.length && options.truncate <= 3) {
19
+ output += `${truncator}(${array.length - array[i] + 1})`;
20
+ break;
21
+ }
22
+ output += string;
23
+ }
24
+ let propertyContents = "";
25
+ if (nonIndexProperties.length) propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
26
+ return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
27
+ }
28
+
29
+ //#endregion
30
+ export { inspectTypedArray as default };