@weapp-tailwindcss/shared 1.0.0-alpha.3 → 1.0.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.
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.5.1_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.5.2_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.5.1_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.5.2_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.5.1_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.5.2_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
31
31
  var init_cjs_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.5.1_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.5.2_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZRPRHDATjs = require('./chunk-ZRPRHDAT.js');
3
+ var _chunk7ERPOV3Yjs = require('./chunk-7ERPOV3Y.js');
4
4
 
5
5
  // src/extractors/index.ts
6
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
6
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
7
7
 
8
8
  // src/extractors/split.ts
9
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
9
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
10
10
  var validateFilterRE = /[\w\u00A0-\uFFFF%-?]/;
11
11
  function isValidSelector(selector = "") {
12
12
  return validateFilterRE.test(selector);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-WGTBZWFY.mjs";
3
+ } from "./chunk-4DONL25O.mjs";
4
4
 
5
5
  // src/extractors/index.ts
6
6
  init_esm_shims();
package/dist/index.js CHANGED
@@ -1,115 +1,14 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
4
 
5
- var _chunkZRPRHDATjs = require('./chunk-ZRPRHDAT.js');
6
-
7
- // ../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js
8
- var require_isobject = _chunkZRPRHDATjs.__commonJS.call(void 0, {
9
- "../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js"(exports, module) {
10
- "use strict";
11
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
12
- module.exports = function isObject(val) {
13
- return val != null && typeof val === "object" && Array.isArray(val) === false;
14
- };
15
- }
16
- });
17
-
18
- // ../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js
19
- var require_get_value = _chunkZRPRHDATjs.__commonJS.call(void 0, {
20
- "../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js"(exports, module) {
21
- "use strict";
22
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
23
- var isObject = require_isobject();
24
- module.exports = function(target, path, options) {
25
- if (!isObject(options)) {
26
- options = { default: options };
27
- }
28
- if (!isValidObject(target)) {
29
- return typeof options.default !== "undefined" ? options.default : target;
30
- }
31
- if (typeof path === "number") {
32
- path = String(path);
33
- }
34
- const isArray = Array.isArray(path);
35
- const isString = typeof path === "string";
36
- const splitChar = options.separator || ".";
37
- const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
38
- if (!isString && !isArray) {
39
- return target;
40
- }
41
- if (isString && path in target) {
42
- return isValid(path, target, options) ? target[path] : options.default;
43
- }
44
- let segs = isArray ? path : split(path, splitChar, options);
45
- let len = segs.length;
46
- let idx = 0;
47
- do {
48
- let prop = segs[idx];
49
- if (typeof prop === "number") {
50
- prop = String(prop);
51
- }
52
- while (prop && prop.slice(-1) === "\\") {
53
- prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
54
- }
55
- if (prop in target) {
56
- if (!isValid(prop, target, options)) {
57
- return options.default;
58
- }
59
- target = target[prop];
60
- } else {
61
- let hasProp = false;
62
- let n = idx + 1;
63
- while (n < len) {
64
- prop = join([prop, segs[n++]], joinChar, options);
65
- if (hasProp = prop in target) {
66
- if (!isValid(prop, target, options)) {
67
- return options.default;
68
- }
69
- target = target[prop];
70
- idx = n - 1;
71
- break;
72
- }
73
- }
74
- if (!hasProp) {
75
- return options.default;
76
- }
77
- }
78
- } while (++idx < len && isValidObject(target));
79
- if (idx === len) {
80
- return target;
81
- }
82
- return options.default;
83
- };
84
- function join(segs, joinChar, options) {
85
- if (typeof options.join === "function") {
86
- return options.join(segs);
87
- }
88
- return segs[0] + joinChar + segs[1];
89
- }
90
- function split(path, splitChar, options) {
91
- if (typeof options.split === "function") {
92
- return options.split(path);
93
- }
94
- return path.split(splitChar);
95
- }
96
- function isValid(key, target, options) {
97
- if (typeof options.isValid === "function") {
98
- return options.isValid(key, target);
99
- }
100
- return true;
101
- }
102
- function isValidObject(val) {
103
- return isObject(val) || Array.isArray(val) || typeof val === "function";
104
- }
105
- }
106
- });
5
+ var _chunk7ERPOV3Yjs = require('./chunk-7ERPOV3Y.js');
107
6
 
108
7
  // ../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js
109
- var require_is_primitive = _chunkZRPRHDATjs.__commonJS.call(void 0, {
8
+ var require_is_primitive = _chunk7ERPOV3Yjs.__commonJS.call(void 0, {
110
9
  "../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js"(exports, module) {
111
10
  "use strict";
112
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
11
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
113
12
  module.exports = function isPrimitive(val) {
114
13
  if (typeof val === "object") {
115
14
  return val === null;
@@ -119,14 +18,25 @@ var require_is_primitive = _chunkZRPRHDATjs.__commonJS.call(void 0, {
119
18
  }
120
19
  });
121
20
 
21
+ // ../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js
22
+ var require_isobject = _chunk7ERPOV3Yjs.__commonJS.call(void 0, {
23
+ "../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js"(exports, module) {
24
+ "use strict";
25
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
26
+ module.exports = function isObject2(val) {
27
+ return val != null && typeof val === "object" && Array.isArray(val) === false;
28
+ };
29
+ }
30
+ });
31
+
122
32
  // ../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js
123
- var require_is_plain_object = _chunkZRPRHDATjs.__commonJS.call(void 0, {
33
+ var require_is_plain_object = _chunk7ERPOV3Yjs.__commonJS.call(void 0, {
124
34
  "../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js"(exports, module) {
125
35
  "use strict";
126
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
127
- var isObject = require_isobject();
36
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
37
+ var isObject2 = require_isobject();
128
38
  function isObjectObject(o) {
129
- return isObject(o) === true && Object.prototype.toString.call(o) === "[object Object]";
39
+ return isObject2(o) === true && Object.prototype.toString.call(o) === "[object Object]";
130
40
  }
131
41
  module.exports = function isPlainObject2(o) {
132
42
  var ctor, prot;
@@ -144,14 +54,14 @@ var require_is_plain_object = _chunkZRPRHDATjs.__commonJS.call(void 0, {
144
54
  });
145
55
 
146
56
  // ../../node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js
147
- var require_set_value = _chunkZRPRHDATjs.__commonJS.call(void 0, {
57
+ var require_set_value = _chunk7ERPOV3Yjs.__commonJS.call(void 0, {
148
58
  "../../node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js"(exports, module) {
149
59
  "use strict";
150
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
60
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
151
61
  var { deleteProperty } = Reflect;
152
62
  var isPrimitive = require_is_primitive();
153
63
  var isPlainObject2 = require_is_plain_object();
154
- var isObject = (value) => {
64
+ var isObject2 = (value) => {
155
65
  return typeof value === "object" && value !== null || typeof value === "function";
156
66
  };
157
67
  var isUnsafeKey = (key) => {
@@ -219,7 +129,7 @@ var require_set_value = _chunkZRPRHDATjs.__commonJS.call(void 0, {
219
129
  }
220
130
  return parts;
221
131
  };
222
- var split = (input, options) => {
132
+ var split2 = (input, options) => {
223
133
  if (options && typeof options.split === "function") return options.split(input);
224
134
  if (typeof input === "symbol") return [input];
225
135
  if (Array.isArray(input)) return input;
@@ -242,8 +152,8 @@ var require_set_value = _chunkZRPRHDATjs.__commonJS.call(void 0, {
242
152
  return obj;
243
153
  };
244
154
  var setValue2 = (target, path, value, options) => {
245
- if (!path || !isObject(target)) return target;
246
- const keys = split(path, options);
155
+ if (!path || !isObject2(target)) return target;
156
+ const keys = split2(path, options);
247
157
  let obj = target;
248
158
  for (let i = 0; i < keys.length; i++) {
249
159
  const key = keys[i];
@@ -257,14 +167,14 @@ var require_set_value = _chunkZRPRHDATjs.__commonJS.call(void 0, {
257
167
  obj = obj[key] = [];
258
168
  continue;
259
169
  }
260
- if (!isObject(obj[key])) {
170
+ if (!isObject2(obj[key])) {
261
171
  obj[key] = {};
262
172
  }
263
173
  obj = obj[key];
264
174
  }
265
175
  return target;
266
176
  };
267
- setValue2.split = split;
177
+ setValue2.split = split2;
268
178
  setValue2.cache = /* @__PURE__ */ new Map();
269
179
  setValue2.clear = () => {
270
180
  setValue2.cache = /* @__PURE__ */ new Map();
@@ -274,10 +184,10 @@ var require_set_value = _chunkZRPRHDATjs.__commonJS.call(void 0, {
274
184
  });
275
185
 
276
186
  // src/index.ts
277
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
187
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
278
188
 
279
189
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
280
- _chunkZRPRHDATjs.init_cjs_shims.call(void 0, );
190
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
281
191
  function isPlainObject(value) {
282
192
  if (value === null || typeof value !== "object") {
283
193
  return false;
@@ -345,9 +255,96 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
345
255
  }
346
256
  });
347
257
 
258
+ // ../../node_modules/.pnpm/get-value@4.0.1/node_modules/get-value/dist/index.mjs
259
+ _chunk7ERPOV3Yjs.init_cjs_shims.call(void 0, );
260
+ var __defProp = Object.defineProperty;
261
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
262
+ var isObject = /* @__PURE__ */ __name((v) => v !== null && typeof v === "object", "isObject");
263
+ var join = /* @__PURE__ */ __name((segs, joinChar, options) => {
264
+ if (typeof options.join === "function") {
265
+ return options.join(segs);
266
+ }
267
+ return segs[0] + joinChar + segs[1];
268
+ }, "join");
269
+ var split = /* @__PURE__ */ __name((path, splitChar, options) => {
270
+ if (typeof options.split === "function") {
271
+ return options.split(path);
272
+ }
273
+ return path.split(splitChar);
274
+ }, "split");
275
+ var isValid = /* @__PURE__ */ __name((key, target = {}, options) => {
276
+ if (typeof _optionalChain([options, 'optionalAccess', _ => _.isValid]) === "function") {
277
+ return options.isValid(key, target);
278
+ }
279
+ return true;
280
+ }, "isValid");
281
+ var isValidObject = /* @__PURE__ */ __name((v) => {
282
+ return isObject(v) || typeof v === "function";
283
+ }, "isValidObject");
284
+ var getValue = /* @__PURE__ */ __name((target, path, options = {}) => {
285
+ if (!isObject(options)) {
286
+ options = { default: options };
287
+ }
288
+ if (!isValidObject(target)) {
289
+ return typeof options.default !== "undefined" ? options.default : target;
290
+ }
291
+ if (typeof path === "number") {
292
+ path = String(path);
293
+ }
294
+ const pathIsArray = Array.isArray(path);
295
+ const pathIsString = typeof path === "string";
296
+ const splitChar = options.separator || ".";
297
+ const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
298
+ if (!pathIsString && !pathIsArray) {
299
+ return target;
300
+ }
301
+ if (target[path] !== void 0) {
302
+ return isValid(path, target, options) ? target[path] : options.default;
303
+ }
304
+ const segs = pathIsArray ? path : split(path, splitChar, options);
305
+ const len = segs.length;
306
+ let idx = 0;
307
+ do {
308
+ let prop = segs[idx];
309
+ if (typeof prop !== "string") {
310
+ prop = String(prop);
311
+ }
312
+ while (prop && prop.slice(-1) === "\\") {
313
+ prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
314
+ }
315
+ if (target[prop] !== void 0) {
316
+ if (!isValid(prop, target, options)) {
317
+ return options.default;
318
+ }
319
+ target = target[prop];
320
+ } else {
321
+ let hasProp = false;
322
+ let n = idx + 1;
323
+ while (n < len) {
324
+ prop = join([prop, segs[n++]], joinChar, options);
325
+ if (hasProp = target[prop] !== void 0) {
326
+ if (!isValid(prop, target, options)) {
327
+ return options.default;
328
+ }
329
+ target = target[prop];
330
+ idx = n - 1;
331
+ break;
332
+ }
333
+ }
334
+ if (!hasProp) {
335
+ return options.default;
336
+ }
337
+ }
338
+ } while (++idx < len && isValidObject(target));
339
+ if (idx === len) {
340
+ return target;
341
+ }
342
+ return options.default;
343
+ }, "getValue");
344
+ var index_default = getValue;
345
+
348
346
  // src/index.ts
349
- var import_get_value = _chunkZRPRHDATjs.__toESM.call(void 0, require_get_value());
350
- var import_set_value = _chunkZRPRHDATjs.__toESM.call(void 0, require_set_value());
347
+ var import_set_value = _chunk7ERPOV3Yjs.__toESM.call(void 0, require_set_value());
351
348
  function isRegexp(value) {
352
349
  return Object.prototype.toString.call(value) === "[object RegExp]";
353
350
  }
@@ -405,7 +402,6 @@ var defuOverrideArray = createDefu((obj, key, value) => {
405
402
  return true;
406
403
  }
407
404
  });
408
- var export_getValue = import_get_value.default;
409
405
  var export_setValue = import_set_value.default;
410
406
 
411
407
 
@@ -418,30 +414,22 @@ var export_setValue = import_set_value.default;
418
414
 
419
415
 
420
416
 
421
- exports.defu = defu; exports.defuOverrideArray = defuOverrideArray; exports.getValue = export_getValue; exports.groupBy = groupBy; exports.isMap = isMap; exports.isRegexp = isRegexp; exports.noop = noop; exports.regExpTest = regExpTest; exports.removeExt = removeExt; exports.setValue = export_setValue;
417
+ exports.defu = defu; exports.defuOverrideArray = defuOverrideArray; exports.getValue = index_default; exports.groupBy = groupBy; exports.isMap = isMap; exports.isRegexp = isRegexp; exports.noop = noop; exports.regExpTest = regExpTest; exports.removeExt = removeExt; exports.setValue = export_setValue;
422
418
  /*! Bundled license information:
423
419
 
424
- isobject/index.js:
425
- (*!
426
- * isobject <https://github.com/jonschlinkert/isobject>
427
- *
428
- * Copyright (c) 2014-2017, Jon Schlinkert.
429
- * Released under the MIT License.
430
- *)
431
-
432
- get-value/index.js:
420
+ is-primitive/index.js:
433
421
  (*!
434
- * get-value <https://github.com/jonschlinkert/get-value>
422
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
435
423
  *
436
- * Copyright (c) 2014-2018, Jon Schlinkert.
424
+ * Copyright (c) 2014-present, Jon Schlinkert.
437
425
  * Released under the MIT License.
438
426
  *)
439
427
 
440
- is-primitive/index.js:
428
+ isobject/index.js:
441
429
  (*!
442
- * is-primitive <https://github.com/jonschlinkert/is-primitive>
430
+ * isobject <https://github.com/jonschlinkert/isobject>
443
431
  *
444
- * Copyright (c) 2014-present, Jon Schlinkert.
432
+ * Copyright (c) 2014-2017, Jon Schlinkert.
445
433
  * Released under the MIT License.
446
434
  *)
447
435
 
@@ -460,4 +448,12 @@ set-value/index.js:
460
448
  * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
461
449
  * Released under the MIT License.
462
450
  *)
451
+
452
+ get-value/dist/index.mjs:
453
+ (*!
454
+ * get-value <https://github.com/jonschlinkert/get-value>
455
+ *
456
+ * Copyright (c) 2014-present, Jon Schlinkert.
457
+ * Released under the MIT License.
458
+ *)
463
459
  */
package/dist/index.mjs CHANGED
@@ -2,108 +2,7 @@ import {
2
2
  __commonJS,
3
3
  __toESM,
4
4
  init_esm_shims
5
- } from "./chunk-WGTBZWFY.mjs";
6
-
7
- // ../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js
8
- var require_isobject = __commonJS({
9
- "../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js"(exports, module) {
10
- "use strict";
11
- init_esm_shims();
12
- module.exports = function isObject(val) {
13
- return val != null && typeof val === "object" && Array.isArray(val) === false;
14
- };
15
- }
16
- });
17
-
18
- // ../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js
19
- var require_get_value = __commonJS({
20
- "../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js"(exports, module) {
21
- "use strict";
22
- init_esm_shims();
23
- var isObject = require_isobject();
24
- module.exports = function(target, path, options) {
25
- if (!isObject(options)) {
26
- options = { default: options };
27
- }
28
- if (!isValidObject(target)) {
29
- return typeof options.default !== "undefined" ? options.default : target;
30
- }
31
- if (typeof path === "number") {
32
- path = String(path);
33
- }
34
- const isArray = Array.isArray(path);
35
- const isString = typeof path === "string";
36
- const splitChar = options.separator || ".";
37
- const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
38
- if (!isString && !isArray) {
39
- return target;
40
- }
41
- if (isString && path in target) {
42
- return isValid(path, target, options) ? target[path] : options.default;
43
- }
44
- let segs = isArray ? path : split(path, splitChar, options);
45
- let len = segs.length;
46
- let idx = 0;
47
- do {
48
- let prop = segs[idx];
49
- if (typeof prop === "number") {
50
- prop = String(prop);
51
- }
52
- while (prop && prop.slice(-1) === "\\") {
53
- prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
54
- }
55
- if (prop in target) {
56
- if (!isValid(prop, target, options)) {
57
- return options.default;
58
- }
59
- target = target[prop];
60
- } else {
61
- let hasProp = false;
62
- let n = idx + 1;
63
- while (n < len) {
64
- prop = join([prop, segs[n++]], joinChar, options);
65
- if (hasProp = prop in target) {
66
- if (!isValid(prop, target, options)) {
67
- return options.default;
68
- }
69
- target = target[prop];
70
- idx = n - 1;
71
- break;
72
- }
73
- }
74
- if (!hasProp) {
75
- return options.default;
76
- }
77
- }
78
- } while (++idx < len && isValidObject(target));
79
- if (idx === len) {
80
- return target;
81
- }
82
- return options.default;
83
- };
84
- function join(segs, joinChar, options) {
85
- if (typeof options.join === "function") {
86
- return options.join(segs);
87
- }
88
- return segs[0] + joinChar + segs[1];
89
- }
90
- function split(path, splitChar, options) {
91
- if (typeof options.split === "function") {
92
- return options.split(path);
93
- }
94
- return path.split(splitChar);
95
- }
96
- function isValid(key, target, options) {
97
- if (typeof options.isValid === "function") {
98
- return options.isValid(key, target);
99
- }
100
- return true;
101
- }
102
- function isValidObject(val) {
103
- return isObject(val) || Array.isArray(val) || typeof val === "function";
104
- }
105
- }
106
- });
5
+ } from "./chunk-4DONL25O.mjs";
107
6
 
108
7
  // ../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js
109
8
  var require_is_primitive = __commonJS({
@@ -119,14 +18,25 @@ var require_is_primitive = __commonJS({
119
18
  }
120
19
  });
121
20
 
21
+ // ../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js
22
+ var require_isobject = __commonJS({
23
+ "../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js"(exports, module) {
24
+ "use strict";
25
+ init_esm_shims();
26
+ module.exports = function isObject2(val) {
27
+ return val != null && typeof val === "object" && Array.isArray(val) === false;
28
+ };
29
+ }
30
+ });
31
+
122
32
  // ../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js
123
33
  var require_is_plain_object = __commonJS({
124
34
  "../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js"(exports, module) {
125
35
  "use strict";
126
36
  init_esm_shims();
127
- var isObject = require_isobject();
37
+ var isObject2 = require_isobject();
128
38
  function isObjectObject(o) {
129
- return isObject(o) === true && Object.prototype.toString.call(o) === "[object Object]";
39
+ return isObject2(o) === true && Object.prototype.toString.call(o) === "[object Object]";
130
40
  }
131
41
  module.exports = function isPlainObject2(o) {
132
42
  var ctor, prot;
@@ -151,7 +61,7 @@ var require_set_value = __commonJS({
151
61
  var { deleteProperty } = Reflect;
152
62
  var isPrimitive = require_is_primitive();
153
63
  var isPlainObject2 = require_is_plain_object();
154
- var isObject = (value) => {
64
+ var isObject2 = (value) => {
155
65
  return typeof value === "object" && value !== null || typeof value === "function";
156
66
  };
157
67
  var isUnsafeKey = (key) => {
@@ -219,7 +129,7 @@ var require_set_value = __commonJS({
219
129
  }
220
130
  return parts;
221
131
  };
222
- var split = (input, options) => {
132
+ var split2 = (input, options) => {
223
133
  if (options && typeof options.split === "function") return options.split(input);
224
134
  if (typeof input === "symbol") return [input];
225
135
  if (Array.isArray(input)) return input;
@@ -242,8 +152,8 @@ var require_set_value = __commonJS({
242
152
  return obj;
243
153
  };
244
154
  var setValue2 = (target, path, value, options) => {
245
- if (!path || !isObject(target)) return target;
246
- const keys = split(path, options);
155
+ if (!path || !isObject2(target)) return target;
156
+ const keys = split2(path, options);
247
157
  let obj = target;
248
158
  for (let i = 0; i < keys.length; i++) {
249
159
  const key = keys[i];
@@ -257,14 +167,14 @@ var require_set_value = __commonJS({
257
167
  obj = obj[key] = [];
258
168
  continue;
259
169
  }
260
- if (!isObject(obj[key])) {
170
+ if (!isObject2(obj[key])) {
261
171
  obj[key] = {};
262
172
  }
263
173
  obj = obj[key];
264
174
  }
265
175
  return target;
266
176
  };
267
- setValue2.split = split;
177
+ setValue2.split = split2;
268
178
  setValue2.cache = /* @__PURE__ */ new Map();
269
179
  setValue2.clear = () => {
270
180
  setValue2.cache = /* @__PURE__ */ new Map();
@@ -345,8 +255,95 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
345
255
  }
346
256
  });
347
257
 
258
+ // ../../node_modules/.pnpm/get-value@4.0.1/node_modules/get-value/dist/index.mjs
259
+ init_esm_shims();
260
+ var __defProp = Object.defineProperty;
261
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
262
+ var isObject = /* @__PURE__ */ __name((v) => v !== null && typeof v === "object", "isObject");
263
+ var join = /* @__PURE__ */ __name((segs, joinChar, options) => {
264
+ if (typeof options.join === "function") {
265
+ return options.join(segs);
266
+ }
267
+ return segs[0] + joinChar + segs[1];
268
+ }, "join");
269
+ var split = /* @__PURE__ */ __name((path, splitChar, options) => {
270
+ if (typeof options.split === "function") {
271
+ return options.split(path);
272
+ }
273
+ return path.split(splitChar);
274
+ }, "split");
275
+ var isValid = /* @__PURE__ */ __name((key, target = {}, options) => {
276
+ if (typeof options?.isValid === "function") {
277
+ return options.isValid(key, target);
278
+ }
279
+ return true;
280
+ }, "isValid");
281
+ var isValidObject = /* @__PURE__ */ __name((v) => {
282
+ return isObject(v) || typeof v === "function";
283
+ }, "isValidObject");
284
+ var getValue = /* @__PURE__ */ __name((target, path, options = {}) => {
285
+ if (!isObject(options)) {
286
+ options = { default: options };
287
+ }
288
+ if (!isValidObject(target)) {
289
+ return typeof options.default !== "undefined" ? options.default : target;
290
+ }
291
+ if (typeof path === "number") {
292
+ path = String(path);
293
+ }
294
+ const pathIsArray = Array.isArray(path);
295
+ const pathIsString = typeof path === "string";
296
+ const splitChar = options.separator || ".";
297
+ const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
298
+ if (!pathIsString && !pathIsArray) {
299
+ return target;
300
+ }
301
+ if (target[path] !== void 0) {
302
+ return isValid(path, target, options) ? target[path] : options.default;
303
+ }
304
+ const segs = pathIsArray ? path : split(path, splitChar, options);
305
+ const len = segs.length;
306
+ let idx = 0;
307
+ do {
308
+ let prop = segs[idx];
309
+ if (typeof prop !== "string") {
310
+ prop = String(prop);
311
+ }
312
+ while (prop && prop.slice(-1) === "\\") {
313
+ prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
314
+ }
315
+ if (target[prop] !== void 0) {
316
+ if (!isValid(prop, target, options)) {
317
+ return options.default;
318
+ }
319
+ target = target[prop];
320
+ } else {
321
+ let hasProp = false;
322
+ let n = idx + 1;
323
+ while (n < len) {
324
+ prop = join([prop, segs[n++]], joinChar, options);
325
+ if (hasProp = target[prop] !== void 0) {
326
+ if (!isValid(prop, target, options)) {
327
+ return options.default;
328
+ }
329
+ target = target[prop];
330
+ idx = n - 1;
331
+ break;
332
+ }
333
+ }
334
+ if (!hasProp) {
335
+ return options.default;
336
+ }
337
+ }
338
+ } while (++idx < len && isValidObject(target));
339
+ if (idx === len) {
340
+ return target;
341
+ }
342
+ return options.default;
343
+ }, "getValue");
344
+ var index_default = getValue;
345
+
348
346
  // src/index.ts
349
- var import_get_value = __toESM(require_get_value());
350
347
  var import_set_value = __toESM(require_set_value());
351
348
  function isRegexp(value) {
352
349
  return Object.prototype.toString.call(value) === "[object RegExp]";
@@ -405,12 +402,11 @@ var defuOverrideArray = createDefu((obj, key, value) => {
405
402
  return true;
406
403
  }
407
404
  });
408
- var export_getValue = import_get_value.default;
409
405
  var export_setValue = import_set_value.default;
410
406
  export {
411
407
  defu,
412
408
  defuOverrideArray,
413
- export_getValue as getValue,
409
+ index_default as getValue,
414
410
  groupBy,
415
411
  isMap,
416
412
  isRegexp,
@@ -421,27 +417,19 @@ export {
421
417
  };
422
418
  /*! Bundled license information:
423
419
 
424
- isobject/index.js:
425
- (*!
426
- * isobject <https://github.com/jonschlinkert/isobject>
427
- *
428
- * Copyright (c) 2014-2017, Jon Schlinkert.
429
- * Released under the MIT License.
430
- *)
431
-
432
- get-value/index.js:
420
+ is-primitive/index.js:
433
421
  (*!
434
- * get-value <https://github.com/jonschlinkert/get-value>
422
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
435
423
  *
436
- * Copyright (c) 2014-2018, Jon Schlinkert.
424
+ * Copyright (c) 2014-present, Jon Schlinkert.
437
425
  * Released under the MIT License.
438
426
  *)
439
427
 
440
- is-primitive/index.js:
428
+ isobject/index.js:
441
429
  (*!
442
- * is-primitive <https://github.com/jonschlinkert/is-primitive>
430
+ * isobject <https://github.com/jonschlinkert/isobject>
443
431
  *
444
- * Copyright (c) 2014-present, Jon Schlinkert.
432
+ * Copyright (c) 2014-2017, Jon Schlinkert.
445
433
  * Released under the MIT License.
446
434
  *)
447
435
 
@@ -460,4 +448,12 @@ set-value/index.js:
460
448
  * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
461
449
  * Released under the MIT License.
462
450
  *)
451
+
452
+ get-value/dist/index.mjs:
453
+ (*!
454
+ * get-value <https://github.com/jonschlinkert/get-value>
455
+ *
456
+ * Copyright (c) 2014-present, Jon Schlinkert.
457
+ * Released under the MIT License.
458
+ *)
463
459
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/shared",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0",
4
4
  "description": "@weapp-tailwindcss/shared",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",