taggedjs 2.8.27 → 2.8.29
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/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/js/alterProp.function.d.ts +4 -4
- package/js/alterProp.function.js +19 -13
- package/js/alterProp.function.js.map +1 -1
- package/js/index.d.ts +1 -1
- package/js/index.js +1 -1
- package/js/index.js.map +1 -1
- package/js/interpolations/attributes/addSupportEventListener.function.d.ts +1 -1
- package/js/interpolations/attributes/bindSubjectCallback.function.d.ts +1 -1
- package/js/interpolations/attributes/bindSubjectCallback.function.js.map +1 -1
- package/js/interpolations/attributes/getSupportWithState.function.d.ts +1 -1
- package/js/interpolations/attributes/getUpTags.function.d.ts +1 -1
- package/js/interpolations/attributes/getUpTags.function.js.map +1 -1
- package/js/interpolations/attributes/processAttribute.function.d.ts +1 -1
- package/js/interpolations/attributes/processAttribute.function.js +2 -13
- package/js/interpolations/attributes/processAttribute.function.js.map +1 -1
- package/js/interpolations/attributes/processAttributeCallback.function.d.ts +1 -1
- package/js/interpolations/attributes/processNameValueAttribute.function.d.ts +1 -1
- package/js/interpolations/attributes/renderTagArray.function.d.ts +1 -1
- package/js/interpolations/attributes/specialAttribute.d.ts +1 -1
- package/js/interpolations/attributes/updateAttribute.function.d.ts +1 -1
- package/js/interpolations/interpolateTemplate.d.ts +1 -1
- package/js/interpolations/optimizers/attachDomElements.function.d.ts +2 -4
- package/js/interpolations/optimizers/attachDomElements.function.js +5 -36
- package/js/interpolations/optimizers/attachDomElements.function.js.map +1 -1
- package/js/interpolations/optimizers/attachDynamicDom.function.d.ts +7 -0
- package/js/interpolations/optimizers/attachDynamicDom.function.js +28 -0
- package/js/interpolations/optimizers/attachDynamicDom.function.js.map +1 -0
- package/js/interpolations/optimizers/domProcessContextItem.function.d.ts +5 -0
- package/js/interpolations/optimizers/domProcessContextItem.function.js +15 -0
- package/js/interpolations/optimizers/domProcessContextItem.function.js.map +1 -0
- package/js/interpolations/optimizers/processDomContextItem.function.d.ts +5 -0
- package/js/interpolations/optimizers/processDomContextItem.function.js +18 -0
- package/js/interpolations/optimizers/processDomContextItem.function.js.map +1 -0
- package/js/interpolations/processSubscriptionUpdate.function.d.ts +1 -1
- package/js/interpolations/processSubscriptionUpdate.function.js +1 -1
- package/js/interpolations/processSubscriptionUpdate.function.js.map +1 -1
- package/js/interpolations/subscribeToTemplate.function.d.ts +1 -3
- package/js/interpolations/subscribeToTemplate.function.js +1 -35
- package/js/interpolations/subscribeToTemplate.function.js.map +1 -1
- package/js/isInstance.d.ts +1 -1
- package/js/state/StateMemory.type.d.ts +1 -1
- package/js/state/callback.function.d.ts +1 -1
- package/js/state/callbackStateUpdate.function.d.ts +1 -1
- package/js/state/handleProviderChanges.function.d.ts +1 -1
- package/js/state/providers.d.ts +1 -1
- package/js/state/providersChangeCheck.function.d.ts +1 -1
- package/js/state/setUse.function.d.ts +1 -1
- package/js/state/state.utils.d.ts +2 -3
- package/js/state/state.utils.js +1 -6
- package/js/state/state.utils.js.map +1 -1
- package/js/state/states.utils.js +0 -23
- package/js/state/states.utils.js.map +1 -1
- package/js/state/syncStates.function.d.ts +1 -1
- package/js/state/tagClosed$.subject.d.ts +1 -1
- package/js/subject/ProcessInit.type.d.ts +2 -2
- package/js/subject/signal.function.js.map +1 -1
- package/js/tag/AnySupport.type.d.ts +7 -0
- package/js/tag/AnySupport.type.js +2 -0
- package/js/tag/AnySupport.type.js.map +1 -0
- package/js/tag/BaseSupport.type.d.ts +1 -1
- package/js/tag/Context.types.d.ts +7 -8
- package/js/tag/Tag.type.d.ts +1 -1
- package/js/tag/afterRender.function.d.ts +1 -1
- package/js/tag/buildBeforeElement.function.d.ts +1 -2
- package/js/tag/buildBeforeElement.function.js +0 -1
- package/js/tag/buildBeforeElement.function.js.map +1 -1
- package/js/tag/checkDestroyPrevious.function.d.ts +1 -1
- package/js/tag/checkDestroyPrevious.function.js +3 -3
- package/js/tag/checkDestroyPrevious.function.js.map +1 -1
- package/js/tag/checkStateMismatch.function.d.ts +1 -1
- package/js/tag/checkTagValueChange.function.d.ts +1 -1
- package/js/tag/checkTagValueChange.function.js +1 -1
- package/js/tag/checkTagValueChange.function.js.map +1 -1
- package/js/tag/clonePropsBy.function.d.ts +1 -1
- package/js/tag/cloneValueArray.function.js +2 -0
- package/js/tag/cloneValueArray.function.js.map +1 -1
- package/js/tag/createHtmlSupport.function.d.ts +33 -0
- package/js/tag/createHtmlSupport.function.js +41 -0
- package/js/tag/createHtmlSupport.function.js.map +1 -0
- package/js/tag/createSupport.function.d.ts +6 -0
- package/js/tag/createSupport.function.js +8 -0
- package/js/tag/createSupport.function.js.map +1 -0
- package/js/tag/destroyContext.function.d.ts +8 -0
- package/js/tag/destroyContext.function.js +48 -0
- package/js/tag/destroyContext.function.js.map +1 -0
- package/js/tag/destroySupport.function.d.ts +1 -1
- package/js/tag/destroySupport.function.js +2 -2
- package/js/tag/destroySupport.function.js.map +1 -1
- package/js/tag/executeWrap.function.d.ts +1 -1
- package/js/tag/getSupportInCycle.function.d.ts +1 -1
- package/js/tag/getTagWrap.function.d.ts +1 -1
- package/js/tag/getTagWrap.function.js +2 -2
- package/js/tag/getTagWrap.function.js.map +1 -1
- package/js/tag/getTemplaterResult.function.d.ts +4 -4
- package/js/tag/getTemplaterResult.function.js.map +1 -1
- package/js/tag/index.d.ts +4 -3
- package/js/tag/index.js.map +1 -1
- package/js/tag/isLikeTags.function.d.ts +1 -1
- package/js/tag/processUpdateAttrContext.function.d.ts +2 -2
- package/js/tag/processUpdateAttrContext.function.js +1 -1
- package/js/tag/processUpdateAttrContext.function.js.map +1 -1
- package/js/tag/processUpdateContext.function.d.ts +1 -1
- package/js/tag/processUpdateContext.function.js +1 -1
- package/js/tag/processUpdateContext.function.js.map +1 -1
- package/js/tag/render/renderExistingTag.function.d.ts +2 -1
- package/js/tag/render/renderExistingTag.function.js.map +1 -1
- package/js/tag/render/renderSupport.function.d.ts +1 -1
- package/js/tag/render/renderSupport.function.js.map +1 -1
- package/js/tag/render/renderTagOnly.function.d.ts +2 -1
- package/js/tag/render/renderTagOnly.function.js +3 -3
- package/js/tag/render/renderTagOnly.function.js.map +1 -1
- package/js/tag/render/renderWithSupport.function.d.ts +2 -1
- package/js/tag/render/renderWithSupport.function.js.map +1 -1
- package/js/tag/render/softDestroySupport.function.d.ts +1 -1
- package/js/tag/render/softDestroySupport.function.js +1 -1
- package/js/tag/render/softDestroySupport.function.js.map +1 -1
- package/js/tag/tagElement.d.ts +2 -1
- package/js/tag/tagElement.js +4 -7
- package/js/tag/tagElement.js.map +1 -1
- package/js/tag/tagRunner.d.ts +1 -1
- package/js/tag/update/compareArrayItems.function.js +1 -1
- package/js/tag/update/compareArrayItems.function.js.map +1 -1
- package/js/tag/update/createAndProcessContextItem.function.d.ts +7 -0
- package/js/tag/update/createAndProcessContextItem.function.js +32 -0
- package/js/tag/update/createAndProcessContextItem.function.js.map +1 -0
- package/js/tag/update/forceUpdateExistingValue.function.d.ts +7 -0
- package/js/tag/update/forceUpdateExistingValue.function.js +13 -0
- package/js/tag/update/forceUpdateExistingValue.function.js.map +1 -0
- package/js/tag/update/handleStillTag.function.d.ts +5 -0
- package/js/tag/update/handleStillTag.function.js +11 -0
- package/js/tag/update/handleStillTag.function.js.map +1 -0
- package/js/tag/update/oneRenderToSupport.function.d.ts +1 -1
- package/js/tag/update/processDomTagInit.function.d.ts +1 -1
- package/js/tag/update/processDomTagInit.function.js.map +1 -1
- package/js/tag/update/processFirstSubjectComponent.function.d.ts +2 -1
- package/js/tag/update/processFirstSubjectComponent.function.js +3 -3
- package/js/tag/update/processFirstSubjectComponent.function.js.map +1 -1
- package/js/tag/update/processFirstSubjectValue.function.d.ts +1 -1
- package/js/tag/update/processFirstSubjectValue.function.js +0 -1
- package/js/tag/update/processFirstSubjectValue.function.js.map +1 -1
- package/js/tag/update/processNewSubjectTag.function.d.ts +1 -1
- package/js/tag/update/processNewSubjectTag.function.js +0 -14
- package/js/tag/update/processNewSubjectTag.function.js.map +1 -1
- package/js/tag/update/processNewValue.function.d.ts +2 -1
- package/js/tag/update/processNewValue.function.js +3 -2
- package/js/tag/update/processNewValue.function.js.map +1 -1
- package/js/tag/update/processRenderOnceInit.function.d.ts +1 -1
- package/js/tag/update/processRenderOnceInit.function.js.map +1 -1
- package/js/tag/update/processSubscribe.function.d.ts +2 -2
- package/js/tag/update/processSubscribe.function.js +2 -2
- package/js/tag/update/processSubscribe.function.js.map +1 -1
- package/js/tag/update/processTag.function.d.ts +2 -1
- package/js/tag/update/processTag.function.js +3 -7
- package/js/tag/update/processTag.function.js.map +1 -1
- package/js/tag/update/processTagArray.d.ts +1 -1
- package/js/tag/update/processTagArray.js +11 -44
- package/js/tag/update/processTagArray.js.map +1 -1
- package/js/tag/update/processTagComponentInit.function.d.ts +1 -1
- package/js/tag/update/processTagComponentInit.function.js.map +1 -1
- package/js/tag/update/processTagInit.function.d.ts +1 -1
- package/js/tag/update/processTagInit.function.js.map +1 -1
- package/js/tag/update/processTagResult.function.d.ts +1 -1
- package/js/tag/update/processTagResult.function.js +1 -10
- package/js/tag/update/processTagResult.function.js.map +1 -1
- package/js/tag/update/setupSubscribe.function.d.ts +11 -6
- package/js/tag/update/setupSubscribe.function.js +45 -30
- package/js/tag/update/setupSubscribe.function.js.map +1 -1
- package/js/tag/update/syncPriorPropFunction.function.d.ts +1 -1
- package/js/tag/update/tryUpdateToTag.function.d.ts +7 -0
- package/js/tag/update/tryUpdateToTag.function.js +64 -0
- package/js/tag/update/tryUpdateToTag.function.js.map +1 -0
- package/js/tag/update/updateContextItemBySupport.function.d.ts +3 -0
- package/js/tag/update/updateContextItemBySupport.function.js +10 -0
- package/js/tag/update/updateContextItemBySupport.function.js.map +1 -0
- package/js/tag/update/updateExistingArray.function.d.ts +1 -1
- package/js/tag/update/updateExistingObject.function.d.ts +1 -1
- package/js/tag/update/updateExistingTagComponent.function.d.ts +2 -1
- package/js/tag/update/updateExistingTagComponent.function.js.map +1 -1
- package/js/tag/update/updateExistingValue.function.d.ts +4 -11
- package/js/tag/update/updateExistingValue.function.js +5 -130
- package/js/tag/update/updateExistingValue.function.js.map +1 -1
- package/js/tag/update/updateToDiffValue.function.d.ts +5 -0
- package/js/tag/update/updateToDiffValue.function.js +28 -0
- package/js/tag/update/updateToDiffValue.function.js.map +1 -0
- package/js/tag/updateSupportBy.function.d.ts +1 -1
- package/js/tag/updateSupportBy.function.js +3 -2
- package/js/tag/updateSupportBy.function.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { processSubUpdate } from './processSubscriptionUpdate.function.js';
|
|
3
|
-
import { setUseMemory } from '../state/setUseMemory.object.js';
|
|
4
|
-
import { paint } from '../tag/paint.function.js';
|
|
5
|
-
/** @deprecated Used for when dynamic value is truly something to subscribe to */
|
|
6
|
-
export function subscribeToTemplate({ subject, support, counts, contextItem, appendTo, }) {
|
|
7
|
-
const sub = setupSubscribeCallbackProcessor(subject, contextItem, support, counts, appendTo);
|
|
8
|
-
// Manage unsubscribing
|
|
9
|
-
const global = support.subject.global;
|
|
10
|
-
const subs = global.subscriptions = global.subscriptions || [];
|
|
11
|
-
subs.push(sub);
|
|
12
|
-
}
|
|
13
|
-
function setupSubscribeCallbackProcessor(observable, contextItem, support, // ownerSupport ?
|
|
14
|
-
counts, // used for animation stagger computing
|
|
15
|
-
appendTo) {
|
|
16
|
-
let onValue = function onSubValue(value) {
|
|
17
|
-
processFirstSubjectValue(value, contextItem, support, { ...counts }, syncRun ? appendTo : undefined);
|
|
18
|
-
if (!syncRun && !setUseMemory.stateConfig.support) {
|
|
19
|
-
paint();
|
|
20
|
-
}
|
|
21
|
-
// from now on just run update
|
|
22
|
-
onValue = function subscriptionUpdate(value) {
|
|
23
|
-
processSubUpdate(value, contextItem, support);
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
// onValue mutates so function below calls original and mutation
|
|
27
|
-
const callback = function subValueProcessor(value) {
|
|
28
|
-
onValue(value);
|
|
29
|
-
}; // as unknown as (ValueSubjectSubscriber<Callback> & ValueSubjectSubscriber<unknown>)
|
|
30
|
-
let syncRun = true;
|
|
31
|
-
const sub = observable.subscribe(callback);
|
|
32
|
-
contextItem.subject = observable;
|
|
33
|
-
syncRun = false;
|
|
34
|
-
return sub;
|
|
35
|
-
}
|
|
1
|
+
export {};
|
|
36
2
|
//# sourceMappingURL=subscribeToTemplate.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribeToTemplate.function.js","sourceRoot":"","sources":["../../ts/interpolations/subscribeToTemplate.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscribeToTemplate.function.js","sourceRoot":"","sources":["../../ts/interpolations/subscribeToTemplate.function.ts"],"names":[],"mappings":""}
|
package/js/isInstance.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SubjectLike } from './subject/subject.utils.js';
|
|
2
|
-
import { AnySupport } from './tag/
|
|
2
|
+
import { AnySupport } from './tag/AnySupport.type.js';
|
|
3
3
|
import { StringTag } from './tag/StringTag.type.js';
|
|
4
4
|
import { TemplaterResult } from './tag/getTemplaterResult.function.js';
|
|
5
5
|
export declare function isSimpleType(value: any): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnySupport } from "../tag/
|
|
1
|
+
import { AnySupport } from "../tag/AnySupport.type.js";
|
|
2
2
|
import { State } from "./state.types.js";
|
|
3
3
|
import { runFirstState } from "./stateHandlers.js";
|
|
4
4
|
import { firstStatesHandler, StatesSetter } from "./states.utils.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnySupport } from '../tag/
|
|
1
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
2
2
|
import { Callback } from './callbackMaker.function.js';
|
|
3
3
|
import { StateMemory } from './StateMemory.type.js';
|
|
4
4
|
/** Wrap a function that will be called back. After the wrapper and function are called, a rendering cycle will update display */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnySupport } from '../tag/
|
|
1
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
2
2
|
import { Callback } from './callbackMaker.function.js';
|
|
3
3
|
import { StatesSetter } from './states.utils.js';
|
|
4
4
|
export default function callbackStateUpdate<T>(support: AnySupport, oldStates: StatesSetter[], callback: Callback<any, any, any, any, any, any, T>, ...args: any[]): T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnySupport } from '../tag/
|
|
1
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
2
2
|
import { Provider } from './providers.js';
|
|
3
3
|
export declare function handleProviderChanges(appSupport: AnySupport, provider: Provider): TagWithProvider[];
|
|
4
4
|
type TagWithProvider = {
|
package/js/state/providers.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnySupport } from '../tag/
|
|
1
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
2
2
|
export declare function providersChangeCheck(support: AnySupport): AnySupport[];
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { AnySupport } from '../tag/
|
|
1
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
2
2
|
import { State, StateConfig } from './state.types.js';
|
|
3
|
-
import { StatesSetter } from './states.utils.js';
|
|
4
3
|
import { StateMemory } from './StateMemory.type.js';
|
|
5
4
|
export declare function initState(support: AnySupport, config: StateMemory): void;
|
|
6
|
-
export declare function reState(newSupport: AnySupport, prevSupport: AnySupport, config: StateMemory, prevState: State
|
|
5
|
+
export declare function reState(newSupport: AnySupport, prevSupport: AnySupport, config: StateMemory, prevState: State): void;
|
|
7
6
|
export declare class StateEchoBack {
|
|
8
7
|
}
|
|
9
8
|
/** sends a fake value and then sets back to received value */
|
package/js/state/state.utils.js
CHANGED
|
@@ -9,19 +9,14 @@ export function initState(support, config) {
|
|
|
9
9
|
config.statesIndex = 0;
|
|
10
10
|
config.support = support;
|
|
11
11
|
}
|
|
12
|
-
export function reState(newSupport, prevSupport, config, prevState
|
|
12
|
+
export function reState(newSupport, prevSupport, config, prevState) {
|
|
13
13
|
// set previous state memory
|
|
14
14
|
config.rearray = prevState;
|
|
15
15
|
config.stateArray = [];
|
|
16
16
|
config.states = [];
|
|
17
|
-
//config.states = prevStates
|
|
18
|
-
//config.states = [...prevStates]
|
|
19
|
-
// newSupport.states = [...prevStates]
|
|
20
|
-
// support.states = config.states
|
|
21
17
|
config.statesIndex = 0;
|
|
22
18
|
config.handlers.handler = runRestate;
|
|
23
19
|
config.handlers.statesHandler = reStatesHandler;
|
|
24
|
-
// config.support = support
|
|
25
20
|
config.prevSupport = prevSupport;
|
|
26
21
|
}
|
|
27
22
|
export class StateEchoBack {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.utils.js","sourceRoot":"","sources":["../../ts/state/state.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,kBAAkB,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"state.utils.js","sourceRoot":"","sources":["../../ts/state/state.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGvE,MAAM,UAAU,SAAS,CACvB,OAAmB,EACnB,MAAmB;IAEnB,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,aAAa,CAAA;IACvC,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,kBAA2E,CAAA;IAE3G,MAAM,CAAC,OAAO,GAAG,EAAE,CAAA;IACnB,MAAM,CAAC,UAAU,GAAG,EAAE,CAAA;IACtB,MAAM,CAAC,MAAM,GAAG,EAAE,CAAA;IAClB,MAAM,CAAC,WAAW,GAAG,CAAC,CAAA;IACtB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA;AAC1B,CAAC;AAED,MAAM,UAAU,OAAO,CACrB,UAAsB,EACtB,WAAuB,EACvB,MAAmB,EACnB,SAAgB;IAEhB,4BAA4B;IAC5B,MAAM,CAAC,OAAO,GAAG,SAAS,CAAA;IAE1B,MAAM,CAAC,UAAU,GAAG,EAAE,CAAA;IACtB,MAAM,CAAC,MAAM,GAAG,EAAE,CAAA;IAClB,MAAM,CAAC,WAAW,GAAG,CAAC,CAAA;IAEtB,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAA;IACpC,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,eAAe,CAAA;IAE/C,MAAM,CAAC,WAAW,GAAG,WAAW,CAAA;AAClC,CAAC;AAED,MAAM,OAAO,aAAa;CAAG;AAE7B,8DAA8D;AAC9D,MAAM,UAAU,gBAAgB,CAC9B,QAAwB;IAExB,MAAM,CAAE,KAAK,CAAE,GAAG,QAAQ,CAAC,aAAoB,CAAC,CAAA,CAAC,iCAAiC;IAClF,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAE,KAAK,CAAE,CAAA,CAAC,6BAA6B;IACpE,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;AAC5B,CAAC"}
|
package/js/state/states.utils.js
CHANGED
|
@@ -2,20 +2,15 @@ import { setUseMemory } from './setUseMemory.object.js';
|
|
|
2
2
|
import { getSupportWithState } from '../interpolations/attributes/getSupportWithState.function.js';
|
|
3
3
|
export function firstStatesHandler(setter) {
|
|
4
4
|
const config = setUseMemory.stateConfig;
|
|
5
|
-
// State first time run
|
|
6
5
|
config.states[config.statesIndex] = setter;
|
|
7
|
-
// const support = config.support as AnySupport
|
|
8
|
-
// support.states[config.statesIndex] = setter
|
|
9
6
|
++config.statesIndex;
|
|
10
7
|
return setter((...args) => {
|
|
11
|
-
// state(args)
|
|
12
8
|
return args;
|
|
13
9
|
});
|
|
14
10
|
}
|
|
15
11
|
/** aka statesHandler */
|
|
16
12
|
export function reStatesHandler(setter) {
|
|
17
13
|
const config = setUseMemory.stateConfig;
|
|
18
|
-
const support = config.support;
|
|
19
14
|
const statesIndex = config.statesIndex;
|
|
20
15
|
const prevSupport = getSupportWithState(config.prevSupport);
|
|
21
16
|
const prevStates = prevSupport.states;
|
|
@@ -26,27 +21,9 @@ export function reStatesHandler(setter) {
|
|
|
26
21
|
lastValues = args;
|
|
27
22
|
return args;
|
|
28
23
|
});
|
|
29
|
-
let index = 0;
|
|
30
24
|
const resetter = (..._args) => {
|
|
31
|
-
// state(value) // fake call and do not care about result
|
|
32
|
-
// fake state() having been called
|
|
33
|
-
/*
|
|
34
|
-
config.stateArray.push({
|
|
35
|
-
get: () => args,
|
|
36
|
-
defaultValue: args,
|
|
37
|
-
})
|
|
38
|
-
*/
|
|
39
|
-
// const lastValue = lastValues[index]
|
|
40
|
-
/*
|
|
41
|
-
let lastValue: any
|
|
42
|
-
oldStates((...x) => {
|
|
43
|
-
return lastValue = x
|
|
44
|
-
})
|
|
45
|
-
*/
|
|
46
|
-
++index;
|
|
47
25
|
return lastValues;
|
|
48
26
|
};
|
|
49
|
-
//;(config.support as AnySupport).states[config.statesIndex] = setter
|
|
50
27
|
config.states[config.statesIndex] = setter;
|
|
51
28
|
++config.statesIndex;
|
|
52
29
|
return setter(resetter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"states.utils.js","sourceRoot":"","sources":["../../ts/state/states.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"states.utils.js","sourceRoot":"","sources":["../../ts/state/states.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AASlG,MAAM,UAAU,kBAAkB,CAChC,MAAoB;IAEpB,MAAM,MAAM,GAAgB,YAAY,CAAC,WAAW,CAAA;IACpD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAA;IAE1C,EAAE,MAAM,CAAC,WAAW,CAAA;IAEpB,OAAO,MAAM,CAAC,CAAkB,GAAG,IAAY,EAAE,EAAE;QACjD,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,wBAAwB;AACxB,MAAM,UAAU,eAAe,CAC7B,MAAoB;IAEpB,MAAM,MAAM,GAAgB,YAAY,CAAC,WAAW,CAAA;IACpD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;IACtC,MAAM,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,WAAyB,CAAC,CAAA;IAEzE,MAAM,UAAU,GAAG,WAAW,CAAC,MAAwB,CAAA;IACvD,mCAAmC;IAEnC,MAAM,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACzC,IAAI,UAAU,GAAU,EAAE,CAAA;IAE1B,SAAS,CAAC,SAAS,QAAQ,CAAC,GAAG,IAAI;QACjC,UAAU,GAAG,IAAI,CAAA;QACjB,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,CAAkB,GAAG,KAAa,EAAK,EAAE;QACxD,OAAO,UAAe,CAAA;IACxB,CAAC,CAAA;IAED,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAA;IAC1C,EAAE,MAAM,CAAC,WAAW,CAAA;IAEpB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAA;AACzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Subject } from '../subject/Subject.class.js';
|
|
2
|
-
import { AnySupport } from '../tag/
|
|
2
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
3
3
|
/** Emits event at the end of a tag being rendered. Use tagClosed$.toPromise() to render a tag after a current tag is done rendering */
|
|
4
4
|
export declare const tagClosed$: Subject<AnySupport>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Counts } from '../interpolations/interpolateTemplate.js';
|
|
2
2
|
import { ContextItem } from '../tag/Context.types.js';
|
|
3
|
-
import { AnySupport } from '../tag/
|
|
3
|
+
import { AnySupport } from '../tag/AnySupport.type.js';
|
|
4
4
|
export type ProcessInit = (value: any, // TemplateValue | StringTag | SubscribeValue | SignalObject,
|
|
5
5
|
contextItem: ContextItem, ownerSupport: AnySupport, counts: Counts, // {added:0, removed:0}
|
|
6
|
-
appendTo?: Element) => any;
|
|
6
|
+
appendTo?: Element, insertBefore?: Text) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signal.function.js","sourceRoot":"","sources":["../../ts/subject/signal.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"signal.function.js","sourceRoot":"","sources":["../../ts/subject/signal.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAKtD,6HAA6H;AAC7H,MAAM,UAAU,MAAM,CAAI,YAAe;IACrC,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAA;IAEnC,IAAG,OAAO,EAAE,CAAC;QACT,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,MAAM,CAAC,YAAY,CAAC,CAAA;AAC/B,CAAC;AASD,kFAAkF;AAClF,MAAM,UAAU,MAAM,CAAI,YAAe;IACrC,IAAI,KAAK,GAAM,YAAY,CAAA;IAC3B,MAAM,WAAW,GAAoB,IAAI,GAAG,EAAE,CAAA;IAE9C,OAAO;QACH,SAAS,EAAE,UAAU,CAAC,MAAM;QAC5B,WAAW,EAAE,aAAa;QAE1B,IAAI,KAAK;YACP,OAAO,KAAK,CAAA;QACd,CAAC;QACD,IAAI,KAAK,CAAC,QAAW;YACjB,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACrB,KAAK,GAAG,QAAQ,CAAA;gBAChB,yBAAyB;gBACzB,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA;YACvD,CAAC;QACL,CAAC;QACD,SAAS,CAAC,QAAoB;YAC1B,QAAQ,CAAC,KAAK,CAAC,CAAA,CAAC,qBAAqB;YAErC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YAEzB,iCAAiC;YACjC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;YAEhD,kCAAkC;YAClC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAA;YAEzB,OAAO,KAAK,CAAA;QAChB,CAAC;KACJ,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnySupport.type.js","sourceRoot":"","sources":["../../ts/tag/AnySupport.type.ts"],"names":[],"mappings":""}
|
|
@@ -2,27 +2,26 @@ import { SpecialDefinition } from '../interpolations/attributes/processAttribute
|
|
|
2
2
|
import { HowToSet } from '../interpolations/attributes/howToSetInputValue.function.js';
|
|
3
3
|
import { InterpolateSubject, TemplateValue } from './update/processFirstSubject.utils.js';
|
|
4
4
|
import { Clone, TagGlobal } from './getTemplaterResult.function.js';
|
|
5
|
-
import { AnySupport
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
global: TagGlobal;
|
|
10
|
-
};
|
|
5
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
6
|
+
import { SupportContextItem } from './createHtmlSupport.function.js';
|
|
7
|
+
export type ContextHandler = (value: TemplateValue, newSupport: AnySupport, contextItem: ContextItem, values: unknown[]) => void;
|
|
8
|
+
export type LastArrayItem = ContextItem;
|
|
11
9
|
export type ContextItem = {
|
|
12
10
|
element?: Element;
|
|
13
|
-
handler?: ContextHandler;
|
|
14
11
|
isAttr?: true;
|
|
15
12
|
howToSet?: HowToSet;
|
|
16
13
|
isNameOnly?: boolean;
|
|
17
14
|
attrName?: string;
|
|
18
15
|
isSpecial?: SpecialDefinition;
|
|
19
16
|
placeholder?: Text;
|
|
17
|
+
withinOwnerElement: boolean;
|
|
20
18
|
simpleValueElm?: Clone;
|
|
21
19
|
lastArray?: LastArrayItem[];
|
|
22
20
|
subject?: InterpolateSubject;
|
|
23
21
|
global?: TagGlobal;
|
|
24
22
|
value?: any;
|
|
25
|
-
|
|
23
|
+
/** Called on value update detected, within processUpdateOneContext(). Return value is ignored */
|
|
24
|
+
handler?: ContextHandler;
|
|
26
25
|
checkValueChange: CheckValueChange | CheckSupportValueChange;
|
|
27
26
|
delete: (contextItem: ContextItem) => any;
|
|
28
27
|
};
|
package/js/tag/Tag.type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TemplaterResult } from './getTemplaterResult.function.js';
|
|
2
2
|
import { ValueTypes } from './ValueTypes.enum.js';
|
|
3
|
-
import { AnySupport } from './
|
|
3
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
4
4
|
import { ProcessInit } from '../subject/ProcessInit.type.js';
|
|
5
5
|
export type Tag = {
|
|
6
6
|
values: unknown[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnySupport } from './
|
|
1
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
2
2
|
/** Compares states of previous renders
|
|
3
3
|
* @property support - The workflow that supports a single tag
|
|
4
4
|
* @property ownerSupport - undefined when "support" is the app element
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Counts } from '../interpolations/interpolateTemplate.js';
|
|
2
|
-
import { AnySupport } from './
|
|
2
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
3
3
|
import { ContextItem } from './Context.types.js';
|
|
4
4
|
/** Function that kicks off actually putting tags down as HTML elements */
|
|
5
5
|
export declare function buildBeforeElement(support: AnySupport, counts: Counts, appendTo?: Element, insertBefore?: Text): {
|
|
6
6
|
context: ContextItem[];
|
|
7
|
-
subs: import("../interpolations/subscribeToTemplate.function.js").SubToTemplateOptions[];
|
|
8
7
|
dom: import("../interpolations/optimizers/ObjectNode.types.js").DomObjectChildren;
|
|
9
8
|
};
|
|
10
9
|
export declare function addOneContext(value: unknown, context: ContextItem[], withinOwnerElement: boolean): ContextItem;
|
|
@@ -14,7 +14,6 @@ export function buildBeforeElement(support, counts, appendTo, insertBefore) {
|
|
|
14
14
|
const result = attachHtmlDomMeta(support, counts, appendTo, insertBefore);
|
|
15
15
|
global.htmlDomMeta = result.dom;
|
|
16
16
|
--painting.locks;
|
|
17
|
-
// ++global.renderCount
|
|
18
17
|
// return fragment
|
|
19
18
|
return result;
|
|
20
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBeforeElement.function.js","sourceRoot":"","sources":["../../ts/tag/buildBeforeElement.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAA;
|
|
1
|
+
{"version":3,"file":"buildBeforeElement.function.js","sourceRoot":"","sources":["../../ts/tag/buildBeforeElement.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAA;AAQ9F,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAA;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,0EAA0E;AAC1E,MAAM,UAAU,kBAAkB,CAChC,OAAmB,EACn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,IAAG,OAAO,CAAC,SAAS,KAAK,UAAU,CAAC,GAAG,EAAE,CAAC;QACxC,OAAQ,OAAkB,CAAC,GAAiB,CAAA;IAC9C,CAAC;IAED,MAAM,OAAO,GAAI,OAAqB,CAAC,OAAO,CAAA;IAE9C,OAAO,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,KAAc,EACd,OAAsB,EACtB,kBAA2B;IAE3B,MAAM,WAAW,GAAgB;QAC/B,KAAK;QACL,gBAAgB,EAAE,sBAAsB;QACxC,MAAM,EAAE,iBAAiB;QACzB,kBAAkB;KACnB,CAAA;IAED,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAEzB,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContextItem } from './Context.types.js';
|
|
2
2
|
export declare function checkArrayValueChange(newValue: unknown, subject: ContextItem): false | 9;
|
|
3
3
|
export declare function destroyArray(subject: ContextItem, lastArray: any[]): void;
|
|
4
|
-
export declare function checkSimpleValueChange(newValue: unknown,
|
|
4
|
+
export declare function checkSimpleValueChange(newValue: unknown, contextItem: ContextItem): -1 | 6;
|
|
5
5
|
export declare function deleteSimpleValue(subject: ContextItem): void;
|
|
@@ -20,14 +20,14 @@ export function destroyArray(subject, lastArray) {
|
|
|
20
20
|
}
|
|
21
21
|
delete subject.lastArray;
|
|
22
22
|
}
|
|
23
|
-
export function checkSimpleValueChange(newValue,
|
|
23
|
+
export function checkSimpleValueChange(newValue, contextItem) {
|
|
24
24
|
const isBadValue = newValue === null || newValue === undefined;
|
|
25
25
|
if (isBadValue || !(typeof (newValue) === BasicTypes.object)) {
|
|
26
26
|
// This will cause all other values to render
|
|
27
|
-
processUpdateRegularValue(newValue,
|
|
27
|
+
processUpdateRegularValue(newValue, contextItem);
|
|
28
28
|
return -1; // no need to destroy, just update display
|
|
29
29
|
}
|
|
30
|
-
deleteSimpleValue(
|
|
30
|
+
deleteSimpleValue(contextItem);
|
|
31
31
|
return 6; // 'changed-simple-value'
|
|
32
32
|
}
|
|
33
33
|
export function deleteSimpleValue(subject) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkDestroyPrevious.function.js","sourceRoot":"","sources":["../../ts/tag/checkDestroyPrevious.function.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,OAAO,EAAE,yBAAyB,EAAgB,MAAM,0CAA0C,CAAA;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAK,wCAAwC,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,MAAK,kBAAkB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,UAAU,qBAAqB,CACnC,QAAiB,EACjB,OAAoB;IAEpB,sBAAsB;IACtB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvB,MAAM,SAAS,GAAG,OAAO,CAAC,SAAsB,CAAA;QAChD,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAEhC,OAAO,CAAC,CAAA,CAAC,UAAU;IACrB,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,OAAoB,EACpB,SAAgB;IAEhB,MAAM,MAAM,GAAG,EAAC,KAAK,EAAC,CAAC,EAAE,OAAO,EAAC,CAAC,EAAC,CAAA;IAEnC,KAAK,IAAI,KAAK,GAAC,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC;QACpD,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,OAAO,CAAC,SAAS,CAAA;AAC1B,CAAC;AAED,MAAM,UAAU,sBAAsB,CAC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OAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3D,6CAA6C;QAC7C,yBAAyB,CACvB,QAAwB,EACxB,WAAW,CACZ,CAAA;QAED,OAAO,CAAC,CAAC,CAAA,CAAE,0CAA0C;IACvD,CAAC;IAED,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAE9B,OAAO,CAAC,CAAA,CAAC,yBAAyB;AACpC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,OAAoB;IAEpB,MAAM,GAAG,GAAG,OAAO,CAAC,cAAyB,CAAA;IAC7C,OAAO,OAAO,CAAC,cAAc,CAAA;IAC7B,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SupportContextItem } from './
|
|
1
|
+
import { SupportContextItem } from './createHtmlSupport.function.js';
|
|
2
2
|
import { ContextItem } from './Context.types.js';
|
|
3
3
|
export declare function checkTagValueChange(newValue: unknown, contextItem: SupportContextItem): false | -1 | 7 | 8;
|
|
4
4
|
export declare function destorySupportByContextItem(contextItem: ContextItem): void;
|
|
@@ -2,7 +2,7 @@ import { getNewGlobal } from './update/getNewGlobal.function.js';
|
|
|
2
2
|
import { destroySupport } from './destroySupport.function.js';
|
|
3
3
|
import { isStaticTag } from '../isInstance.js';
|
|
4
4
|
import { isLikeTags } from './isLikeTags.function.js';
|
|
5
|
-
import { tryUpdateToTag } from './update/
|
|
5
|
+
import { tryUpdateToTag } from './update/tryUpdateToTag.function.js';
|
|
6
6
|
import { paint, paintAfters } from './paint.function.js';
|
|
7
7
|
export function checkTagValueChange(newValue, contextItem) {
|
|
8
8
|
const global = contextItem.global;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkTagValueChange.function.js","sourceRoot":"","sources":["../../ts/tag/checkTagValueChange.function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkTagValueChange.function.js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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IACrC,CAAC;IAED,yDAAyD;IACzD,IAAG,WAAW,CAAC,OAAO,CAAC,WAAW,KAAK,CAAC,EAAE,CAAC;QACzC,OAAQ,WAA2B,CAAC,MAAM,CAAA;QAC1C,WAAW,CAAC,WAAW,GAAG,CAAC,CAAA;QAE3B,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE;YACpB,cAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;YACnC,WAAW,CAAC,KAAK,EAAE,CAAA,CAAC,4BAA4B;YAChD,KAAK,EAAE,CAAA;QACT,CAAC,CAAC,CAAA;QACF,OAAO,CAAC,CAAA,CAAC,iBAAiB;IAC5B,CAAC;IAED,2BAA2B,CAAC,WAAW,CAAC,CAAA;IAExC,OAAO,CAAC,CAAA,CAAC,kBAAkB;AAC7B,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,WAAwB;IAExB,MAAM,MAAM,GAAG,WAAW,CAAC,MAA0B,CAAA;IACrD,MAAM,WAAW,GAAG,MAAM,EAAE,MAAM,CAAA;IAElC,kDAAkD;IAClD,cAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACnC,OAAQ,WAA2B,CAAC,MAAM,CAEzC;IAAC,WAAkC,CAAC,WAAW,GAAG,CAAC,CAAA;AACtD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Props } from '../Props.js';
|
|
2
|
-
import { AnySupport } from './
|
|
2
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
3
3
|
export declare function clonePropsBy(support: AnySupport, props: Props, castProps?: Props): {
|
|
4
4
|
latest: Props;
|
|
5
5
|
castProps: Props | undefined;
|
|
@@ -10,6 +10,8 @@ export function cloneTagJsValue(value, maxDepth) {
|
|
|
10
10
|
const tagJsType = value?.tagJsType;
|
|
11
11
|
if (tagJsType) {
|
|
12
12
|
switch (tagJsType) {
|
|
13
|
+
case ValueTypes.signal:
|
|
14
|
+
case ValueTypes.subscribe:
|
|
13
15
|
case ValueTypes.stateRender:
|
|
14
16
|
return undefined;
|
|
15
17
|
case ValueTypes.dom:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloneValueArray.function.js","sourceRoot":"","sources":["../../ts/tag/cloneValueArray.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAa,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,eAAe,CAC7B,MAAuC;IAEvC,OAAO,MAAM,CAAC,GAAG,CAAC,eAAsB,CAAC,CAAA;AAC3C,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,eAAe,CAC7B,KAAQ,EACR,QAAgB;IAEhB,MAAM,GAAG,GAAG,KAAkB,CAAA;IAE9B,MAAM,SAAS,GAAI,KAAa,EAAE,SAAsB,CAAA;IACxD,IAAG,SAAS,EAAE,CAAC;QACb,QAAQ,SAAS,EAAG,CAAC;YACnB,KAAK,UAAU,CAAC,WAAW;gBACzB,OAAO,SAAgB,CAAA;YAEzB,KAAK,UAAU,CAAC,GAAG,CAAC;YACpB,KAAK,UAAU,CAAC,GAAG,CAAC;YACpB,KAAK,UAAU,CAAC,SAAS;gBACvB,OAAO,eAAe,CAAC,GAAG,CAAC,MAAM,CAAM,CAAA;QAC3C,CAAC;IACH,CAAC;IAED,IAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAClB,OAAO,eAAe,CAAC,GAA6B,CAAM,CAAA;IAC5D,CAAC;IAED,OAAO,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AACnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"cloneValueArray.function.js","sourceRoot":"","sources":["../../ts/tag/cloneValueArray.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAa,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,MAAM,UAAU,eAAe,CAC7B,MAAuC;IAEvC,OAAO,MAAM,CAAC,GAAG,CAAC,eAAsB,CAAC,CAAA;AAC3C,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,eAAe,CAC7B,KAAQ,EACR,QAAgB;IAEhB,MAAM,GAAG,GAAG,KAAkB,CAAA;IAE9B,MAAM,SAAS,GAAI,KAAa,EAAE,SAAsB,CAAA;IACxD,IAAG,SAAS,EAAE,CAAC;QACb,QAAQ,SAAS,EAAG,CAAC;YACnB,KAAK,UAAU,CAAC,MAAM,CAAC;YACvB,KAAK,UAAU,CAAC,SAAS,CAAC;YAC1B,KAAK,UAAU,CAAC,WAAW;gBACzB,OAAO,SAAgB,CAAA;YAEzB,KAAK,UAAU,CAAC,GAAG,CAAC;YACpB,KAAK,UAAU,CAAC,GAAG,CAAC;YACpB,KAAK,UAAU,CAAC,SAAS;gBACvB,OAAO,eAAe,CAAC,GAAG,CAAC,MAAM,CAAM,CAAA;QAC3C,CAAC;IACH,CAAC;IAED,IAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAClB,OAAO,eAAe,CAAC,GAA6B,CAAM,CAAA;IAC5D,CAAC;IAED,OAAO,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AACnC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SupportTagGlobal, TemplaterResult } from './getTemplaterResult.function.js';
|
|
2
|
+
import { ContextItem } from './Context.types.js';
|
|
3
|
+
import { Props } from '../Props.js';
|
|
4
|
+
import { BaseSupport } from './BaseSupport.type.js';
|
|
5
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
6
|
+
export type PropsConfig = {
|
|
7
|
+
latest: Props;
|
|
8
|
+
castProps?: Props;
|
|
9
|
+
};
|
|
10
|
+
export type HtmlSupport = {
|
|
11
|
+
appSupport: AnySupport;
|
|
12
|
+
ownerSupport?: AnySupport;
|
|
13
|
+
appElement?: Element;
|
|
14
|
+
propsConfig?: PropsConfig;
|
|
15
|
+
templater: TemplaterResult;
|
|
16
|
+
subject: ContextItem;
|
|
17
|
+
};
|
|
18
|
+
export type SupportContextItem = ContextItem & {
|
|
19
|
+
global: SupportTagGlobal;
|
|
20
|
+
/** Indicator of re-rending. Saves from double rending something already rendered */
|
|
21
|
+
renderCount: number;
|
|
22
|
+
};
|
|
23
|
+
/** used only for apps, otherwise use Support */
|
|
24
|
+
export declare function getBaseSupport(templater: TemplaterResult, subject: SupportContextItem, castedProps?: Props): BaseSupport;
|
|
25
|
+
export type Support = AnySupport & {
|
|
26
|
+
ownerSupport: AnySupport;
|
|
27
|
+
appSupport: BaseSupport;
|
|
28
|
+
};
|
|
29
|
+
/** Sets support states to empty array and clones props */
|
|
30
|
+
export declare function upgradeBaseToSupport(templater: TemplaterResult, // at runtime rendering of a tag, it needs to be married to a new Support()
|
|
31
|
+
support: BaseSupport, appSupport: AnySupport, castedProps?: Props): AnySupport;
|
|
32
|
+
export declare function createHtmlSupport(templater: TemplaterResult, // at runtime rendering of a tag, it needs to be married to a new Support()
|
|
33
|
+
ownerSupport: AnySupport, appSupport: AnySupport, subject: ContextItem, castedProps?: Props): AnySupport;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { clonePropsBy } from './clonePropsBy.function.js';
|
|
2
|
+
import { Subject } from '../subject/Subject.class.js';
|
|
3
|
+
/** used only for apps, otherwise use Support */
|
|
4
|
+
export function getBaseSupport(templater, subject, castedProps) {
|
|
5
|
+
const baseSupport = {
|
|
6
|
+
templater,
|
|
7
|
+
subject,
|
|
8
|
+
castedProps,
|
|
9
|
+
appSupport: undefined,
|
|
10
|
+
};
|
|
11
|
+
// baseSupport.appSupport = baseSupport
|
|
12
|
+
const global = subject.global;
|
|
13
|
+
global.blocked = [];
|
|
14
|
+
global.destroy$ = new Subject();
|
|
15
|
+
return baseSupport;
|
|
16
|
+
}
|
|
17
|
+
/** Sets support states to empty array and clones props */
|
|
18
|
+
export function upgradeBaseToSupport(templater, // at runtime rendering of a tag, it needs to be married to a new Support()
|
|
19
|
+
support, appSupport, castedProps) {
|
|
20
|
+
// ;(support as AnySupport).state = []
|
|
21
|
+
// ;(support as AnySupport).states = []
|
|
22
|
+
support.appSupport = appSupport;
|
|
23
|
+
const props = templater.props; // natural props
|
|
24
|
+
if (props) {
|
|
25
|
+
support.propsConfig = clonePropsBy(support, props, castedProps);
|
|
26
|
+
}
|
|
27
|
+
return support;
|
|
28
|
+
}
|
|
29
|
+
export function createHtmlSupport(templater, // at runtime rendering of a tag, it needs to be married to a new Support()
|
|
30
|
+
ownerSupport, appSupport, subject, castedProps) {
|
|
31
|
+
const support = {
|
|
32
|
+
templater,
|
|
33
|
+
subject,
|
|
34
|
+
castedProps,
|
|
35
|
+
appSupport: undefined,
|
|
36
|
+
};
|
|
37
|
+
support.ownerSupport = ownerSupport;
|
|
38
|
+
support.appSupport = appSupport;
|
|
39
|
+
return support;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=createHtmlSupport.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHtmlSupport.function.js","sourceRoot":"","sources":["../../ts/tag/createHtmlSupport.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AA6BrD,gDAAgD;AAChD,MAAM,UAAU,cAAc,CAC5B,SAA0B,EAC1B,OAA0B,EAC1B,WAAmB;IAEnB,MAAM,WAAW,GAAG;QAClB,SAAS;QACT,OAAO;QACP,WAAW;QAEX,UAAU,EAAE,SAAkC;KAChC,CAAA;IAEhB,uCAAuC;IAEvC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC7B,MAAM,CAAC,OAAO,GAAG,EAAE,CAAA;IACnB,MAAM,CAAC,QAAQ,GAAG,IAAI,OAAO,EAAQ,CAAA;IAErC,OAAO,WAAW,CAAA;AACpB,CAAC;AAOD,0DAA0D;AAC1D,MAAM,UAAU,oBAAoB,CAClC,SAA0B,EAAE,2EAA2E;AACvG,OAAoB,EACpB,UAAsB,EACtB,WAAmB;IAEnB,sCAAsC;IACtC,uCAAuC;IAEvC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAA;IAE/B,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAA,CAAE,gBAAgB;IAC/C,IAAG,KAAK,EAAE,CAAC;QACT,OAAO,CAAC,WAAW,GAAG,YAAY,CAAC,OAAqB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAA;IAC/E,CAAC;IAED,OAAO,OAAqB,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,SAA0B,EAAE,2EAA2E;AACvG,YAAwB,EACxB,UAAsB,EACtB,OAAoB,EACpB,WAAmB;IAEnB,MAAM,OAAO,GAAG;QACd,SAAS;QACT,OAAO;QACP,WAAW;QAEX,UAAU,EAAE,SAAkC;KAChC,CAAA;IAEhB,OAAO,CAAC,YAAY,GAAG,YAAY,CAAA;IACnC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAA;IAC/B,OAAO,OAAqB,CAAA;AAC9B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TemplaterResult } from './getTemplaterResult.function.js';
|
|
2
|
+
import { ContextItem } from './Context.types.js';
|
|
3
|
+
import { Props } from '../Props.js';
|
|
4
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
5
|
+
export declare function createSupport(templater: TemplaterResult, // at runtime rendering of a tag, it needs to be married to a new Support()
|
|
6
|
+
ownerSupport: AnySupport, appSupport: AnySupport, subject: ContextItem, castedProps?: Props): AnySupport;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getBaseSupport, upgradeBaseToSupport } from './createHtmlSupport.function.js';
|
|
2
|
+
export function createSupport(templater, // at runtime rendering of a tag, it needs to be married to a new Support()
|
|
3
|
+
ownerSupport, appSupport, subject, castedProps) {
|
|
4
|
+
const support = getBaseSupport(templater, subject, castedProps);
|
|
5
|
+
support.ownerSupport = ownerSupport;
|
|
6
|
+
return upgradeBaseToSupport(templater, support, appSupport, castedProps);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=createSupport.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSupport.function.js","sourceRoot":"","sources":["../../ts/tag/createSupport.function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAsB,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAE1G,MAAM,UAAU,aAAa,CAC3B,SAA0B,EAAE,2EAA2E;AACvG,YAAwB,EACxB,UAAsB,EACtB,OAAoB,EACpB,WAAmB;IAEnB,MAAM,OAAO,GAAG,cAAc,CAC5B,SAAS,EACT,OAA6B,EAC7B,WAAW,CACE,CAAA;IAEf,OAAO,CAAC,YAAY,GAAG,YAAY,CAAA;IAEnC,OAAO,oBAAoB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAA;AAC1E,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Subscription } from '../subject/subject.utils.js';
|
|
2
|
+
import { AnySupport } from './AnySupport.type.js';
|
|
3
|
+
import { ContextItem } from './Context.types.js';
|
|
4
|
+
export declare function destroyContext(childTags: ContextItem[]): void;
|
|
5
|
+
export declare function getChildTagsToSoftDestroy(childTags: ContextItem[], tags?: AnySupport[], subs?: Subscription<any>[]): {
|
|
6
|
+
subs: Subscription<any>[];
|
|
7
|
+
tags: AnySupport[];
|
|
8
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { isTagComponent } from '../isInstance.js';
|
|
2
|
+
import { runBeforeDestroy } from './tagRunner.js';
|
|
3
|
+
export function destroyContext(childTags) {
|
|
4
|
+
for (const child of childTags) {
|
|
5
|
+
// deleting arrays
|
|
6
|
+
const lastArray = child.lastArray;
|
|
7
|
+
if (lastArray) {
|
|
8
|
+
destroyContext(lastArray);
|
|
9
|
+
continue;
|
|
10
|
+
}
|
|
11
|
+
const global = child.global;
|
|
12
|
+
if (!global) {
|
|
13
|
+
continue; // not a support contextItem
|
|
14
|
+
}
|
|
15
|
+
const support = global.newest;
|
|
16
|
+
const iSubs = global.subscriptions;
|
|
17
|
+
if (iSubs) {
|
|
18
|
+
iSubs.forEach(iSub => iSub.unsubscribe());
|
|
19
|
+
}
|
|
20
|
+
if (isTagComponent(support.templater)) {
|
|
21
|
+
runBeforeDestroy(support, global);
|
|
22
|
+
}
|
|
23
|
+
const subTags = global.context;
|
|
24
|
+
destroyContext(subTags);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function getChildTagsToSoftDestroy(childTags, tags = [], subs = []) {
|
|
28
|
+
for (const child of childTags) {
|
|
29
|
+
const global = child.global;
|
|
30
|
+
if (!global) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const support = global.newest;
|
|
34
|
+
if (support) {
|
|
35
|
+
tags.push(support);
|
|
36
|
+
const iSubs = global.subscriptions;
|
|
37
|
+
if (iSubs) {
|
|
38
|
+
subs.push(...iSubs);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const subTags = global.context;
|
|
42
|
+
if (subTags) {
|
|
43
|
+
getChildTagsToSoftDestroy(subTags, tags, subs);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return { tags, subs };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=destroyContext.function.js.map
|