@packtrack/layout 1.3.0 → 1.3.1
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/package.json +3 -3
- package/.built/device/channel.d.ts +0 -8
- package/.built/device/channel.js +0 -12
- package/.built/device/device.d.ts +0 -11
- package/.built/device/device.js +0 -20
- package/.built/device/index.d.ts +0 -11
- package/.built/device/index.js +0 -20
- package/.built/district.d.ts +0 -22
- package/.built/district.js +0 -83
- package/.built/layout.d.ts +0 -35
- package/.built/layout.js +0 -331
- package/.built/monitor.d.ts +0 -9
- package/.built/monitor.js +0 -15
- package/.built/position.d.ts +0 -12
- package/.built/position.js +0 -45
- package/.built/positioner/index.d.ts +0 -2
- package/.built/positioner/index.js +0 -2
- package/.built/positioner/point.d.ts +0 -13
- package/.built/positioner/point.js +0 -23
- package/.built/positioner/responder-type.d.ts +0 -5
- package/.built/positioner/responder-type.js +0 -9
- package/.built/power-district/activator.d.ts +0 -7
- package/.built/power-district/activator.js +0 -8
- package/.built/power-district/index.d.ts +0 -14
- package/.built/power-district/index.js +0 -17
- package/.built/power-district/monitor.d.ts +0 -7
- package/.built/power-district/monitor.js +0 -8
- package/.built/power-district/reverser.d.ts +0 -7
- package/.built/power-district/reverser.js +0 -8
- package/.built/power-district.d.ts +0 -8
- package/.built/power-district.js +0 -14
- package/.built/route.d.ts +0 -10
- package/.built/route.js +0 -13
- package/.built/router.d.ts +0 -14
- package/.built/router.js +0 -36
- package/.built/section.d.ts +0 -40
- package/.built/section.js +0 -213
- package/.built/source/device/device.d.ts +0 -11
- package/.built/source/device/device.js +0 -24
- package/.built/source/power-district.d.ts +0 -8
- package/.built/source/power-district.js +0 -18
- package/.built/span.d.ts +0 -12
- package/.built/span.js +0 -77
- package/.built/throttle.d.ts +0 -9
- package/.built/throttle.js +0 -15
- package/.built/tile.d.ts +0 -57
- package/.built/tile.js +0 -73
- package/.built/track.d.ts +0 -12
- package/.built/track.js +0 -25
package/.built/throttle.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Layout } from "./layout";
|
|
2
|
-
export class Throttle {
|
|
3
|
-
device;
|
|
4
|
-
scope;
|
|
5
|
-
constructor(device, scope) {
|
|
6
|
-
this.device = device;
|
|
7
|
-
this.scope = scope;
|
|
8
|
-
}
|
|
9
|
-
dump() {
|
|
10
|
-
console.group('Throttle');
|
|
11
|
-
console.log('scope:', this.scope instanceof Layout ? '*' : this.scope.domainName);
|
|
12
|
-
this.device.dump();
|
|
13
|
-
console.groupEnd();
|
|
14
|
-
}
|
|
15
|
-
}
|
package/.built/tile.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Section } from './section.js';
|
|
2
|
-
export declare class TilePattern {
|
|
3
|
-
length: number;
|
|
4
|
-
path: (continuous: boolean, x: number, y: number) => string;
|
|
5
|
-
static patterns: {
|
|
6
|
-
'tl-cc': TilePattern;
|
|
7
|
-
'tc-cc': TilePattern;
|
|
8
|
-
'tr-cc': TilePattern;
|
|
9
|
-
'cl-cc': TilePattern;
|
|
10
|
-
'cr-cc': TilePattern;
|
|
11
|
-
'bl-cc': TilePattern;
|
|
12
|
-
'bc-cc': TilePattern;
|
|
13
|
-
'br-cc': TilePattern;
|
|
14
|
-
'cc-tl': TilePattern;
|
|
15
|
-
'cc-tc': TilePattern;
|
|
16
|
-
'cc-tr': TilePattern;
|
|
17
|
-
'cc-cl': TilePattern;
|
|
18
|
-
'cc-cr': TilePattern;
|
|
19
|
-
'cc-bl': TilePattern;
|
|
20
|
-
'cc-bc': TilePattern;
|
|
21
|
-
'cc-br': TilePattern;
|
|
22
|
-
'cr-cl': TilePattern;
|
|
23
|
-
'cr-tl': TilePattern;
|
|
24
|
-
'cr-bl': TilePattern;
|
|
25
|
-
'cl-cr': TilePattern;
|
|
26
|
-
'cl-tr': TilePattern;
|
|
27
|
-
'cl-bl': TilePattern;
|
|
28
|
-
'tl-bc': TilePattern;
|
|
29
|
-
'tl-br': TilePattern;
|
|
30
|
-
'tl-cr': TilePattern;
|
|
31
|
-
'tc-bc': TilePattern;
|
|
32
|
-
'tc-br': TilePattern;
|
|
33
|
-
'tc-bl': TilePattern;
|
|
34
|
-
'tr-cl': TilePattern;
|
|
35
|
-
'tr-bc': TilePattern;
|
|
36
|
-
'bl-tr': TilePattern;
|
|
37
|
-
'bl-tc': TilePattern;
|
|
38
|
-
'bl-cr': TilePattern;
|
|
39
|
-
'bc-tc': TilePattern;
|
|
40
|
-
'bc-tr': TilePattern;
|
|
41
|
-
'bc-tl': TilePattern;
|
|
42
|
-
'br-cl': TilePattern;
|
|
43
|
-
'br-tc': TilePattern;
|
|
44
|
-
'br-tl': TilePattern;
|
|
45
|
-
'cl-bc': TilePattern;
|
|
46
|
-
};
|
|
47
|
-
constructor(length: number, path: (continuous: boolean, x: number, y: number) => string);
|
|
48
|
-
}
|
|
49
|
-
export declare class Tile {
|
|
50
|
-
section: Section;
|
|
51
|
-
x: number;
|
|
52
|
-
y: number;
|
|
53
|
-
pattern: TilePattern;
|
|
54
|
-
constructor(section: Section, x: number, y: number, pattern: TilePattern);
|
|
55
|
-
toSVGPath(continuous?: boolean): string;
|
|
56
|
-
toSVG(): string;
|
|
57
|
-
}
|
package/.built/tile.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export class TilePattern {
|
|
2
|
-
length;
|
|
3
|
-
path;
|
|
4
|
-
// TODO: replace simple paths with rounded versions
|
|
5
|
-
static patterns = {
|
|
6
|
-
'tl-cc': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0}, L ${x + 0.5} ${y + 0.5}`),
|
|
7
|
-
'tc-cc': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0}, L ${x + 0.5} ${y + 0.5}`),
|
|
8
|
-
'tr-cc': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0}, L ${x + 0.5} ${y + 0.5}`),
|
|
9
|
-
'cl-cc': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0.5}, L ${x + 0.5} ${y + 0.5}`),
|
|
10
|
-
'cr-cc': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0.5}, L ${x + 0.5} ${y + 0.5}`),
|
|
11
|
-
'bl-cc': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 1}, L ${x + 0.5} ${y + 0.5}`),
|
|
12
|
-
'bc-cc': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 1}, L ${x + 0.5} ${y + 0.5}`),
|
|
13
|
-
'br-cc': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 1}, L ${x + 0.5} ${y + 0.5}`),
|
|
14
|
-
'cc-tl': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0}`),
|
|
15
|
-
'cc-tc': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 0}`),
|
|
16
|
-
'cc-tr': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0}`),
|
|
17
|
-
'cc-cl': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0.5}`),
|
|
18
|
-
'cc-cr': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0.5}`),
|
|
19
|
-
'cc-bl': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 1}`),
|
|
20
|
-
'cc-bc': new TilePattern(0.5, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 1}`),
|
|
21
|
-
'cc-br': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 1}`),
|
|
22
|
-
'cr-cl': new TilePattern(1, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0.5}, L ${x + 0} ${y + 0.5}`),
|
|
23
|
-
'cr-tl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0.5}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0}`),
|
|
24
|
-
'cr-bl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0.5}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 1}`),
|
|
25
|
-
'cl-cr': new TilePattern(1, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0.5}, L ${x + 1} ${y + 0.5}`),
|
|
26
|
-
'cl-tr': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0.5}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0}`),
|
|
27
|
-
'cl-bl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0.5}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 1}`),
|
|
28
|
-
'tl-bc': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 1}`),
|
|
29
|
-
'tl-br': new TilePattern(1.4, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 1}`),
|
|
30
|
-
'tl-cr': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0.5}`),
|
|
31
|
-
'tc-bc': new TilePattern(1, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0}, L ${x + 0.5} ${y + 1}`),
|
|
32
|
-
'tc-br': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 1}`),
|
|
33
|
-
'tc-bl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 1}`),
|
|
34
|
-
'tr-cl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0.5}`),
|
|
35
|
-
'tr-bc': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 0}, L ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 1}`),
|
|
36
|
-
'bl-tr': new TilePattern(1.4, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0}`),
|
|
37
|
-
'bl-tc': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 0}`),
|
|
38
|
-
'bl-cr': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0.5}`),
|
|
39
|
-
'bc-tc': new TilePattern(1, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 0}`),
|
|
40
|
-
'bc-tr': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 1} ${y + 0}`),
|
|
41
|
-
'bc-tl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0.5} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0}`),
|
|
42
|
-
'br-cl': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0.5}`),
|
|
43
|
-
'br-tc': new TilePattern(1.2, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 0.5} ${y + 0}`),
|
|
44
|
-
'br-tl': new TilePattern(1.4, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 1} ${y + 1}, L ${x + 0.5} ${y + 0.5}, L ${x + 0} ${y + 0}`),
|
|
45
|
-
// oddities
|
|
46
|
-
'cl-bc': new TilePattern(0.7, (continuous, x, y) => `${continuous ? 'L' : 'M'} ${x + 0} ${y + 0.5}, L ${x + 0.5} ${y + 1}`)
|
|
47
|
-
};
|
|
48
|
-
constructor(length, path) {
|
|
49
|
-
this.length = length;
|
|
50
|
-
this.path = path;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export class Tile {
|
|
54
|
-
section;
|
|
55
|
-
x;
|
|
56
|
-
y;
|
|
57
|
-
pattern;
|
|
58
|
-
constructor(section, x, y, pattern) {
|
|
59
|
-
this.section = section;
|
|
60
|
-
this.x = x;
|
|
61
|
-
this.y = y;
|
|
62
|
-
this.pattern = pattern;
|
|
63
|
-
}
|
|
64
|
-
toSVGPath(continuous = false) {
|
|
65
|
-
return this.pattern.path(continuous, this.x, this.y);
|
|
66
|
-
}
|
|
67
|
-
toSVG() {
|
|
68
|
-
return `
|
|
69
|
-
<path d="${this.toSVGPath()}" />
|
|
70
|
-
${this.section.tiles[0] == this ? `<text x="${this.x}" y="${this.y}" font-size="0.2">${this.section.name}</text>` : ''}
|
|
71
|
-
`;
|
|
72
|
-
}
|
|
73
|
-
}
|
package/.built/track.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Positioner } from "./positioner";
|
|
2
|
-
import { Section } from "./section";
|
|
3
|
-
import { SectionPosition } from "./position";
|
|
4
|
-
export declare class Track {
|
|
5
|
-
section: Section;
|
|
6
|
-
length: number;
|
|
7
|
-
path: string;
|
|
8
|
-
positioners: Positioner[];
|
|
9
|
-
constructor(section: Section, length: number, path: string);
|
|
10
|
-
get head(): SectionPosition;
|
|
11
|
-
dump(): void;
|
|
12
|
-
}
|
package/.built/track.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SectionPosition } from "./position";
|
|
2
|
-
export class Track {
|
|
3
|
-
section;
|
|
4
|
-
length;
|
|
5
|
-
path;
|
|
6
|
-
positioners = [];
|
|
7
|
-
constructor(section, length, path) {
|
|
8
|
-
this.section = section;
|
|
9
|
-
this.length = length;
|
|
10
|
-
this.path = path;
|
|
11
|
-
}
|
|
12
|
-
// the start of the track within the section
|
|
13
|
-
get head() {
|
|
14
|
-
let offset = 0;
|
|
15
|
-
for (let track of this.section.tracks) {
|
|
16
|
-
if (track == this) {
|
|
17
|
-
return new SectionPosition(this.section, offset, false);
|
|
18
|
-
}
|
|
19
|
-
offset += track.length;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
dump() {
|
|
23
|
-
console.log(this.length);
|
|
24
|
-
}
|
|
25
|
-
}
|