@zcomponent/core 1.29.0 → 2.0.0-alpha.2
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/README.md +1 -0
- package/css/zcomponent.css +121 -122
- package/index.js +0 -3
- package/lib/actionbehavior.d.ts +3 -3
- package/lib/actionbehavior.js +20 -19
- package/lib/animation/animation.d.ts +13 -6
- package/lib/animation/animation.js +56 -43
- package/lib/animation/bezier.d.ts +6 -0
- package/lib/animation/bezier.js +8 -2
- package/lib/animation/clips/clip.d.ts +13 -1
- package/lib/animation/clips/clip.js +34 -14
- package/lib/animation/index.d.ts +4 -4
- package/lib/animation/index.js +4 -4
- package/lib/animation/layer.d.ts +9 -0
- package/lib/animation/layer.js +28 -12
- package/lib/animation/layerclip.d.ts +21 -0
- package/lib/animation/layerclip.js +82 -45
- package/lib/animation/tracks/cliptrack.d.ts +18 -0
- package/lib/animation/tracks/cliptrack.js +27 -6
- package/lib/animation/tracks/functiontrack.d.ts +9 -0
- package/lib/animation/tracks/functiontrack.js +16 -3
- package/lib/animation/tracks/propertytrack.d.ts +20 -1
- package/lib/animation/tracks/propertytrack.js +48 -11
- package/lib/animation/tracks/streamtrack.d.ts +18 -0
- package/lib/animation/tracks/streamtrack.js +32 -6
- package/lib/animation/tracks/track.d.ts +8 -2
- package/lib/animation/tracks/track.js +3 -2
- package/lib/behavior.js +13 -10
- package/lib/behaviors/ActivateState.d.ts +22 -24
- package/lib/behaviors/ActivateState.js +145 -35
- package/lib/behaviors/CallFunction.d.ts +2 -4
- package/lib/behaviors/CallFunction.js +69 -11
- package/lib/behaviors/ChangeRootScene.d.ts +35 -0
- package/lib/behaviors/ChangeRootScene.js +123 -0
- package/lib/behaviors/ConsoleLog.d.ts +6 -5
- package/lib/behaviors/ConsoleLog.js +95 -12
- package/lib/behaviors/DownloadSnapshot.d.ts +7 -12
- package/lib/behaviors/DownloadSnapshot.js +70 -19
- package/lib/behaviors/EmitComponentPropEvent.d.ts +1 -3
- package/lib/behaviors/EmitComponentPropEvent.js +80 -12
- package/lib/behaviors/LaunchURL.d.ts +5 -5
- package/lib/behaviors/LaunchURL.js +92 -10
- package/lib/behaviors/LogAnalyticsEvent.d.ts +10 -4
- package/lib/behaviors/LogAnalyticsEvent.js +88 -7
- package/lib/behaviors/PauseLayerClip.d.ts +7 -9
- package/lib/behaviors/PauseLayerClip.js +89 -21
- package/lib/behaviors/PlayLayerClip.d.ts +35 -32
- package/lib/behaviors/PlayLayerClip.js +202 -48
- package/lib/behaviors/PlaySound.d.ts +19 -25
- package/lib/behaviors/PlaySound.js +122 -28
- package/lib/behaviors/SetLayerOff.d.ts +7 -9
- package/lib/behaviors/SetLayerOff.js +88 -21
- package/lib/behaviors/ShareSnapshot.d.ts +5 -9
- package/lib/behaviors/ShareSnapshot.js +70 -17
- package/lib/behaviors/ShowTextAlert.d.ts +16 -29
- package/lib/behaviors/ShowTextAlert.js +116 -48
- package/lib/behaviors/TakeSnapshot.d.ts +22 -26
- package/lib/behaviors/TakeSnapshot.js +131 -56
- package/lib/behaviors/ToggleLayerClips.d.ts +45 -62
- package/lib/behaviors/ToggleLayerClips.js +233 -64
- package/lib/behaviors/stream/PauseStream.d.ts +5 -16
- package/lib/behaviors/stream/PauseStream.js +94 -34
- package/lib/behaviors/stream/PlayStream.d.ts +14 -27
- package/lib/behaviors/stream/PlayStream.js +123 -34
- package/lib/behaviors/stream/SeekStream.d.ts +8 -18
- package/lib/behaviors/stream/SeekStream.js +97 -31
- package/lib/behaviors/stream/StopStream.d.ts +6 -15
- package/lib/behaviors/stream/StopStream.js +89 -27
- package/lib/component.d.ts +36 -13
- package/lib/component.js +237 -151
- package/lib/components/AnimatedLoader.d.ts +51 -0
- package/lib/components/AnimatedLoader.js +159 -0
- package/lib/components/Audio.d.ts +35 -37
- package/lib/components/Audio.js +264 -151
- package/lib/components/AudioLayerSettings.d.ts +13 -11
- package/lib/components/AudioLayerSettings.js +76 -18
- package/lib/components/Children.d.ts +2 -1
- package/lib/components/Children.js +66 -13
- package/lib/components/ConditionalConstruct.d.ts +44 -0
- package/lib/components/ConditionalConstruct.js +142 -0
- package/lib/components/DefaultCookieConsent.d.ts +53 -73
- package/lib/components/DefaultCookieConsent.js +382 -264
- package/lib/components/DefaultLoader.d.ts +40 -28
- package/lib/components/DefaultLoader.js +198 -46
- package/lib/components/Gamepad.d.ts +5 -26
- package/lib/components/Gamepad.js +201 -65
- package/lib/components/LoaderScope.d.ts +15 -0
- package/lib/components/LoaderScope.js +71 -0
- package/lib/components/LongLoad.d.ts +11 -15
- package/lib/components/LongLoad.js +89 -34
- package/lib/components/SnapshotUI.d.ts +19 -24
- package/lib/components/SnapshotUI.js +202 -105
- package/lib/context.d.ts +23 -5
- package/lib/context.js +12 -6
- package/lib/contexts/analyticscontext.d.ts +12 -2
- package/lib/contexts/analyticscontext.js +68 -10
- package/lib/contexts/audiocontextcontext.d.ts +1 -1
- package/lib/contexts/audiocontextcontext.js +9 -8
- package/lib/contexts/canvascontext.d.ts +32 -18
- package/lib/contexts/canvascontext.js +195 -120
- package/lib/contexts/cookieconsentcontext.d.ts +38 -28
- package/lib/contexts/cookieconsentcontext.js +35 -32
- package/lib/contexts/documentflagmanager.js +15 -11
- package/lib/contexts/environmentcontext.d.ts +22 -6
- package/lib/contexts/environmentcontext.js +135 -21
- package/lib/contexts/gamepadcontext.d.ts +29 -26
- package/lib/contexts/gamepadcontext.js +46 -46
- package/lib/contexts/gesturecontext.d.ts +31 -6
- package/lib/contexts/gesturecontext.js +110 -85
- package/lib/contexts/globaltagcontext.d.ts +1 -1
- package/lib/contexts/globaltagcontext.js +8 -11
- package/lib/contexts/loadcontext.d.ts +45 -8
- package/lib/contexts/loadcontext.js +232 -82
- package/lib/contexts/orientationcontext.d.ts +13 -15
- package/lib/contexts/orientationcontext.js +150 -67
- package/lib/contexts/rootcomponentscontext.d.ts +16 -0
- package/lib/contexts/rootcomponentscontext.js +65 -0
- package/lib/contexts/snapshotContext.d.ts +0 -3
- package/lib/contexts/snapshotContext.js +78 -23
- package/lib/contexts/tagcontext.d.ts +5 -5
- package/lib/contexts/tagcontext.js +16 -16
- package/lib/contexts/textalertcontext.d.ts +1 -5
- package/lib/contexts/textalertcontext.js +1 -5
- package/lib/contexts/usereventcontext.d.ts +1 -1
- package/lib/contexts/usereventcontext.js +12 -12
- package/lib/data/animation.d.ts +10 -2
- package/lib/data/change.d.ts +1 -1
- package/lib/data/change.js +7 -0
- package/lib/data/core.d.ts +9 -1
- package/lib/data/index.d.ts +1 -1
- package/lib/data/index.js +1 -1
- package/lib/decorators.d.ts +348 -0
- package/lib/decorators.js +239 -0
- package/lib/decoratorutils.d.ts +3 -0
- package/lib/decoratorutils.js +8 -0
- package/lib/emitter.d.ts +15 -2
- package/lib/emitter.js +15 -6
- package/lib/entity.d.ts +43 -25
- package/lib/entity.js +104 -71
- package/lib/event.d.ts +2 -1
- package/lib/event.js +1 -4
- package/lib/groups.d.ts +18 -0
- package/lib/groups.js +19 -0
- package/lib/icons.d.ts +3372 -0
- package/lib/icons.js +1 -0
- package/lib/index.d.ts +18 -13
- package/lib/index.js +17 -13
- package/lib/inflate.d.ts +7 -7
- package/lib/inflate.js +5 -5
- package/lib/observable.d.ts +9 -2
- package/lib/observable.js +5 -4
- package/lib/observe.d.ts +18 -0
- package/lib/observe.js +177 -0
- package/lib/profile.d.ts +9 -5
- package/lib/profile.js +27 -17
- package/lib/selectors.d.ts +1 -1
- package/lib/selectors.js +5 -4
- package/lib/types.d.ts +161 -19
- package/lib/types.js +22 -1
- package/lib/values/values.d.ts +7 -8
- package/lib/values/values.js +1 -2
- package/lib/values/valuesmutator.d.ts +4 -1
- package/lib/values/valuesmutator.js +10 -8
- package/lib/zcomponent.d.ts +21 -10
- package/lib/zcomponent.js +717 -540
- package/package.json +22 -5
- package/lib/behaviors/ChangeCursor.d.ts +0 -39
- package/lib/behaviors/ChangeCursor.js +0 -44
package/package.json
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zcomponent/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"description": "The core component model and built-in functionality for Mattercraft.",
|
|
5
5
|
"author": "Zappar Limited",
|
|
6
6
|
"license": "Proprietary",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"types": "index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"development": "./src/index.ts",
|
|
12
|
+
"types": "./index.d.ts",
|
|
13
|
+
"default": "./index.js"
|
|
14
|
+
},
|
|
15
|
+
"./*": {
|
|
16
|
+
"development": "./src/*.ts",
|
|
17
|
+
"types": "./lib/*.d.ts",
|
|
18
|
+
"default": "./lib/*.js"
|
|
19
|
+
},
|
|
20
|
+
"./lib/*": {
|
|
21
|
+
"development": "./src/*.ts",
|
|
22
|
+
"types": "./lib/*.d.ts",
|
|
23
|
+
"default": "./lib/*.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
9
26
|
"type": "module",
|
|
10
27
|
"engines": {
|
|
11
28
|
"node": ">=12.0.0",
|
|
@@ -27,17 +44,17 @@
|
|
|
27
44
|
"assets/**/*"
|
|
28
45
|
],
|
|
29
46
|
"scripts": {
|
|
30
|
-
"build": "rm -rf lib &&
|
|
47
|
+
"build": "rm -rf lib && tspc && tsc-alias",
|
|
31
48
|
"watch": "tsc -w",
|
|
32
49
|
"docs": "typedoc --out docs",
|
|
33
|
-
"test": "
|
|
50
|
+
"test": "vitest run",
|
|
34
51
|
"build-animation-tests": "tsc -p ./tsconfig.test.animation.json",
|
|
35
52
|
"predocs": "npm run ctix",
|
|
36
53
|
"ctix": "ctix build"
|
|
37
54
|
},
|
|
38
55
|
"devDependencies": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
56
|
+
"ts-patch": "^3.3.0",
|
|
57
|
+
"vitest": "3.1.3"
|
|
41
58
|
},
|
|
42
59
|
"keywords": [],
|
|
43
60
|
"release": {
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ActionBehavior, ActionBehaviorConstructorProps } from '../actionbehavior';
|
|
2
|
-
import { Component } from '../component';
|
|
3
|
-
import { ContextManager } from '../context';
|
|
4
|
-
import { Observable } from '../observable';
|
|
5
|
-
/**
|
|
6
|
-
* Enum for different cursor styles
|
|
7
|
-
*/
|
|
8
|
-
export declare enum CursorStyle {
|
|
9
|
-
Default = "default",
|
|
10
|
-
Pointer = "pointer",
|
|
11
|
-
Move = "move",
|
|
12
|
-
Grab = "grab",
|
|
13
|
-
Grabbing = "grabbing",
|
|
14
|
-
Wait = "wait",
|
|
15
|
-
Text = "text",
|
|
16
|
-
NotAllowed = "not-allowed",
|
|
17
|
-
ZoomIn = "zoom-in",
|
|
18
|
-
ZoomOut = "zoom-out"
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Action behavior to change the cursor style.
|
|
22
|
-
* @zbehavior
|
|
23
|
-
* @zicon mouse
|
|
24
|
-
* @zgroup Actions
|
|
25
|
-
*/
|
|
26
|
-
export declare class ChangeCursor extends ActionBehavior {
|
|
27
|
-
/**
|
|
28
|
-
* The cursor style to apply.
|
|
29
|
-
* @zprop
|
|
30
|
-
* @zdefault default
|
|
31
|
-
*/
|
|
32
|
-
cursorStyle: Observable<CursorStyle, never>;
|
|
33
|
-
constructor(contextManager: ContextManager, instance: Component, props: ActionBehaviorConstructorProps);
|
|
34
|
-
/**
|
|
35
|
-
* Performs the cursor change action.
|
|
36
|
-
* @zprop
|
|
37
|
-
*/
|
|
38
|
-
perform(): void;
|
|
39
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ActionBehavior } from '../actionbehavior';
|
|
2
|
-
import { registerBehaviorRunAtDesignTime } from '../behavior';
|
|
3
|
-
import { Observable } from '../observable';
|
|
4
|
-
/**
|
|
5
|
-
* Enum for different cursor styles
|
|
6
|
-
*/
|
|
7
|
-
export var CursorStyle;
|
|
8
|
-
(function (CursorStyle) {
|
|
9
|
-
CursorStyle["Default"] = "default";
|
|
10
|
-
CursorStyle["Pointer"] = "pointer";
|
|
11
|
-
CursorStyle["Move"] = "move";
|
|
12
|
-
CursorStyle["Grab"] = "grab";
|
|
13
|
-
CursorStyle["Grabbing"] = "grabbing";
|
|
14
|
-
CursorStyle["Wait"] = "wait";
|
|
15
|
-
CursorStyle["Text"] = "text";
|
|
16
|
-
CursorStyle["NotAllowed"] = "not-allowed";
|
|
17
|
-
CursorStyle["ZoomIn"] = "zoom-in";
|
|
18
|
-
CursorStyle["ZoomOut"] = "zoom-out";
|
|
19
|
-
})(CursorStyle || (CursorStyle = {}));
|
|
20
|
-
/**
|
|
21
|
-
* Action behavior to change the cursor style.
|
|
22
|
-
* @zbehavior
|
|
23
|
-
* @zicon mouse
|
|
24
|
-
* @zgroup Actions
|
|
25
|
-
*/
|
|
26
|
-
export class ChangeCursor extends ActionBehavior {
|
|
27
|
-
constructor(contextManager, instance, props) {
|
|
28
|
-
super(contextManager, instance, props);
|
|
29
|
-
/**
|
|
30
|
-
* The cursor style to apply.
|
|
31
|
-
* @zprop
|
|
32
|
-
* @zdefault default
|
|
33
|
-
*/
|
|
34
|
-
this.cursorStyle = new Observable(CursorStyle.Default);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Performs the cursor change action.
|
|
38
|
-
* @zprop
|
|
39
|
-
*/
|
|
40
|
-
perform() {
|
|
41
|
-
document.body.style.cursor = this.cursorStyle.value;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
registerBehaviorRunAtDesignTime(ChangeCursor);
|