aptechka 0.1.3 → 0.1.6
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/lib/Animated-CJcYqJzq.js +130 -0
- package/lib/Animated-DyZuTEQE.cjs +1 -0
- package/lib/Damped-AHRBHNEQ.cjs +1 -0
- package/lib/Damped-Csj-9_gH.js +36 -0
- package/lib/Derived-Bc88XJ8J.js +27 -0
- package/lib/Derived-SjPdLJiZ.cjs +1 -0
- package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
- package/lib/ElementConstructor-CoKM2CTK.js +228 -0
- package/lib/{SourceManager-vXInLlh_.js → SourceManager-BoP9RAJr.js} +26 -26
- package/lib/SourceManager-CI6NfLzW.cjs +1 -0
- package/lib/Store-D0_rDIsE.cjs +1 -0
- package/lib/Store-JOKrNVEr.js +152 -0
- package/lib/Viewport-COsaberc.cjs +1 -0
- package/lib/Viewport-CXY5xcGJ.js +129 -0
- package/lib/WheelControls-CX9WUbBC.js +83 -0
- package/lib/WheelControls-CfDeGCOU.cjs +1 -0
- package/lib/abstract-elements/AbstractButtonElement.d.ts +5 -0
- package/lib/abstract-elements/index.cjs +1 -0
- package/lib/abstract-elements/index.d.ts +1 -0
- package/lib/abstract-elements/index.js +27 -0
- package/lib/accordion/AccordionElement.d.ts +24 -1
- package/lib/accordion/index.cjs +1 -0
- package/lib/accordion/index.js +166 -0
- package/lib/animation/Animated.d.ts +9 -12
- package/lib/animation/Tweened.d.ts +1 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +11 -17
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.d.ts +8 -4
- package/lib/attribute/index.js +44 -35
- package/lib/canvas/index.cjs +1 -0
- package/lib/{canvas-2d → canvas}/index.d.ts +4 -3
- package/lib/canvas/index.js +97 -0
- package/lib/connector/index.cjs +1 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/connector/index.js +54 -0
- package/lib/controls/WheelControls.d.ts +3 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +23 -27
- package/lib/createStylesheet-BON7aJYs.js +10 -0
- package/lib/createStylesheet-uicRVW05.cjs +1 -0
- package/lib/createTheme-BMH9cRrS.js +15 -0
- package/lib/createTheme-COo8IzPG.cjs +1 -0
- package/lib/custom-element/index.cjs +1 -1
- package/lib/custom-element/index.d.ts +3 -1
- package/lib/custom-element/index.js +19 -9
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -121
- package/lib/element-constructor/ElementConstructor.d.ts +15 -17
- package/lib/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/element-constructor/createTheme.d.ts +12 -0
- package/lib/element-constructor/htmlTags.d.ts +115 -113
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.d.ts +2 -1
- package/lib/element-constructor/index.js +387 -1136
- package/lib/element-constructor/svgTags.d.ts +63 -63
- package/lib/element-resizer/index.cjs +1 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/element-resizer/index.js +64 -0
- package/lib/en3/attachments/En3SourceManager.d.ts +2 -2
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.js +252 -242
- package/lib/en3/objects/En3Clip.d.ts +2 -2
- package/lib/events-CoqmkUxo.js +11 -0
- package/lib/events-D68xg4dy.cjs +1 -0
- package/lib/file-EevnUtRj.cjs +1 -0
- package/lib/file-lxi_oXJf.js +13 -0
- package/lib/htmlTags-BCNUG7oK.js +683 -0
- package/lib/htmlTags-BSQys9wH.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +13 -20
- package/lib/index-DgtdcBEI.js +310 -0
- package/lib/index-i_Ki9M-w.cjs +9 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +2 -1
- package/lib/intersector/index.js +33 -22
- package/lib/jsx/ComponentElement.d.ts +17 -0
- package/lib/jsx/h.d.ts +8 -0
- package/lib/jsx/hooks.d.ts +25 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +4 -0
- package/lib/jsx/index.js +116 -0
- package/lib/jsx/render.d.ts +2 -0
- package/lib/jsx/type.d.ts +186 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +3 -4
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +1 -0
- package/lib/layout-box/index.js +113 -99
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +17 -20
- package/lib/modal/ModalElement.d.ts +12 -0
- package/lib/modal/index.cjs +1 -0
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/index.js +144 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +1 -1
- package/lib/number-Bo5RdrA1.js +23 -0
- package/lib/number-yVpzMdbQ.cjs +1 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +19 -0
- package/lib/popover/index.cjs +1 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +122 -0
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +5 -3
- package/lib/scroll/index.cjs +1 -71
- package/lib/scroll/index.js +349 -314
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +1 -1
- package/lib/scroll-entries/index.js +4 -2
- package/lib/select/SelectElement.d.ts +25 -0
- package/lib/select/SelectHeadElement.d.ts +12 -0
- package/lib/select/SelectOptionElement.d.ts +13 -0
- package/lib/select/SelectUserElement.d.ts +7 -0
- package/lib/select/index.cjs +1 -0
- package/lib/select/index.d.ts +4 -0
- package/lib/select/index.js +7 -0
- package/lib/source/SourceClass.d.ts +1 -1
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +13 -18
- package/lib/store/CumulativeResource.d.ts +2 -2
- package/lib/store/Resource.d.ts +1 -1
- package/lib/store/Store.d.ts +55 -9
- package/lib/store/StoreRegistry.d.ts +2 -2
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -1
- package/lib/store/index.js +105 -66
- package/lib/string-BrDhnNUL.js +39 -0
- package/lib/string-DzUwFYSS.cjs +1 -0
- package/lib/studio/StudioElement.d.ts +3 -0
- package/lib/studio/index.cjs +10 -0
- package/lib/studio/index.js +1004 -0
- package/lib/studio/studioStorage.d.ts +14 -0
- package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerFieldElement.d.ts +21 -0
- package/lib/studio/tweaker/TweakerFolderElement.d.ts +22 -0
- package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +17 -0
- package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +10 -0
- package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +12 -0
- package/lib/studio/tweaker/tweakerManagerConstructors.d.ts +5 -0
- package/lib/style-At6aDoqG.cjs +1 -0
- package/lib/style-j2TwriJ_.js +10 -0
- package/lib/theme/index.cjs +1 -0
- package/lib/theme/index.d.ts +90 -0
- package/lib/theme/index.js +34 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +1 -1
- package/lib/utils/events.d.ts +6 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +8 -7
- package/lib/utils/index.js +95 -105
- package/lib/utils/number.d.ts +2 -3
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-utility.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +13 -20
- package/lib/window-resizer/index.cjs +1 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/lib/window-resizer/index.js +46 -0
- package/package.json +91 -28
- package/lib/Damped-DdPj4Sho.cjs +0 -1
- package/lib/Damped-H3PuZwKV.js +0 -152
- package/lib/SourceManager-tmQlXkSD.cjs +0 -1
- package/lib/Store-qq7IjRLE.js +0 -136
- package/lib/Store-txkR3wXU.cjs +0 -1
- package/lib/WheelControls-9ZQKSYYq.js +0 -83
- package/lib/WheelControls-TYhGU6oA.cjs +0 -1
- package/lib/canvas-2d/index.cjs +0 -5
- package/lib/canvas-2d/index.js +0 -90
- package/lib/element-constructor/specialObjects.d.ts +0 -2
- package/lib/measurer/CumulativeOffsetLeft.d.ts +0 -4
- package/lib/measurer/CumulativeOffsetTop.d.ts +0 -4
- package/lib/measurer/Meaurer.d.ts +0 -8
- package/lib/measurer/index.cjs +0 -1
- package/lib/measurer/index.d.ts +0 -3
- package/lib/measurer/index.js +0 -48
- package/lib/number-2bR0KBcX.cjs +0 -1
- package/lib/number-bCHB2GAD.js +0 -31
- package/lib/resizer/index.cjs +0 -1
- package/lib/resizer/index.d.ts +0 -10
- package/lib/resizer/index.js +0 -45
- package/lib/string-GmxZA5Nq.js +0 -31
- package/lib/string-WmNOGq16.cjs +0 -1
- package/lib/utils/dev.d.ts +0 -3
- /package/lib/{attributes-w0u-KiIb.js → attributes-69we3byR.js} +0 -0
- /package/lib/{attributes-_2U65GDl.cjs → attributes-Bf2svn4j.cjs} +0 -0
- /package/lib/{browser-S4eq8AeN.js → browser-0zX67oeU.js} +0 -0
- /package/lib/{browser-QbF6EW-w.cjs → browser-CpzFX2xg.cjs} +0 -0
- /package/lib/{dom-bHEwc_xV.js → dom-BY7JhTx5.js} +0 -0
- /package/lib/{dom-QhWsdQS2.cjs → dom-qY2LdCVL.cjs} +0 -0
- /package/lib/{easings-uF-tgahf.js → easings-BKi40vHz.js} +0 -0
- /package/lib/{easings-_wFs9ZWc.cjs → easings-DsS5-Kqc.cjs} +0 -0
- /package/lib/{function-zwSFehNd.js → function-C10DGppn.js} +0 -0
- /package/lib/{function-QP7IreXR.cjs → function-MthRj-GJ.cjs} +0 -0
- /package/lib/{layout-rZzbsLPd.cjs → layout-8ryRAMGJ.cjs} +0 -0
- /package/lib/{layout-5SJlcXTY.js → layout-HoBT_Da2.js} +0 -0
- /package/lib/{math-_a3IpKOc.js → math-BOBiC4TN.js} +0 -0
- /package/lib/{math-FNUBmQPK.cjs → math-GDWEqu7y.cjs} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StoreOptions, StoreEntry, Store } from '../store';
|
|
2
2
|
import { TickerCallbackEntry, TickerAddOptions } from '../ticker';
|
|
3
|
-
export interface AnimatedOptions extends StoreOptions<number>, TickerAddOptions {
|
|
4
|
-
min?: number |
|
|
5
|
-
max?: number |
|
|
3
|
+
export interface AnimatedOptions extends StoreOptions<number, 'number'>, TickerAddOptions {
|
|
4
|
+
min?: number | Store<number>;
|
|
5
|
+
max?: number | Store<number>;
|
|
6
|
+
default?: number;
|
|
6
7
|
}
|
|
7
|
-
export type AnimatedEdgeFunction = () => number;
|
|
8
8
|
export interface AnimatedEntry extends StoreEntry<number> {
|
|
9
9
|
min: number;
|
|
10
10
|
max: number;
|
|
@@ -13,23 +13,20 @@ export interface AnimatedEntry extends StoreEntry<number> {
|
|
|
13
13
|
direction: number;
|
|
14
14
|
speed: number;
|
|
15
15
|
}
|
|
16
|
-
export declare abstract class Animated<Entry extends AnimatedEntry = AnimatedEntry> extends Store<number, Entry> {
|
|
16
|
+
export declare abstract class Animated<Entry extends AnimatedEntry = AnimatedEntry> extends Store<number, 'number', Entry> {
|
|
17
17
|
#private;
|
|
18
18
|
constructor(options?: AnimatedOptions);
|
|
19
19
|
get target(): number;
|
|
20
|
-
get isRunning(): Store<boolean, StoreEntry<boolean>>;
|
|
20
|
+
get isRunning(): Store<boolean, keyof import('../store').StoreManagers, StoreEntry<boolean>>;
|
|
21
21
|
get direction(): number;
|
|
22
22
|
get maxFPS(): number | undefined;
|
|
23
23
|
get speed(): number;
|
|
24
|
-
get min(): number
|
|
25
|
-
|
|
26
|
-
get max(): number;
|
|
27
|
-
set max(value: number | AnimatedEdgeFunction | undefined);
|
|
24
|
+
get min(): Store<number, keyof import('../store').StoreManagers, StoreEntry<number>>;
|
|
25
|
+
get max(): Store<number, keyof import('../store').StoreManagers, StoreEntry<number>>;
|
|
28
26
|
get delta(): number;
|
|
29
27
|
get progress(): number;
|
|
30
28
|
get entry(): Entry;
|
|
31
|
-
get
|
|
32
|
-
set setter(animated: Animated | undefined);
|
|
29
|
+
get updater(): Store<Animated<AnimatedEntry> | null, keyof import('../store').StoreManagers, StoreEntry<Animated<AnimatedEntry> | null>>;
|
|
33
30
|
set(value: number, equalize?: boolean): void;
|
|
34
31
|
shift(value: number, equalize?: boolean): void;
|
|
35
32
|
close(): void;
|
|
@@ -10,7 +10,7 @@ export declare class Tweened extends Animated {
|
|
|
10
10
|
start(): void;
|
|
11
11
|
pause(): void;
|
|
12
12
|
stop(): void;
|
|
13
|
-
get max(): number
|
|
13
|
+
get max(): import("../store").Store<number, keyof import("../store").StoreManagers, import("../store").StoreEntry<number>>;
|
|
14
14
|
protected update(): void;
|
|
15
15
|
protected handleAnimationFrame(e: TickerCallbackEntry): void;
|
|
16
16
|
}
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty,
|
|
1
|
+
"use strict";var h=Object.defineProperty,c=Object.defineProperties;var l=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var i=(a,t,e)=>t in a?h(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,n=(a,t)=>{for(var e in t||(t={}))g.call(t,e)&&i(a,e,t[e]);if(r)for(var e of r(t))A.call(t,e)&&i(a,e,t[e]);return a},s=(a,t)=>c(a,l(t));var m=(a,t,e)=>(i(a,typeof t!="symbol"?t+"":t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../Animated-DyZuTEQE.cjs"),x=require("../easings-DsS5-Kqc.cjs"),F=require("../Damped-AHRBHNEQ.cjs");class f extends d.Animated{constructor(e){super(s(n({},e),{min:(e==null?void 0:e.min)||0,max:(e==null?void 0:e.max)||1e3}));m(this,"easing");this.easing=(e==null?void 0:e.easing)||x.linear}start(){this.listenAnimationFrame()}pause(){this.unlistenAnimationFrame()}stop(){this.reset()}get max(){return super.max}update(){const e=(this.target-this.min.current)/(this.delta||1),u=this.easing(e);this.current=this.min.current+u*this.delta}handleAnimationFrame(e){this.shift(e.elapsed),(e.elapsed&&this.current===0||this.current===this.delta)&&this.unlistenAnimationFrame()}}exports.Animated=d.Animated;exports.Damped=F.Damped;exports.Tweened=f;
|
package/lib/animation/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Animated, type AnimatedOptions, type
|
|
1
|
+
export { Animated, type AnimatedOptions, type AnimatedEntry } from './Animated';
|
|
2
2
|
export { Tweened, type TweenedOptions } from './Tweened';
|
|
3
3
|
export { Damped, type DampedOptions } from './Damped';
|
package/lib/animation/index.js
CHANGED
|
@@ -2,27 +2,21 @@ var d = Object.defineProperty, l = Object.defineProperties;
|
|
|
2
2
|
var u = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var i = Object.getOwnPropertySymbols;
|
|
4
4
|
var c = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var r = (a, t, e) => t in a ? d(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e,
|
|
5
|
+
var r = (a, t, e) => t in a ? d(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, s = (a, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
7
|
c.call(t, e) && r(a, e, t[e]);
|
|
8
8
|
if (i)
|
|
9
9
|
for (var e of i(t))
|
|
10
10
|
x.call(t, e) && r(a, e, t[e]);
|
|
11
11
|
return a;
|
|
12
|
-
},
|
|
12
|
+
}, m = (a, t) => l(a, u(t));
|
|
13
13
|
var n = (a, t, e) => (r(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
-
import { A as g } from "../
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
import "../number-bCHB2GAD.js";
|
|
19
|
-
import "../Store-qq7IjRLE.js";
|
|
20
|
-
import "../browser-S4eq8AeN.js";
|
|
21
|
-
import "../ticker/index.js";
|
|
22
|
-
import "../intersector/index.js";
|
|
23
|
-
class k extends g {
|
|
14
|
+
import { A as g } from "../Animated-CJcYqJzq.js";
|
|
15
|
+
import { l as A } from "../easings-BKi40vHz.js";
|
|
16
|
+
import { D as b } from "../Damped-Csj-9_gH.js";
|
|
17
|
+
class w extends g {
|
|
24
18
|
constructor(e) {
|
|
25
|
-
super(s(
|
|
19
|
+
super(m(s({}, e), {
|
|
26
20
|
min: (e == null ? void 0 : e.min) || 0,
|
|
27
21
|
max: (e == null ? void 0 : e.max) || 1e3
|
|
28
22
|
}));
|
|
@@ -42,8 +36,8 @@ class k extends g {
|
|
|
42
36
|
return super.max;
|
|
43
37
|
}
|
|
44
38
|
update() {
|
|
45
|
-
const e = (this.target - this.min) / (this.delta || 1), h = this.easing(e);
|
|
46
|
-
this.current = this.min + h * this.delta;
|
|
39
|
+
const e = (this.target - this.min.current) / (this.delta || 1), h = this.easing(e);
|
|
40
|
+
this.current = this.min.current + h * this.delta;
|
|
47
41
|
}
|
|
48
42
|
handleAnimationFrame(e) {
|
|
49
43
|
this.shift(e.elapsed), (e.elapsed && this.current === 0 || this.current === this.delta) && this.unlistenAnimationFrame();
|
|
@@ -51,6 +45,6 @@ class k extends g {
|
|
|
51
45
|
}
|
|
52
46
|
export {
|
|
53
47
|
g as Animated,
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
b as Damped,
|
|
49
|
+
w as Tweened
|
|
56
50
|
};
|
package/lib/attribute/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m=(s,r,e)=>{if(!r.has(s))throw TypeError("Cannot "+e)};var t=(s,r,e)=>(m(s,r,"read from private field"),e?e.call(s):r.get(s)),u=(s,r,e)=>{if(r.has(s))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(s):r.set(s,e)},h=(s,r,e,f)=>(m(s,r,"write to private field"),f?f.call(s,e):r.set(s,e),e);var o=(s,r,e)=>(m(s,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../Store-D0_rDIsE.cjs"),q=require("../attributes-Bf2svn4j.cjs"),C=require("../browser-CpzFX2xg.cjs"),p=require("../dom-qY2LdCVL.cjs");var i,n,b,a,c,l,w,d,y;class z extends S.Store{constructor(e,f,O,v){super(O,v);u(this,l);u(this,d);u(this,i,null);u(this,n,void 0);u(this,b,null);u(this,a,null);u(this,c,!1);h(this,n,f),C.isBrowser&&(h(this,i,p.getElement(e)),v!=null&&v.sync&&this.subscribe(g=>{t(this,i).setAttribute(t(this,n),g.current.toString())}),h(this,b,new MutationObserver(g=>{g.forEach(A=>{A.type==="attributes"&&A.attributeName===t(this,n)&&o(this,l,w).call(this)})})),h(this,a,new ResizeObserver(()=>{t(this,i).isConnected&&!t(this,c)?t(this,b).observe(t(this,i),{attributes:!0}):!t(this,i).isConnected&&t(this,c)&&(t(this,b).disconnect(),t(this,a).disconnect()),h(this,c,t(this,i).isConnected)})))}get current(){return o(this,d,y).call(this),super.current}set current(e){super.current=e}subscribe(e){return o(this,d,y).call(this),super.subscribe(e)}}i=new WeakMap,n=new WeakMap,b=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakSet,w=function(){const e=t(this,i).getAttribute(t(this,n));e!=null&&(this.current=q.parseAttributeValue(e))},d=new WeakSet,y=function(){t(this,c)||(o(this,l,w).call(this),t(this,a).observe(t(this,i)))};exports.Attribute=z;
|
package/lib/attribute/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Store, StoreOptions } from '../store';
|
|
1
|
+
import { Store, StoreCallback, StoreEntry, StoreOptions } from '../store';
|
|
2
2
|
import { ElementOrSelector } from '../utils';
|
|
3
|
+
export interface AttributeOptions<T> extends StoreOptions<T> {
|
|
4
|
+
sync?: boolean;
|
|
5
|
+
}
|
|
3
6
|
export declare class Attribute<T extends string | number | boolean> extends Store<T> {
|
|
4
7
|
#private;
|
|
5
|
-
constructor(elementOrSelector: ElementOrSelector, name: string, defaultValue: T, options?:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
constructor(elementOrSelector: ElementOrSelector, name: string, defaultValue: T, options?: AttributeOptions<T>);
|
|
9
|
+
get current(): T;
|
|
10
|
+
set current(value: T);
|
|
11
|
+
subscribe(callback: StoreCallback<StoreEntry<T>>): () => void;
|
|
8
12
|
}
|
package/lib/attribute/index.js
CHANGED
|
@@ -1,47 +1,56 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
1
|
+
var v = (s, r, t) => {
|
|
2
|
+
if (!r.has(s))
|
|
3
3
|
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var e = (s, r, t) => (v(s, r, "read from private field"), t ? t.call(s) : r.get(s)), u = (s, r, t) => {
|
|
6
|
+
if (r.has(s))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
var
|
|
11
|
-
import { S as
|
|
12
|
-
import { p as
|
|
13
|
-
import { i as
|
|
14
|
-
import { g as
|
|
15
|
-
var
|
|
16
|
-
class
|
|
17
|
-
constructor(t,
|
|
18
|
-
super(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
r instanceof WeakSet ? r.add(s) : r.set(s, t);
|
|
9
|
+
}, c = (s, r, t, m) => (v(s, r, "write to private field"), m ? m.call(s, t) : r.set(s, t), t);
|
|
10
|
+
var o = (s, r, t) => (v(s, r, "access private method"), t);
|
|
11
|
+
import { S as O } from "../Store-JOKrNVEr.js";
|
|
12
|
+
import { p as y } from "../attributes-69we3byR.js";
|
|
13
|
+
import { i as S } from "../browser-0zX67oeU.js";
|
|
14
|
+
import { g as x } from "../dom-BY7JhTx5.js";
|
|
15
|
+
var i, h, a, b, n, f, g, l, w;
|
|
16
|
+
class N extends O {
|
|
17
|
+
constructor(t, m, C, d) {
|
|
18
|
+
super(C, d);
|
|
19
|
+
u(this, f);
|
|
20
|
+
u(this, l);
|
|
21
|
+
u(this, i, null);
|
|
22
|
+
u(this, h, void 0);
|
|
23
|
+
u(this, a, null);
|
|
24
|
+
u(this, b, null);
|
|
25
|
+
u(this, n, !1);
|
|
26
|
+
c(this, h, m), S && (c(this, i, x(t)), d != null && d.sync && this.subscribe((p) => {
|
|
27
|
+
e(this, i).setAttribute(e(this, h), p.current.toString());
|
|
28
|
+
}), c(this, a, new MutationObserver((p) => {
|
|
29
|
+
p.forEach((A) => {
|
|
30
|
+
A.type === "attributes" && A.attributeName === e(this, h) && o(this, f, g).call(this);
|
|
29
31
|
});
|
|
32
|
+
})), c(this, b, new ResizeObserver(() => {
|
|
33
|
+
e(this, i).isConnected && !e(this, n) ? e(this, a).observe(e(this, i), {
|
|
34
|
+
attributes: !0
|
|
35
|
+
}) : !e(this, i).isConnected && e(this, n) && (e(this, a).disconnect(), e(this, b).disconnect()), c(this, n, e(this, i).isConnected);
|
|
30
36
|
})));
|
|
31
37
|
}
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
get current() {
|
|
39
|
+
return o(this, l, w).call(this), super.current;
|
|
34
40
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
set current(t) {
|
|
42
|
+
super.current = t;
|
|
43
|
+
}
|
|
44
|
+
subscribe(t) {
|
|
45
|
+
return o(this, l, w).call(this), super.subscribe(t);
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
|
-
|
|
42
|
-
const t =
|
|
43
|
-
t != null && (this.current =
|
|
48
|
+
i = new WeakMap(), h = new WeakMap(), a = new WeakMap(), b = new WeakMap(), n = new WeakMap(), f = new WeakSet(), g = function() {
|
|
49
|
+
const t = e(this, i).getAttribute(e(this, h));
|
|
50
|
+
t != null && (this.current = y(t));
|
|
51
|
+
}, l = new WeakSet(), w = function() {
|
|
52
|
+
e(this, n) || (o(this, f, g).call(this), e(this, b).observe(e(this, i)));
|
|
44
53
|
};
|
|
45
54
|
export {
|
|
46
|
-
|
|
55
|
+
N as Attribute
|
|
47
56
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../custom-element/index.cjs"),R=require("../ElementConstructor-9f-12v7T.cjs"),M=require("../htmlTags-BSQys9wH.cjs"),W=require("../createStylesheet-uicRVW05.cjs"),y=require("../math-GDWEqu7y.cjs"),b=require("../notifier/index.cjs"),x=require("../element-resizer/index.cjs"),E=require("../ticker/index.cjs");var q=Object.defineProperty,S=Object.getOwnPropertyDescriptor,P=(i,e,s,r)=>{for(var h=r>1?void 0:r?S(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(h=(r?g(e,s,h):g(h))||h);return r&&h&&q(e,s,h),h},C=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(C(i,e,"read from private field"),s?s.call(i):e.get(i)),n=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},c=(i,e,s,r)=>(C(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s),p,a,d,l,o,u,v,_,m,w;const O=W.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends k.CustomElement{constructor(){super(),n(this,p,new b.Notifier),n(this,a,null),n(this,d,null),n(this,l,0),n(this,o,0),n(this,u,1),n(this,v,0),n(this,_,1),n(this,m,e=>{c(this,u,y.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,a).width=t(this,l)*this.pixelRatio,t(this,a).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),this.renderEvent.notify(this.detail)}),n(this,w,e=>{c(this,v,e.timestamp),c(this,_,e.elapsed),t(this,p).notify(this.detail)}),this.openShadow(O),R.element(this,{shadowChildren:M.canvas({ref:e=>{c(this,a,e),c(this,d,e.getContext("2d"))}})})}get renderEvent(){return t(this,p)}get canvasElement(){return t(this,a)}get context(){return t(this,d)}get pixelRatio(){return t(this,u)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,a),pixelRatio:t(this,u),context:t(this,d),timestamp:t(this,v),elapsed:t(this,_)}}connectedCallback(){x.elementResizer.subscribe(this,t(this,m)),this.hasAttribute("static")||E.ticker.subscribe(t(this,w),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){x.elementResizer.unsubscribe(t(this,m)),E.ticker.unsubscribe(t(this,w)),t(this,p).close(),t(this,a).remove()}};p=new WeakMap;a=new WeakMap;d=new WeakMap;l=new WeakMap;o=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;m=new WeakMap;w=new WeakMap;exports.CanvasElement=P([k.define("e-canvas")],exports.CanvasElement);
|
|
@@ -5,14 +5,15 @@ export interface Canvas2DRenderEntry {
|
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
element: HTMLElement;
|
|
8
|
-
canvasElement:
|
|
8
|
+
canvasElement: HTMLCanvasElement;
|
|
9
9
|
context: CanvasRenderingContext2D;
|
|
10
10
|
timestamp: number;
|
|
11
11
|
elapsed: number;
|
|
12
12
|
}
|
|
13
13
|
export type Canvas2DRenderCallback = (entry: Canvas2DRenderEntry) => void;
|
|
14
|
-
export declare class
|
|
14
|
+
export declare class CanvasElement extends CustomElement {
|
|
15
15
|
#private;
|
|
16
|
+
constructor();
|
|
16
17
|
get renderEvent(): Notifier<Canvas2DRenderCallback>;
|
|
17
18
|
get canvasElement(): HTMLCanvasElement;
|
|
18
19
|
get context(): CanvasRenderingContext2D;
|
|
@@ -25,6 +26,6 @@ export declare class Canvas2DElement extends CustomElement {
|
|
|
25
26
|
}
|
|
26
27
|
declare global {
|
|
27
28
|
interface HTMLElementTagNameMap {
|
|
28
|
-
'canvas
|
|
29
|
+
'e-canvas': CanvasElement;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CustomElement as C, define as E } from "../custom-element/index.js";
|
|
2
|
+
import { e as M } from "../ElementConstructor-CoKM2CTK.js";
|
|
3
|
+
import { c as y } from "../htmlTags-BCNUG7oK.js";
|
|
4
|
+
import { c as b } from "../createStylesheet-BON7aJYs.js";
|
|
5
|
+
import { c as P } from "../math-BOBiC4TN.js";
|
|
6
|
+
import { Notifier as S } from "../notifier/index.js";
|
|
7
|
+
import { elementResizer as x } from "../element-resizer/index.js";
|
|
8
|
+
import { ticker as k } from "../ticker/index.js";
|
|
9
|
+
var A = Object.defineProperty, O = Object.getOwnPropertyDescriptor, z = (t, i, s, r) => {
|
|
10
|
+
for (var n = r > 1 ? void 0 : r ? O(i, s) : i, _ = t.length - 1, g; _ >= 0; _--)
|
|
11
|
+
(g = t[_]) && (n = (r ? g(i, s, n) : g(n)) || n);
|
|
12
|
+
return r && n && A(i, s, n), n;
|
|
13
|
+
}, W = (t, i, s) => {
|
|
14
|
+
if (!i.has(t))
|
|
15
|
+
throw TypeError("Cannot " + s);
|
|
16
|
+
}, e = (t, i, s) => (W(t, i, "read from private field"), s ? s.call(t) : i.get(t)), a = (t, i, s) => {
|
|
17
|
+
if (i.has(t))
|
|
18
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
19
|
+
i instanceof WeakSet ? i.add(t) : i.set(t, s);
|
|
20
|
+
}, o = (t, i, s, r) => (W(t, i, "write to private field"), r ? r.call(t, s) : i.set(t, s), s), l, h, d, p, c, m, v, f, u, w;
|
|
21
|
+
const D = b({
|
|
22
|
+
":host, canvas": {
|
|
23
|
+
display: "block",
|
|
24
|
+
width: "100%",
|
|
25
|
+
height: "100%"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
let R = class extends C {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(), a(this, l, new S()), a(this, h, null), a(this, d, null), a(this, p, 0), a(this, c, 0), a(this, m, 1), a(this, v, 0), a(this, f, 1), a(this, u, (t) => {
|
|
31
|
+
o(this, m, P(devicePixelRatio, 1, 2)), o(this, p, t.contentRect.width), o(this, c, t.contentRect.height), e(this, h).width = e(this, p) * this.pixelRatio, e(this, h).height = e(this, c) * this.pixelRatio, this.context.scale(this.pixelRatio, this.pixelRatio), this.renderEvent.notify(this.detail);
|
|
32
|
+
}), a(this, w, (t) => {
|
|
33
|
+
o(this, v, t.timestamp), o(this, f, t.elapsed), e(this, l).notify(this.detail);
|
|
34
|
+
}), this.openShadow(D), M(this, {
|
|
35
|
+
shadowChildren: y({
|
|
36
|
+
ref: (t) => {
|
|
37
|
+
o(this, h, t), o(this, d, t.getContext("2d"));
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
get renderEvent() {
|
|
43
|
+
return e(this, l);
|
|
44
|
+
}
|
|
45
|
+
get canvasElement() {
|
|
46
|
+
return e(this, h);
|
|
47
|
+
}
|
|
48
|
+
get context() {
|
|
49
|
+
return e(this, d);
|
|
50
|
+
}
|
|
51
|
+
get pixelRatio() {
|
|
52
|
+
return e(this, m);
|
|
53
|
+
}
|
|
54
|
+
get width() {
|
|
55
|
+
return e(this, p);
|
|
56
|
+
}
|
|
57
|
+
get height() {
|
|
58
|
+
return e(this, c);
|
|
59
|
+
}
|
|
60
|
+
get detail() {
|
|
61
|
+
return {
|
|
62
|
+
width: e(this, p),
|
|
63
|
+
height: e(this, c),
|
|
64
|
+
element: this,
|
|
65
|
+
canvasElement: e(this, h),
|
|
66
|
+
pixelRatio: e(this, m),
|
|
67
|
+
context: e(this, d),
|
|
68
|
+
timestamp: e(this, v),
|
|
69
|
+
elapsed: e(this, f)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
connectedCallback() {
|
|
73
|
+
x.subscribe(this, e(this, u)), this.hasAttribute("static") || k.subscribe(e(this, w), {
|
|
74
|
+
culling: this,
|
|
75
|
+
maxFPS: this.hasAttribute("fps") ? parseInt(this.getAttribute("fps")) : void 0
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
x.unsubscribe(e(this, u)), k.unsubscribe(e(this, w)), e(this, l).close(), e(this, h).remove();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
l = /* @__PURE__ */ new WeakMap();
|
|
83
|
+
h = /* @__PURE__ */ new WeakMap();
|
|
84
|
+
d = /* @__PURE__ */ new WeakMap();
|
|
85
|
+
p = /* @__PURE__ */ new WeakMap();
|
|
86
|
+
c = /* @__PURE__ */ new WeakMap();
|
|
87
|
+
m = /* @__PURE__ */ new WeakMap();
|
|
88
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
89
|
+
f = /* @__PURE__ */ new WeakMap();
|
|
90
|
+
u = /* @__PURE__ */ new WeakMap();
|
|
91
|
+
w = /* @__PURE__ */ new WeakMap();
|
|
92
|
+
R = z([
|
|
93
|
+
E("e-canvas")
|
|
94
|
+
], R);
|
|
95
|
+
export {
|
|
96
|
+
R as CanvasElement
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var C=(t,n,e)=>{if(!n.has(t))throw TypeError("Cannot "+e)};var s=(t,n,e)=>(C(t,n,"read from private field"),e?e.call(t):n.get(t)),o=(t,n,e)=>{if(n.has(t))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(t):n.set(t,e)},r=(t,n,e,a)=>(C(t,n,"write to private field"),a?a.call(t,e):n.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../browser-CpzFX2xg.cjs");var i,l,d;class b{constructor(){o(this,i,[]);o(this,l,void 0);o(this,d,()=>{var n,e;for(let a=0;a<s(this,i).length;a++){const c=s(this,i)[a];c.node.isConnected&&!c.isConnected?((n=c.connectCallback)==null||n.call(c),c.isConnected=!0):!c.node.isConnected&&c.isConnected&&((e=c.disconnectCallback)==null||e.call(c),c.isConnected=!1,c.unsubscribeAfterDisconnect&&this.unsubscribe(c)),c.timer+=100,!c.isConnected&&c.timer>c.maxWaitSec*1e3&&this.unsubscribe(c)}});f.isBrowser&&r(this,l,setInterval(s(this,d),100))}subscribe(n,e){return s(this,i).push({node:n,connectCallback:e.connectCallback,disconnectCallback:e.disconnectCallback,isConnected:!1,maxWaitSec:e.maxWaitSec||1/0,timer:0,unsubscribeAfterDisconnect:e.unsubscribeAfterDisconnect||!1}),()=>{this.unsubscribe(e)}}unsubscribe(n){s(this,i).forEach(e=>{e.connectCallback===n.connectCallback&&(e.connectCallback=void 0),e.disconnectCallback===n.disconnectCallback&&(e.disconnectCallback=void 0)}),r(this,i,s(this,i).filter(e=>e.connectCallback&&e.disconnectCallback))}destroy(){clearInterval(s(this,l)),r(this,i,[])}}i=new WeakMap,l=new WeakMap,d=new WeakMap;const u=new b;exports.Connector=b;exports.connector=u;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ConnectorCallback = () => void;
|
|
2
|
+
export interface ConnectorOptions {
|
|
3
|
+
connectCallback?: ConnectorCallback;
|
|
4
|
+
disconnectCallback?: ConnectorCallback;
|
|
5
|
+
maxWaitSec?: number;
|
|
6
|
+
unsubscribeAfterDisconnect?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class Connector {
|
|
9
|
+
#private;
|
|
10
|
+
constructor();
|
|
11
|
+
subscribe(node: Node, options: ConnectorOptions): () => void;
|
|
12
|
+
unsubscribe(options: ConnectorOptions): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const connector: Connector;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var d = (t, c, e) => {
|
|
2
|
+
if (!c.has(t))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
|
+
};
|
|
5
|
+
var s = (t, c, e) => (d(t, c, "read from private field"), e ? e.call(t) : c.get(t)), o = (t, c, e) => {
|
|
6
|
+
if (c.has(t))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
c instanceof WeakSet ? c.add(t) : c.set(t, e);
|
|
9
|
+
}, r = (t, c, e, a) => (d(t, c, "write to private field"), a ? a.call(t, e) : c.set(t, e), e);
|
|
10
|
+
import { i as b } from "../browser-0zX67oeU.js";
|
|
11
|
+
var i, l, C;
|
|
12
|
+
class f {
|
|
13
|
+
constructor() {
|
|
14
|
+
o(this, i, []);
|
|
15
|
+
o(this, l, void 0);
|
|
16
|
+
o(this, C, () => {
|
|
17
|
+
var c, e;
|
|
18
|
+
for (let a = 0; a < s(this, i).length; a++) {
|
|
19
|
+
const n = s(this, i)[a];
|
|
20
|
+
n.node.isConnected && !n.isConnected ? ((c = n.connectCallback) == null || c.call(n), n.isConnected = !0) : !n.node.isConnected && n.isConnected && ((e = n.disconnectCallback) == null || e.call(n), n.isConnected = !1, n.unsubscribeAfterDisconnect && this.unsubscribe(n)), n.timer += 100, !n.isConnected && n.timer > n.maxWaitSec * 1e3 && this.unsubscribe(n);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
b && r(this, l, setInterval(s(this, C), 100));
|
|
24
|
+
}
|
|
25
|
+
subscribe(c, e) {
|
|
26
|
+
return s(this, i).push({
|
|
27
|
+
node: c,
|
|
28
|
+
connectCallback: e.connectCallback,
|
|
29
|
+
disconnectCallback: e.disconnectCallback,
|
|
30
|
+
isConnected: !1,
|
|
31
|
+
maxWaitSec: e.maxWaitSec || 1 / 0,
|
|
32
|
+
timer: 0,
|
|
33
|
+
unsubscribeAfterDisconnect: e.unsubscribeAfterDisconnect || !1
|
|
34
|
+
}), () => {
|
|
35
|
+
this.unsubscribe(e);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
unsubscribe(c) {
|
|
39
|
+
s(this, i).forEach((e) => {
|
|
40
|
+
e.connectCallback === c.connectCallback && (e.connectCallback = void 0), e.disconnectCallback === c.disconnectCallback && (e.disconnectCallback = void 0);
|
|
41
|
+
}), r(this, i, s(this, i).filter(
|
|
42
|
+
(e) => e.connectCallback && e.disconnectCallback
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
destroy() {
|
|
46
|
+
clearInterval(s(this, l)), r(this, i, []);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
i = new WeakMap(), l = new WeakMap(), C = new WeakMap();
|
|
50
|
+
const u = new f();
|
|
51
|
+
export {
|
|
52
|
+
f as Connector,
|
|
53
|
+
u as connector
|
|
54
|
+
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { Axes2D } from '../utils';
|
|
2
2
|
import { Controls } from './Controls';
|
|
3
|
+
export type WheelControlsAxis = Axes2D | 'max';
|
|
3
4
|
export interface WheelControlsOptions {
|
|
4
|
-
axis?:
|
|
5
|
+
axis?: WheelControlsAxis;
|
|
5
6
|
speed?: number;
|
|
6
7
|
debounce?: boolean;
|
|
7
8
|
element?: HTMLElement;
|
|
8
9
|
}
|
|
9
10
|
export declare class WheelControls extends Controls {
|
|
10
11
|
#private;
|
|
11
|
-
axis:
|
|
12
|
+
axis: WheelControlsAxis;
|
|
12
13
|
speed: number;
|
|
13
14
|
debounce: boolean;
|
|
14
15
|
constructor(options?: WheelControlsOptions);
|
package/lib/controls/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var d=(s,e,r)=>e in s?a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var l=(s,e,r)=>(d(s,typeof e!="symbol"?e+"":e,r),r),C=(s,e,r)=>{if(!e.has(s))throw TypeError("Cannot "+r)};var n=(s,e,r)=>(C(s,e,"read from private field"),r?r.call(s):e.get(s)),c=(s,e,r)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,r)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../WheelControls-CfDeGCOU.cjs"),i=require("../ticker/index.cjs");var t;class u extends o.Controls{constructor(r){super();l(this,"speed");c(this,t,r=>{this.changeEvent.notify(r.elapsed*this.speed)});this.speed=(r==null?void 0:r.speed)||1}connect(){i.ticker.subscribe(n(this,t))}disconnect(){i.ticker.unsubscribe(n(this,t))}}t=new WeakMap;exports.Controls=o.Controls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=u;
|
package/lib/controls/index.js
CHANGED
|
@@ -1,42 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
if (!e.has(
|
|
5
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var l = (r, e, s) => e in r ? i(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
|
|
3
|
+
var a = (r, e, s) => (l(r, typeof e != "symbol" ? e + "" : e, s), s), d = (r, e, s) => {
|
|
4
|
+
if (!e.has(r))
|
|
5
|
+
throw TypeError("Cannot " + s);
|
|
6
6
|
};
|
|
7
|
-
var o = (
|
|
8
|
-
if (e.has(
|
|
7
|
+
var o = (r, e, s) => (d(r, e, "read from private field"), s ? s.call(r) : e.get(r)), n = (r, e, s) => {
|
|
8
|
+
if (e.has(r))
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
|
10
|
-
e instanceof WeakSet ? e.add(
|
|
10
|
+
e instanceof WeakSet ? e.add(r) : e.set(r, s);
|
|
11
11
|
};
|
|
12
|
-
import { C as
|
|
13
|
-
import { K as
|
|
14
|
-
import { ticker as
|
|
15
|
-
import "../browser-S4eq8AeN.js";
|
|
16
|
-
import "../dom-bHEwc_xV.js";
|
|
17
|
-
import "../notifier/index.js";
|
|
18
|
-
import "../intersector/index.js";
|
|
12
|
+
import { C as h } from "../WheelControls-CX9WUbBC.js";
|
|
13
|
+
import { K as x, W as k } from "../WheelControls-CX9WUbBC.js";
|
|
14
|
+
import { ticker as c } from "../ticker/index.js";
|
|
19
15
|
var t;
|
|
20
|
-
class
|
|
21
|
-
constructor(
|
|
16
|
+
class C extends h {
|
|
17
|
+
constructor(s) {
|
|
22
18
|
super();
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.changeEvent.notify(
|
|
19
|
+
a(this, "speed");
|
|
20
|
+
n(this, t, (s) => {
|
|
21
|
+
this.changeEvent.notify(s.elapsed * this.speed);
|
|
26
22
|
});
|
|
27
|
-
this.speed = (
|
|
23
|
+
this.speed = (s == null ? void 0 : s.speed) || 1;
|
|
28
24
|
}
|
|
29
25
|
connect() {
|
|
30
|
-
|
|
26
|
+
c.subscribe(o(this, t));
|
|
31
27
|
}
|
|
32
28
|
disconnect() {
|
|
33
|
-
|
|
29
|
+
c.unsubscribe(o(this, t));
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
t = new WeakMap();
|
|
37
33
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
h as Controls,
|
|
35
|
+
x as KeyboardControls,
|
|
36
|
+
C as LinearControls,
|
|
37
|
+
k as WheelControls
|
|
42
38
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./htmlTags-BSQys9wH.cjs");function r(t){const e=new CSSStyleSheet;return e.replaceSync(n.style(t).rootElements[0].innerHTML),e}exports.createStylesheet=r;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { c as l } from "./string-BrDhnNUL.js";
|
|
2
|
+
function m(r, a) {
|
|
3
|
+
const f = (a == null ? void 0 : a.prefix) || "", c = {
|
|
4
|
+
style: {}
|
|
5
|
+
};
|
|
6
|
+
for (const e in r)
|
|
7
|
+
c[e] = {
|
|
8
|
+
var: `var(--${f}${l(e)})`,
|
|
9
|
+
value: r[e]
|
|
10
|
+
}, c.style[`--${f}${l(e)}`] = r[e];
|
|
11
|
+
return c;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
m as c
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("./string-DzUwFYSS.cjs");function s(r,a){const t=(a==null?void 0:a.prefix)||"",c={style:{}};for(const e in r)c[e]={var:`var(--${t}${l.camelToKebab(e)})`,value:r[e]},c.style[`--${t}${l.camelToKebab(e)}`]=r[e];return c}exports.createTheme=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../browser-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../browser-CpzFX2xg.cjs");function n(s,e){return function(o){t.isBrowser&&!customElements.get(s)&&customElements.define(s,o,{extends:e})}}const d=t.isBrowser?window.HTMLElement:class{attachShadow(){}};class i extends d{openShadow(...e){if(!this.shadowRoot&&t.isBrowser){const o=this.attachShadow({mode:"open"});return this.addStylesheet(...e),o}return this.shadowRoot}addStylesheet(...e){this.shadowRoot&&t.isBrowser&&this.shadowRoot.adoptedStyleSheets.push(...e)}}exports.CustomElement=i;exports.define=n;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export declare function define(name: string): (Constructor: CustomElementConstructor) => void;
|
|
1
|
+
export declare function define(name: string, extend?: keyof HTMLElementTagNameMap): (Constructor: CustomElementConstructor) => void;
|
|
2
2
|
declare const HTMLElement: {
|
|
3
3
|
new (): HTMLElement;
|
|
4
4
|
prototype: HTMLElement;
|
|
5
5
|
};
|
|
6
6
|
export declare class CustomElement extends HTMLElement {
|
|
7
|
+
openShadow(...stylesheets: Array<CSSStyleSheet>): ShadowRoot;
|
|
8
|
+
addStylesheet(...stylesheets: Array<CSSStyleSheet>): void;
|
|
7
9
|
}
|
|
8
10
|
export {};
|