ftdsy-attr 2.1.7 → 2.1.8

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.
@@ -66,6 +66,7 @@ type MatchDatas = {
66
66
  specs?: any;
67
67
  };
68
68
 
69
+ declare const getGlobal: () => any;
69
70
  declare const _default: {
70
71
  createCategoryProperties: typeof createCategoryProperties;
71
72
  getOriginProperty: typeof getOriginProperty;
@@ -111,5 +112,5 @@ declare function matchCategoryProperties(matchDatas: MatchDatas, matchLevel?: nu
111
112
  * */
112
113
  declare function createCategoryPropertyTemplate(properties: (DsyAttrWithValue | goodsAttr)[]): goodsAttr[];
113
114
 
114
- export { _default as default };
115
+ export { _default as default, getGlobal };
115
116
  export type { ComponentType, Condition, DsyAttr, DsyAttrValue, DsyAttrWithValue, MatchDatas, PropertyComponent, PropertyOption, PropertyType, Pt, Rule, RuleName, goodsAttr };
@@ -74973,18 +74973,36 @@ var error = {
74973
74973
  }
74974
74974
  };
74975
74975
 
74976
- // 全局对象 polyfill
74977
- if (typeof globalThis === 'undefined') {
74978
- window.globalThis = globalThis;
74979
- }
74980
- if (typeof globalThis === 'undefined') {
74981
- globalThis.global = globalThis;
74982
- }
74976
+ // 增强全局对象 polyfill
74977
+ (function () {
74978
+ if (typeof globalThisThis !== 'undefined') return globalThisThis;
74979
+ return globalThis;
74980
+ })();
74983
74981
 
74984
- // 确保 globalThis 在非浏览器环境有定义
74985
- if (typeof globalThis === 'undefined') {
74986
- globalThis.self = globalThis;
74987
- }
74982
+ // 确保所有全局对象引用都指向 globalThisThis
74983
+ Object.defineProperty(globalThisObject, 'globalThis', {
74984
+ value: globalThisObject,
74985
+ writable: true,
74986
+ enumerable: false,
74987
+ configurable: true
74988
+ });
74989
+ Object.defineProperty(globalThisObject, 'globalThis', {
74990
+ value: globalThisObject,
74991
+ writable: true,
74992
+ enumerable: false,
74993
+ configurable: true
74994
+ });
74995
+ Object.defineProperty(globalThisObject, 'globalThis', {
74996
+ value: globalThisObject,
74997
+ writable: true,
74998
+ enumerable: false,
74999
+ configurable: true
75000
+ });
75001
+
75002
+ // 导出全局对象
75003
+ var getGlobal = function getGlobal() {
75004
+ return globalThisObject;
75005
+ };
74988
75006
  var main = {
74989
75007
  createCategoryProperties: createCategoryProperties,
74990
75008
  getOriginProperty: getOriginProperty,
@@ -75241,5 +75259,5 @@ function createCategoryPropertyTemplate(properties) {
75241
75259
  return attrs;
75242
75260
  }
75243
75261
 
75244
- export { main as default };
75262
+ export { main as default, getGlobal };
75245
75263
  //# sourceMappingURL=ftdsy-attr.esm.mjs.map