solid-logic 3.1.1-536a3ae → 3.1.1-6b04155

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
@@ -28,17 +28,15 @@ import { someFunction } from 'solid-logic';
28
28
  ## Files
29
29
  - For browser UMD, without rdflib: `dist/solid-logic.js` (global `window.SolidLogic`)
30
30
  - For browser ESM, without rdflib: `dist/solid-logic.esm.external.js` (import as module)
31
- - UMD have also chunked files.
32
- - both version also containe minified versions.
31
+ - UMD has also chunked files.
32
+ - both versions also contain minified versions.
33
33
 
34
34
 
35
35
  ### UMD bundle (global variable)
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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AU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAChC,KAAK,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAA;QAChE,UAAU,CAAC,gBAAgB,CAAC,GAAG,IAAA,6BAAgB,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,yBAAW,CAAC,CAAA;QAC/E,KAAK,CAAC,GAAG,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))