@dxtmisha/wiki 0.39.6 → 0.39.7

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.
@@ -0,0 +1,39 @@
1
+ //#region \0@oxc-project+runtime@0.123.0/helpers/typeof.js
2
+ function e(t) {
3
+ "@babel/helpers - typeof";
4
+ return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
5
+ return typeof e;
6
+ } : function(e) {
7
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
8
+ }, e(t);
9
+ }
10
+ //#endregion
11
+ //#region \0@oxc-project+runtime@0.123.0/helpers/toPrimitive.js
12
+ function t(t, n) {
13
+ if (e(t) != "object" || !t) return t;
14
+ var r = t[Symbol.toPrimitive];
15
+ if (r !== void 0) {
16
+ var i = r.call(t, n || "default");
17
+ if (e(i) != "object") return i;
18
+ throw TypeError("@@toPrimitive must return a primitive value.");
19
+ }
20
+ return (n === "string" ? String : Number)(t);
21
+ }
22
+ //#endregion
23
+ //#region \0@oxc-project+runtime@0.123.0/helpers/toPropertyKey.js
24
+ function n(n) {
25
+ var r = t(n, "string");
26
+ return e(r) == "symbol" ? r : r + "";
27
+ }
28
+ //#endregion
29
+ //#region \0@oxc-project+runtime@0.123.0/helpers/defineProperty.js
30
+ function r(e, t, r) {
31
+ return (t = n(t)) in e ? Object.defineProperty(e, t, {
32
+ value: r,
33
+ enumerable: !0,
34
+ configurable: !0,
35
+ writable: !0
36
+ }) : e[t] = r, e;
37
+ }
38
+ //#endregion
39
+ export { r as t };
package/dist/library.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './classes/WikiStorybook';
2
- export * from './classes/WikiStorybookDescriptions';
3
2
  export * from './classes/WikiStorybookItem';
4
3
  export * from './classes/WikiStorybookProp';
5
4
  export * from './types/storybookTypes';
package/dist/library.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { n as e, t } from "./storybookTypes-RNr8gPGw.js";
2
- import { n, t as r } from "./WikiStorybookDescriptions-IKMchHA-.js";
3
- import { Geo as i, forEach as a, isArray as o, isObjectNotArray as s, toCamelCase as c } from "@dxtmisha/functional";
4
- import { isString as l, toKebabCase as u } from "@dxtmisha/functional-basic";
2
+ import { t as n } from "./defineProperty-DblGXmzD.js";
3
+ import { Geo as r, forEach as i, isArray as a, isObjectNotArray as o, toCamelCase as s } from "@dxtmisha/functional";
4
+ import { isString as c, toKebabCase as l } from "@dxtmisha/functional-basic";
5
5
  //#region src/classes/WikiStorybookItem.ts
6
- var d = class {
6
+ var u = class {
7
7
  constructor(e, t) {
8
8
  this.name = e, this.item = t;
9
9
  }
@@ -82,13 +82,13 @@ var d = class {
82
82
  return n ? { defaultValue: { summary: n } } : {};
83
83
  }
84
84
  getDescription() {
85
- let e = i.getLanguage(), t = this.item.options.description, n;
86
- return typeof t == "string" ? n = t : s(t) && e in t && (n = t[e]), n ? { description: n } : {};
85
+ let e = r.getLanguage(), t = this.item.options.description, n;
86
+ return typeof t == "string" ? n = t : o(t) && e in t && (n = t[e]), n ? { description: n } : {};
87
87
  }
88
88
  getType() {
89
89
  let t = this.item.options.type, n = this.item.options.options, r;
90
- if (n) o(n) ? r = n.join(" | ") : s(n) && (r = Object.keys(n).join(" | "));
91
- else if (t) r = o(t) ? t.join(" | ") : t;
90
+ if (n) a(n) ? r = n.join(" | ") : o(n) && (r = Object.keys(n).join(" | "));
91
+ else if (t) r = a(t) ? t.join(" | ") : t;
92
92
  else switch (this.item.type) {
93
93
  case e.select:
94
94
  r = String(e.object);
@@ -161,7 +161,7 @@ var d = class {
161
161
  ...this.getDemo()
162
162
  };
163
163
  }
164
- }, f = class {
164
+ }, d = class {
165
165
  constructor(e, t) {
166
166
  this.name = e, this.item = t;
167
167
  }
@@ -175,7 +175,7 @@ var d = class {
175
175
  return this.item;
176
176
  }
177
177
  getName() {
178
- return u(this.name);
178
+ return l(this.name);
179
179
  }
180
180
  getDefaultValue() {
181
181
  var e;
@@ -183,7 +183,7 @@ var d = class {
183
183
  }
184
184
  getType() {
185
185
  var t, n, r;
186
- return !((t = this.item) == null || (t = t.table) == null || (t = t.type) == null) && t.summary ? this.item.table.type.summary : l(this.item.control) ? this.item.control : (n = (r = this.item.control) == null ? void 0 : r.type) == null ? e.string : n;
186
+ return !((t = this.item) == null || (t = t.table) == null || (t = t.type) == null) && t.summary ? this.item.table.type.summary : c(this.item.control) ? this.item.control : (n = (r = this.item.control) == null ? void 0 : r.type) == null ? e.string : n;
187
187
  }
188
188
  getDescription() {
189
189
  var e;
@@ -199,7 +199,7 @@ var d = class {
199
199
  var e;
200
200
  return (e = this.item.demoOptions) == null ? {} : e;
201
201
  }
202
- }, p = class {
202
+ }, f = class {
203
203
  constructor(e, t, r, i = {}, a = {}, o = []) {
204
204
  n(this, "list", void 0), this.component = e, this.props = t, this.defaults = r, this.wikiDesign = i, this.wikiBasic = a, this.wikiDescriptions = o, this.list = this.initList();
205
205
  }
@@ -210,8 +210,8 @@ var d = class {
210
210
  return this.initPropsWiki();
211
211
  }
212
212
  getWikiObject() {
213
- return a(this.getWiki(), (e, t) => {
214
- if (e) return new f(t, e);
213
+ return i(this.getWiki(), (e, t) => {
214
+ if (e) return new d(t, e);
215
215
  });
216
216
  }
217
217
  getDescription() {
@@ -230,7 +230,7 @@ var d = class {
230
230
  }
231
231
  getFilteredValues() {
232
232
  let e = {};
233
- return a(this.getValues(), (t, n) => {
233
+ return i(this.getValues(), (t, n) => {
234
234
  t !== void 0 && (e[n] = t);
235
235
  }), e;
236
236
  }
@@ -280,10 +280,10 @@ var d = class {
280
280
  }
281
281
  toDescriptionText(e) {
282
282
  if (e) {
283
- let r = i.getLanguage();
284
- if (s(e)) {
283
+ let i = r.getLanguage();
284
+ if (o(e)) {
285
285
  var t, n;
286
- return String((t = e == null ? void 0 : e[r]) == null ? (n = Object.values(e)) == null ? void 0 : n[0] : t);
286
+ return String((t = e == null ? void 0 : e[i]) == null ? (n = Object.values(e)) == null ? void 0 : n[0] : t);
287
287
  }
288
288
  return e;
289
289
  }
@@ -291,10 +291,10 @@ var d = class {
291
291
  }
292
292
  toPossibilitiesText(e) {
293
293
  if (e) {
294
- let a = i.getLanguage();
295
- if (s(e)) {
296
- var t, n, r;
297
- return (t = (n = e == null ? void 0 : e[a]) == null ? (r = Object.values(e)) == null ? void 0 : r[0] : n) == null ? [] : t;
294
+ let a = r.getLanguage();
295
+ if (o(e)) {
296
+ var t, n, i;
297
+ return (t = (n = e == null ? void 0 : e[a]) == null ? (i = Object.values(e)) == null ? void 0 : i[0] : n) == null ? [] : t;
298
298
  }
299
299
  return e;
300
300
  }
@@ -304,8 +304,8 @@ var d = class {
304
304
  let e = [];
305
305
  return this.props.forEach((t) => {
306
306
  var n;
307
- let r = `${c(this.component)}.${t.name}`, i = (n = this.getWikiItem(r)) == null ? this.getWikiItem(t.name) : n;
308
- i ? e.push(new d(t.name, this.toWikiItemChanged(t, i))) : console.error(`[WikiStorybook] ${t.name} not found`);
307
+ let r = `${s(this.component)}.${t.name}`, i = (n = this.getWikiItem(r)) == null ? this.getWikiItem(t.name) : n;
308
+ i ? e.push(new u(t.name, this.toWikiItemChanged(t, i))) : console.error(`[WikiStorybook] ${t.name} not found`);
309
309
  }), e.sort((e, t) => {
310
310
  let n = e.getOrder(), r = t.getOrder();
311
311
  return n === r ? e.getName() > t.getName() ? 1 : -1 : n > r ? 1 : -1;
@@ -319,4 +319,4 @@ var d = class {
319
319
  }
320
320
  };
321
321
  //#endregion
322
- export { t as StorybookCategory, e as StorybookControl, p as WikiStorybook, r as WikiStorybookDescriptions, d as WikiStorybookItem, f as WikiStorybookProp };
322
+ export { t as StorybookCategory, e as StorybookControl, f as WikiStorybook, u as WikiStorybookItem, d as WikiStorybookProp };