phecda-core 1.2.1 → 1.3.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/dist/index.d.ts CHANGED
@@ -10,7 +10,6 @@ interface PhecdaHandler {
10
10
  }
11
11
  interface Phecda {
12
12
  _namespace: {
13
- __TAG__: string;
14
13
  __INIT_EVENT__: Set<PropertyKey>;
15
14
  __EXPOSE_VAR__: Set<PropertyKey>;
16
15
  __IGNORE_VAR__: Set<PropertyKey>;
@@ -76,7 +76,7 @@ var Phecda = (() => {
76
76
  }
77
77
  __name(validate, "validate");
78
78
  function getTag(Model) {
79
- return Model.prototype?._namespace?.__TAG__;
79
+ return Model.prototype?.__TAG__;
80
80
  }
81
81
  __name(getTag, "getTag");
82
82
  function mergeOptions(obj1, obj2) {
@@ -109,7 +109,6 @@ var Phecda = (() => {
109
109
  function init(target) {
110
110
  if (!target._namespace) {
111
111
  target._namespace = {
112
- __TAG__: "",
113
112
  __INIT_EVENT__: /* @__PURE__ */ new Set(),
114
113
  __EXPOSE_VAR__: /* @__PURE__ */ new Set(),
115
114
  __IGNORE_VAR__: /* @__PURE__ */ new Set(),
@@ -279,15 +278,14 @@ var Phecda = (() => {
279
278
  __name(Pipe, "Pipe");
280
279
  function Tag(tag) {
281
280
  return (target) => {
282
- init(target.prototype);
283
- target.prototype._namespace.__TAG__ = tag;
281
+ target.prototype.__TAG__ = tag;
284
282
  };
285
283
  }
286
284
  __name(Tag, "Tag");
287
285
  function Global(target) {
288
286
  if (!globalThis.__PHECDA__)
289
287
  globalThis.__PHECDA__ = {};
290
- const tag = target.prototype._namespace.__TAG__;
288
+ const tag = target.prototype.__TAG__;
291
289
  if (tag)
292
290
  globalThis.__PHECDA__[tag] = target;
293
291
  }
@@ -402,7 +400,7 @@ var Phecda = (() => {
402
400
  let tag;
403
401
  if (key) {
404
402
  init(target);
405
- tag = storeKey || target._namespace.__TAG__;
403
+ tag = storeKey || target.__TAG__;
406
404
  const uniTag = Symbol(tag);
407
405
  setModalVar(target, uniTag);
408
406
  regisHandler(target, uniTag, {
@@ -416,7 +414,7 @@ var Phecda = (() => {
416
414
  });
417
415
  } else {
418
416
  init(target.prototype);
419
- tag = storeKey || `${target.prototype._namespace.__TAG__}_${key}`;
417
+ tag = storeKey || `${target.prototype.__TAG__}_${key}`;
420
418
  const uniTag = Symbol(tag);
421
419
  setModalVar(target.prototype, uniTag);
422
420
  regisHandler(target.prototype, uniTag, {
package/dist/index.js CHANGED
@@ -76,7 +76,7 @@ async function validate(p, v) {
76
76
  }
77
77
  __name(validate, "validate");
78
78
  function getTag(Model) {
79
- return Model.prototype?._namespace?.__TAG__;
79
+ return Model.prototype?.__TAG__;
80
80
  }
81
81
  __name(getTag, "getTag");
82
82
  function mergeOptions(obj1, obj2) {
@@ -109,7 +109,6 @@ __name(isPhecda, "isPhecda");
109
109
  function init(target) {
110
110
  if (!target._namespace) {
111
111
  target._namespace = {
112
- __TAG__: "",
113
112
  __INIT_EVENT__: /* @__PURE__ */ new Set(),
114
113
  __EXPOSE_VAR__: /* @__PURE__ */ new Set(),
115
114
  __IGNORE_VAR__: /* @__PURE__ */ new Set(),
@@ -279,15 +278,14 @@ function Pipe(v) {
279
278
  __name(Pipe, "Pipe");
280
279
  function Tag(tag) {
281
280
  return (target) => {
282
- init(target.prototype);
283
- target.prototype._namespace.__TAG__ = tag;
281
+ target.prototype.__TAG__ = tag;
284
282
  };
285
283
  }
286
284
  __name(Tag, "Tag");
287
285
  function Global(target) {
288
286
  if (!globalThis.__PHECDA__)
289
287
  globalThis.__PHECDA__ = {};
290
- const tag = target.prototype._namespace.__TAG__;
288
+ const tag = target.prototype.__TAG__;
291
289
  if (tag)
292
290
  globalThis.__PHECDA__[tag] = target;
293
291
  }
@@ -402,7 +400,7 @@ function Storage(storeKey) {
402
400
  let tag;
403
401
  if (key) {
404
402
  init(target);
405
- tag = storeKey || target._namespace.__TAG__;
403
+ tag = storeKey || target.__TAG__;
406
404
  const uniTag = Symbol(tag);
407
405
  setModalVar(target, uniTag);
408
406
  regisHandler(target, uniTag, {
@@ -416,7 +414,7 @@ function Storage(storeKey) {
416
414
  });
417
415
  } else {
418
416
  init(target.prototype);
419
- tag = storeKey || `${target.prototype._namespace.__TAG__}_${key}`;
417
+ tag = storeKey || `${target.prototype.__TAG__}_${key}`;
420
418
  const uniTag = Symbol(tag);
421
419
  setModalVar(target.prototype, uniTag);
422
420
  regisHandler(target.prototype, uniTag, {
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ async function validate(p, v) {
15
15
  }
16
16
  __name(validate, "validate");
17
17
  function getTag(Model) {
18
- return Model.prototype?._namespace?.__TAG__;
18
+ return Model.prototype?.__TAG__;
19
19
  }
20
20
  __name(getTag, "getTag");
21
21
  function mergeOptions(obj1, obj2) {
@@ -48,7 +48,6 @@ __name(isPhecda, "isPhecda");
48
48
  function init(target) {
49
49
  if (!target._namespace) {
50
50
  target._namespace = {
51
- __TAG__: "",
52
51
  __INIT_EVENT__: /* @__PURE__ */ new Set(),
53
52
  __EXPOSE_VAR__: /* @__PURE__ */ new Set(),
54
53
  __IGNORE_VAR__: /* @__PURE__ */ new Set(),
@@ -218,15 +217,14 @@ function Pipe(v) {
218
217
  __name(Pipe, "Pipe");
219
218
  function Tag(tag) {
220
219
  return (target) => {
221
- init(target.prototype);
222
- target.prototype._namespace.__TAG__ = tag;
220
+ target.prototype.__TAG__ = tag;
223
221
  };
224
222
  }
225
223
  __name(Tag, "Tag");
226
224
  function Global(target) {
227
225
  if (!globalThis.__PHECDA__)
228
226
  globalThis.__PHECDA__ = {};
229
- const tag = target.prototype._namespace.__TAG__;
227
+ const tag = target.prototype.__TAG__;
230
228
  if (tag)
231
229
  globalThis.__PHECDA__[tag] = target;
232
230
  }
@@ -341,7 +339,7 @@ function Storage(storeKey) {
341
339
  let tag;
342
340
  if (key) {
343
341
  init(target);
344
- tag = storeKey || target._namespace.__TAG__;
342
+ tag = storeKey || target.__TAG__;
345
343
  const uniTag = Symbol(tag);
346
344
  setModalVar(target, uniTag);
347
345
  regisHandler(target, uniTag, {
@@ -355,7 +353,7 @@ function Storage(storeKey) {
355
353
  });
356
354
  } else {
357
355
  init(target.prototype);
358
- tag = storeKey || `${target.prototype._namespace.__TAG__}_${key}`;
356
+ tag = storeKey || `${target.prototype.__TAG__}_${key}`;
359
357
  const uniTag = Symbol(tag);
360
358
  setModalVar(target.prototype, uniTag);
361
359
  regisHandler(target.prototype, uniTag, {
@@ -45,7 +45,6 @@ var Phecda = (() => {
45
45
  function init(target) {
46
46
  if (!target._namespace) {
47
47
  target._namespace = {
48
- __TAG__: "",
49
48
  __INIT_EVENT__: /* @__PURE__ */ new Set(),
50
49
  __EXPOSE_VAR__: /* @__PURE__ */ new Set(),
51
50
  __IGNORE_VAR__: /* @__PURE__ */ new Set(),
@@ -45,7 +45,6 @@ module.exports = __toCommonJS(preset_exports);
45
45
  function init(target) {
46
46
  if (!target._namespace) {
47
47
  target._namespace = {
48
- __TAG__: "",
49
48
  __INIT_EVENT__: /* @__PURE__ */ new Set(),
50
49
  __EXPOSE_VAR__: /* @__PURE__ */ new Set(),
51
50
  __IGNORE_VAR__: /* @__PURE__ */ new Set(),
@@ -5,7 +5,6 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
5
5
  function init(target) {
6
6
  if (!target._namespace) {
7
7
  target._namespace = {
8
- __TAG__: "",
9
8
  __INIT_EVENT__: /* @__PURE__ */ new Set(),
10
9
  __EXPOSE_VAR__: /* @__PURE__ */ new Set(),
11
10
  __IGNORE_VAR__: /* @__PURE__ */ new Set(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-core",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "provide base function and abstract limit to other phecda module ",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",