@adaas/are-html 0.0.19 → 0.0.21
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/browser/index.d.mts +161 -5
- package/dist/browser/index.mjs +357 -55
- package/dist/browser/index.mjs.map +1 -1
- package/dist/node/directives/AreDirectiveFor.directive.d.mts +7 -0
- package/dist/node/directives/AreDirectiveFor.directive.d.ts +7 -0
- package/dist/node/directives/AreDirectiveFor.directive.js +17 -2
- package/dist/node/directives/AreDirectiveFor.directive.js.map +1 -1
- package/dist/node/directives/AreDirectiveFor.directive.mjs +17 -2
- package/dist/node/directives/AreDirectiveFor.directive.mjs.map +1 -1
- package/dist/node/directives/AreDirectiveShow.directive.d.mts +32 -0
- package/dist/node/directives/AreDirectiveShow.directive.d.ts +32 -0
- package/dist/node/directives/AreDirectiveShow.directive.js +81 -0
- package/dist/node/directives/AreDirectiveShow.directive.js.map +1 -0
- package/dist/node/directives/AreDirectiveShow.directive.mjs +71 -0
- package/dist/node/directives/AreDirectiveShow.directive.mjs.map +1 -0
- package/dist/node/engine/AreHTML.engine.d.mts +2 -1
- package/dist/node/engine/AreHTML.engine.d.ts +2 -1
- package/dist/node/engine/AreHTML.engine.js +8 -2
- package/dist/node/engine/AreHTML.engine.js.map +1 -1
- package/dist/node/engine/AreHTML.engine.mjs +8 -2
- package/dist/node/engine/AreHTML.engine.mjs.map +1 -1
- package/dist/node/engine/AreHTML.interpreter.d.mts +3 -0
- package/dist/node/engine/AreHTML.interpreter.d.ts +3 -0
- package/dist/node/engine/AreHTML.interpreter.js +29 -0
- package/dist/node/engine/AreHTML.interpreter.js.map +1 -1
- package/dist/node/engine/AreHTML.interpreter.mjs +29 -0
- package/dist/node/engine/AreHTML.interpreter.mjs.map +1 -1
- package/dist/node/index.d.mts +4 -1
- package/dist/node/index.d.ts +4 -1
- package/dist/node/index.js +21 -0
- package/dist/node/index.mjs +3 -0
- package/dist/node/instructions/AreHTML.instructions.constants.d.mts +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.d.ts +1 -0
- package/dist/node/instructions/AreHTML.instructions.constants.js +2 -1
- package/dist/node/instructions/AreHTML.instructions.constants.js.map +1 -1
- package/dist/node/instructions/AreHTML.instructions.constants.mjs +2 -1
- package/dist/node/instructions/AreHTML.instructions.constants.mjs.map +1 -1
- package/dist/node/instructions/AreHTML.instructions.types.d.mts +9 -1
- package/dist/node/instructions/AreHTML.instructions.types.d.ts +9 -1
- package/dist/node/instructions/HideElement.instruction.d.mts +13 -0
- package/dist/node/instructions/HideElement.instruction.d.ts +13 -0
- package/dist/node/instructions/HideElement.instruction.js +31 -0
- package/dist/node/instructions/HideElement.instruction.js.map +1 -0
- package/dist/node/instructions/HideElement.instruction.mjs +24 -0
- package/dist/node/instructions/HideElement.instruction.mjs.map +1 -0
- package/dist/node/lib/AreRoot/AreRoot.component.d.mts +57 -3
- package/dist/node/lib/AreRoot/AreRoot.component.d.ts +57 -3
- package/dist/node/lib/AreRoot/AreRoot.component.js +137 -48
- package/dist/node/lib/AreRoot/AreRoot.component.js.map +1 -1
- package/dist/node/lib/AreRoot/AreRoot.component.mjs +139 -50
- package/dist/node/lib/AreRoot/AreRoot.component.mjs.map +1 -1
- package/dist/node/lib/AreRoot/AreRootCache.context.d.mts +58 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.d.ts +58 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.js +106 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.js.map +1 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.mjs +99 -0
- package/dist/node/lib/AreRoot/AreRootCache.context.mjs.map +1 -0
- package/examples/jumpstart/dist/index.html +1 -1
- package/examples/jumpstart/dist/{mq1a0fv0-ccgtz6.js → mq7hqrxy-4kus50.js} +629 -433
- package/examples/signal-routing/dist/index.html +1 -1
- package/examples/signal-routing/dist/{mq1bzrik-4lec86.js → mq7k53th-qiwy4x.js} +903 -486
- package/examples/signal-routing/src/components/SettingsPage.component.ts +39 -0
- package/examples/signal-routing/src/concept.ts +2 -0
- package/package.json +9 -9
- package/src/directives/AreDirectiveFor.directive.ts +44 -2
- package/src/directives/AreDirectiveShow.directive.ts +127 -0
- package/src/engine/AreHTML.engine.ts +11 -1
- package/src/engine/AreHTML.interpreter.ts +50 -0
- package/src/index.ts +3 -0
- package/src/instructions/AreHTML.instructions.constants.ts +1 -0
- package/src/instructions/AreHTML.instructions.types.ts +9 -0
- package/src/instructions/HideElement.instruction.ts +29 -0
- package/src/lib/AreRoot/AreRoot.component.ts +201 -71
- package/src/lib/AreRoot/AreRootCache.context.ts +133 -0
package/dist/node/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
export { A as AreBindingAttribute, a as AreDirective, b as AreDirectiveAttribute, c as AreEventAttribute, d as AreHTMLAttribute, e as AreHTMLNode, f as AreStaticAttribute } from './AreBinding.attribute-Bm5LlOyE.js';
|
|
2
2
|
export { AreDirectiveFor } from './directives/AreDirectiveFor.directive.js';
|
|
3
3
|
export { AreDirectiveIf } from './directives/AreDirectiveIf.directive.js';
|
|
4
|
+
export { AreDirectiveShow } from './directives/AreDirectiveShow.directive.js';
|
|
4
5
|
export { AddAttributeInstruction } from './instructions/AddAttribute.instruction.js';
|
|
5
6
|
export { AddElementInstruction } from './instructions/AddElement.instruction.js';
|
|
6
7
|
export { AddInterpolationInstruction } from './instructions/AddInterpolation.instruction.js';
|
|
7
8
|
export { AddListenerInstruction } from './instructions/AddListener.instruction.js';
|
|
8
9
|
export { AddStyleInstruction } from './instructions/AddStyle.instruction.js';
|
|
9
10
|
export { AddTextInstruction } from './instructions/AddText.instruction.js';
|
|
11
|
+
export { HideElementInstruction } from './instructions/HideElement.instruction.js';
|
|
10
12
|
export { AreHTMLInstructions } from './instructions/AreHTML.instructions.constants.js';
|
|
11
|
-
export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload } from './instructions/AreHTML.instructions.types.js';
|
|
13
|
+
export { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload } from './instructions/AreHTML.instructions.types.js';
|
|
12
14
|
export { AreComment } from './nodes/AreComment.js';
|
|
13
15
|
export { AreComponentNode } from './nodes/AreComponent.js';
|
|
14
16
|
export { AreInterpolation } from './nodes/AreInterpolation.js';
|
|
@@ -29,6 +31,7 @@ export { AreDirectiveContext } from './lib/AreDirective/AreDirective.context.js'
|
|
|
29
31
|
export { AreDirectiveMeta } from './lib/AreDirective/AreDirective.meta.js';
|
|
30
32
|
export { AreDirectiveOrderDecoratorParameters } from './lib/AreDirective/AreDirective.types.js';
|
|
31
33
|
export { AreRoot } from './lib/AreRoot/AreRoot.component.js';
|
|
34
|
+
export { AreRootCache, AreRootCacheEntry } from './lib/AreRoot/AreRootCache.context.js';
|
|
32
35
|
export { AreStyle } from './lib/AreStyle/AreStyle.context.js';
|
|
33
36
|
export { AreRouteWatcher } from './lib/AreRouteWatcher/AreRouteWatcher.component.js';
|
|
34
37
|
import '@adaas/are';
|
package/dist/node/index.js
CHANGED
|
@@ -7,12 +7,14 @@ var AreStatic_attribute = require('./attributes/AreStatic.attribute');
|
|
|
7
7
|
var AreComponent_directive = require('./directives/AreComponent.directive');
|
|
8
8
|
var AreDirectiveFor_directive = require('./directives/AreDirectiveFor.directive');
|
|
9
9
|
var AreDirectiveIf_directive = require('./directives/AreDirectiveIf.directive');
|
|
10
|
+
var AreDirectiveShow_directive = require('./directives/AreDirectiveShow.directive');
|
|
10
11
|
var AddAttribute_instruction = require('./instructions/AddAttribute.instruction');
|
|
11
12
|
var AddElement_instruction = require('./instructions/AddElement.instruction');
|
|
12
13
|
var AddInterpolation_instruction = require('./instructions/AddInterpolation.instruction');
|
|
13
14
|
var AddListener_instruction = require('./instructions/AddListener.instruction');
|
|
14
15
|
var AddStyle_instruction = require('./instructions/AddStyle.instruction');
|
|
15
16
|
var AddText_instruction = require('./instructions/AddText.instruction');
|
|
17
|
+
var HideElement_instruction = require('./instructions/HideElement.instruction');
|
|
16
18
|
var AreHTML_instructions_constants = require('./instructions/AreHTML.instructions.constants');
|
|
17
19
|
var AreHTML_instructions_types = require('./instructions/AreHTML.instructions.types');
|
|
18
20
|
var AreComment = require('./nodes/AreComment');
|
|
@@ -38,6 +40,7 @@ var AreDirective_context = require('./lib/AreDirective/AreDirective.context');
|
|
|
38
40
|
var AreDirective_meta = require('./lib/AreDirective/AreDirective.meta');
|
|
39
41
|
var AreDirective_types = require('./lib/AreDirective/AreDirective.types');
|
|
40
42
|
var AreRoot_component = require('./lib/AreRoot/AreRoot.component');
|
|
43
|
+
var AreRootCache_context = require('./lib/AreRoot/AreRootCache.context');
|
|
41
44
|
var AreStyle_context = require('./lib/AreStyle/AreStyle.context');
|
|
42
45
|
var AreStyle_types = require('./lib/AreStyle/AreStyle.types');
|
|
43
46
|
var AreRouteWatcher_component = require('./lib/AreRouteWatcher/AreRouteWatcher.component');
|
|
@@ -86,6 +89,12 @@ Object.keys(AreDirectiveIf_directive).forEach(function (k) {
|
|
|
86
89
|
get: function () { return AreDirectiveIf_directive[k]; }
|
|
87
90
|
});
|
|
88
91
|
});
|
|
92
|
+
Object.keys(AreDirectiveShow_directive).forEach(function (k) {
|
|
93
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () { return AreDirectiveShow_directive[k]; }
|
|
96
|
+
});
|
|
97
|
+
});
|
|
89
98
|
Object.keys(AddAttribute_instruction).forEach(function (k) {
|
|
90
99
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
91
100
|
enumerable: true,
|
|
@@ -122,6 +131,12 @@ Object.keys(AddText_instruction).forEach(function (k) {
|
|
|
122
131
|
get: function () { return AddText_instruction[k]; }
|
|
123
132
|
});
|
|
124
133
|
});
|
|
134
|
+
Object.keys(HideElement_instruction).forEach(function (k) {
|
|
135
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return HideElement_instruction[k]; }
|
|
138
|
+
});
|
|
139
|
+
});
|
|
125
140
|
Object.keys(AreHTML_instructions_constants).forEach(function (k) {
|
|
126
141
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
127
142
|
enumerable: true,
|
|
@@ -272,6 +287,12 @@ Object.keys(AreRoot_component).forEach(function (k) {
|
|
|
272
287
|
get: function () { return AreRoot_component[k]; }
|
|
273
288
|
});
|
|
274
289
|
});
|
|
290
|
+
Object.keys(AreRootCache_context).forEach(function (k) {
|
|
291
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
292
|
+
enumerable: true,
|
|
293
|
+
get: function () { return AreRootCache_context[k]; }
|
|
294
|
+
});
|
|
295
|
+
});
|
|
275
296
|
Object.keys(AreStyle_context).forEach(function (k) {
|
|
276
297
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
277
298
|
enumerable: true,
|
package/dist/node/index.mjs
CHANGED
|
@@ -5,12 +5,14 @@ export * from './attributes/AreStatic.attribute';
|
|
|
5
5
|
export * from './directives/AreComponent.directive';
|
|
6
6
|
export * from './directives/AreDirectiveFor.directive';
|
|
7
7
|
export * from './directives/AreDirectiveIf.directive';
|
|
8
|
+
export * from './directives/AreDirectiveShow.directive';
|
|
8
9
|
export * from './instructions/AddAttribute.instruction';
|
|
9
10
|
export * from './instructions/AddElement.instruction';
|
|
10
11
|
export * from './instructions/AddInterpolation.instruction';
|
|
11
12
|
export * from './instructions/AddListener.instruction';
|
|
12
13
|
export * from './instructions/AddStyle.instruction';
|
|
13
14
|
export * from './instructions/AddText.instruction';
|
|
15
|
+
export * from './instructions/HideElement.instruction';
|
|
14
16
|
export * from './instructions/AreHTML.instructions.constants';
|
|
15
17
|
export * from './instructions/AreHTML.instructions.types';
|
|
16
18
|
export * from './nodes/AreComment';
|
|
@@ -36,6 +38,7 @@ export * from './lib/AreDirective/AreDirective.context';
|
|
|
36
38
|
export * from './lib/AreDirective/AreDirective.meta';
|
|
37
39
|
export * from './lib/AreDirective/AreDirective.types';
|
|
38
40
|
export * from './lib/AreRoot/AreRoot.component';
|
|
41
|
+
export * from './lib/AreRoot/AreRootCache.context';
|
|
39
42
|
export * from './lib/AreStyle/AreStyle.context';
|
|
40
43
|
export * from './lib/AreStyle/AreStyle.types';
|
|
41
44
|
export * from './lib/AreRouteWatcher/AreRouteWatcher.component';
|
|
@@ -6,6 +6,7 @@ declare const AreHTMLInstructions: {
|
|
|
6
6
|
readonly AddListener: "_AreHTML_AddListener";
|
|
7
7
|
readonly AddInterpolation: "_AreHTML_AddInterpolation";
|
|
8
8
|
readonly AddComment: "_AreHTML_AddComment";
|
|
9
|
+
readonly HideElement: "_AreHTML_HideElement";
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export { AreHTMLInstructions };
|
|
@@ -6,6 +6,7 @@ declare const AreHTMLInstructions: {
|
|
|
6
6
|
readonly AddListener: "_AreHTML_AddListener";
|
|
7
7
|
readonly AddInterpolation: "_AreHTML_AddInterpolation";
|
|
8
8
|
readonly AddComment: "_AreHTML_AddComment";
|
|
9
|
+
readonly HideElement: "_AreHTML_HideElement";
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export { AreHTMLInstructions };
|
|
@@ -7,7 +7,8 @@ const AreHTMLInstructions = {
|
|
|
7
7
|
AddStyle: "_AreHTML_AddStyle",
|
|
8
8
|
AddListener: "_AreHTML_AddListener",
|
|
9
9
|
AddInterpolation: "_AreHTML_AddInterpolation",
|
|
10
|
-
AddComment: "_AreHTML_AddComment"
|
|
10
|
+
AddComment: "_AreHTML_AddComment",
|
|
11
|
+
HideElement: "_AreHTML_HideElement"
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
exports.AreHTMLInstructions = AreHTMLInstructions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY;
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.js","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
|
|
@@ -7,7 +7,8 @@ const AreHTMLInstructions = {
|
|
|
7
7
|
AddStyle: "_AreHTML_AddStyle",
|
|
8
8
|
AddListener: "_AreHTML_AddListener",
|
|
9
9
|
AddInterpolation: "_AreHTML_AddInterpolation",
|
|
10
|
-
AddComment: "_AreHTML_AddComment"
|
|
10
|
+
AddComment: "_AreHTML_AddComment",
|
|
11
|
+
HideElement: "_AreHTML_HideElement"
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export { AreHTMLInstructions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY;
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/AreHTML.instructions.constants.ts"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAsB;AAAA,EAC/B,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,WAAA,EAAa,sBAAA;AAAA,EACb,gBAAA,EAAkB,2BAAA;AAAA,EAClB,UAAA,EAAY,qBAAA;AAAA,EACZ,WAAA,EAAa;AACjB","file":"AreHTML.instructions.constants.mjs","sourcesContent":["\n\nexport const AreHTMLInstructions = {\n AddElement: '_AreHTML_AddElement',\n AddText: '_AreHTML_AddText',\n AddAttribute: '_AreHTML_AddAttribute',\n AddStyle: '_AreHTML_AddStyle',\n AddListener: '_AreHTML_AddListener',\n AddInterpolation: '_AreHTML_AddInterpolation',\n AddComment: '_AreHTML_AddComment',\n HideElement: '_AreHTML_HideElement',\n} as const"]}
|
|
@@ -28,6 +28,14 @@ type AreHtmlAddStyleInstructionPayload = {
|
|
|
28
28
|
/** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
|
|
29
29
|
styles: string;
|
|
30
30
|
};
|
|
31
|
+
type AreHtmlHideInstructionPayload = {
|
|
32
|
+
/**
|
|
33
|
+
* Optional explicit display value to restore when the element becomes
|
|
34
|
+
* visible again. When omitted, the interpreter caches and restores the
|
|
35
|
+
* element's own prior inline `display` value (Vue `v-show` semantics).
|
|
36
|
+
*/
|
|
37
|
+
display?: string;
|
|
38
|
+
};
|
|
31
39
|
type AreHtmlAddListenerInstructionPayload = {
|
|
32
40
|
/** DOM event name (e.g. "click", "input", "submit") */
|
|
33
41
|
name: string;
|
|
@@ -41,4 +49,4 @@ type AreHtmlAddInterpolationInstructionPayload = {
|
|
|
41
49
|
content: (...args: any[]) => string;
|
|
42
50
|
};
|
|
43
51
|
|
|
44
|
-
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload };
|
|
52
|
+
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
|
|
@@ -28,6 +28,14 @@ type AreHtmlAddStyleInstructionPayload = {
|
|
|
28
28
|
/** Full CSS string to inject as a <style> block scoped to the component. Applied to the document head and reverted on unmount. */
|
|
29
29
|
styles: string;
|
|
30
30
|
};
|
|
31
|
+
type AreHtmlHideInstructionPayload = {
|
|
32
|
+
/**
|
|
33
|
+
* Optional explicit display value to restore when the element becomes
|
|
34
|
+
* visible again. When omitted, the interpreter caches and restores the
|
|
35
|
+
* element's own prior inline `display` value (Vue `v-show` semantics).
|
|
36
|
+
*/
|
|
37
|
+
display?: string;
|
|
38
|
+
};
|
|
31
39
|
type AreHtmlAddListenerInstructionPayload = {
|
|
32
40
|
/** DOM event name (e.g. "click", "input", "submit") */
|
|
33
41
|
name: string;
|
|
@@ -41,4 +49,4 @@ type AreHtmlAddInterpolationInstructionPayload = {
|
|
|
41
49
|
content: (...args: any[]) => string;
|
|
42
50
|
};
|
|
43
51
|
|
|
44
|
-
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload };
|
|
52
|
+
export type { AreHtmlAddAttributeInstructionPayload, AreHtmlAddCommentInstructionPayload, AreHtmlAddElementInstructionPayload, AreHtmlAddInterpolationInstructionPayload, AreHtmlAddListenerInstructionPayload, AreHtmlAddStyleInstructionPayload, AreHtmlAddTextInstructionPayload, AreHtmlHideInstructionPayload };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AreMutation, AreDeclaration, AreInstructionSerialized } from '@adaas/are';
|
|
2
|
+
import { AreHtmlHideInstructionPayload } from './AreHTML.instructions.types.mjs';
|
|
3
|
+
|
|
4
|
+
declare class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {
|
|
5
|
+
/**
|
|
6
|
+
* Caches the element's inline `display` value captured at apply time so it
|
|
7
|
+
* can be restored verbatim on revert (mirrors Vue `v-show`).
|
|
8
|
+
*/
|
|
9
|
+
cache?: string;
|
|
10
|
+
constructor(parent: AreDeclaration, props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { HideElementInstruction };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AreMutation, AreDeclaration, AreInstructionSerialized } from '@adaas/are';
|
|
2
|
+
import { AreHtmlHideInstructionPayload } from './AreHTML.instructions.types.js';
|
|
3
|
+
|
|
4
|
+
declare class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {
|
|
5
|
+
/**
|
|
6
|
+
* Caches the element's inline `display` value captured at apply time so it
|
|
7
|
+
* can be restored verbatim on revert (mirrors Vue `v-show`).
|
|
8
|
+
*/
|
|
9
|
+
cache?: string;
|
|
10
|
+
constructor(parent: AreDeclaration, props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { HideElementInstruction };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@adaas/a-frame/core');
|
|
4
|
+
var are = require('@adaas/are');
|
|
5
|
+
var AreHTML_instructions_constants = require('./AreHTML.instructions.constants');
|
|
6
|
+
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (decorator(result)) || result;
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
exports.HideElementInstruction = class HideElementInstruction extends are.AreMutation {
|
|
16
|
+
constructor(parent, props) {
|
|
17
|
+
if ("aseid" in props) {
|
|
18
|
+
super(props);
|
|
19
|
+
} else {
|
|
20
|
+
super(AreHTML_instructions_constants.AreHTMLInstructions.HideElement, parent, props);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.HideElementInstruction = __decorateClass([
|
|
25
|
+
core.A_Frame.Define({
|
|
26
|
+
namespace: "a-are-html",
|
|
27
|
+
description: 'Toggles the visibility of an existing element by setting its inline display to "none" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'
|
|
28
|
+
})
|
|
29
|
+
], exports.HideElementInstruction);
|
|
30
|
+
//# sourceMappingURL=HideElement.instruction.js.map
|
|
31
|
+
//# sourceMappingURL=HideElement.instruction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/HideElement.instruction.ts"],"names":["HideElementInstruction","AreMutation","AreHTMLInstructions","A_Frame"],"mappings":";;;;;;;;;;;;;;AAUaA,8BAAA,GAAN,qCAAqCC,eAAA,CAA2C;AAAA,EAQnF,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAgE,CAAA;AAAA,IAC1E,CAAA,MAAO;AACH,MAAA,KAAA,CAAMC,kDAAA,CAAoB,WAAA,EAAa,MAAA,EAAQ,KAAK,CAAA;AAAA,IACxD;AAAA,EACJ;AACJ;AAlBaF,8BAAA,GAAN,eAAA,CAAA;AAAA,EAJNG,aAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACYH,8BAAA,CAAA","file":"HideElement.instruction.js","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlHideInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'Toggles the visibility of an existing element by setting its inline display to \"none\" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'\n})\nexport class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {\n\n /**\n * Caches the element's inline `display` value captured at apply time so it\n * can be restored verbatim on revert (mirrors Vue `v-show`).\n */\n cache?: string;\n\n constructor(\n parent: AreDeclaration,\n props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>\n ) {\n if ('aseid' in props) {\n super(props as AreInstructionSerialized<AreHtmlHideInstructionPayload>);\n } else {\n super(AreHTMLInstructions.HideElement, parent, props);\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __decorateClass } from '../chunk-EQQGB2QZ.mjs';
|
|
2
|
+
import { A_Frame } from '@adaas/a-frame/core';
|
|
3
|
+
import { AreMutation } from '@adaas/are';
|
|
4
|
+
import { AreHTMLInstructions } from './AreHTML.instructions.constants';
|
|
5
|
+
|
|
6
|
+
let HideElementInstruction = class extends AreMutation {
|
|
7
|
+
constructor(parent, props) {
|
|
8
|
+
if ("aseid" in props) {
|
|
9
|
+
super(props);
|
|
10
|
+
} else {
|
|
11
|
+
super(AreHTMLInstructions.HideElement, parent, props);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
HideElementInstruction = __decorateClass([
|
|
16
|
+
A_Frame.Define({
|
|
17
|
+
namespace: "a-are-html",
|
|
18
|
+
description: 'Toggles the visibility of an existing element by setting its inline display to "none" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'
|
|
19
|
+
})
|
|
20
|
+
], HideElementInstruction);
|
|
21
|
+
|
|
22
|
+
export { HideElementInstruction };
|
|
23
|
+
//# sourceMappingURL=HideElement.instruction.mjs.map
|
|
24
|
+
//# sourceMappingURL=HideElement.instruction.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/instructions/HideElement.instruction.ts"],"names":[],"mappings":";;;;;AAUO,IAAM,sBAAA,GAAN,cAAqC,WAAA,CAA2C;AAAA,EAQnF,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAgE,CAAA;AAAA,IAC1E,CAAA,MAAO;AACH,MAAA,KAAA,CAAM,mBAAA,CAAoB,WAAA,EAAa,MAAA,EAAQ,KAAK,CAAA;AAAA,IACxD;AAAA,EACJ;AACJ;AAlBa,sBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,sBAAA,CAAA","file":"HideElement.instruction.mjs","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlHideInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n namespace: 'a-are-html',\n description: 'Toggles the visibility of an existing element by setting its inline display to \"none\" on apply and restoring the previous inline display on revert. Used by the $show directive to hide/show an element without unmounting it, preserving its subtree, listeners and scene state.'\n})\nexport class HideElementInstruction extends AreMutation<AreHtmlHideInstructionPayload> {\n\n /**\n * Caches the element's inline `display` value captured at apply time so it\n * can be restored verbatim on revert (mirrors Vue `v-show`).\n */\n cache?: string;\n\n constructor(\n parent: AreDeclaration,\n props: AreHtmlHideInstructionPayload | AreInstructionSerialized<AreHtmlHideInstructionPayload>\n ) {\n if ('aseid' in props) {\n super(props as AreInstructionSerialized<AreHtmlHideInstructionPayload>);\n } else {\n super(AreHTMLInstructions.HideElement, parent, props);\n }\n }\n}\n"]}
|
|
@@ -1,10 +1,64 @@
|
|
|
1
|
+
import { A_TYPES__Ctor } from '@adaas/a-concept';
|
|
1
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
2
|
-
import { A_SignalVector } from '@adaas/a-utils/a-signal';
|
|
3
|
+
import { A_SignalState, A_SignalVector } from '@adaas/a-utils/a-signal';
|
|
3
4
|
import { Are, AreNode, AreSignalsContext } from '@adaas/are';
|
|
5
|
+
import { AreRootCache, AreRootCacheEntry } from './AreRootCache.context.mjs';
|
|
4
6
|
|
|
5
7
|
declare class AreRoot extends Are {
|
|
6
|
-
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
7
|
-
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
8
|
+
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext, signalState?: A_SignalState): Promise<void>;
|
|
9
|
+
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext, cache?: AreRootCache): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the component a vector should render for the given root, mirroring
|
|
12
|
+
* the priority used everywhere in the routing system:
|
|
13
|
+
* 1. Root-specific conditions registered on AreSignalsContext.
|
|
14
|
+
* 2. The global AreSignalsMeta map, restricted to this outlet's pool.
|
|
15
|
+
*
|
|
16
|
+
* Passing the pool *into* the meta lookup is critical: without it, the first
|
|
17
|
+
* globally matching component wins and may belong to a different outlet
|
|
18
|
+
* (e.g. AisRequirementsPanel for the meta-outlet matching
|
|
19
|
+
* AisEditorCursorScope) — the pool check would then reject it and the outlet
|
|
20
|
+
* would fall back to its default, hiding a valid in-pool match (e.g.
|
|
21
|
+
* AisDiagramTab matching AisSetPrimaryDisplay).
|
|
22
|
+
*
|
|
23
|
+
* Returns `undefined` when nothing matches — callers decide whether to use a
|
|
24
|
+
* configured default, body content, or clear the outlet.
|
|
25
|
+
*/
|
|
26
|
+
protected matchComponent(rootId: string, vector: A_SignalVector | undefined, signalsContext?: AreSignalsContext): A_TYPES__Ctor<Are> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Builds the vector used for the INITIAL render. It is seeded from the
|
|
29
|
+
* accumulated signal state (every signal dispatched on the bus so far) so a
|
|
30
|
+
* freshly-mounted outlet reflects the live application state immediately,
|
|
31
|
+
* not just on the next signal tick. The current URL route is appended when
|
|
32
|
+
* no AreRoute is already present in the state, so route-driven outlets still
|
|
33
|
+
* resolve on the very first paint (before AreRouteWatcher has dispatched).
|
|
34
|
+
*/
|
|
35
|
+
protected buildInitialVector(signalState?: A_SignalState): A_SignalVector;
|
|
36
|
+
/**
|
|
37
|
+
* Detach a displayed child subtree from the outlet and stash it in the cache
|
|
38
|
+
* for fast re-injection later. The subtree is unmounted (its scene plan is
|
|
39
|
+
* preserved) and deregistered from the root scope, but NOT destroyed. The
|
|
40
|
+
* nodes that were subscribed to the signal bus are unsubscribed while cached
|
|
41
|
+
* so the detached DOM never reacts to signals, and recorded so they can be
|
|
42
|
+
* re-subscribed verbatim on restore.
|
|
43
|
+
*
|
|
44
|
+
* When no cache is available, or the LRU evicts an entry, the affected
|
|
45
|
+
* subtree is fully destroyed.
|
|
46
|
+
*/
|
|
47
|
+
protected stashChild(root: AreNode, child: AreNode, signalsContext: AreSignalsContext | undefined, cache: AreRootCache | undefined): void;
|
|
48
|
+
/**
|
|
49
|
+
* Re-attach a cached subtree to the outlet and re-mount it from its preserved
|
|
50
|
+
* scene plan, re-subscribing exactly the nodes that were subscribed before it
|
|
51
|
+
* was cached.
|
|
52
|
+
*/
|
|
53
|
+
protected restoreChild(root: AreNode, entry: AreRootCacheEntry, signalsContext: AreSignalsContext | undefined): void;
|
|
54
|
+
/**
|
|
55
|
+
* Walk a subtree and collect the nodes currently registered as signal
|
|
56
|
+
* subscribers. Mirrors the subscription performed at init time in
|
|
57
|
+
* AreHTMLLifecycle (component nodes and root nodes) without depending on the
|
|
58
|
+
* concrete node classes — it simply intersects the subtree with the live
|
|
59
|
+
* subscriber registry.
|
|
60
|
+
*/
|
|
61
|
+
protected collectSubscribers(node: AreNode, signalsContext: AreSignalsContext): AreNode[];
|
|
8
62
|
}
|
|
9
63
|
|
|
10
64
|
export { AreRoot };
|
|
@@ -1,10 +1,64 @@
|
|
|
1
|
+
import { A_TYPES__Ctor } from '@adaas/a-concept';
|
|
1
2
|
import { A_Logger } from '@adaas/a-utils/a-logger';
|
|
2
|
-
import { A_SignalVector } from '@adaas/a-utils/a-signal';
|
|
3
|
+
import { A_SignalState, A_SignalVector } from '@adaas/a-utils/a-signal';
|
|
3
4
|
import { Are, AreNode, AreSignalsContext } from '@adaas/are';
|
|
5
|
+
import { AreRootCache, AreRootCacheEntry } from './AreRootCache.context.js';
|
|
4
6
|
|
|
5
7
|
declare class AreRoot extends Are {
|
|
6
|
-
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
7
|
-
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext): Promise<void>;
|
|
8
|
+
template(root: AreNode, logger: A_Logger, signalsContext?: AreSignalsContext, signalState?: A_SignalState): Promise<void>;
|
|
9
|
+
onSignal(root: AreNode, vector: A_SignalVector, logger: A_Logger, signalsContext?: AreSignalsContext, cache?: AreRootCache): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the component a vector should render for the given root, mirroring
|
|
12
|
+
* the priority used everywhere in the routing system:
|
|
13
|
+
* 1. Root-specific conditions registered on AreSignalsContext.
|
|
14
|
+
* 2. The global AreSignalsMeta map, restricted to this outlet's pool.
|
|
15
|
+
*
|
|
16
|
+
* Passing the pool *into* the meta lookup is critical: without it, the first
|
|
17
|
+
* globally matching component wins and may belong to a different outlet
|
|
18
|
+
* (e.g. AisRequirementsPanel for the meta-outlet matching
|
|
19
|
+
* AisEditorCursorScope) — the pool check would then reject it and the outlet
|
|
20
|
+
* would fall back to its default, hiding a valid in-pool match (e.g.
|
|
21
|
+
* AisDiagramTab matching AisSetPrimaryDisplay).
|
|
22
|
+
*
|
|
23
|
+
* Returns `undefined` when nothing matches — callers decide whether to use a
|
|
24
|
+
* configured default, body content, or clear the outlet.
|
|
25
|
+
*/
|
|
26
|
+
protected matchComponent(rootId: string, vector: A_SignalVector | undefined, signalsContext?: AreSignalsContext): A_TYPES__Ctor<Are> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Builds the vector used for the INITIAL render. It is seeded from the
|
|
29
|
+
* accumulated signal state (every signal dispatched on the bus so far) so a
|
|
30
|
+
* freshly-mounted outlet reflects the live application state immediately,
|
|
31
|
+
* not just on the next signal tick. The current URL route is appended when
|
|
32
|
+
* no AreRoute is already present in the state, so route-driven outlets still
|
|
33
|
+
* resolve on the very first paint (before AreRouteWatcher has dispatched).
|
|
34
|
+
*/
|
|
35
|
+
protected buildInitialVector(signalState?: A_SignalState): A_SignalVector;
|
|
36
|
+
/**
|
|
37
|
+
* Detach a displayed child subtree from the outlet and stash it in the cache
|
|
38
|
+
* for fast re-injection later. The subtree is unmounted (its scene plan is
|
|
39
|
+
* preserved) and deregistered from the root scope, but NOT destroyed. The
|
|
40
|
+
* nodes that were subscribed to the signal bus are unsubscribed while cached
|
|
41
|
+
* so the detached DOM never reacts to signals, and recorded so they can be
|
|
42
|
+
* re-subscribed verbatim on restore.
|
|
43
|
+
*
|
|
44
|
+
* When no cache is available, or the LRU evicts an entry, the affected
|
|
45
|
+
* subtree is fully destroyed.
|
|
46
|
+
*/
|
|
47
|
+
protected stashChild(root: AreNode, child: AreNode, signalsContext: AreSignalsContext | undefined, cache: AreRootCache | undefined): void;
|
|
48
|
+
/**
|
|
49
|
+
* Re-attach a cached subtree to the outlet and re-mount it from its preserved
|
|
50
|
+
* scene plan, re-subscribing exactly the nodes that were subscribed before it
|
|
51
|
+
* was cached.
|
|
52
|
+
*/
|
|
53
|
+
protected restoreChild(root: AreNode, entry: AreRootCacheEntry, signalsContext: AreSignalsContext | undefined): void;
|
|
54
|
+
/**
|
|
55
|
+
* Walk a subtree and collect the nodes currently registered as signal
|
|
56
|
+
* subscribers. Mirrors the subscription performed at init time in
|
|
57
|
+
* AreHTMLLifecycle (component nodes and root nodes) without depending on the
|
|
58
|
+
* concrete node classes — it simply intersects the subtree with the live
|
|
59
|
+
* subscriber registry.
|
|
60
|
+
*/
|
|
61
|
+
protected collectSubscribers(node: AreNode, signalsContext: AreSignalsContext): AreNode[];
|
|
8
62
|
}
|
|
9
63
|
|
|
10
64
|
export { AreRoot };
|