@mulsense/xnew 0.3.1 → 0.3.3

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.
Files changed (53) hide show
  1. package/dist/addons/xmatter.d.ts +2 -1
  2. package/dist/addons/xpixi.d.ts +3 -3
  3. package/dist/addons/xpixi.js +1 -6
  4. package/dist/addons/xpixi.mjs +1 -6
  5. package/dist/addons/xrapier2d.d.ts +2 -1
  6. package/dist/addons/xrapier2d.js +1 -1
  7. package/dist/addons/xrapier2d.mjs +1 -1
  8. package/dist/addons/xthree.d.ts +2 -1
  9. package/dist/xnew.d.ts +3 -2
  10. package/dist/xnew.js +19 -26
  11. package/dist/xnew.mjs +19 -26
  12. package/package.json +1 -1
  13. package/dist/types/audio/audio.d.ts +0 -64
  14. package/dist/types/audio/file.d.ts +0 -12
  15. package/dist/types/audio/loader.d.ts +0 -13
  16. package/dist/types/audio/synthesizer.d.ts +0 -41
  17. package/dist/types/basics/Accordion.d.ts +0 -20
  18. package/dist/types/basics/Audio.d.ts +0 -2
  19. package/dist/types/basics/Block.d.ts +0 -24
  20. package/dist/types/basics/Bullet.d.ts +0 -7
  21. package/dist/types/basics/ControlPanel.d.ts +0 -7
  22. package/dist/types/basics/Controller.d.ts +0 -19
  23. package/dist/types/basics/Drag.d.ts +0 -6
  24. package/dist/types/basics/Event.d.ts +0 -4
  25. package/dist/types/basics/File.d.ts +0 -1
  26. package/dist/types/basics/Input.d.ts +0 -8
  27. package/dist/types/basics/KeyEvent.d.ts +0 -2
  28. package/dist/types/basics/KeyboardEvent.d.ts +0 -2
  29. package/dist/types/basics/Modal.d.ts +0 -15
  30. package/dist/types/basics/Navigation.d.ts +0 -1
  31. package/dist/types/basics/Panel.d.ts +0 -6
  32. package/dist/types/basics/PointerEvent.d.ts +0 -2
  33. package/dist/types/basics/Popup.d.ts +0 -8
  34. package/dist/types/basics/ResizeEvent.d.ts +0 -2
  35. package/dist/types/basics/Screen.d.ts +0 -9
  36. package/dist/types/basics/SubWIndow.d.ts +0 -6
  37. package/dist/types/basics/Tab.d.ts +0 -24
  38. package/dist/types/basics/TabView.d.ts +0 -18
  39. package/dist/types/basics/Tabs.d.ts +0 -8
  40. package/dist/types/basics/Text.d.ts +0 -6
  41. package/dist/types/basics/Touch.d.ts +0 -28
  42. package/dist/types/basics/Transition.d.ts +0 -17
  43. package/dist/types/basics/UserEvent.d.ts +0 -2
  44. package/dist/types/basics/WorkSpace.d.ts +0 -16
  45. package/dist/types/core/audio.d.ts +0 -64
  46. package/dist/types/core/map.d.ts +0 -21
  47. package/dist/types/core/time.d.ts +0 -29
  48. package/dist/types/core/unit.d.ts +0 -93
  49. package/dist/types/core/util.d.ts +0 -1
  50. package/dist/types/core/xnew.d.ts +0 -150
  51. package/dist/types/icons/icons.d.ts +0 -327
  52. package/dist/types/index.d.ts +0 -48
  53. package/dist/types/xnew.d.ts +0 -8
@@ -3,4 +3,5 @@ declare const _default: {
3
3
  readonly engine: any;
4
4
  readonly world: any;
5
5
  };
6
- export default _default;
6
+
7
+ export { _default as default };
@@ -1,10 +1,10 @@
1
- import * as PIXI from 'pixi.js';
2
1
  declare const _default: {
3
2
  initialize({ renderer, canvas }?: any): void;
4
3
  nest(object: any): any;
5
- sync(canvas: any): PIXI.Texture<PIXI.TextureSource<any>>;
4
+ sync(canvas: any): any;
6
5
  readonly renderer: any;
7
6
  readonly scene: any;
8
7
  readonly canvas: any;
9
8
  };
10
- export default _default;
9
+
10
+ export { _default as default };
@@ -60,12 +60,7 @@
60
60
  antialias: true, backgroundAlpha: 0,
61
61
  });
62
62
  root.renderer = null;
63
- if (renderer instanceof Promise) {
64
- xnew.promise(renderer).then((renderer) => root.renderer = renderer);
65
- }
66
- else {
67
- root.renderer = renderer;
68
- }
63
+ xnew.promise(renderer, false).then((renderer) => root.renderer = renderer);
69
64
  root.updates = [];
70
65
  root.scene = new PIXI__namespace.Container();
71
66
  xnew.context('xpixi.object', root.scene);
@@ -38,12 +38,7 @@ function Root(self, { canvas }) {
38
38
  antialias: true, backgroundAlpha: 0,
39
39
  });
40
40
  root.renderer = null;
41
- if (renderer instanceof Promise) {
42
- xnew.promise(renderer).then((renderer) => root.renderer = renderer);
43
- }
44
- else {
45
- root.renderer = renderer;
46
- }
41
+ xnew.promise(renderer, false).then((renderer) => root.renderer = renderer);
47
42
  root.updates = [];
48
43
  root.scene = new PIXI.Container();
49
44
  xnew.context('xpixi.object', root.scene);
@@ -3,4 +3,5 @@ declare const _default: {
3
3
  connect(type: any, object: any): any;
4
4
  readonly world: any;
5
5
  };
6
- export default _default;
6
+
7
+ export { _default as default };
@@ -20,7 +20,7 @@
20
20
  function Root(self, { gravity, timestep }) {
21
21
  const root = {};
22
22
  xnew.context('xrapier2d.root', root);
23
- xnew.promise(RAPIER.init()).then(() => {
23
+ xnew.promise(RAPIER.init(), false).then(() => {
24
24
  root.world = new RAPIER.World(gravity);
25
25
  if (timestep !== null) {
26
26
  root.world.timestep = timestep;
@@ -17,7 +17,7 @@ var xrapier2d = {
17
17
  function Root(self, { gravity, timestep }) {
18
18
  const root = {};
19
19
  xnew.context('xrapier2d.root', root);
20
- xnew.promise(RAPIER.init()).then(() => {
20
+ xnew.promise(RAPIER.init(), false).then(() => {
21
21
  root.world = new RAPIER.World(gravity);
22
22
  if (timestep !== null) {
23
23
  root.world.timestep = timestep;
@@ -6,4 +6,5 @@ declare const _default: {
6
6
  readonly scene: any;
7
7
  readonly canvas: any;
8
8
  };
9
- export default _default;
9
+
10
+ export { _default as default };
package/dist/xnew.d.ts CHANGED
@@ -97,7 +97,8 @@ declare class Unit {
97
97
  }
98
98
  declare class UnitPromise {
99
99
  promise: Promise<any>;
100
- constructor(promise: Promise<any>);
100
+ useResult: Boolean;
101
+ constructor(promise: Promise<any>, useResult: Boolean);
101
102
  then(callback: Function): UnitPromise;
102
103
  catch(callback: Function): UnitPromise;
103
104
  finally(callback: Function): UnitPromise;
@@ -169,7 +170,7 @@ declare const xnew$1: CreateUnit & {
169
170
  * @example
170
171
  * xnew.promise(fetchData()).then(data => console.log(data))
171
172
  */
172
- promise(promise: Promise<any>): UnitPromise;
173
+ promise(promise: Promise<any>, useResult?: Boolean): UnitPromise;
173
174
  /**
174
175
  * Handles successful resolution of all registered promises in the current component
175
176
  * @param callback - Function to call when all promises resolve
package/dist/xnew.js CHANGED
@@ -527,7 +527,10 @@
527
527
  // unit promise
528
528
  //----------------------------------------------------------------------------------------------------
529
529
  class UnitPromise {
530
- constructor(promise) { this.promise = promise; }
530
+ constructor(promise, useResult) {
531
+ this.promise = promise;
532
+ this.useResult = useResult;
533
+ }
531
534
  then(callback) {
532
535
  this.promise = this.promise.then(Unit.wrap(Unit.current, callback));
533
536
  return this;
@@ -675,9 +678,9 @@
675
678
  * @example
676
679
  * xnew.promise(fetchData()).then(data => console.log(data))
677
680
  */
678
- promise(promise) {
681
+ promise(promise, useResult = true) {
679
682
  try {
680
- Unit.current._.promises.push(new UnitPromise(promise));
683
+ Unit.current._.promises.push(new UnitPromise(promise, useResult));
681
684
  return Unit.current._.promises[Unit.current._.promises.length - 1];
682
685
  }
683
686
  catch (error) {
@@ -694,7 +697,11 @@
694
697
  */
695
698
  then(callback) {
696
699
  try {
697
- return new UnitPromise(Promise.all(Unit.current._.promises.map(p => p.promise))).then(callback);
700
+ const promises = Unit.current._.promises;
701
+ return new UnitPromise(Promise.all(promises.map(p => p.promise)), true)
702
+ .then((results) => {
703
+ callback(results.filter((_result, index) => promises[index].useResult));
704
+ });
698
705
  }
699
706
  catch (error) {
700
707
  console.error('xnew.then(callback: Function): ', error);
@@ -710,7 +717,9 @@
710
717
  */
711
718
  catch(callback) {
712
719
  try {
713
- return new UnitPromise(Promise.all(Unit.current._.promises.map(p => p.promise))).catch(callback);
720
+ const promises = Unit.current._.promises;
721
+ return new UnitPromise(Promise.all(promises.map(p => p.promise)), true)
722
+ .catch(callback);
714
723
  }
715
724
  catch (error) {
716
725
  console.error('xnew.catch(callback: Function): ', error);
@@ -726,7 +735,9 @@
726
735
  */
727
736
  finally(callback) {
728
737
  try {
729
- return new UnitPromise(Promise.all(Unit.current._.promises.map(p => p.promise))).finally(callback);
738
+ const promises = Unit.current._.promises;
739
+ return new UnitPromise(Promise.all(promises.map(p => p.promise)), true)
740
+ .finally(callback);
730
741
  }
731
742
  catch (error) {
732
743
  console.error('xnew.finally(callback: Function): ', error);
@@ -1689,25 +1700,7 @@
1689
1700
  // heroicons
1690
1701
  // https://heroicons.com/outline
1691
1702
  // MIT License
1692
- function OutLineTemplate(unit, { frame, stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1693
- if (frame) {
1694
- xnew$1((unit) => {
1695
- xnew$1.nest(`<div style="position: absolute; margin: auto; width: 100%; height: 100%;">`);
1696
- xnew$1.nest('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.0" stroke="currentColor">');
1697
- if (frame === 'circle') {
1698
- xnew$1('<circle cx="12" cy="12" r="11">');
1699
- }
1700
- else if (frame === 'square') {
1701
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="0">');
1702
- }
1703
- else if (frame === 'rounded-square') {
1704
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="6">');
1705
- }
1706
- });
1707
- }
1708
- if (frame) {
1709
- xnew$1.nest(`<div style="position: absolute; inset: 0; margin: auto; width: 70%; height: 70%;">`);
1710
- }
1703
+ function OutLineTemplate(unit, { stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1711
1704
  xnew$1.nest(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1712
1705
  style="stroke-width: ${strokeWidth}; stroke: ${stroke}; stroke-opacity: ${strokeOpacity}; stroke-linejoin: ${strokeLinejoin}; stroke-linecap: ${strokeLinecap};"
1713
1706
  >`);
@@ -4050,7 +4043,7 @@
4050
4043
  const unit = xnew();
4051
4044
  if (music.played === null) {
4052
4045
  music.play(options);
4053
- unit.on('-finalize', () => music.pause({ fade: options.fade }));
4046
+ unit.on('finalize', () => music.pause({ fade: options.fade }));
4054
4047
  }
4055
4048
  },
4056
4049
  pause(options) {
package/dist/xnew.mjs CHANGED
@@ -521,7 +521,10 @@ Unit.type2units = new MapSet();
521
521
  // unit promise
522
522
  //----------------------------------------------------------------------------------------------------
523
523
  class UnitPromise {
524
- constructor(promise) { this.promise = promise; }
524
+ constructor(promise, useResult) {
525
+ this.promise = promise;
526
+ this.useResult = useResult;
527
+ }
525
528
  then(callback) {
526
529
  this.promise = this.promise.then(Unit.wrap(Unit.current, callback));
527
530
  return this;
@@ -669,9 +672,9 @@ const xnew$1 = Object.assign(function (...args) {
669
672
  * @example
670
673
  * xnew.promise(fetchData()).then(data => console.log(data))
671
674
  */
672
- promise(promise) {
675
+ promise(promise, useResult = true) {
673
676
  try {
674
- Unit.current._.promises.push(new UnitPromise(promise));
677
+ Unit.current._.promises.push(new UnitPromise(promise, useResult));
675
678
  return Unit.current._.promises[Unit.current._.promises.length - 1];
676
679
  }
677
680
  catch (error) {
@@ -688,7 +691,11 @@ const xnew$1 = Object.assign(function (...args) {
688
691
  */
689
692
  then(callback) {
690
693
  try {
691
- return new UnitPromise(Promise.all(Unit.current._.promises.map(p => p.promise))).then(callback);
694
+ const promises = Unit.current._.promises;
695
+ return new UnitPromise(Promise.all(promises.map(p => p.promise)), true)
696
+ .then((results) => {
697
+ callback(results.filter((_result, index) => promises[index].useResult));
698
+ });
692
699
  }
693
700
  catch (error) {
694
701
  console.error('xnew.then(callback: Function): ', error);
@@ -704,7 +711,9 @@ const xnew$1 = Object.assign(function (...args) {
704
711
  */
705
712
  catch(callback) {
706
713
  try {
707
- return new UnitPromise(Promise.all(Unit.current._.promises.map(p => p.promise))).catch(callback);
714
+ const promises = Unit.current._.promises;
715
+ return new UnitPromise(Promise.all(promises.map(p => p.promise)), true)
716
+ .catch(callback);
708
717
  }
709
718
  catch (error) {
710
719
  console.error('xnew.catch(callback: Function): ', error);
@@ -720,7 +729,9 @@ const xnew$1 = Object.assign(function (...args) {
720
729
  */
721
730
  finally(callback) {
722
731
  try {
723
- return new UnitPromise(Promise.all(Unit.current._.promises.map(p => p.promise))).finally(callback);
732
+ const promises = Unit.current._.promises;
733
+ return new UnitPromise(Promise.all(promises.map(p => p.promise)), true)
734
+ .finally(callback);
724
735
  }
725
736
  catch (error) {
726
737
  console.error('xnew.finally(callback: Function): ', error);
@@ -1683,25 +1694,7 @@ class Synthesizer {
1683
1694
  // heroicons
1684
1695
  // https://heroicons.com/outline
1685
1696
  // MIT License
1686
- function OutLineTemplate(unit, { frame, stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1687
- if (frame) {
1688
- xnew$1((unit) => {
1689
- xnew$1.nest(`<div style="position: absolute; margin: auto; width: 100%; height: 100%;">`);
1690
- xnew$1.nest('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.0" stroke="currentColor">');
1691
- if (frame === 'circle') {
1692
- xnew$1('<circle cx="12" cy="12" r="11">');
1693
- }
1694
- else if (frame === 'square') {
1695
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="0">');
1696
- }
1697
- else if (frame === 'rounded-square') {
1698
- xnew$1('<rect x="2" y="2" width="20" height="20" rx="6">');
1699
- }
1700
- });
1701
- }
1702
- if (frame) {
1703
- xnew$1.nest(`<div style="position: absolute; inset: 0; margin: auto; width: 70%; height: 70%;">`);
1704
- }
1697
+ function OutLineTemplate(unit, { stroke = 'currentColor', strokeOpacity = 1.0, strokeWidth = 1.5, strokeLinejoin = 'round', strokeLinecap = 'round' } = {}) {
1705
1698
  xnew$1.nest(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
1706
1699
  style="stroke-width: ${strokeWidth}; stroke: ${stroke}; stroke-opacity: ${strokeOpacity}; stroke-linejoin: ${strokeLinejoin}; stroke-linecap: ${strokeLinecap};"
1707
1700
  >`);
@@ -4044,7 +4037,7 @@ const audio = {
4044
4037
  const unit = xnew();
4045
4038
  if (music.played === null) {
4046
4039
  music.play(options);
4047
- unit.on('-finalize', () => music.pause({ fade: options.fade }));
4040
+ unit.on('finalize', () => music.pause({ fade: options.fade }));
4048
4041
  }
4049
4042
  },
4050
4043
  pause(options) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "Component-Oriented Programming"
6
6
  ],
7
- "version": "0.3.1",
7
+ "version": "0.3.3",
8
8
  "main": "dist/xnew.js",
9
9
  "module": "dist/xnew.mjs",
10
10
  "types": "dist/xnew.d.ts",
@@ -1,64 +0,0 @@
1
- export declare const context: AudioContext;
2
- export declare const master: GainNode;
3
- export type AudioFilePlayOptions = {
4
- offset?: number;
5
- fade?: number;
6
- loop?: boolean;
7
- };
8
- export type AudioFilePauseOptions = {
9
- fade?: number;
10
- };
11
- export declare class AudioFile {
12
- private buffer?;
13
- private source;
14
- private amp;
15
- private fade;
16
- promise: Promise<void>;
17
- played: number | null;
18
- constructor(path: string);
19
- set volume(value: number);
20
- get volume(): number;
21
- play({ offset, fade, loop }?: AudioFilePlayOptions): void;
22
- pause({ fade }?: AudioFilePauseOptions): number | undefined;
23
- clear(): void;
24
- }
25
- export type SynthesizerOptions = {
26
- oscillator: OscillatorOptions;
27
- amp: AmpOptions;
28
- filter?: FilterOptions;
29
- reverb?: ReverbOptions;
30
- bpm?: number;
31
- };
32
- type OscillatorOptions = {
33
- type: OscillatorType;
34
- envelope?: Envelope;
35
- LFO?: LFO;
36
- };
37
- type FilterOptions = {
38
- type: BiquadFilterType;
39
- cutoff: number;
40
- };
41
- type AmpOptions = {
42
- envelope: Envelope;
43
- };
44
- type ReverbOptions = {
45
- time: number;
46
- mix: number;
47
- };
48
- type Envelope = {
49
- amount: number;
50
- ADSR: [number, number, number, number];
51
- };
52
- type LFO = {
53
- amount: number;
54
- type: OscillatorType;
55
- rate: number;
56
- };
57
- export declare class Synthesizer {
58
- props: SynthesizerOptions;
59
- constructor(props: SynthesizerOptions);
60
- press(frequency: number | string, duration?: number | string, wait?: number): {
61
- release: () => void;
62
- } | undefined;
63
- }
64
- export {};
@@ -1,12 +0,0 @@
1
- export declare function load(path: string): AudioFile;
2
- declare class AudioFile {
3
- buffer?: AudioBuffer;
4
- promise: Promise<void>;
5
- source?: AudioBufferSourceNode;
6
- amp?: GainNode;
7
- start: number | null;
8
- constructor(path: string);
9
- play(offset?: number, loop?: boolean): void;
10
- pause(): number | undefined;
11
- }
12
- export {};
@@ -1,13 +0,0 @@
1
- export declare function load(path: string): AudioFile;
2
- declare class AudioFile {
3
- data: any;
4
- startTime: number | null;
5
- source: AudioBufferSourceNode;
6
- amp: GainNode;
7
- constructor(path: string);
8
- isReady(): boolean;
9
- get promise(): Promise<void>;
10
- play(offset?: number): void;
11
- pause(): number | undefined;
12
- }
13
- export {};
@@ -1,41 +0,0 @@
1
- export declare function synthesizer(props: SynthProps): Synthesizer;
2
- type SynthProps = {
3
- oscillator: OscillatorOptions;
4
- amp: AmpOptions;
5
- filter?: FilterOptions;
6
- reverb?: ReverbOptions;
7
- bpm?: number;
8
- };
9
- type OscillatorOptions = {
10
- type: OscillatorType;
11
- envelope?: Envelope;
12
- LFO?: LFO;
13
- };
14
- type FilterOptions = {
15
- type: BiquadFilterType;
16
- cutoff: number;
17
- };
18
- type AmpOptions = {
19
- envelope: Envelope;
20
- };
21
- type ReverbOptions = {
22
- time: number;
23
- mix: number;
24
- };
25
- type Envelope = {
26
- amount: number;
27
- ADSR: [number, number, number, number];
28
- };
29
- type LFO = {
30
- amount: number;
31
- type: OscillatorType;
32
- rate: number;
33
- };
34
- declare class Synthesizer {
35
- props: SynthProps;
36
- constructor(props: SynthProps);
37
- press(frequency: number | string, duration?: number | string, wait?: number): {
38
- release: () => void;
39
- } | undefined;
40
- }
41
- export {};
@@ -1,20 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function AccordionFrame(frame: Unit, { open, duration, easing }?: {
3
- open?: boolean;
4
- duration?: number;
5
- easing?: string;
6
- }): {
7
- toggle(): void;
8
- open(): void;
9
- close(): void;
10
- };
11
- export declare function AccordionHeader(header: Unit, {}?: {}): void;
12
- export declare function AccordionBullet(bullet: Unit, { type }?: {
13
- type?: string;
14
- }): void;
15
- export declare function AccordionContent(content: Unit, {}?: {}): {
16
- transition({ element, rate }: {
17
- element: HTMLElement;
18
- rate: number;
19
- }): void;
20
- };
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function VolumeController(unit: Unit, {}?: {}): void;
@@ -1,24 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function Modal(self: xnew.Unit, { duration, easing }?: {
3
- duration?: number | undefined;
4
- easing?: string | undefined;
5
- }): {
6
- open(): void;
7
- close(): void;
8
- };
9
- export declare function Accordion(self: xnew.Unit, { open, duration, easing }?: {
10
- open?: boolean | undefined;
11
- duration?: number | undefined;
12
- easing?: string | undefined;
13
- }): {
14
- open(): void;
15
- close(): void;
16
- toggle(): void;
17
- };
18
- export declare function Tab(self: xnew.Unit, { duration, easing }?: {
19
- duration?: number | undefined;
20
- easing?: string | undefined;
21
- }): {
22
- assign(name: string, component: Function): void;
23
- select(name: string): void;
24
- };
@@ -1,7 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function BulletArrow(self: xnew.Unit, { rotate, color }?: {
3
- rotate?: number;
4
- color?: string;
5
- }): {
6
- rotate(rotate: number, transition?: number, easing?: string): void;
7
- };
@@ -1,7 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function ControlPanel(self: xnew.Unit, {}?: {}): {
3
- group(name: string): void;
4
- button(name: string, component: Function, props?: any): void;
5
- range(name: string, component: Function, props?: any): void;
6
- select(name: string): void;
7
- };
@@ -1,19 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function AnalogStick(unit: Unit, { stroke, strokeOpacity, strokeWidth, strokeLinejoin, fill, fillOpacity }?: {
3
- stroke?: string;
4
- strokeOpacity?: number;
5
- strokeWidth?: number;
6
- strokeLinejoin?: string;
7
- diagonal?: boolean;
8
- fill?: string;
9
- fillOpacity?: number;
10
- }): void;
11
- export declare function DirectionalPad(unit: Unit, { diagonal, stroke, strokeOpacity, strokeWidth, strokeLinejoin, fill, fillOpacity }?: {
12
- diagonal?: boolean;
13
- stroke?: string;
14
- strokeOpacity?: number;
15
- strokeWidth?: number;
16
- strokeLinejoin?: string;
17
- fill?: string;
18
- fillOpacity?: number;
19
- }): void;
@@ -1,6 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function DragFrame(frame: Unit, { x, y }?: {
3
- x?: number;
4
- y?: number;
5
- }): void;
6
- export declare function DragTarget(target: Unit, {}?: {}): void;
@@ -1,4 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function ResizeEvent(resize: Unit): void;
3
- export declare function KeyboardEvent(keyboard: Unit): void;
4
- export declare function PointerEvent(unit: Unit): void;
@@ -1 +0,0 @@
1
- export declare function File(data: string, filename: string, mimeType?: string): void;
@@ -1,8 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function InputRange(frame: Unit, { value, min, max, step, ...attributes }?: {
3
- value?: number | string;
4
- min?: number | string;
5
- max?: number | string;
6
- step?: number | string;
7
- attributes?: Object;
8
- }): void;
@@ -1,2 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function KeyEvent(unit: xnew.Unit): void;
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function KeyboardEvent(unit: Unit): void;
@@ -1,15 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function ModalFrame(frame: Unit, { duration, easing }?: {
3
- duration?: number;
4
- easing?: string;
5
- }): {
6
- close(): void;
7
- };
8
- export declare function ModalContent(content: Unit, { background }?: {
9
- background?: string;
10
- }): {
11
- transition({ element, rate }: {
12
- element: HTMLElement;
13
- rate: number;
14
- }): void;
15
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function PanelFrame(frame: xnew.Unit): void;
3
- export declare function PanelGroup(group: xnew.Unit, { name, open }?: {
4
- name?: string;
5
- open?: boolean;
6
- }): void;
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function PointerEvent(unit: Unit): void;
@@ -1,8 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function Modal(self: xnew.Unit, { duration, easing }?: {
3
- duration?: number | undefined;
4
- easing?: string | undefined;
5
- }): {
6
- open(): void;
7
- close(): void;
8
- };
@@ -1,2 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function ResizeEvent(resize: Unit): void;
@@ -1,9 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function Screen(screen: Unit, { width, height, fit }?: {
3
- width?: number | undefined;
4
- height?: number | undefined;
5
- fit?: string | undefined;
6
- }): {
7
- readonly canvas: import("../core/unit").UnitElement;
8
- resize(width: number, height: number): void;
9
- };
@@ -1,6 +0,0 @@
1
- import { xnew } from '../core/xnew';
2
- export declare function DragFrame(frame: xnew.Unit, { x, y }?: {
3
- x?: number;
4
- y?: number;
5
- }): void;
6
- export declare function DragTarget(target: xnew.Unit, {}?: {}): void;
@@ -1,24 +0,0 @@
1
- import { Unit } from '../core/unit';
2
- export declare function TabFrame(frame: Unit, { select }?: {
3
- select?: string;
4
- }): void;
5
- export declare function TabButton(button: Unit, { key }?: {
6
- key?: string;
7
- }): {
8
- select({ element }: {
9
- element: HTMLElement;
10
- }): void;
11
- deselect({ element }: {
12
- element: HTMLElement;
13
- }): void;
14
- };
15
- export declare function TabContent(content: Unit, { key }?: {
16
- key?: string;
17
- }): {
18
- select({ element }: {
19
- element: HTMLElement;
20
- }): void;
21
- deselect({ element }: {
22
- element: HTMLElement;
23
- }): void;
24
- };