solid-logic 3.1.1-dbb83f7 → 3.1.1-e2f6c8f

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/README.md CHANGED
@@ -36,9 +36,7 @@ import { someFunction } from 'solid-logic';
36
36
 
37
37
  ```html
38
38
  <!-- Load dependencies first -->
39
- <script src="https://unpkg.com/rdflib/dist/rdflib.min.js"></script>
40
- <!-- or -->
41
- <!-- script src="https://cdn.jsdelivr.net/npm/rdflib/dist/rdflib.min.js"></script -->
39
+ <script src="https://cdn.jsdelivr.net/npm/rdflib/dist/rdflib.min.js"></script>
42
40
  <!-- Load solid-logic UMD bundle -->
43
41
  <script src="https://unpkg.com/solid-logic/dist/solid-logic.min.js"></script>
44
42
  <!-- or -->
@@ -1,3 +1,4 @@
1
- declare const solidLogicSingleton: import("..").SolidLogic;
1
+ import { SolidLogic } from '../types';
2
+ declare const solidLogicSingleton: SolidLogic;
2
3
  export { solidLogicSingleton };
3
4
  //# sourceMappingURL=solidLogicSingleton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"solidLogicSingleton.d.ts","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":"AAeA,QAAA,MAAM,mBAAmB,yBAAmD,CAAA;AAI5E,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"solidLogicSingleton.d.ts","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAiCrC,QAAA,MAAM,mBAAmB,YAAyB,CAAA;AAElD,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -47,8 +47,21 @@ const _fetch = async (url, requestInit) => {
47
47
  return window.fetch(url, requestInit);
48
48
  }
49
49
  };
50
+ // Global singleton pattern to ensure unique store across library versions
51
+ const SINGLETON_SYMBOL = Symbol.for('solid-logic-singleton');
52
+ const globalThis = (typeof window !== 'undefined' ? window : global);
53
+ function getOrCreateSingleton() {
54
+ if (!globalThis[SINGLETON_SYMBOL]) {
55
+ debug.log('SolidLogic: Creating new global singleton instance.');
56
+ globalThis[SINGLETON_SYMBOL] = (0, solidLogic_1.createSolidLogic)({ fetch: _fetch }, authSession_1.authSession);
57
+ debug.log('Unique quadstore initialized.');
58
+ }
59
+ else {
60
+ debug.log('SolidLogic: Using existing global singleton instance.');
61
+ }
62
+ return globalThis[SINGLETON_SYMBOL];
63
+ }
50
64
  //this const makes solidLogicSingleton global accessible in mashlib
51
- const solidLogicSingleton = (0, solidLogic_1.createSolidLogic)({ fetch: _fetch }, authSession_1.authSession);
65
+ const solidLogicSingleton = getOrCreateSingleton();
52
66
  exports.solidLogicSingleton = solidLogicSingleton;
53
- debug.log('Unique quadstore initialized.');
54
67
  //# sourceMappingURL=solidLogicSingleton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"solidLogicSingleton.js","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAsC;AACtC,4DAAwD;AACxD,6CAA+C;AAE/C,MAAM,MAAM,GAAG,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE;IACtC,MAAM,SAAS,GAAG,WAAW,IAAI,WAAW,CAAC,WAAW,IAAI,WAAW,CAAC,WAAW,IAAI,MAAM,CAAA;IAC7F,IAAI,yBAAW,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,oDAAoD;QAC5F,uDAAuD;QACvD,OAAO,yBAAW,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;IAC9C,CAAC;SAAM,CAAC;QACJ,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;IACzC,CAAC;AACL,CAAC,CAAA;AAED,mEAAmE;AACnE,MAAM,mBAAmB,GAAG,IAAA,6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G,CAAC,+BAA+B,CAAC,CAAA;IAC9C,CAAC;SAAM,CAAC;QACJ,KAAK,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAA;IACtE,CAAC;IACD,OAAO,UAAU,CAAC,gBAAgB,CAAE,CAAA;AACxC,CAAC;AACD,mEAAmE;AACnE,MAAM,mBAAmB,GAAG,oBAAoB,EAAE,CAAA;AAEzC,kDAAmB"}
@@ -1418,10 +1418,23 @@ const _fetch = async (url, requestInit) => {
1418
1418
  return window.fetch(url, requestInit);
1419
1419
  }
1420
1420
  };
1421
+ // Global singleton pattern to ensure unique store across library versions
1422
+ const SINGLETON_SYMBOL = Symbol.for('solid-logic-singleton');
1423
+ const globalThis = (typeof window !== 'undefined' ? window : __webpack_require__.g);
1424
+ function getOrCreateSingleton() {
1425
+ if (!globalThis[SINGLETON_SYMBOL]) {
1426
+ debug.log('SolidLogic: Creating new global singleton instance.');
1427
+ globalThis[SINGLETON_SYMBOL] = (0, solidLogic_1.createSolidLogic)({ fetch: _fetch }, authSession_1.authSession);
1428
+ debug.log('Unique quadstore initialized.');
1429
+ }
1430
+ else {
1431
+ debug.log('SolidLogic: Using existing global singleton instance.');
1432
+ }
1433
+ return globalThis[SINGLETON_SYMBOL];
1434
+ }
1421
1435
  //this const makes solidLogicSingleton global accessible in mashlib
1422
- const solidLogicSingleton = (0, solidLogic_1.createSolidLogic)({ fetch: _fetch }, authSession_1.authSession);
1436
+ const solidLogicSingleton = getOrCreateSingleton();
1423
1437
  exports.solidLogicSingleton = solidLogicSingleton;
1424
- debug.log('Unique quadstore initialized.');
1425
1438
 
1426
1439
 
1427
1440
  /***/ }),
@@ -12649,6 +12662,18 @@ const isDisjoint = (...headers) => {
12649
12662
  /******/ };
12650
12663
  /******/ })();
12651
12664
  /******/
12665
+ /******/ /* webpack/runtime/global */
12666
+ /******/ (() => {
12667
+ /******/ __webpack_require__.g = (function() {
12668
+ /******/ if (typeof globalThis === 'object') return globalThis;
12669
+ /******/ try {
12670
+ /******/ return this || new Function('return this')();
12671
+ /******/ } catch (e) {
12672
+ /******/ if (typeof window === 'object') return window;
12673
+ /******/ }
12674
+ /******/ })();
12675
+ /******/ })();
12676
+ /******/
12652
12677
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
12653
12678
  /******/ (() => {
12654
12679
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
@@ -12722,4 +12747,4 @@ const __webpack_exports__solidLogicSingleton = __webpack_exports__.solidLogicSin
12722
12747
  const __webpack_exports__store = __webpack_exports__.store;
12723
12748
  export { __webpack_exports__ACL_LINK as ACL_LINK, __webpack_exports__CrossOriginForbiddenError as CrossOriginForbiddenError, __webpack_exports__FetchError as FetchError, __webpack_exports__NotEditableError as NotEditableError, __webpack_exports__NotFoundError as NotFoundError, __webpack_exports__SameOriginForbiddenError as SameOriginForbiddenError, __webpack_exports__UnauthorizedError as UnauthorizedError, __webpack_exports__WebOperationError as WebOperationError, __webpack_exports___esModule as __esModule, __webpack_exports__appContext as appContext, __webpack_exports__authSession as authSession, __webpack_exports__authn as authn, __webpack_exports__createTypeIndexLogic as createTypeIndexLogic, __webpack_exports__getSuggestedIssuers as getSuggestedIssuers, __webpack_exports__offlineTestID as offlineTestID, __webpack_exports__solidLogicSingleton as solidLogicSingleton, __webpack_exports__store as store, __webpack_exports__ as default };
12724
12749
 
12725
- //# sourceMappingURL=solid-logic.esm.external.js.map
12750
+ //# sourceMappingURL=solid-logic.esm.js.map