@yoltra/core 0.1.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/LICENSE +21 -0
- package/README.es.md +473 -0
- package/README.md +468 -0
- package/dist/types/eventBus/EventBus.d.ts +127 -0
- package/dist/types/eventBus/LooseEventBus.d.ts +219 -0
- package/dist/types/eventBus/index.d.ts +2 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/reducer/Reducer.d.ts +81 -0
- package/dist/types/store/Store.d.ts +834 -0
- package/dist/types/types.d.ts +939 -0
- package/dist/types/utils/detectChangedProps.d.ts +67 -0
- package/dist/types/utils/immutability.d.ts +47 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/yoltra.cjs.js +8 -0
- package/dist/yoltra.esm.js +1557 -0
- package/dist/yoltra.umd.js +8 -0
- package/package.json +83 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @yoltra/core v0.1.0
|
|
3
|
+
* (c) 2026 Manu Ramirez <@pixerael>
|
|
4
|
+
* License: MIT
|
|
5
|
+
* Homepage: https://yoltra.dev
|
|
6
|
+
*/
|
|
7
|
+
(function(y,g){typeof exports=="object"&&typeof module<"u"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(y=typeof globalThis<"u"?globalThis:y||self,g(y.yoltra={}))})(this,(function(y){"use strict";var $=Object.defineProperty;var R=(y,g,b)=>g in y?$(y,g,{enumerable:!0,configurable:!0,writable:!0,value:b}):y[g]=b;var u=(y,g,b)=>R(y,typeof g!="symbol"?g+"":g,b);class g{constructor(){u(this,"handlers",new Map)}on(e,t,s){let n=this.handlers.get(e);n||(n=new Map,this.handlers.set(e,n));let r=n.get(t);return r||(r=new Set,n.set(t,r)),r.add(s),()=>this.off(e,t,s)}off(e,t,s){const n=this.handlers.get(e);if(!n)return;const r=n.get(t);r&&(r.delete(s),r.size===0&&n.delete(t),n.size===0&&this.handlers.delete(e))}emit(e,t,s){const n=this.handlers.get(e);if(!n)return;const r=n.get(t);if(!(!r||r.size===0))for(const o of[...r])try{o(s)}catch(i){console.error("EventBus handler error:",i)}}clear(){this.handlers.clear()}}class b{constructor(){u(this,"handlers",new Map);u(this,"patternHandlers",new Map)}on(e,t,s){const n=String(t);if(this.isPattern(n)){const r=n;this.patternHandlers.has(e)||this.patternHandlers.set(e,new Map);const o=this.patternHandlers.get(e);return o.has(r)||o.set(r,[]),o.get(r).push(s),()=>this.offPattern(e,r,s)}else{const r=this.normalizeTypeKey(n);this.handlers.has(e)||this.handlers.set(e,new Map);const o=this.handlers.get(e);return o.has(r)||o.set(r,[]),o.get(r).push(s),()=>this.offExactNormalized(e,r,s)}}off(e,t,s){const n=this.normalizeTypeKey(String(t));this.offExactNormalized(e,n,s)}offExactNormalized(e,t,s){const n=this.handlers.get(e);if(!n)return;const r=n.get(t);if(!r)return;const o=r.indexOf(s);o!==-1&&r.splice(o,1),r.length===0&&n.delete(t),n.size===0&&this.handlers.delete(e)}offPattern(e,t,s){const n=this.patternHandlers.get(e);if(!n)return;const r=n.get(t);if(!r)return;const o=r.indexOf(s);o!==-1&&r.splice(o,1),r.length===0&&n.delete(t),n.size===0&&this.patternHandlers.delete(e)}emit(e,t,s){const n=String(t),r=this.normalizeTypeKey(n),o=this.handlers.get(e)?.get(r)??[],i=this.patternHandlers.get(e),c=[];if(i&&i.size){const l=this.normalizeTypeKey(n);for(const[p,d]of i.entries())this.matchPattern(p,l)&&c.push(d)}const f=new Set,h=l=>{for(const p of[...l])if(!f.has(p)){f.add(p);try{p(s)}catch(d){console.error(d);continue}}};h(o);for(const l of c)h(l)}isPattern(e){return e.includes("*")}normalizeTypeKey(e){return e.replace(/^\./,"")}splitPath(e){return this.normalizeTypeKey(e).split(".").filter(Boolean)}matchPattern(e,t){const s=this.splitPath(e),n=this.splitPath(t);let r=0,o=0;for(;r<s.length&&o<n.length;){const i=s[r];if(i==="**"){if(r===s.length-1||s.slice(r).filter(f=>f!=="**").length===0)return!0;for(let f=o;f<=n.length;f++)if(this.matchPattern(s.slice(r+1).join("."),n.slice(f).join(".")))return!0;return!1}if(i==="*"||i===n[o]){r++,o++;continue}return!1}if(o===n.length){for(;r<s.length;r++)if(s[r]!=="**")return!1;return!0}return!1}clear(){this.handlers.clear(),this.patternHandlers.clear()}__introspect(){const e=[];for(const[t,s]of this.handlers)for(const[n,r]of s)r.length>0&&e.push({channel:t,type:n,count:r.length});for(const[t,s]of this.patternHandlers)for(const[n,r]of s)r.length>0&&e.push({channel:t,type:n,count:r.length});return e}}class z{constructor(e){u(this,"_reduce");this._reduce=e}reduce(e,t){return this._reduce(e,t)}}function S(a,e,t="",s=new WeakMap){if(a===e)return[];if(typeof a!="object"||typeof e!="object"||a===null||e===null)return[t];if(a instanceof Date&&e instanceof Date)return a.getTime()===e.getTime()?[]:[t];if(a instanceof RegExp&&e instanceof RegExp)return a.source===e.source&&e.flags===a.flags?[]:[t];const n=a,r=e;let o=s.get(n);if(o){if(o.has(r))return[];o.add(r)}else o=new WeakSet,o.add(r),s.set(n,o);const i=Array.isArray(a),c=Array.isArray(e);if(i!==c)return[t];const f=[];if(i){const d=a,E=e;if(d.length!==E.length)return[t];for(let m=0;m<d.length;m++){const w=t?`${t}.${m}`:`${m}`,P=S(d[m],E[m],w,s);f.push(...P)}return f.filter(Boolean)}const h=Object.keys(a),l=Object.keys(e),p=new Set([...h,...l]);for(const d of p){const E=t?`${t}.${d}`:d,m=Object.prototype.hasOwnProperty.call(a,d),w=Object.prototype.hasOwnProperty.call(e,d);if(!m){f.push(E);continue}if(!w){f.push(E);continue}const P=S(a[d],e[d],E,s);f.push(...P)}return f.filter(Boolean)}function v(a,e=new WeakSet){if(a===null||typeof a!="object"||e.has(a)||Object.isFrozen(a))return a;if(e.add(a),Array.isArray(a)){const t=a;for(let s=0;s<t.length;s++)t[s]=v(t[s],e);return Object.freeze(t)}for(const t of Object.getOwnPropertyNames(a)){const s=Object.getOwnPropertyDescriptor(a,t);!s||!("value"in s)||(a[t]=v(a[t],e))}for(const t of Object.getOwnPropertySymbols(a)){const s=Object.getOwnPropertyDescriptor(a,t);!s||!("value"in s)||(a[t]=v(a[t],e))}return Object.freeze(a)}class M{constructor(e){u(this,"name");u(this,"middleware");u(this,"reducers");u(this,"state");u(this,"reducerBus");u(this,"connectorBus");u(this,"listeners",new Set);u(this,"effects",new Map);u(this,"patternEffects",new Set);u(this,"committedEventSubscribers",new Map);u(this,"uncommittedEventSubscribers",new Map);u(this,"allEventSubscribers",new Map);u(this,"sliceUnsubs",new Map);u(this,"patternReducers",new Map);u(this,"replayEnabled");u(this,"eventQueue",[]);u(this,"isProcessingQueue",!1);u(this,"processedEvents",new Map);u(this,"dedupConfig");u(this,"eventCleanupTimer",null);this.name=e.name??"yoltra Store",this.reducerBus=new g,this.connectorBus=new b,this.middleware=[...e.middleware??[]],this.reducers={},this.state={},this.replayEnabled=e.devtools?.allowReplay??!1;const t=process.env.NODE_ENV==="production"?100:50;if(this.dedupConfig={windowMs:e.dedupWindowMs??t,maxCacheSize:1e3},Object.entries(e.reducer).forEach(([s,n])=>{this.mountSlice(s,n,{preserveState:!1})}),e.effects?.length)for(const s of e.effects)this.registerEffect(s);this.eventCleanupTimer=setInterval(()=>{this.pruneProcessedEvents(Date.now())},5e3),this.dispose=this.dispose.bind(this),this.notifyEffects=this.notifyEffects.bind(this),this.forwardEvent=this.forwardEvent.bind(this),this.__applyExternalState=this.__applyExternalState.bind(this),this.__replayEvents=this.__replayEvents.bind(this),this.__devtoolsIntrospect=this.__devtoolsIntrospect.bind(this),this.mountSlice=this.mountSlice.bind(this),this.unmountSlice=this.unmountSlice.bind(this),this.getAtPath=this.getAtPath.bind(this),this.emit=this.emit.bind(this),this.subscribe=this.subscribe.bind(this),this.connect=this.connect.bind(this),this.onEffect=this.onEffect.bind(this),this.onEvent=this.onEvent.bind(this),this.getState=this.getState.bind(this),this.registerEffect=this.registerEffect.bind(this),this.registerMiddleware=this.registerMiddleware.bind(this),this.registerReducer=this.registerReducer.bind(this),this.replaceMiddleware=this.replaceMiddleware.bind(this),this.replaceEffects=this.replaceEffects.bind(this),this.replaceReducers=this.replaceReducers.bind(this),this.hotReplace=this.hotReplace.bind(this)}dispose(){this.eventCleanupTimer&&(clearInterval(this.eventCleanupTimer),this.eventCleanupTimer=null),this.processedEvents.clear(),this.effects.clear(),this.patternEffects.clear()}fingerprint(e,t,s){const n=`${e}::${t}`;try{if(s==null)return`${n}::null`;if(typeof s!="object")return`${n}::${String(s)}`;const r=JSON.stringify(s);return`${n}::${r}`}catch{return`${n}::${Date.now()}::${Math.random()}`}}shouldDedupe(e){const t=Date.now(),s=this.processedEvents.get(e);return s!==void 0&&t-s<this.dedupConfig.windowMs?!0:(this.processedEvents.set(e,t),this.processedEvents.size>this.dedupConfig.maxCacheSize&&this.pruneProcessedEvents(t),!1)}pruneProcessedEvents(e){const t=e-this.dedupConfig.windowMs*2;for(const[s,n]of this.processedEvents)n<t&&this.processedEvents.delete(s)}matchesWhen(e,t){return!e||"any"in e&&e.any===!0?!0:"keys"in e?e.keys.some(([s,n])=>t.channel===s&&t.type===n):"channel"in e?t.channel===e.channel:"channels"in e?e.channels.includes(t.channel):!1}getMiddlewareFunction(e){return typeof e=="function"?e:e.middleware}getMiddlewareWhen(e){if(typeof e!="function")return e.when}async notifyEffects(e){const t=`${String(e.channel)}::${String(e.type)}`,s=this.effects.get(t);if(s&&s.size>0)for(const n of[...s])try{await n(e,this.getState,this.emit)}catch(r){console.error("Effect error:",r)}for(const{effect:n,when:r}of this.patternEffects)if(this.matchesWhen(r,e))try{await n(e,this.getState,this.emit)}catch(o){console.error("Effect error:",o)}}async notifyEventSubscribers(e,t){const s=`${String(e.channel)}::${String(e.type)}`,r=(t==="committed"?this.committedEventSubscribers:this.uncommittedEventSubscribers).get(s);if(r?.size)for(const i of[...r])try{await i(e,this.getState,this.emit,t)}catch(c){console.error("Event subscription error:",c)}const o=this.allEventSubscribers.get(s);if(o?.size)for(const i of[...o])try{await i(e,this.getState,this.emit,t)}catch(c){console.error("Event subscription error:",c)}}forwardEvent(e,t){const s=this.state[e],n=this.reducers[e].reduce(s,t);if(s===n)return!1;const r=S(s,n).filter(Boolean);if(r.length===0)return!1;const o=v(structuredClone(n));this.state={...this.state,[e]:o};const i=new Set;for(const c of r)for(const f of M.buildAncestorPaths(c))i.add(f);for(const c of i){const f=this.getAtPath(s,c),h=this.getAtPath(o,c);this.connectorBus.emit(e,c,{oldValue:f,newValue:h,path:c})}return!0}__devtoolsIntrospect(){const e=Object.keys(this.reducers).map(i=>{const c=this.patternReducers.get(i);return{name:i,when:c}}),t=[];for(const[i,c]of this.effects){if(c.size===0)continue;const[f,h]=i.split("::");for(const l of c){const p=l.__quoMeta;t.push({channel:f,type:h,name:p?.name,description:p?.description})}}for(const i of this.patternEffects){const c=i.effect.__quoMeta;t.push({channel:"*",type:"*",name:c?.name,description:c?.description})}const s=[];for(const i of this.middleware)typeof i=="function"?s.push({name:i.name||void 0}):s.push({name:i.meta?.name,description:i.meta?.description,when:i.when});const n=[];for(const i of this.connectorBus.__introspect())for(let c=0;c<i.count;c++)n.push({reducer:i.channel,property:i.type});const r=[];for(const[i,c]of this.committedEventSubscribers){if(c.size===0)continue;const[f,h]=i.split("::");for(let l=0;l<c.size;l++)r.push({channel:f,type:h,phase:"committed"})}for(const[i,c]of this.uncommittedEventSubscribers){if(c.size===0)continue;const[f,h]=i.split("::");for(let l=0;l<c.size;l++)r.push({channel:f,type:h,phase:"uncommitted"})}for(const[i,c]of this.allEventSubscribers){if(c.size===0)continue;const[f,h]=i.split("::");for(let l=0;l<c.size;l++)r.push({channel:f,type:h,phase:"all"})}const o=this.listeners.size;return{reducers:e,effects:t,middleware:s,atomic:n,event:r,coarse:o}}__applyExternalState(e){const t=this.state,s=e;let n={...this.state},r=!1;Object.keys(this.reducers).forEach(o=>{const i=t?.[o],c=s?.[o];if(i===c)return;const f=v(structuredClone(c));n[o]=f,r=!0;const h=S(i,c).filter(Boolean);if(h.length===0)return;const l=new Set;for(const p of h)for(const d of M.buildAncestorPaths(p))l.add(d);for(const p of l){const d=this.getAtPath(i,p),E=this.getAtPath(f,p);this.connectorBus.emit(o,p,{oldValue:d,newValue:E,path:p})}}),r&&(this.state=n),r&&this.listeners.forEach(o=>o())}__replayEvents(e,t){if(!this.replayEnabled)throw new Error("[yoltra] Event replay is disabled. Enable it with createStore({ devtools: { allowReplay: true } })");this.__applyExternalState(e);for(const s of t){const n=s,r=this.state;this.reducerBus.emit(n.channel,n.type,n.payload);for(const[c,f]of this.patternReducers)this.matchesWhen(f,n)&&this.forwardEvent(c,n);const o=this.state,i=r!==o;this.notifyEventSubscribers(n,"committed"),i&&this.listeners.forEach(c=>c())}}async emit(e,t,s){const n=this.fingerprint(e,t,s);if(this.shouldDedupe(n))return;const r=crypto.randomUUID();if(this.eventQueue.push({channel:e,type:t,payload:s,id:r}),!this.isProcessingQueue){this.isProcessingQueue=!0;try{for(;this.eventQueue.length;){const{channel:o,type:i,payload:c,id:f}=this.eventQueue.shift(),h={channel:o,type:i,payload:c,id:f};let l=!0;for(const m of this.middleware){const w=this.getMiddlewareWhen(m);if(!this.matchesWhen(w,h))continue;const P=this.getMiddlewareFunction(m);try{if(!await P(this.state,h,this.emit)){l=!1;break}}catch(k){console.error("Middleware error:",k),l=!1;break}}if(!l){await this.notifyEventSubscribers(h,"uncommitted");continue}const p=this.state;this.reducerBus.emit(o,i,c);for(const[m,w]of this.patternReducers)this.matchesWhen(w,h)&&this.forwardEvent(m,h);const d=this.state,E=p!==d;await this.notifyEventSubscribers(h,"committed"),await this.notifyEffects(h),E&&this.listeners.forEach(m=>m())}}catch(o){console.error("Emit queue error:",o)}finally{this.isProcessingQueue=!1}}}connect(e,t){return this.connectorBus.on(e.reducer,e.property,t)}onEvent(e,t,s,n="committed"){const r=`${e}::${String(t)}`,o=n==="committed"?this.committedEventSubscribers:n==="uncommitted"?this.uncommittedEventSubscribers:this.allEventSubscribers;return o.has(r)||o.set(r,new Set),o.get(r).add(s),()=>{const i=o.get(r);i&&(i.delete(s),i.size===0&&o.delete(r))}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}getState(){return this.state}registerMiddleware(e){return this.middleware.push(e),()=>{const t=this.middleware.indexOf(e);t!==-1&&this.middleware.splice(t,1)}}registerReducer(e,t){if(e in this.reducers)throw new Error(`Reducer ${e} already exists`);return this.mountSlice(e,t,{preserveState:!1}),this.listeners.forEach(s=>s()),()=>{this.unmountSlice(e,{deleteState:!0}),this.listeners.forEach(s=>s())}}registerEffect(e){const{effect:t,meta:s,when:n}=e,r=[];if(s&&(t.__quoMeta=s),n&&("any"in n&&n.any===!0||"channel"in n||"channels"in n)){const c={effect:t,when:n};return this.patternEffects.add(c),()=>{this.patternEffects.delete(c)}}const i=this.normalizeEventKeys(e);if(i.length===0&&!n&&!e.events){const c={effect:t,when:{any:!0}};return this.patternEffects.add(c),()=>{this.patternEffects.delete(c)}}for(const[c,f]of i){const h=`${String(c)}::${String(f)}`;this.effects.has(h)||this.effects.set(h,new Set),this.effects.get(h).add(t),r.push(()=>{const l=this.effects.get(h);l&&(l.delete(t),l.size===0&&this.effects.delete(h))})}return()=>{for(const c of r)c()}}onEffect(e,t,s){const n=async(r,o,i)=>{if(r.channel!==e||r.type!==t)return;const c=r;return s(c.payload,o,i,c)};return this.registerEffect({events:[[e,t]],effect:n})}replaceMiddleware(e){this.middleware.length=0;for(const t of e)this.middleware.push(t)}replaceEffects(e){this.effects.clear(),this.patternEffects.clear();for(const t of e)this.registerEffect(t)}replaceReducers(e,t={}){const s=t.preserveState!==!1,n=new Set(Object.keys(this.reducers)),r=Object.entries(e),o=new Set(r.map(([i])=>i));for(const i of n)o.has(i)||this.unmountSlice(i,{deleteState:!0});for(const[i,c]of r)n.has(i)?(this.unmountSlice(i,{deleteState:!1}),this.mountSlice(i,c,{preserveState:s})):this.mountSlice(i,c,{preserveState:!1})}hotReplace(e){e.middleware&&this.replaceMiddleware(e.middleware),e.effects&&this.replaceEffects(e.effects),e.reducer&&this.replaceReducers(e.reducer,{preserveState:e.preserveState})}mountSlice(e,t,s){const n=e,{events:r,reducer:o,state:i,when:c}=t;if(this.reducers[e]=new z(o),(!s.preserveState||this.state[n]===void 0)&&(this.state[n]=v(structuredClone(i))),c&&("any"in c&&c.any===!0||"channel"in c||"channels"in c)){this.patternReducers.set(e,c),this.sliceUnsubs.set(n,[]);return}const h=this.normalizeEventKeys(t);if(h.length===0&&!c&&!r){this.patternReducers.set(e,{any:!0}),this.sliceUnsubs.set(n,[]);return}const l=[];for(const[p,d]of h){const E=this.reducerBus.on(p,d,m=>{const w={channel:p,type:d,payload:m,id:crypto.randomUUID()};this.forwardEvent(e,w)});l.push(E)}this.sliceUnsubs.set(n,l)}unmountSlice(e,t){const s=e;this.patternReducers.delete(e);const n=this.sliceUnsubs.get(s);if(n){for(const r of n)try{r()}catch(o){console.error(`[Store error]: ${o}`)}this.sliceUnsubs.delete(s)}delete this.reducers[e],t.deleteState&&delete this.state[s]}normalizeEventKeys(e){if(e.when){const t=e.when;if("any"in t&&t.any===!0)return[];if("keys"in t)return t.keys;if("channel"in t)return[];if("channels"in t)return[]}return e.events?e.events:[]}getAtPath(e,t){if(!t)return e;const n=(t[0]==="."?t.slice(1):t).split(".");let r=e;for(const o of n){if(r==null)return;r=r[o]}return r}static buildAncestorPaths(e){if(!e)return[];const s=(e[0]==="."?e.slice(1):e).split("."),n=[];for(let r=0;r<s.length;r++)n.push(s.slice(0,r+1).join("."));return n}}function _(a){return new M({name:a.name,reducer:a.reducer??{},middleware:a.middleware??[],effects:a.effects??[],dedupWindowMs:a.dedupWindowMs,devtools:a.devtools})}const O=a=>(e,t)=>t.map(s=>[e,s]),B=()=>a=>a;y.EventBus=g,y.LooseEventBus=b,y.Reducer=z,y.Store=M,y.createStore=_,y.detectChangedProps=S,y.eventKeys=B,y.freezeState=v,y.typedEvents=O,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
|
|
8
|
+
//# sourceMappingURL=yoltra.umd.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yoltra/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A modern predictable state container built on the idea of channels, events, and payloads, giving you strongly typed, expressive actions",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"lint": "node ../../tools/repo-tools/bin/repo-eslint.cjs --report-unused-disable-directives --max-warnings 0",
|
|
8
|
+
"lint:fix": "node ../../tools/repo-tools/bin/repo-eslint.cjs --fix",
|
|
9
|
+
"test": "pnpm vitest --coverage --watch=false",
|
|
10
|
+
"build": "vite build",
|
|
11
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
12
|
+
"typecheck:tools": "tsc -p tsconfig.tools.json --noEmit",
|
|
13
|
+
"preview": "vite preview",
|
|
14
|
+
"prepublishOnly": "node ../../common/scripts/copy-license.cjs",
|
|
15
|
+
"docs": "rushx docs:js && rushx docs:md",
|
|
16
|
+
"docs:md": "pnpm typedoc --options ./typedoc.core.json",
|
|
17
|
+
"docs:js": "pnpm typedoc --options ./typedoc.core.json --json ./.typedoc/core-en.json"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "Manu Ramirez <@pixerael>",
|
|
22
|
+
"email": "manu@yoltra.dev"
|
|
23
|
+
},
|
|
24
|
+
"maintainers": [],
|
|
25
|
+
"homepage": "https://yoltra.dev",
|
|
26
|
+
"keywords": [
|
|
27
|
+
"state",
|
|
28
|
+
"store",
|
|
29
|
+
"react",
|
|
30
|
+
"redux-alternative",
|
|
31
|
+
"yoltra"
|
|
32
|
+
],
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/yoltra/yoltra.git"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/yoltra/yoltra/issues"
|
|
39
|
+
},
|
|
40
|
+
"main": "dist/yoltra.cjs.js",
|
|
41
|
+
"module": "dist/yoltra.esm.js",
|
|
42
|
+
"types": "dist/types/index.d.ts",
|
|
43
|
+
"unpkg": "dist/yoltra.umd.js",
|
|
44
|
+
"jsdelivr": "dist/yoltra.umd.js",
|
|
45
|
+
"files": [
|
|
46
|
+
"dist/",
|
|
47
|
+
"LICENSE",
|
|
48
|
+
"README.md",
|
|
49
|
+
"!dist/**/*.map"
|
|
50
|
+
],
|
|
51
|
+
"private": false,
|
|
52
|
+
"sideEffects": false,
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=18.18"
|
|
58
|
+
},
|
|
59
|
+
"exports": {
|
|
60
|
+
".": {
|
|
61
|
+
"types": "./dist/types/index.d.ts",
|
|
62
|
+
"import": "./dist/yoltra.esm.js",
|
|
63
|
+
"require": "./dist/yoltra.cjs.js",
|
|
64
|
+
"default": "./dist/yoltra.esm.js"
|
|
65
|
+
},
|
|
66
|
+
"./package.json": "./package.json"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@types/mocha": "^10.0.10",
|
|
71
|
+
"@types/node": "^24.0.12",
|
|
72
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
73
|
+
"@vitest/ui": "^3.2.4",
|
|
74
|
+
"typedoc": "^0.28.13",
|
|
75
|
+
"typedoc-plugin-markdown": "4.9.0",
|
|
76
|
+
"typedoc-plugin-localization": "3.0.6",
|
|
77
|
+
"typescript": "5.9.3",
|
|
78
|
+
"vite": "^7.1.11",
|
|
79
|
+
"vite-plugin-banner": "0.8.1",
|
|
80
|
+
"vite-plugin-dts": "^4.5.4",
|
|
81
|
+
"vitest": "3.2.4"
|
|
82
|
+
}
|
|
83
|
+
}
|