@fluffjs/fluff 0.4.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.min.js +1 -1
- package/decorators/Directive.d.ts +16 -0
- package/decorators/Directive.js +23 -0
- package/decorators/HostElement.d.ts +1 -0
- package/decorators/HostElement.js +4 -0
- package/index.d.ts +4 -0
- package/index.js +3 -0
- package/interfaces/ElementWithDirectives.d.ts +4 -0
- package/interfaces/FluffHostElement.d.ts +3 -10
- package/package.json +1 -1
- package/runtime/BreakController.d.ts +2 -3
- package/runtime/BreakController.js +0 -3
- package/runtime/FluffBase.d.ts +50 -42
- package/runtime/FluffBase.js +185 -242
- package/runtime/FluffDirective.d.ts +9 -0
- package/runtime/FluffDirective.js +36 -0
- package/runtime/FluffElement.d.ts +0 -1
- package/runtime/FluffElementImpl.d.ts +5 -10
- package/runtime/FluffElementImpl.js +59 -77
- package/runtime/FluffMarkers.d.ts +0 -1
- package/runtime/FluffMarkers.js +0 -1
- package/runtime/ForController.d.ts +2 -5
- package/runtime/ForController.js +7 -9
- package/runtime/IfController.d.ts +2 -5
- package/runtime/IfController.js +12 -13
- package/runtime/MarkerController.d.ts +9 -11
- package/runtime/MarkerController.js +6 -3
- package/runtime/MarkerManager.d.ts +2 -5
- package/runtime/MarkerManager.js +11 -50
- package/runtime/MarkerManagerInterface.d.ts +5 -2
- package/runtime/SwitchController.d.ts +2 -5
- package/runtime/SwitchController.js +10 -13
- package/runtime/TextController.d.ts +2 -4
- package/runtime/TextController.js +8 -16
- package/runtime/tests/DirectOutputParent.js +4 -1
- package/runtime/tests/TestChildTasksListComponent.js +4 -1
- package/runtime/tests/TestForComponent.js +4 -1
- package/runtime/tests/TestForReinsertBindsInputParentComponent.js +7 -2
- package/runtime/tests/TestForTextMarkerCollisionNoTrackParentComponent.js +5 -2
- package/runtime/tests/TestForTextMarkerCollisionParentComponent.js +5 -10
- package/runtime/tests/TestForUnsubscribeNestedParentComponent.js +7 -2
- package/runtime/tests/TestGetterReactivityComponent.js +4 -1
- package/runtime/tests/TestHarness.d.ts +1 -1
- package/runtime/tests/TestHarness.js +3 -3
- package/runtime/tests/TestIfReinsertBindsInputChildComponent.js +4 -1
- package/runtime/tests/TestIfReinsertBindsInputParentComponent.js +7 -2
- package/runtime/tests/TestIfUnsubscribeNestedParentComponent.js +7 -2
- package/runtime/tests/TestInterpolationNestedPropertyComponentBase.js +4 -1
- package/runtime/tests/TestLateDefineForComponent.js +4 -1
- package/runtime/tests/TestNullInputTextComponent.js +5 -2
- package/runtime/tests/TestOutputBindingChildComponent.js +4 -1
- package/runtime/tests/TestOutputBindingParentComponent.js +7 -2
- package/runtime/tests/TestParentBindsTasksComponent.js +4 -1
- package/runtime/tests/TestSwitchReinsertBindsInputChildComponent.js +4 -1
- package/runtime/tests/TestSwitchReinsertBindsInputParentComponent.js +8 -10
- package/runtime/tests/TestSwitchUnsubscribeNestedParentComponent.js +7 -9
- package/runtime/tests/TestTemplateNestedMarkersComponent.js +5 -2
- package/runtime/tests/TestUnsubscribeNestedChildComponent.js +4 -1
- package/runtime/tests/TestUnsubscribeNestedGrandchildComponent.js +4 -1
- package/runtime/tests/createPipeUnwrapTestComponent.js +4 -1
- package/runtime/tests/createPropBindParentComponent.js +4 -1
- package/runtime/tests/createTestInterpolationPipeComponent.js +4 -1
- package/runtime/tests/createTestInterpolationPipeWithArgsComponent.js +4 -1
- package/interfaces/BreakMarkerConfig.d.ts +0 -3
- package/interfaces/ForMarkerConfig.d.ts +0 -8
- package/interfaces/ForMarkerConfig.js +0 -1
- package/interfaces/IfMarkerConfig.d.ts +0 -7
- package/interfaces/IfMarkerConfig.js +0 -1
- package/interfaces/MarkerConfig.d.ts +0 -6
- package/interfaces/MarkerConfig.js +0 -1
- package/interfaces/SwitchMarkerConfig.d.ts +0 -10
- package/interfaces/SwitchMarkerConfig.js +0 -1
- package/interfaces/TextMarkerConfig.d.ts +0 -9
- package/interfaces/TextMarkerConfig.js +0 -1
- package/runtime/MarkerConfigGuards.d.ts +0 -13
- package/runtime/MarkerConfigGuards.js +0 -17
- /package/interfaces/{BreakMarkerConfig.js → ElementWithDirectives.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Property } from '../../utils/Property.js';
|
|
2
|
+
import { FluffBase } from '../FluffBase.js';
|
|
2
3
|
import { FluffElement } from '../FluffElementImpl.js';
|
|
3
4
|
import { MarkerManager } from '../MarkerManager.js';
|
|
4
5
|
export function createTestInterpolationPipeComponent() {
|
|
@@ -22,8 +23,10 @@ export function createTestInterpolationPipeComponent() {
|
|
|
22
23
|
};
|
|
23
24
|
__render() {
|
|
24
25
|
this.__getShadowRoot().innerHTML = '<span><!--fluff:text:0--><!--/fluff:text:0--></span>';
|
|
26
|
+
const si = FluffBase.__s.length;
|
|
27
|
+
FluffBase.__s.push('message', 'uppercase');
|
|
25
28
|
this.__setMarkerConfigs([
|
|
26
|
-
[0,
|
|
29
|
+
[0, [2, 0, [si], [[si + 1, []]]]]
|
|
27
30
|
]);
|
|
28
31
|
}
|
|
29
32
|
__setupBindings() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Property } from '../../utils/Property.js';
|
|
2
|
+
import { FluffBase } from '../FluffBase.js';
|
|
2
3
|
import { FluffElement } from '../FluffElementImpl.js';
|
|
3
4
|
import { MarkerManager } from '../MarkerManager.js';
|
|
4
5
|
export function createTestInterpolationPipeWithArgsComponent() {
|
|
@@ -22,8 +23,10 @@ export function createTestInterpolationPipeWithArgsComponent() {
|
|
|
22
23
|
};
|
|
23
24
|
__render() {
|
|
24
25
|
this.__getShadowRoot().innerHTML = '<span><!--fluff:text:0--><!--/fluff:text:0--></span>';
|
|
26
|
+
const si = FluffBase.__s.length;
|
|
27
|
+
FluffBase.__s.push('message', 'truncate');
|
|
25
28
|
this.__setMarkerConfigs([
|
|
26
|
-
[0,
|
|
29
|
+
[0, [2, 0, [si], [[si + 1, [1]]]]]
|
|
27
30
|
]);
|
|
28
31
|
}
|
|
29
32
|
__setupBindings() {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BreakMarkerConfig } from './BreakMarkerConfig.js';
|
|
2
|
-
import type { ForMarkerConfig } from './ForMarkerConfig.js';
|
|
3
|
-
import type { IfMarkerConfig } from './IfMarkerConfig.js';
|
|
4
|
-
import type { SwitchMarkerConfig } from './SwitchMarkerConfig.js';
|
|
5
|
-
import type { TextMarkerConfig } from './TextMarkerConfig.js';
|
|
6
|
-
export type MarkerConfig = IfMarkerConfig | ForMarkerConfig | SwitchMarkerConfig | TextMarkerConfig | BreakMarkerConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { BreakMarkerConfig } from '../interfaces/BreakMarkerConfig.js';
|
|
2
|
-
import type { ForMarkerConfig } from '../interfaces/ForMarkerConfig.js';
|
|
3
|
-
import type { IfMarkerConfig } from '../interfaces/IfMarkerConfig.js';
|
|
4
|
-
import type { MarkerConfig } from '../interfaces/MarkerConfig.js';
|
|
5
|
-
import type { SwitchMarkerConfig } from '../interfaces/SwitchMarkerConfig.js';
|
|
6
|
-
import type { TextMarkerConfig } from '../interfaces/TextMarkerConfig.js';
|
|
7
|
-
export declare class MarkerConfigGuards {
|
|
8
|
-
static isIfConfig(config: MarkerConfig): config is IfMarkerConfig;
|
|
9
|
-
static isForConfig(config: MarkerConfig): config is ForMarkerConfig;
|
|
10
|
-
static isSwitchConfig(config: MarkerConfig): config is SwitchMarkerConfig;
|
|
11
|
-
static isTextConfig(config: MarkerConfig): config is TextMarkerConfig;
|
|
12
|
-
static isBreakConfig(config: MarkerConfig): config is BreakMarkerConfig;
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export class MarkerConfigGuards {
|
|
2
|
-
static isIfConfig(config) {
|
|
3
|
-
return config.type === 'if';
|
|
4
|
-
}
|
|
5
|
-
static isForConfig(config) {
|
|
6
|
-
return config.type === 'for';
|
|
7
|
-
}
|
|
8
|
-
static isSwitchConfig(config) {
|
|
9
|
-
return config.type === 'switch';
|
|
10
|
-
}
|
|
11
|
-
static isTextConfig(config) {
|
|
12
|
-
return config.type === 'text';
|
|
13
|
-
}
|
|
14
|
-
static isBreakConfig(config) {
|
|
15
|
-
return config.type === 'break';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
File without changes
|