@jucie.io/engine-local-storage 1.0.9 → 1.0.10

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/main.js CHANGED
@@ -1,2 +1,2 @@
1
- var n=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(r,t)=>{for(var e in t)n(r,e,{get:t[e],enumerable:!0})},u=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of h(t))!d.call(r,i)&&i!==e&&n(r,i,{get:()=>t[i],enumerable:!(o=c(t,i))||o.enumerable});return r};var w=r=>u(n({},"__esModule",{value:!0}),r);var f={};g(f,{LocalStorage:()=>a});module.exports=w(f);var l=require("@jucie.io/engine");var s=class{#e={};#t;constructor(t){if(!t)throw new Error("StorageSpace requires a space name");this.#t=t,this.#o()}#o(){try{let t=localStorage.getItem(this.#t);this.#e=t?JSON.parse(t):{}}catch(t){console.error(`Failed to load storage space "${this.#t}":`,t),this.#e={}}}#r(){try{localStorage.setItem(this.#t,JSON.stringify(this.#e))}catch(t){throw console.error(`Failed to save storage space "${this.#t}":`,t),t}}set(t,e){return this.#e[t]=e,this.#r(),e}get(t,e=null){return this.#e[t]??e}update(t,e){let o=this.get(t),i=e(o);return this.set(t,i),i}remove(t){let e=this.#e[t];return delete this.#e[t],this.#r(),e}getAll(){return{...this.#e}}clear(){this.#e={},this.#r()}has(t){return t in this.#e}keys(){return Object.keys(this.#e)}size(){return Object.keys(this.#e).length}getName(){return this.#t}};var a=class extends l.ServiceProvider{#e=new Map;static manifest={name:"LocalStorage",namespace:"localStorage",version:"1.0.0",description:"Namespaced localStorage service for browser storage"};initialize(){(typeof window>"u"||!window.localStorage)&&console.warn("localStorage not available - LocalStorage extension will use in-memory fallback")}actions(t){return{create:e=>{if(!e)throw new Error("Storage space name is required");return this.#e.has(e)||this.#e.set(e,new s(e)),this.#e.get(e)},use:e=>{if(!e)throw new Error("Storage space name is required");return this.#e.has(e)||this.#e.set(e,new s(e)),this.#e.get(e)},exists:e=>typeof window>"u"||!window.localStorage?this.#e.has(e):localStorage.getItem(e)!==null,destroy:e=>{typeof window<"u"&&window.localStorage&&localStorage.removeItem(e),this.#e.delete(e)},listSpaces:()=>{if(typeof window>"u"||!window.localStorage)return Array.from(this.#e.keys());let e=[];for(let o=0;o<localStorage.length;o++)e.push(localStorage.key(o));return e},clearAll:()=>{typeof window<"u"&&window.localStorage&&localStorage.clear(),this.#e.clear()}}}};0&&(module.exports={LocalStorage});
1
+ var o=class{#e={};#t;constructor(t){if(!t)throw new Error("StorageSpace requires a space name");this.#t=t,this.#o()}#o(){try{let t=localStorage.getItem(this.#t);this.#e=t?JSON.parse(t):{}}catch(t){console.error(`Failed to load storage space "${this.#t}":`,t),this.#e={}}}#r(){try{localStorage.setItem(this.#t,JSON.stringify(this.#e))}catch(t){throw console.error(`Failed to save storage space "${this.#t}":`,t),t}}set(t,e){return this.#e[t]=e,this.#r(),e}get(t,e=null){return this.#e[t]??e}update(t,e){let r=this.get(t),s=e(r);return this.set(t,s),s}remove(t){let e=this.#e[t];return delete this.#e[t],this.#r(),e}getAll(){return{...this.#e}}clear(){this.#e={},this.#r()}has(t){return t in this.#e}keys(){return Object.keys(this.#e)}size(){return Object.keys(this.#e).length}getName(){return this.#t}};import{ServiceProvider as n}from"@jucie.io/engine";var i=class extends n{#e=new Map;static manifest={name:"LocalStorage",namespace:"localStorage",version:"1.0.0",description:"Namespaced localStorage service for browser storage"};initialize(){(typeof window>"u"||!window.localStorage)&&console.warn("localStorage not available - LocalStorage extension will use in-memory fallback")}actions(t){return{create:e=>{if(!e)throw new Error("Storage space name is required");return this.#e.has(e)||this.#e.set(e,new o(e)),this.#e.get(e)},use:e=>{if(!e)throw new Error("Storage space name is required");return this.#e.has(e)||this.#e.set(e,new o(e)),this.#e.get(e)},exists:e=>typeof window>"u"||!window.localStorage?this.#e.has(e):localStorage.getItem(e)!==null,destroy:e=>{typeof window<"u"&&window.localStorage&&localStorage.removeItem(e),this.#e.delete(e)},listSpaces:()=>{if(typeof window>"u"||!window.localStorage)return Array.from(this.#e.keys());let e=[];for(let r=0;r<localStorage.length;r++)e.push(localStorage.key(r));return e},clearAll:()=>{typeof window<"u"&&window.localStorage&&localStorage.clear(),this.#e.clear()}}}};export{i as LocalStorage};
2
2
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/main.js", "../src/LocalStorage.js", "../src/StorageSpace.js"],
4
- "sourcesContent": ["/**\n * @services/local-storage\n * Namespaced localStorage extension for Jucie engine\n */\n\nexport { LocalStorage } from './LocalStorage.js';\n", "import { ServiceProvider } from '@jucie.io/engine';\nimport { StorageSpace } from './StorageSpace.js';\n\n/**\n * LocalStorage Extension\n * Provides namespaced localStorage management for the Jucie engine\n * \n * Usage:\n * engine.localStorage.create('navigation');\n * const nav = engine.localStorage.use('navigation');\n * nav.set('destination', { path: '/editor' });\n * nav.get('destination');\n */\nexport class LocalStorage extends ServiceProvider {\n #spaces = new Map();\n\n static manifest = {\n name: 'LocalStorage',\n namespace: 'localStorage',\n version: '1.0.0',\n description: 'Namespaced localStorage service for browser storage',\n };\n\n initialize() {\n // Check if localStorage is available\n if (typeof window === 'undefined' || !window.localStorage) {\n console.warn('localStorage not available - LocalStorage extension will use in-memory fallback');\n }\n }\n\n actions(useContext) {\n return {\n /**\n * Create a new storage space (or return existing)\n * @param {string} spaceName - Name of the storage space\n * @returns {StorageSpace} Storage space instance\n */\n create: (spaceName) => {\n if (!spaceName) {\n throw new Error('Storage space name is required');\n }\n\n if (!this.#spaces.has(spaceName)) {\n this.#spaces.set(spaceName, new StorageSpace(spaceName));\n }\n \n return this.#spaces.get(spaceName);\n },\n \n /**\n * Use an existing storage space (creates if doesn't exist)\n * @param {string} spaceName - Name of the storage space\n * @returns {StorageSpace} Storage space instance\n */\n use: (spaceName) => {\n if (!spaceName) {\n throw new Error('Storage space name is required');\n }\n\n if (!this.#spaces.has(spaceName)) {\n this.#spaces.set(spaceName, new StorageSpace(spaceName));\n }\n \n return this.#spaces.get(spaceName);\n },\n \n /**\n * Check if a storage space exists\n * @param {string} spaceName - Name to check\n * @returns {boolean}\n */\n exists: (spaceName) => {\n if (typeof window === 'undefined' || !window.localStorage) {\n return this.#spaces.has(spaceName);\n }\n return localStorage.getItem(spaceName) !== null;\n },\n \n /**\n * Destroy a storage space completely\n * @param {string} spaceName - Name of space to destroy\n */\n destroy: (spaceName) => {\n if (typeof window !== 'undefined' && window.localStorage) {\n localStorage.removeItem(spaceName);\n }\n this.#spaces.delete(spaceName);\n },\n \n /**\n * List all storage spaces\n * @returns {Array<string>} Array of space names\n */\n listSpaces: () => {\n if (typeof window === 'undefined' || !window.localStorage) {\n return Array.from(this.#spaces.keys());\n }\n\n const keys = [];\n for (let i = 0; i < localStorage.length; i++) {\n keys.push(localStorage.key(i));\n }\n return keys;\n },\n \n /**\n * Clear all storage spaces (use with caution!)\n */\n clearAll: () => {\n if (typeof window !== 'undefined' && window.localStorage) {\n localStorage.clear();\n }\n this.#spaces.clear();\n }\n };\n }\n}\n", "/**\n * StorageSpace - Manages a namespaced area in localStorage\n * Each space stores its data as a single JSON object\n */\nexport class StorageSpace {\n #data = {};\n #spaceName;\n\n constructor(spaceName) {\n if (!spaceName) {\n throw new Error('StorageSpace requires a space name');\n }\n \n this.#spaceName = spaceName;\n this.#loadData();\n }\n\n /**\n * Load data from localStorage\n * @private\n */\n #loadData() {\n try {\n const stored = localStorage.getItem(this.#spaceName);\n this.#data = stored ? JSON.parse(stored) : {};\n } catch (error) {\n console.error(`Failed to load storage space \"${this.#spaceName}\":`, error);\n this.#data = {};\n }\n }\n\n /**\n * Save data to localStorage\n * @private\n */\n #saveData() {\n try {\n localStorage.setItem(this.#spaceName, JSON.stringify(this.#data));\n } catch (error) {\n console.error(`Failed to save storage space \"${this.#spaceName}\":`, error);\n throw error;\n }\n }\n\n /**\n * Set a value in the storage space\n * @param {string} key - The key to set\n * @param {*} value - The value to store (will be JSON serialized)\n * @returns {*} The value that was set\n */\n set(key, value) {\n this.#data[key] = value;\n this.#saveData();\n return value;\n }\n\n /**\n * Get a value from the storage space\n * @param {string} key - The key to get\n * @param {*} defaultValue - Default value if key doesn't exist\n * @returns {*} The stored value or default\n */\n get(key, defaultValue = null) {\n return this.#data[key] ?? defaultValue;\n }\n\n /**\n * Update a value using an update function\n * @param {string} key - The key to update\n * @param {Function} updateFn - Function that receives current value and returns new value\n * @returns {*} The updated value\n */\n update(key, updateFn) {\n const current = this.get(key);\n const updated = updateFn(current);\n this.set(key, updated);\n return updated;\n }\n\n /**\n * Remove a key from the storage space\n * @param {string} key - The key to remove\n * @returns {*} The value that was removed\n */\n remove(key) {\n const value = this.#data[key];\n delete this.#data[key];\n this.#saveData();\n return value;\n }\n\n /**\n * Get all data in the storage space\n * @returns {Object} Copy of all data\n */\n getAll() {\n return { ...this.#data };\n }\n\n /**\n * Clear all data in the storage space\n */\n clear() {\n this.#data = {};\n this.#saveData();\n }\n\n /**\n * Check if a key exists in the storage space\n * @param {string} key - The key to check\n * @returns {boolean}\n */\n has(key) {\n return key in this.#data;\n }\n\n /**\n * Get all keys in the storage space\n * @returns {Array<string>}\n */\n keys() {\n return Object.keys(this.#data);\n }\n\n /**\n * Get the number of items in the storage space\n * @returns {number}\n */\n size() {\n return Object.keys(this.#data).length;\n }\n\n /**\n * Get the space name\n * @returns {string}\n */\n getName() {\n return this.#spaceName;\n }\n}\n"],
5
- "mappings": "4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAgC,4BCIzB,IAAMC,EAAN,KAAmB,CACxBC,GAAQ,CAAC,EACTC,GAEA,YAAYC,EAAW,CACrB,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,oCAAoC,EAGtD,KAAKD,GAAaC,EAClB,KAAKC,GAAU,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import_engine", "StorageSpace", "#data", "#spaceName", "spaceName", "#loadData", "stored", "error", "#saveData", "key", "value", "defaultValue", "updateFn", "current", "updated", "LocalStorage", "#spaces", "useContext", "spaceName", "StorageSpace", "keys", "i"]
3
+ "sources": ["../src/StorageSpace.js", "../src/LocalStorage.js"],
4
+ "sourcesContent": ["/**\n * StorageSpace - Manages a namespaced area in localStorage\n * Each space stores its data as a single JSON object\n */\nexport class StorageSpace {\n #data = {};\n #spaceName;\n\n constructor(spaceName) {\n if (!spaceName) {\n throw new Error('StorageSpace requires a space name');\n }\n \n this.#spaceName = spaceName;\n this.#loadData();\n }\n\n /**\n * Load data from localStorage\n * @private\n */\n #loadData() {\n try {\n const stored = localStorage.getItem(this.#spaceName);\n this.#data = stored ? JSON.parse(stored) : {};\n } catch (error) {\n console.error(`Failed to load storage space \"${this.#spaceName}\":`, error);\n this.#data = {};\n }\n }\n\n /**\n * Save data to localStorage\n * @private\n */\n #saveData() {\n try {\n localStorage.setItem(this.#spaceName, JSON.stringify(this.#data));\n } catch (error) {\n console.error(`Failed to save storage space \"${this.#spaceName}\":`, error);\n throw error;\n }\n }\n\n /**\n * Set a value in the storage space\n * @param {string} key - The key to set\n * @param {*} value - The value to store (will be JSON serialized)\n * @returns {*} The value that was set\n */\n set(key, value) {\n this.#data[key] = value;\n this.#saveData();\n return value;\n }\n\n /**\n * Get a value from the storage space\n * @param {string} key - The key to get\n * @param {*} defaultValue - Default value if key doesn't exist\n * @returns {*} The stored value or default\n */\n get(key, defaultValue = null) {\n return this.#data[key] ?? defaultValue;\n }\n\n /**\n * Update a value using an update function\n * @param {string} key - The key to update\n * @param {Function} updateFn - Function that receives current value and returns new value\n * @returns {*} The updated value\n */\n update(key, updateFn) {\n const current = this.get(key);\n const updated = updateFn(current);\n this.set(key, updated);\n return updated;\n }\n\n /**\n * Remove a key from the storage space\n * @param {string} key - The key to remove\n * @returns {*} The value that was removed\n */\n remove(key) {\n const value = this.#data[key];\n delete this.#data[key];\n this.#saveData();\n return value;\n }\n\n /**\n * Get all data in the storage space\n * @returns {Object} Copy of all data\n */\n getAll() {\n return { ...this.#data };\n }\n\n /**\n * Clear all data in the storage space\n */\n clear() {\n this.#data = {};\n this.#saveData();\n }\n\n /**\n * Check if a key exists in the storage space\n * @param {string} key - The key to check\n * @returns {boolean}\n */\n has(key) {\n return key in this.#data;\n }\n\n /**\n * Get all keys in the storage space\n * @returns {Array<string>}\n */\n keys() {\n return Object.keys(this.#data);\n }\n\n /**\n * Get the number of items in the storage space\n * @returns {number}\n */\n size() {\n return Object.keys(this.#data).length;\n }\n\n /**\n * Get the space name\n * @returns {string}\n */\n getName() {\n return this.#spaceName;\n }\n}\n", "import { ServiceProvider } from '@jucie.io/engine';\nimport { StorageSpace } from './StorageSpace.js';\n\n/**\n * LocalStorage Extension\n * Provides namespaced localStorage management for the Jucie engine\n * \n * Usage:\n * engine.localStorage.create('navigation');\n * const nav = engine.localStorage.use('navigation');\n * nav.set('destination', { path: '/editor' });\n * nav.get('destination');\n */\nexport class LocalStorage extends ServiceProvider {\n #spaces = new Map();\n\n static manifest = {\n name: 'LocalStorage',\n namespace: 'localStorage',\n version: '1.0.0',\n description: 'Namespaced localStorage service for browser storage',\n };\n\n initialize() {\n // Check if localStorage is available\n if (typeof window === 'undefined' || !window.localStorage) {\n console.warn('localStorage not available - LocalStorage extension will use in-memory fallback');\n }\n }\n\n actions(useContext) {\n return {\n /**\n * Create a new storage space (or return existing)\n * @param {string} spaceName - Name of the storage space\n * @returns {StorageSpace} Storage space instance\n */\n create: (spaceName) => {\n if (!spaceName) {\n throw new Error('Storage space name is required');\n }\n\n if (!this.#spaces.has(spaceName)) {\n this.#spaces.set(spaceName, new StorageSpace(spaceName));\n }\n \n return this.#spaces.get(spaceName);\n },\n \n /**\n * Use an existing storage space (creates if doesn't exist)\n * @param {string} spaceName - Name of the storage space\n * @returns {StorageSpace} Storage space instance\n */\n use: (spaceName) => {\n if (!spaceName) {\n throw new Error('Storage space name is required');\n }\n\n if (!this.#spaces.has(spaceName)) {\n this.#spaces.set(spaceName, new StorageSpace(spaceName));\n }\n \n return this.#spaces.get(spaceName);\n },\n \n /**\n * Check if a storage space exists\n * @param {string} spaceName - Name to check\n * @returns {boolean}\n */\n exists: (spaceName) => {\n if (typeof window === 'undefined' || !window.localStorage) {\n return this.#spaces.has(spaceName);\n }\n return localStorage.getItem(spaceName) !== null;\n },\n \n /**\n * Destroy a storage space completely\n * @param {string} spaceName - Name of space to destroy\n */\n destroy: (spaceName) => {\n if (typeof window !== 'undefined' && window.localStorage) {\n localStorage.removeItem(spaceName);\n }\n this.#spaces.delete(spaceName);\n },\n \n /**\n * List all storage spaces\n * @returns {Array<string>} Array of space names\n */\n listSpaces: () => {\n if (typeof window === 'undefined' || !window.localStorage) {\n return Array.from(this.#spaces.keys());\n }\n\n const keys = [];\n for (let i = 0; i < localStorage.length; i++) {\n keys.push(localStorage.key(i));\n }\n return keys;\n },\n \n /**\n * Clear all storage spaces (use with caution!)\n */\n clearAll: () => {\n if (typeof window !== 'undefined' && window.localStorage) {\n localStorage.clear();\n }\n this.#spaces.clear();\n }\n };\n }\n}\n"],
5
+ "mappings": "AAIO,IAAMA,EAAN,KAAmB,CACxBC,GAAQ,CAAC,EACTC,GAEA,YAAYC,EAAW,CACrB,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,oCAAoC,EAGtD,KAAKD,GAAaC,EAClB,KAAKC,GAAU,CACjB,CAMAA,IAAY,CACV,GAAI,CACF,IAAMC,EAAS,aAAa,QAAQ,KAAKH,EAAU,EACnD,KAAKD,GAAQI,EAAS,KAAK,MAAMA,CAAM,EAAI,CAAC,CAC9C,OAASC,EAAO,CACd,QAAQ,MAAM,iCAAiC,KAAKJ,EAAU,KAAMI,CAAK,EACzE,KAAKL,GAAQ,CAAC,CAChB,CACF,CAMAM,IAAY,CACV,GAAI,CACF,aAAa,QAAQ,KAAKL,GAAY,KAAK,UAAU,KAAKD,EAAK,CAAC,CAClE,OAASK,EAAO,CACd,cA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AAaD,CAAS,CAAC,EAGlD,KAAKF,GAAQ,IAAIE,CAAS,CACnC,EAOA,IAAMA,GAAc,CAClB,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,gCAAgC,EAGlD,OAAK,KAAKF,GAAQ,IAAIE,CAAS,GAC7B,KAAKF,GAAQ,IAAIE,EAAW,IAAIC,EAAaD,CAAS,CAAC,EAGlD,KAAKF,GAAQ,IAAIE,CAAS,CACnC,EAOA,OAASA,GACH,OAAO,OAAW,KAAe,CAAC,OAAO,aACpC,KAAKF,GAAQ,IAAIE,CAAS,EAE5B,aAAa,QAAQA,CAAS,IAAM,KAO7C,QAAUA,GAAc,CAClB,OAAO,OAAW,KAAe,OAAO,cAC1C,aAAa,WAAWA,CAAS,EAEnC,KAAKF,GAAQ,OAAOE,CAAS,CAC/B,EAMA,WAAY,IAAM,CAChB,GAAI,OAAO,OAAW,KAAe,CAAC,OAAO,aAC3C,OAAO,MAAM,KAAK,KAAKF,GAAQ,KAAK,CAAC,EAGvC,IAAMI,EAAO,CAAC,EACd,QAASC,EAAI,EAAGA,EAAI,aAAa,OAAQA,IACvCD,EAAK,KAAK,aAAa,IAAIC,CAAC,CAAC,EAE/B,OAAOD,CACT,EAKA,SAAU,IAAM,CACV,OAAO,OAAW,KAAe,OAAO,cAC1C,aAAa,MAAM,EAErB,KAAKJ,GAAQ,MAAM,CACrB,CACF,CACF,CACF",
6
+ "names": ["StorageSpace", "#data", "#spaceName", "spaceName", "#loadData", "stored", "error", "#saveData", "key", "value", "defaultValue", "updateFn", "current", "updated", "ServiceProvider", "LocalStorage", "#spaces", "useContext", "spaceName", "StorageSpace", "keys", "i"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jucie.io/engine-local-storage",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Namespaced localStorage service for @jucie.io/engine with browser storage management",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",