@arcanejs/toolkit 0.4.0 → 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.
Files changed (41) hide show
  1. package/dist/backend/components/base.d.mts +1 -1
  2. package/dist/backend/components/base.d.ts +1 -1
  3. package/dist/backend/components/button.d.mts +1 -1
  4. package/dist/backend/components/button.d.ts +1 -1
  5. package/dist/backend/components/group.d.mts +1 -1
  6. package/dist/backend/components/group.d.ts +1 -1
  7. package/dist/backend/components/label.d.mts +1 -1
  8. package/dist/backend/components/label.d.ts +1 -1
  9. package/dist/backend/components/rect.d.mts +2 -4
  10. package/dist/backend/components/rect.d.ts +2 -4
  11. package/dist/backend/components/rect.js +2 -2
  12. package/dist/backend/components/rect.mjs +1 -1
  13. package/dist/backend/components/slider-button.d.mts +2 -5
  14. package/dist/backend/components/slider-button.d.ts +2 -5
  15. package/dist/backend/components/slider-button.js +2 -2
  16. package/dist/backend/components/slider-button.mjs +1 -1
  17. package/dist/backend/components/switch.d.mts +1 -1
  18. package/dist/backend/components/switch.d.ts +1 -1
  19. package/dist/backend/components/tabs.d.mts +1 -1
  20. package/dist/backend/components/tabs.d.ts +1 -1
  21. package/dist/backend/components/text-input.d.mts +1 -1
  22. package/dist/backend/components/text-input.d.ts +1 -1
  23. package/dist/backend/components/timeline.d.mts +1 -1
  24. package/dist/backend/components/timeline.d.ts +1 -1
  25. package/dist/backend/util/index.d.mts +8 -6
  26. package/dist/backend/util/index.d.ts +8 -6
  27. package/dist/backend/util/index.js +13 -1
  28. package/dist/backend/util/index.mjs +12 -0
  29. package/dist/{chunk-G7GFSIHY.js → chunk-53DEDXHG.js} +3 -1
  30. package/dist/{chunk-KOKUFP6V.mjs → chunk-ESMRIWOM.mjs} +1 -1
  31. package/dist/{chunk-K572ZPUS.js → chunk-IQ4SDDYP.js} +1 -1
  32. package/dist/{chunk-A2STBGBE.mjs → chunk-SN2XKRYX.mjs} +3 -1
  33. package/dist/frontend.js +146 -69
  34. package/dist/frontend.js.map +4 -4
  35. package/dist/id-map-DxQ3_gyA.d.mts +7 -0
  36. package/dist/id-map-DxQ3_gyA.d.ts +7 -0
  37. package/dist/index.d.mts +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +3 -3
  40. package/dist/index.mjs +2 -2
  41. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Logger } from '@arcanejs/protocol/logging';
4
4
 
5
5
  interface Component {
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Logger } from '@arcanejs/protocol/logging';
4
4
 
5
5
  interface Component {
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Base, Listenable } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Base, Listenable } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
2
  import { GroupComponentStyle } from '@arcanejs/protocol/styles';
3
- import { IDMap } from '../util/index.mjs';
3
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
4
4
  import { BaseParent, Listenable } from './base.mjs';
5
5
  import { Button } from './button.mjs';
6
6
  import '@arcanejs/protocol/logging';
@@ -1,6 +1,6 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
2
  import { GroupComponentStyle } from '@arcanejs/protocol/styles';
3
- import { IDMap } from '../util/index.js';
3
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
4
4
  import { BaseParent, Listenable } from './base.js';
5
5
  import { Button } from './button.js';
6
6
  import '@arcanejs/protocol/logging';
@@ -1,6 +1,6 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
2
  import { LabelComponentStyle } from '@arcanejs/protocol/styles';
3
- import { IDMap } from '../util/index.mjs';
3
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
4
4
  import { Base } from './base.mjs';
5
5
  import '@arcanejs/protocol/logging';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
2
  import { LabelComponentStyle } from '@arcanejs/protocol/styles';
3
- import { IDMap } from '../util/index.js';
3
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
4
4
  import { Base } from './base.js';
5
5
  import '@arcanejs/protocol/logging';
6
6
 
@@ -1,11 +1,9 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Base } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
6
- type InternalProps = {
7
- color: string;
8
- };
6
+ type InternalProps = Pick<proto.RectComponent, 'color' | 'grow'>;
9
7
  type Props = Partial<InternalProps>;
10
8
  /**
11
9
  * A simple rectangle component. Could be used for example to indicate
@@ -1,11 +1,9 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Base } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
6
- type InternalProps = {
7
- color: string;
8
- };
6
+ type InternalProps = Pick<proto.RectComponent, 'color' | 'grow'>;
9
7
  type Props = Partial<InternalProps>;
10
8
  /**
11
9
  * A simple rectangle component. Could be used for example to indicate
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkK572ZPUSjs = require('../../chunk-K572ZPUS.js');
3
+ var _chunkIQ4SDDYPjs = require('../../chunk-IQ4SDDYP.js');
4
4
  require('../../chunk-CFO5PSSK.js');
5
5
  require('../../chunk-3RG5ZIWI.js');
6
6
 
7
7
 
8
- exports.Rect = _chunkK572ZPUSjs.Rect;
8
+ exports.Rect = _chunkIQ4SDDYPjs.Rect;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Rect
3
- } from "../../chunk-KOKUFP6V.mjs";
3
+ } from "../../chunk-ESMRIWOM.mjs";
4
4
  import "../../chunk-PW7QVLLF.mjs";
5
5
  import "../../chunk-Y6FXYEAI.mjs";
6
6
  export {
@@ -1,15 +1,12 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Base, Listenable } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
6
6
  type Events = {
7
7
  change: (value: number) => void | Promise<void>;
8
8
  };
9
- type InternalProps = {
10
- min: number;
11
- max: number;
12
- step: number;
9
+ type InternalProps = Pick<proto.SliderButtonComponent, 'min' | 'max' | 'step' | 'gradient' | 'grow'> & {
13
10
  value?: number;
14
11
  defaultValue?: number;
15
12
  };
@@ -1,15 +1,12 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Base, Listenable } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
6
6
  type Events = {
7
7
  change: (value: number) => void | Promise<void>;
8
8
  };
9
- type InternalProps = {
10
- min: number;
11
- max: number;
12
- step: number;
9
+ type InternalProps = Pick<proto.SliderButtonComponent, 'min' | 'max' | 'step' | 'gradient' | 'grow'> & {
13
10
  value?: number;
14
11
  defaultValue?: number;
15
12
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkG7GFSIHYjs = require('../../chunk-G7GFSIHY.js');
3
+ var _chunk53DEDXHGjs = require('../../chunk-53DEDXHG.js');
4
4
  require('../../chunk-CFO5PSSK.js');
5
5
  require('../../chunk-3RG5ZIWI.js');
6
6
 
7
7
 
8
- exports.SliderButton = _chunkG7GFSIHYjs.SliderButton;
8
+ exports.SliderButton = _chunk53DEDXHGjs.SliderButton;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SliderButton
3
- } from "../../chunk-A2STBGBE.mjs";
3
+ } from "../../chunk-SN2XKRYX.mjs";
4
4
  import "../../chunk-PW7QVLLF.mjs";
5
5
  import "../../chunk-Y6FXYEAI.mjs";
6
6
  export {
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Base, Listenable } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Base, Listenable } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { BaseParent, Component } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { BaseParent, Component } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Base, Listenable } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Base, Listenable } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.mjs';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
3
3
  import { Base } from './base.mjs';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as proto from '@arcanejs/protocol';
2
- import { IDMap } from '../util/index.js';
2
+ import { I as IDMap } from '../../id-map-DxQ3_gyA.js';
3
3
  import { Base } from './base.js';
4
4
  import '@arcanejs/protocol/logging';
5
5
 
@@ -1,7 +1,9 @@
1
- declare class IDMap {
2
- private readonly idMap;
3
- private nextId;
4
- getId(object: object): number;
5
- }
1
+ export { I as IDMap } from '../../id-map-DxQ3_gyA.mjs';
2
+ import { Gradient } from '@arcanejs/protocol';
6
3
 
7
- export { IDMap };
4
+ /**
5
+ * Rainbow gradient used for hue slider values.
6
+ */
7
+ declare const HUE_GRADIENT: Gradient;
8
+
9
+ export { HUE_GRADIENT };
@@ -1,7 +1,9 @@
1
- declare class IDMap {
2
- private readonly idMap;
3
- private nextId;
4
- getId(object: object): number;
5
- }
1
+ export { I as IDMap } from '../../id-map-DxQ3_gyA.js';
2
+ import { Gradient } from '@arcanejs/protocol';
6
3
 
7
- export { IDMap };
4
+ /**
5
+ * Rainbow gradient used for hue slider values.
6
+ */
7
+ declare const HUE_GRADIENT: Gradient;
8
+
9
+ export { HUE_GRADIENT };
@@ -3,5 +3,17 @@
3
3
  var _chunkEABM5X65js = require('../../chunk-EABM5X65.js');
4
4
  require('../../chunk-3RG5ZIWI.js');
5
5
 
6
+ // src/backend/util/color.ts
7
+ var HUE_GRADIENT = [
8
+ { color: "red", position: 0 },
9
+ { color: "yellow", position: 60 / 360 },
10
+ { color: "green", position: 120 / 360 },
11
+ { color: "cyan", position: 180 / 360 },
12
+ { color: "blue", position: 240 / 360 },
13
+ { color: "magenta", position: 300 / 360 },
14
+ { color: "red", position: 1 }
15
+ ];
6
16
 
7
- exports.IDMap = _chunkEABM5X65js.IDMap;
17
+
18
+
19
+ exports.HUE_GRADIENT = HUE_GRADIENT; exports.IDMap = _chunkEABM5X65js.IDMap;
@@ -2,6 +2,18 @@ import {
2
2
  IDMap
3
3
  } from "../../chunk-RGHJEMWG.mjs";
4
4
  import "../../chunk-Y6FXYEAI.mjs";
5
+
6
+ // src/backend/util/color.ts
7
+ var HUE_GRADIENT = [
8
+ { color: "red", position: 0 },
9
+ { color: "yellow", position: 60 / 360 },
10
+ { color: "green", position: 120 / 360 },
11
+ { color: "cyan", position: 180 / 360 },
12
+ { color: "blue", position: 240 / 360 },
13
+ { color: "magenta", position: 300 / 360 },
14
+ { color: "red", position: 1 }
15
+ ];
5
16
  export {
17
+ HUE_GRADIENT,
6
18
  IDMap
7
19
  };
@@ -33,7 +33,9 @@ var SliderButton = (_class = class extends _chunkCFO5PSSKjs.Base {
33
33
  min: this.props.min,
34
34
  max: this.props.max,
35
35
  step: this.props.step,
36
- value: this._value
36
+ value: this._value,
37
+ gradient: this.props.gradient,
38
+ grow: this.props.grow
37
39
  };
38
40
  }
39
41
  /** @hidden */
@@ -15,7 +15,7 @@ var Rect = class extends Base {
15
15
  return {
16
16
  component: "rect",
17
17
  key: idMap.getId(this),
18
- color: this.props.color
18
+ ...this.props
19
19
  };
20
20
  }
21
21
  setColor(color) {
@@ -15,7 +15,7 @@ var Rect = class extends _chunkCFO5PSSKjs.Base {
15
15
  return {
16
16
  component: "rect",
17
17
  key: idMap.getId(this),
18
- color: this.props.color
18
+ ...this.props
19
19
  };
20
20
  }
21
21
  setColor(color) {
@@ -33,7 +33,9 @@ var SliderButton = class extends Base {
33
33
  min: this.props.min,
34
34
  max: this.props.max,
35
35
  step: this.props.step,
36
- value: this._value
36
+ value: this._value,
37
+ gradient: this.props.gradient,
38
+ grow: this.props.grow
37
39
  };
38
40
  }
39
41
  /** @hidden */