@wirestate/lit 0.7.0-experimental.2 → 0.7.0-experimental.3
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/cjs/development/index.js +164 -191
- package/cjs/development/index.js.map +1 -1
- package/cjs/production/index.js +1 -1
- package/cjs/production/index.js.map +1 -1
- package/esm/development/commands/on-command-controller.js +17 -20
- package/esm/development/commands/on-command-controller.js.map +1 -1
- package/esm/development/commands/on-command.js +4 -9
- package/esm/development/commands/on-command.js.map +1 -1
- package/esm/development/commands/use-on-command.js +4 -3
- package/esm/development/commands/use-on-command.js.map +1 -1
- package/esm/development/consumption/injection.js +10 -9
- package/esm/development/consumption/injection.js.map +1 -1
- package/esm/development/consumption/use-container.js +2 -2
- package/esm/development/consumption/use-container.js.map +1 -1
- package/esm/development/consumption/use-injection.js +9 -7
- package/esm/development/consumption/use-injection.js.map +1 -1
- package/esm/development/consumption/use-scope.js +2 -2
- package/esm/development/consumption/use-scope.js.map +1 -1
- package/esm/development/context/container-context.js +2 -2
- package/esm/development/context/container-context.js.map +1 -1
- package/esm/development/error/error-code.js +1 -1
- package/esm/development/error/error-code.js.map +1 -1
- package/esm/development/events/on-event-controller.js +20 -24
- package/esm/development/events/on-event-controller.js.map +1 -1
- package/esm/development/events/on-event.js +5 -11
- package/esm/development/events/on-event.js.map +1 -1
- package/esm/development/events/use-on-events.js +5 -5
- package/esm/development/events/use-on-events.js.map +1 -1
- package/esm/development/provision/container-provide.js +7 -7
- package/esm/development/provision/container-provide.js.map +1 -1
- package/esm/development/provision/container-provider.js +17 -23
- package/esm/development/provision/container-provider.js.map +1 -1
- package/esm/development/provision/sub-container-provide.js +7 -7
- package/esm/development/provision/sub-container-provide.js.map +1 -1
- package/esm/development/provision/sub-container-provider.js +28 -31
- package/esm/development/provision/sub-container-provider.js.map +1 -1
- package/esm/development/queries/on-query-controller.js +17 -20
- package/esm/development/queries/on-query-controller.js.map +1 -1
- package/esm/development/queries/on-query.js +4 -9
- package/esm/development/queries/on-query.js.map +1 -1
- package/esm/development/queries/use-on-query.js +4 -3
- package/esm/development/queries/use-on-query.js.map +1 -1
- package/esm/production/commands/on-command-controller.js +1 -1
- package/esm/production/commands/on-command-controller.js.map +1 -1
- package/esm/production/commands/on-command.js +1 -1
- package/esm/production/commands/on-command.js.map +1 -1
- package/esm/production/commands/use-on-command.js +1 -1
- package/esm/production/commands/use-on-command.js.map +1 -1
- package/esm/production/consumption/injection.js +1 -1
- package/esm/production/consumption/injection.js.map +1 -1
- package/esm/production/consumption/use-container.js +1 -1
- package/esm/production/consumption/use-container.js.map +1 -1
- package/esm/production/consumption/use-injection.js +1 -1
- package/esm/production/consumption/use-injection.js.map +1 -1
- package/esm/production/consumption/use-scope.js +1 -1
- package/esm/production/consumption/use-scope.js.map +1 -1
- package/esm/production/context/container-context.js +1 -1
- package/esm/production/context/container-context.js.map +1 -1
- package/esm/production/error/error-code.js +1 -1
- package/esm/production/error/error-code.js.map +1 -1
- package/esm/production/events/on-event-controller.js +1 -1
- package/esm/production/events/on-event-controller.js.map +1 -1
- package/esm/production/events/on-event.js +1 -1
- package/esm/production/events/on-event.js.map +1 -1
- package/esm/production/events/use-on-events.js +1 -1
- package/esm/production/events/use-on-events.js.map +1 -1
- package/esm/production/provision/container-provide.js +1 -1
- package/esm/production/provision/container-provide.js.map +1 -1
- package/esm/production/provision/container-provider.js +1 -1
- package/esm/production/provision/container-provider.js.map +1 -1
- package/esm/production/provision/sub-container-provide.js +1 -1
- package/esm/production/provision/sub-container-provide.js.map +1 -1
- package/esm/production/provision/sub-container-provider.js +1 -1
- package/esm/production/provision/sub-container-provider.js.map +1 -1
- package/esm/production/queries/on-query-controller.js +1 -1
- package/esm/production/queries/on-query-controller.js.map +1 -1
- package/esm/production/queries/on-query.js +1 -1
- package/esm/production/queries/on-query.js.map +1 -1
- package/esm/production/queries/use-on-query.js +1 -1
- package/esm/production/queries/use-on-query.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-scope.js","sources":["../../../../../../../../src/wirestate-lit/consumption/use-scope.ts"],"sourcesContent":[null],"names":["ContextConsumer","WireScope","ContainerContext","useScope","host","current","value","undefined","injectionId","context","subscribe","callback","container","get"],"mappings":"0BAkBAA,MAAA,mCAAAC,MAAA,6CAAAC,MAAA,kCAuBM,SAAUC,EAAyDC,GAMvE,
|
|
1
|
+
{"version":3,"file":"use-scope.js","sources":["../../../../../../../../src/wirestate-lit/consumption/use-scope.ts"],"sourcesContent":[null],"names":["ContextConsumer","WireScope","ContainerContext","useScope","host","current","value","undefined","injectionId","context","subscribe","callback","container","get"],"mappings":"0BAkBAA,MAAA,mCAAAC,MAAA,6CAAAC,MAAA,kCAuBM,SAAUC,EAAyDC,GAMvE,MAAMC,EAAwC,CAAEC,WAAOC,EAAmCC,YAAaP,GAUvG,OARA,IAAID,EAAgBI,EAAM,CACxBK,QAASP,EACTQ,WAAW,EACXC,SAAWC,IACTP,EAAQC,MAAQM,EAAUC,IAAIZ,EAAU,IAIrCI,CACT,QAAAF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t}from"@lit/context";
|
|
1
|
+
import{createContext as t}from"@lit/context";const o=Symbol("ContainerContext"),n=t(o);export{o as CONTAINER_KEY,n as ContainerContext};//# sourceMappingURL=container-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-context.js","sources":["../../../../../../../../src/wirestate-lit/context/container-context.ts"],"sourcesContent":[null],"names":["createContext","CONTAINER_KEY","Symbol","ContainerContext"],"mappings":"wBAGAA,MAAA,
|
|
1
|
+
{"version":3,"file":"container-context.js","sources":["../../../../../../../../src/wirestate-lit/context/container-context.ts"],"sourcesContent":[null],"names":["createContext","CONTAINER_KEY","Symbol","ContainerContext"],"mappings":"wBAGAA,MAAA,qBAKaC,EAA+BC,OAAO,oBAOtCC,EAAmBH,EAAyBC,UAAaA,mBAAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const o=2051;export{o as ERROR_CODE_INVALID_ARGUMENTS};//# sourceMappingURL=error-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-code.js","sources":["../../../../../../../../src/wirestate-lit/error/error-code.ts"],"sourcesContent":[null],"names":["ERROR_CODE_INVALID_ARGUMENTS"],"mappings":"AAAO,
|
|
1
|
+
{"version":3,"file":"error-code.js","sources":["../../../../../../../../src/wirestate-lit/error/error-code.ts"],"sourcesContent":[null],"names":["ERROR_CODE_INVALID_ARGUMENTS"],"mappings":"AAAO,MAAMA,EAAuC,YAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ContextConsumer as
|
|
1
|
+
import{ContextConsumer as s}from"@lit/context";import{EventBus as t}from"@wirestate/core";import{ContainerContext as e}from"../context/container-context.js";class i{bus=null;unsubscriber=null;constructor(i,r,n){i.addController(this),this.types=r,this.handler=n,new s(i,{context:e,subscribe:!0,callback:s=>{this.bus=s.get(t),i.isConnected&&this.resubscribe()}})}hostConnected(){this.resubscribe()}hostDisconnected(){this.cleanup()}resubscribe(){this.cleanup(),this.bus&&(null===this.types?this.unsubscriber=this.bus.subscribe(this.handler):this.unsubscriber=this.bus.subscribe((s=>{this.types.includes(s.type)&&this.handler(s)})))}cleanup(){this.unsubscriber?.(),this.unsubscriber=null}}export{i as OnEventController};//# sourceMappingURL=on-event-controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-event-controller.js","sources":["../../../../../../../../src/wirestate-lit/events/on-event-controller.ts"],"sourcesContent":[null],"names":["ContextConsumer","EventBus","ContainerContext","OnEventController","
|
|
1
|
+
{"version":3,"file":"on-event-controller.js","sources":["../../../../../../../../src/wirestate-lit/events/on-event-controller.ts"],"sourcesContent":[null],"names":["ContextConsumer","EventBus","ContainerContext","OnEventController","bus","unsubscriber","constructor","host","types","handler","addController","this","context","subscribe","callback","container","get","isConnected","resubscribe","hostConnected","hostDisconnected","cleanup","event","includes","type"],"mappings":"0BAUAA,MAAA,kCAAAC,MAAA,6CAAAC,MAAA,wCASaC,EACHC,IAA0B,KAC1BC,aAA4C,KAUpDC,YAAmBC,EAAuBC,EAA2CC,GAGnFF,EAAKG,cAAcC,MAEnBA,KAAKH,MAAQA,EACbG,KAAKF,QAAUA,EAEf,IAAIT,EAAgBO,EAAM,CACxBK,QAASV,EACTW,WAAW,EACXC,SAAWC,IACTJ,KAAKP,IAAMW,EAAUC,IAAIf,GAErBM,EAAKU,aACPN,KAAKO,aACP,GAGN,CAEOC,gBAELR,KAAKO,aACP,CAEOE,mBAELT,KAAKU,SACP,CAEQH,cACNP,KAAKU,UAEDV,KAAKP,MAGY,OAAfO,KAAKH,MACPG,KAAKN,aAAeM,KAAKP,IAAIS,UAAUF,KAAKF,SAE5CE,KAAKN,aAAeM,KAAKP,IAAIS,WAAWS,IACjCX,KAAKH,MAAmCe,SAASD,EAAME,OAC1Db,KAAKF,QAAQa,EACf,IAIR,CAEQD,UAGNV,KAAKN,iBACLM,KAAKN,aAAe,IACtB,SACDF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{OnEventController as n}from"./on-event-controller.js";function t(t){const r=void 0===t?null:Array.isArray(t)?[...t]:[t];return(t,o)=>{"object"==typeof o?o.addInitializer((function(){new n(this,r,(n=>this[o.name](n)))})):t.constructor.addInitializer((t=>{new n(t,r,(n=>t[o](n)))}))}}export{t as onEvent};//# sourceMappingURL=on-event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-event.js","sources":["../../../../../../../../src/wirestate-lit/events/on-event.ts"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"on-event.js","sources":["../../../../../../../../src/wirestate-lit/events/on-event.ts"],"sourcesContent":[null],"names":["OnEventController","onEvent","types","normalized","undefined","Array","isArray","protoOrTarget","nameOrContext","addInitializer","this","event","name","constructor","element"],"mappings":"4BAyBAA,MAAA,2BAyCM,SAAUC,EAAiCC,GAC/C,MAAMC,OACMC,IAAVF,EAAsB,KAAOG,MAAMC,QAAQJ,GAAS,IAAKA,GAAsC,CAACA,GAElG,MAAQ,CAACK,EAAuBC,KACD,iBAAlBA,EAETA,EAAcC,gBAAe,WAC3B,IAAIT,EAAkBU,KAAyBP,GAAaQ,GACzDD,KAAmBF,EAAcI,MAAMD,IAE5C,IAGCJ,EAAcM,YAAuCJ,gBAAgBK,IACpE,IAAId,EAAkBc,EAASX,GAAaQ,GAAWG,EAAsBN,GAAeG,IAAO,GAEvG,CAEJ,QAAAV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{OnEventController as r}from"./on-event-controller.js";function n(n,{types:e,handler:o}){const t=e?Array.isArray(e)?[...e]:[e]:null;return new r(n,t,o)}export{n as useOnEvents};//# sourceMappingURL=use-on-events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-on-events.js","sources":["../../../../../../../../src/wirestate-lit/events/use-on-events.ts"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"use-on-events.js","sources":["../../../../../../../../src/wirestate-lit/events/use-on-events.ts"],"sourcesContent":[null],"names":["OnEventController","useOnEvents","host","types","handler","normalized","Array","isArray"],"mappings":"4BAuBAA,MAAA,2BA8BM,SAAUC,EACdC,GACAC,MAAEA,EAAKC,QAAEA,IAET,MAAMC,EAAiDF,EACnDG,MAAMC,QAAQJ,GACZ,IAAKA,GACL,CAACA,GACH,KAEJ,OAAO,IAAIH,EAAqBE,EAAMG,EAAYD,EACpD,QAAAH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ContainerProvider as
|
|
1
|
+
import{ContainerProvider as e}from"./container-provider.js";function t(t){return(r,i)=>{if("object"!=typeof i){let i;return r.constructor.addInitializer((r=>{i=new e(r,t)})),{get:()=>i,set(){},configurable:!0,enumerable:!0}}i.addInitializer((function(){r.set.call(this,new e(this,t))}))}}export{t as containerProvide};//# sourceMappingURL=container-provide.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-provide.js","sources":["../../../../../../../../src/wirestate-lit/provision/container-provide.ts"],"sourcesContent":[null],"names":["ContainerProvider","containerProvide","options","protoOrTarget","nameOrContext","
|
|
1
|
+
{"version":3,"file":"container-provide.js","sources":["../../../../../../../../src/wirestate-lit/provision/container-provide.ts"],"sourcesContent":[null],"names":["ContainerProvider","containerProvide","options","protoOrTarget","nameOrContext","controller","constructor","addInitializer","element","get","set","configurable","enumerable","call","this"],"mappings":"4BA2BAA,MAAA,0BAwCM,SAAUC,EACdC,GAEA,MAAQ,CACNC,EACAC,KAEA,GAA6B,iBAAlBA,EAKJ,CACL,IAAIC,EAMJ,OAJCF,EAAcG,YAAuCC,gBAAgBC,IACpEH,EAAa,IAAIL,EAAkBQ,EAAcN,EAAQ,IAGpD,CACLO,IAAGA,IACMJ,EAETK,MAAa,EACbC,cAAc,EACdC,YAAY,EAEhB,CAlBER,EAAcG,gBAAe,WAC3BJ,EAAcO,IAAIG,KAAKC,KAAM,IAAId,EAAkBc,KAAsBZ,GAC3E,GAgBF,CAEJ,QAAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ContextProvider as t}from"@lit/context";import{WirestateError as o,createContainer as e}from"@wirestate/core";import{ContainerContext as i}from"../context/container-context.js";import{ERROR_CODE_INVALID_ARGUMENTS as n}from"../error/error-code.js";class r extends t{destroyed=!1;constructor(t,r){if(!r.container&&!r.options)throw new o(n,"ContainerProvider requires a valid container instance or creation options.");if(r.container&&r.options)throw new o(n,"ContainerProvider requires only container or valid options object to be provided.");super(t,{context:i,initialValue:r.container?r.container:e({...r.options,activate:[]})}),this.options=r.options}hostConnected(){if(this.options)if(this.destroyed)this.value=e(this.options),this.destroyed=!1;else if(this.options?.activate)for(const t of this.options.activate)this.value.get(t);super.hostConnected()}hostDisconnected(){this.options&&(this.value.unbindAll(),this.destroyed=!0)}}export{r as ContainerProvider};//# sourceMappingURL=container-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-provider.js","sources":["../../../../../../../../src/wirestate-lit/provision/container-provider.ts"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"container-provider.js","sources":["../../../../../../../../src/wirestate-lit/provision/container-provider.ts"],"sourcesContent":[null],"names":["ContextProvider","WirestateError","createContainer","ContainerContext","ERROR_CODE_INVALID_ARGUMENTS","ContainerProvider","destroyed","constructor","host","options","container","super","context","initialValue","activate","this","hostConnected","value","entry","get","hostDisconnected","unbindAll"],"mappings":"0BAyCAA,MAAA,wCAAAC,qBAAAC,MAAA,6CAAAC,MAAA,yEAAAC,MAAA,yBAeM,MAAOC,UACHL,EAKEM,WAAqB,EAQ/BC,YAAmBC,EAASC,GAC1B,IAAKA,EAAQC,YAAcD,EAAQA,QACjC,MAAM,IAAIR,EACRG,EACA,8EAEG,GAAIK,EAAQC,WAAaD,EAAQA,QACtC,MAAM,IAAIR,EACRG,EACA,qFAIJO,MAAMH,EAAM,CACVI,QAAST,EACTU,aAAcJ,EAAQC,UAAYD,EAAQC,UAAYR,EAAgB,IAAKO,EAAQA,QAASK,SAAU,OAGxGC,KAAKN,QAAUA,EAAQA,OAQzB,CAEOO,gBACL,GAAID,KAAKN,QACP,GAAIM,KAAKT,UAKPS,KAAKE,MAAQf,EAAgBa,KAAKN,SAClCM,KAAKT,WAAY,OAEjB,GAAIS,KAAKN,SAASK,SAKhB,IAAK,MAAMI,KAASH,KAAKN,QAAQK,SAC/BC,KAAKE,MAAME,IAAID,GAMvBP,MAAMK,eACR,CAEOI,mBACDL,KAAKN,UAKPM,KAAKE,MAAMI,YACXN,KAAKT,WAAY,EAErB,SACDD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SubContainerProvider as
|
|
1
|
+
import{SubContainerProvider as e}from"./sub-container-provider.js";function t(t){return(r,i)=>{if("object"!=typeof i){let i;return r.constructor.addInitializer((r=>{i=new e(r,t)})),{get:()=>i,set(){},configurable:!0,enumerable:!0}}i.addInitializer((function(){r.set.call(this,new e(this,t))}))}}export{t as subContainerProvide};//# sourceMappingURL=sub-container-provide.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-container-provide.js","sources":["../../../../../../../../src/wirestate-lit/provision/sub-container-provide.ts"],"sourcesContent":[null],"names":["SubContainerProvider","subContainerProvide","options","protoOrTarget","nameOrContext","
|
|
1
|
+
{"version":3,"file":"sub-container-provide.js","sources":["../../../../../../../../src/wirestate-lit/provision/sub-container-provide.ts"],"sourcesContent":[null],"names":["SubContainerProvider","subContainerProvide","options","protoOrTarget","nameOrContext","provider","constructor","addInitializer","element","get","set","configurable","enumerable","call","this"],"mappings":"+BA2BAA,MAAA,8BA4BM,SAAUC,EACdC,GAEA,MAAQ,CACNC,EACAC,KAEA,GAA6B,iBAAlBA,EAKJ,CACL,IAAIC,EAMJ,OAJCF,EAAcG,YAAuCC,gBAAgBC,IACpEH,EAAW,IAAIL,EAAqBQ,EAAcN,EAAQ,IAGrD,CACLO,IAAGA,IACMJ,EAETK,MAAa,EACbC,cAAc,EACdC,YAAY,EAEhB,CAlBER,EAAcG,gBAAe,WAC3BJ,EAAcO,IAAIG,KAAKC,KAAM,IAAId,EAAqBc,KAAyBZ,GACjF,GAgBF,CAEJ,QAAAD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ContextProvider as t,ContextConsumer as e}from"@lit/context";import{createContainer as s}from"@wirestate/core";import{ContainerContext as o}from"../context/container-context.js";class n extends t{parent=null;destroyed=!0;constructor(t,s){super(t,{context:o}),this.options=s.options,this.consumer=new e(t,{context:o,subscribe:!0,callback:e=>{const s=this.parent;this.parent=e,t.isConnected&&(!this.destroyed&&this.value&&s===e||(this.destroyContainer(),this.createContainer()))}})}hostConnected(){!this.parent||!this.destroyed&&this.value||(this.destroyContainer(),this.createContainer()),super.hostConnected()}hostDisconnected(){this.destroyContainer()}createContainer(){const t=s({...this.options,parent:this.parent});this.destroyed=!1,this.value=t}destroyContainer(){this.value&&!this.destroyed&&(this.value.unbindAll(),this.destroyed=!0)}}export{n as SubContainerProvider};//# sourceMappingURL=sub-container-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-container-provider.js","sources":["../../../../../../../../src/wirestate-lit/provision/sub-container-provider.ts"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"sub-container-provider.js","sources":["../../../../../../../../src/wirestate-lit/provision/sub-container-provider.ts"],"sourcesContent":[null],"names":["ContextProvider","ContextConsumer","createContainer","ContainerContext","SubContainerProvider","parent","destroyed","constructor","host","options","super","context","this","consumer","subscribe","callback","previousParent","isConnected","value","destroyContainer","hostConnected","hostDisconnected","container","unbindAll"],"mappings":"0BAkDAA,qBAAAC,MAAA,yCAAAC,MAAA,6CAAAC,MAAA,kCAwBM,MAAOC,UACHJ,EAMEK,OAA2B,KAC3BC,WAAqB,EAM/BC,YAAmBC,EAASC,GAC1BC,MAAMF,EAAM,CACVG,QAASR,IAKXS,KAAKH,QAAUA,EAAQA,QAEvBG,KAAKC,SAAW,IAAIZ,EAAgBO,EAAM,CACxCG,QAASR,EACTW,WAAW,EACXC,SAAWJ,IACT,MAAMK,EAAmCJ,KAAKP,OAE9CO,KAAKP,OAASM,EAEVH,EAAKS,eAMHL,KAAKN,WAAcM,KAAKM,OAASF,IAAmBL,IACtDC,KAAKO,mBACLP,KAAKV,mBAET,GAQN,CAEOkB,iBAODR,KAAKP,SAAWO,KAAKN,WAAcM,KAAKM,QAC1CN,KAAKO,mBACLP,KAAKV,mBAGPQ,MAAMU,eACR,CAEOC,mBAOLT,KAAKO,kBACP,CAMUjB,kBACR,MAAMoB,EAAuBpB,EAAgB,IACxCU,KAAKH,QACRJ,OAAQO,KAAKP,SASfO,KAAKN,WAAY,EACjBM,KAAKM,MAAQI,CACf,CAKUH,mBACJP,KAAKM,QAAUN,KAAKN,YAMtBM,KAAKM,MAAMK,YACXX,KAAKN,WAAY,EAErB,SACDF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ContextConsumer as t}from"@lit/context";import{QueryBus as e}from"@wirestate/core";import{ContainerContext as
|
|
1
|
+
import{ContextConsumer as t}from"@lit/context";import{QueryBus as e}from"@wirestate/core";import{ContainerContext as s}from"../context/container-context.js";class r{bus=null;unregister=null;constructor(r,i,n){r.addController(this),this.type=i,this.handler=n,new t(r,{context:s,subscribe:!0,callback:t=>{this.bus=t.get(e),r.isConnected&&this.reregister()}})}hostConnected(){this.reregister()}hostDisconnected(){this.cleanup()}reregister(){this.cleanup(),this.bus&&(this.unregister=this.bus.register(this.type,this.handler))}cleanup(){this.unregister?.(),this.unregister=null}}export{r as OnQueryController};//# sourceMappingURL=on-query-controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-query-controller.js","sources":["../../../../../../../../src/wirestate-lit/queries/on-query-controller.ts"],"sourcesContent":[null],"names":["ContextConsumer","QueryBus","ContainerContext","OnQueryController","
|
|
1
|
+
{"version":3,"file":"on-query-controller.js","sources":["../../../../../../../../src/wirestate-lit/queries/on-query-controller.ts"],"sourcesContent":[null],"names":["ContextConsumer","QueryBus","ContainerContext","OnQueryController","bus","unregister","constructor","host","type","handler","addController","this","context","subscribe","callback","container","get","isConnected","reregister","hostConnected","hostDisconnected","cleanup","register"],"mappings":"0BAUAA,MAAA,kCAAAC,MAAA,6CAAAC,MAAA,wCASaC,EACHC,IAA0B,KAC1BC,WAAwC,KAUhDC,YAAmBC,EAAuBC,EAAiBC,GACzDF,EAAKG,cAAcC,MAEnBA,KAAKH,KAAOA,EACZG,KAAKF,QAAUA,EAIf,IAAIT,EAAgBO,EAAM,CACxBK,QAASV,EACTW,WAAW,EACXC,SAAWC,IACTJ,KAAKP,IAAMW,EAAUC,IAAIf,GAErBM,EAAKU,aACPN,KAAKO,YACP,GAGN,CAEOC,gBAELR,KAAKO,YACP,CAEOE,mBAELT,KAAKU,SACP,CAEQH,aACNP,KAAKU,UAEDV,KAAKP,MAEPO,KAAKN,WAAaM,KAAKP,IAAIkB,SAASX,KAAKH,KAAMG,KAAKF,SAExD,CAEQY,UACNV,KAAKN,eACLM,KAAKN,WAAa,IACpB,SACDF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{OnQueryController as
|
|
1
|
+
import{OnQueryController as t}from"./on-query-controller.js";function n(n){return(o,r)=>{"object"==typeof r?r.addInitializer((function(){new t(this,n,(t=>this[r.name](t)))})):o.constructor.addInitializer((o=>{new t(o,n,(t=>o[r](t)))}))}}export{n as onQuery};//# sourceMappingURL=on-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-query.js","sources":["../../../../../../../../src/wirestate-lit/queries/on-query.ts"],"sourcesContent":[null],"names":["OnQueryController","onQuery","type","protoOrTarget","nameOrContext","addInitializer","
|
|
1
|
+
{"version":3,"file":"on-query.js","sources":["../../../../../../../../src/wirestate-lit/queries/on-query.ts"],"sourcesContent":[null],"names":["OnQueryController","onQuery","type","protoOrTarget","nameOrContext","addInitializer","this","data","name","constructor","element"],"mappings":"4BAyBAA,MAAA,2BAqBM,SAAUC,EAAkCC,GAChD,MAAQ,CAACC,EAAuBC,KACD,iBAAlBA,EAETA,EAAcC,gBAAe,WAC3B,IAAIL,EACFM,KACAJ,GACCK,GAAaD,KAAmBF,EAAcI,MAAMD,IAEzD,IAGCJ,EAAcM,YAAuCJ,gBAAgBK,IACpE,IAAIV,EACFU,EACAR,GACCK,GAAaG,EAAsBN,GAAeG,IACpD,GAEL,CAEJ,QAAAN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{OnQueryController as r}from"./on-query-controller.js";function e(e,
|
|
1
|
+
import{OnQueryController as r}from"./on-query-controller.js";function e(e,{type:n,handler:o}){return new r(e,n,o)}export{e as useOnQuery};//# sourceMappingURL=use-on-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-on-query.js","sources":["../../../../../../../../src/wirestate-lit/queries/use-on-query.ts"],"sourcesContent":[null],"names":["OnQueryController","useOnQuery","host","
|
|
1
|
+
{"version":3,"file":"use-on-query.js","sources":["../../../../../../../../src/wirestate-lit/queries/use-on-query.ts"],"sourcesContent":[null],"names":["OnQueryController","useOnQuery","host","type","handler"],"mappings":"4BAqBAA,MAAA,2BAqBM,SAAUC,EACdC,GACAC,KAAEA,EAAIC,QAAEA,IAER,OAAO,IAAIJ,EAAwBE,EAAMC,EAAMC,EACjD,QAAAH"}
|