@fmsim/machine 3.0.0-beta.4 → 3.0.0-beta.5
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/dist/agv-line.js +2 -2
- package/dist/agv-line.js.map +1 -1
- package/dist/agv.js +6 -2
- package/dist/agv.js.map +1 -1
- package/dist/buffer.js +2 -2
- package/dist/buffer.js.map +1 -1
- package/dist/conveyor-join.js +2 -2
- package/dist/conveyor-join.js.map +1 -1
- package/dist/conveyor.js +2 -2
- package/dist/conveyor.js.map +1 -1
- package/dist/crane.js +2 -2
- package/dist/crane.js.map +1 -1
- package/dist/equipment.js +2 -2
- package/dist/equipment.js.map +1 -1
- package/dist/factories/conveyor-3d.js +2 -2
- package/dist/factories/conveyor-3d.js.map +1 -1
- package/dist/factories/machine-3d.js +12 -12
- package/dist/factories/machine-3d.js.map +1 -1
- package/dist/factories/oht-3d.js +3 -4
- package/dist/factories/oht-3d.js.map +1 -1
- package/dist/features/legend-panel.js +29 -0
- package/dist/features/legend-panel.js.map +1 -0
- package/dist/features/legend-rows.js +88 -0
- package/dist/features/legend-rows.js.map +1 -0
- package/dist/features/lv-figures.js +137 -0
- package/dist/features/lv-figures.js.map +1 -0
- package/dist/features/lv-heights.js +20 -0
- package/dist/features/lv-heights.js.map +1 -0
- package/dist/features/mcs-status-default.js +3 -49
- package/dist/features/mcs-status-default.js.map +1 -1
- package/dist/features/oht-rail.js +32 -0
- package/dist/features/oht-rail.js.map +1 -0
- package/dist/features/vehicle-travel.js +18 -1
- package/dist/features/vehicle-travel.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcs-carrier-holder.js +19 -26
- package/dist/mcs-carrier-holder.js.map +1 -1
- package/dist/mcs-machine.js +10 -1
- package/dist/mcs-machine.js.map +1 -1
- package/dist/mcs-unit.js +10 -1
- package/dist/mcs-unit.js.map +1 -1
- package/dist/mcs-vehicle.js +0 -4
- package/dist/mcs-vehicle.js.map +1 -1
- package/dist/oht-line.js +7 -3
- package/dist/oht-line.js.map +1 -1
- package/dist/oht.js +2 -2
- package/dist/oht.js.map +1 -1
- package/dist/port.js +2 -2
- package/dist/port.js.map +1 -1
- package/dist/scene/root-container-override.js +15 -210
- package/dist/scene/root-container-override.js.map +1 -1
- package/dist/shelf.js +2 -2
- package/dist/shelf.js.map +1 -1
- package/dist/shuttle.js +2 -2
- package/dist/shuttle.js.map +1 -1
- package/dist/stocker.js +2 -2
- package/dist/stocker.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/src/agv-line.ts +2 -2
- package/src/agv.ts +7 -2
- package/src/buffer.ts +2 -2
- package/src/conveyor-join.ts +2 -2
- package/src/conveyor.ts +2 -2
- package/src/crane.ts +2 -2
- package/src/equipment.ts +2 -2
- package/src/factories/conveyor-3d.ts +2 -2
- package/src/factories/machine-3d.ts +11 -12
- package/src/factories/oht-3d.ts +3 -5
- package/src/features/legend-panel.ts +31 -0
- package/src/features/legend-rows.ts +86 -0
- package/src/features/lv-figures.ts +144 -0
- package/src/features/lv-heights.ts +22 -0
- package/src/features/mcs-status-default.ts +3 -53
- package/src/features/oht-rail.ts +31 -0
- package/src/features/vehicle-travel.ts +16 -1
- package/src/index.ts +4 -0
- package/src/mcs-carrier-holder.ts +17 -29
- package/src/mcs-machine.ts +12 -1
- package/src/mcs-unit.ts +12 -1
- package/src/mcs-vehicle.ts +0 -4
- package/src/oht-line.ts +7 -3
- package/src/oht.ts +2 -2
- package/src/port.ts +2 -2
- package/src/scene/root-container-override.ts +15 -207
- package/src/shelf.ts +2 -2
- package/src/shuttle.ts +2 -2
- package/src/stocker.ts +2 -2
- package/translations/en.json +7 -1
- package/translations/ja.json +7 -1
- package/translations/ko.json +7 -1
- package/translations/ms.json +7 -1
- package/translations/zh.json +7 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import JSON5 from 'json5';
|
|
2
|
+
import tinycolor from 'tinycolor2';
|
|
3
|
+
import { legendRowOf } from '@fmsim/figure-capabilities';
|
|
4
|
+
/*
|
|
5
|
+
* A board's legend rows (ADR-0167 decision 20): the legend a row chose is read here, by the row's board property, for
|
|
6
|
+
* fmsim's own components and its figures alike. Kept in the board properties they have always had.
|
|
7
|
+
*/
|
|
8
|
+
// rootModel.state.style[name] 에 저장된 legend/animation 값은 보드 직렬화 형태에 따라 (a) 정상 object 또는 (b) JSON 문자열
|
|
9
|
+
// 둘 다로 나타난다 (2026-06-09 진단). WeakMap<state, Map<rawString, parsed>> 으로 *raw string 자체를 key* — 보드 편집으로 raw 가
|
|
10
|
+
// 바뀌면 자연 무효화, 같은 raw 의 반복 lookup 은 O(1). root 가 GC 되면 cache 도 같이 GC.
|
|
11
|
+
const _legendParseCache = new WeakMap();
|
|
12
|
+
export function parseLegendIfString(state, raw) {
|
|
13
|
+
if (typeof raw !== 'string')
|
|
14
|
+
return raw;
|
|
15
|
+
let cache = _legendParseCache.get(state);
|
|
16
|
+
if (!cache) {
|
|
17
|
+
cache = new Map();
|
|
18
|
+
_legendParseCache.set(state, cache);
|
|
19
|
+
}
|
|
20
|
+
if (cache.has(raw))
|
|
21
|
+
return cache.get(raw);
|
|
22
|
+
let parsed;
|
|
23
|
+
try {
|
|
24
|
+
parsed = JSON.parse(raw);
|
|
25
|
+
}
|
|
26
|
+
catch (_a) {
|
|
27
|
+
parsed = raw; // parse 실패 시 raw 보존
|
|
28
|
+
}
|
|
29
|
+
cache.set(raw, parsed);
|
|
30
|
+
return parsed;
|
|
31
|
+
}
|
|
32
|
+
/** The legend a board property names, read from the board's style: none when the board chose none. */
|
|
33
|
+
export function boardLegendOf(root, property) {
|
|
34
|
+
var _a, _b, _c;
|
|
35
|
+
const name = (_b = (_a = root === null || root === void 0 ? void 0 : root.rootModel) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b[property];
|
|
36
|
+
if (!name || !((_c = root === null || root === void 0 ? void 0 : root.state) === null || _c === void 0 ? void 0 : _c.style))
|
|
37
|
+
return undefined;
|
|
38
|
+
return parseLegendIfString(root.state, root.state.style[name]) || undefined;
|
|
39
|
+
}
|
|
40
|
+
/** The legend the board chose for a row, for a component on it: none when the row is not registered or not chosen. */
|
|
41
|
+
export function boardLegendOfRow(component, row) {
|
|
42
|
+
const registered = legendRowOf(row);
|
|
43
|
+
return registered ? boardLegendOf(component === null || component === void 0 ? void 0 : component.root, registered.property) : undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A legend colour as a figure takes it: `#RRGGBB`. fmsim's own components draw any CSS colour a legend gives (`navy`,
|
|
47
|
+
* `rgb(33, 148, 33)`, `#f00`); a figure's table takes `#RRGGBB` only (ADR-0166), so an opaque colour is written so. A
|
|
48
|
+
* colour that is not opaque (`transparent`) has no `#RRGGBB` and stays as it is -- the figure says it did not take it.
|
|
49
|
+
*/
|
|
50
|
+
export function figureColourOf(value) {
|
|
51
|
+
if (typeof value !== 'string' || /^#[0-9a-f]{6}$/i.test(value))
|
|
52
|
+
return value;
|
|
53
|
+
const colour = tinycolor(value.trim());
|
|
54
|
+
return colour.isValid() && colour.getAlpha() === 1 ? colour.toHexString() : value;
|
|
55
|
+
}
|
|
56
|
+
/** A legend as a figure takes it from fmsim: each entry's colour, written `#RRGGBB`, and effect; an entry's JSON5 text read. */
|
|
57
|
+
export function colourAndEffect(legend) {
|
|
58
|
+
return Object.fromEntries(Object.entries(legend).map(([code, raw]) => {
|
|
59
|
+
let entry = raw;
|
|
60
|
+
if (typeof entry === 'string' && entry.trim().startsWith('{')) {
|
|
61
|
+
try {
|
|
62
|
+
entry = JSON5.parse(entry);
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
return [code, raw];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!entry || typeof entry !== 'object')
|
|
69
|
+
return [code, figureColourOf(entry)];
|
|
70
|
+
const { color, effect } = entry;
|
|
71
|
+
return [code, Object.assign(Object.assign({}, (color !== undefined ? { color: figureColourOf(color) } : {})), (effect !== undefined ? { effect } : {}))];
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
/** The rows the components of a board follow, each once: what its LEGENDS panel shows first. */
|
|
75
|
+
export function legendRowsOnBoard(container) {
|
|
76
|
+
const used = new Set();
|
|
77
|
+
const walk = (c) => {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
for (const row of (_a = c === null || c === void 0 ? void 0 : c.legendRowsUsed) !== null && _a !== void 0 ? _a : [])
|
|
80
|
+
if (row)
|
|
81
|
+
used.add(row);
|
|
82
|
+
for (const child of (_b = c === null || c === void 0 ? void 0 : c.components) !== null && _b !== void 0 ? _b : [])
|
|
83
|
+
walk(child);
|
|
84
|
+
};
|
|
85
|
+
walk(container);
|
|
86
|
+
return used;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=legend-rows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend-rows.js","sourceRoot":"","sources":["../../src/features/legend-rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAGxD;;;GAGG;AAEH,oGAAoG;AACpG,4GAA4G;AAC5G,qEAAqE;AACrE,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAA4B,CAAA;AAEjE,MAAM,UAAU,mBAAmB,CAAC,KAAU,EAAE,GAAQ;IACtD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAA;IACvC,IAAI,KAAK,GAAG,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,IAAI,GAAG,EAAE,CAAA;QACjB,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IACrC,CAAC;IACD,IAAI,KAAK,C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,CAAC,CAAC,CACH,CAAA;AACH,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,iBAAiB,CAAC,SAAc;IAC9C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,MAAM,IAAI,GAAG,CAAC,CAAM,EAAE,EAAE;;QACtB,KAAK,MAAM,GAAG,IAAI,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,cAAc,mCAAI,EAAE;YAAE,IAAI,GAAG;gBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACjE,KAAK,MAAM,KAAK,IAAI,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,UAAU,mCAAI,EAAE;YAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IACtD,CAAC,CAAA;IACD,IAAI,CAAC,SAAS,CAAC,CAAA;IACf,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import JSON5 from 'json5'\nimport tinycolor from 'tinycolor2'\nimport { legendRowOf } from '@fmsim/figure-capabilities'\nimport type { Legend } from './mcs-status-default'\n\n/*\n * A board's legend rows (ADR-0167 decision 20): the legend a row chose is read here, by the row's board property, for\n * fmsim's own components and its figures alike. Kept in the board properties they have always had.\n */\n\n// rootModel.state.style[name] 에 저장된 legend/animation 값은 보드 직렬화 형태에 따라 (a) 정상 object 또는 (b) JSON 문자열\n// 둘 다로 나타난다 (2026-06-09 진단). WeakMap<state, Map<rawString, parsed>> 으로 *raw string 자체를 key* — 보드 편집으로 raw 가\n// 바뀌면 자연 무효화, 같은 raw 의 반복 lookup 은 O(1). root 가 GC 되면 cache 도 같이 GC.\nconst _legendParseCache = new WeakMap<object, Map<string, any>>()\n\nexport function parseLegendIfString(state: any, raw: any): any {\n if (typeof raw !== 'string') return raw\n let cache = _legendParseCache.get(state)\n if (!cache) {\n cache = new Map()\n _legendParseCache.set(state, cache)\n }\n if (cache.has(raw)) return cache.get(raw)\n let parsed: any\n try {\n parsed = JSON.parse(raw)\n } catch {\n parsed = raw // parse 실패 시 raw 보존\n }\n cache.set(raw, parsed)\n return parsed\n}\n\n/** The legend a board property names, read from the board's style: none when the board chose none. */\nexport function boardLegendOf(root: any, property: string): Legend | undefined {\n const name = root?.rootModel?.state?.[property]\n if (!name || !root?.state?.style) return undefined\n return parseLegendIfString(root.state, root.state.style[name]) || undefined\n}\n\n/** The legend the board chose for a row, for a component on it: none when the row is not registered or not chosen. */\nexport function boardLegendOfRow(component: any, row: unknown): Legend | undefined {\n const registered = legendRowOf(row)\n return registered ? boardLegendOf(component?.root, registered.property) : undefined\n}\n\n/**\n * A legend colour as a figure takes it: `#RRGGBB`. fmsim's own components draw any CSS colour a legend gives (`navy`,\n * `rgb(33, 148, 33)`, `#f00`); a figure's table takes `#RRGGBB` only (ADR-0166), so an opaque colour is written so. A\n * colour that is not opaque (`transparent`) has no `#RRGGBB` and stays as it is -- the figure says it did not take it.\n */\nexport function figureColourOf(value: unknown): unknown {\n if (typeof value !== 'string' || /^#[0-9a-f]{6}$/i.test(value)) return value\n const colour = tinycolor(value.trim())\n return colour.isValid() && colour.getAlpha() === 1 ? colour.toHexString() : value\n}\n\n/** A legend as a figure takes it from fmsim: each entry's colour, written `#RRGGBB`, and effect; an entry's JSON5 text read. */\nexport function colourAndEffect(legend: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(\n Object.entries(legend).map(([code, raw]) => {\n let entry = raw\n if (typeof entry === 'string' && entry.trim().startsWith('{')) {\n try {\n entry = JSON5.parse(entry)\n } catch {\n return [code, raw]\n }\n }\n if (!entry || typeof entry !== 'object') return [code, figureColourOf(entry)]\n const { color, effect } = entry as { color?: unknown; effect?: unknown }\n return [code, { ...(color !== undefined ? { color: figureColourOf(color) } : {}), ...(effect !== undefined ? { effect } : {}) }]\n })\n )\n}\n\n/** The rows the components of a board follow, each once: what its LEGENDS panel shows first. */\nexport function legendRowsOnBoard(container: any): Set<string> {\n const used = new Set<string>()\n const walk = (c: any) => {\n for (const row of c?.legendRowsUsed ?? []) if (row) used.add(row)\n for (const child of c?.components ?? []) walk(child)\n }\n walk(container)\n return used\n}\n"]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { figureLegendSourcesChanged, registerFigureCapability, registerFigureLegendResolver } from '@hatiolab/things-scene';
|
|
2
|
+
import { CARRIER_HOLDER, MACHINE, STATUS, STATUS_LEGEND_ROLE, UNIT, VEHICLE, carrierHolderProperties, statusProperties } from '@fmsim/figure-capabilities';
|
|
3
|
+
import { themesAnimationMap, themesColorMap } from '@fmsim/api';
|
|
4
|
+
import { boardLegendOfRow, colourAndEffect, parseLegendIfString } from './legend-rows';
|
|
5
|
+
import { MACHINE_HEIGHTS, TRANSPORT_SURFACE_HEIGHT } from './lv-heights';
|
|
6
|
+
import { VehicleTravel } from './vehicle-travel';
|
|
7
|
+
import { CarrierHolder } from '../mcs-carrier-holder';
|
|
8
|
+
/*
|
|
9
|
+
* fmsim's figure capabilities (ADR-0167 decision 22): what a figure is in LV -- fmsim.Machine, fmsim.Unit or
|
|
10
|
+
* fmsim.Vehicle, one at most -- and the features worn with any of them, fmsim.Status and fmsim.CarrierHolder. A kind
|
|
11
|
+
* says its type (`lvType`), the board row a status follows; the features are the mixins fmsim's own wear.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* STATUS as the figure takes it: a code, so a number (MCS sends 4001) is given as its text ('4001'). The status table reads
|
|
15
|
+
* STATUS as a text and a figure refuses data whose value is not of the declared kind; the component's own data is not changed.
|
|
16
|
+
*/
|
|
17
|
+
export function statusAsCode(data) {
|
|
18
|
+
return data && typeof data === 'object' && typeof data.STATUS === 'number' ? Object.assign(Object.assign({}, data), { STATUS: String(data.STATUS) }) : data;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* `fmsim.Status`: the figure follows the board row of its kind's type, a change of its legend has its tables chosen
|
|
22
|
+
* again, and its STATUS reaches the figure as a code. The colour is its capability's table, drawn by things-scene.
|
|
23
|
+
*/
|
|
24
|
+
export function StatusFigure(Base) {
|
|
25
|
+
return class extends Base {
|
|
26
|
+
/** The figure's inputs, given the data's STATUS as a code when they are made (a new release starts them again) */
|
|
27
|
+
get figureInputs() {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const inputs = super.figureInputs;
|
|
30
|
+
if (inputs && inputs !== this._statusInputs) {
|
|
31
|
+
this._statusInputs = inputs;
|
|
32
|
+
if (typeof ((_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.STATUS) === 'number')
|
|
33
|
+
inputs.setData(statusAsCode(this.state.data));
|
|
34
|
+
}
|
|
35
|
+
return inputs;
|
|
36
|
+
}
|
|
37
|
+
/** The board row its status follows: its kind's type, none without a kind */
|
|
38
|
+
get statusLegendRow() {
|
|
39
|
+
return this.lvType;
|
|
40
|
+
}
|
|
41
|
+
get legendRowsUsed() {
|
|
42
|
+
var _a;
|
|
43
|
+
const row = this.statusLegendRow;
|
|
44
|
+
return [...((_a = super.legendRowsUsed) !== null && _a !== void 0 ? _a : []), ...(row ? [row] : [])];
|
|
45
|
+
}
|
|
46
|
+
onchange(after, before) {
|
|
47
|
+
var _a;
|
|
48
|
+
(_a = super.onchange) === null || _a === void 0 ? void 0 : _a.call(this, after && 'data' in after ? Object.assign(Object.assign({}, after), { data: statusAsCode(after.data) }) : after, before);
|
|
49
|
+
if (after && 'legendName' in after)
|
|
50
|
+
figureLegendSourcesChanged(this);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** An LV kind: its type, chosen or its default, is `lvType`; another type has the figure's legends chosen again. */
|
|
55
|
+
function Kind(Base, property, defaultOf) {
|
|
56
|
+
return class extends Base {
|
|
57
|
+
get lvType() {
|
|
58
|
+
var _a;
|
|
59
|
+
const chosen = (_a = this.state) === null || _a === void 0 ? void 0 : _a[property];
|
|
60
|
+
return typeof chosen === 'string' && chosen ? chosen : defaultOf(this);
|
|
61
|
+
}
|
|
62
|
+
onchange(after, before) {
|
|
63
|
+
var _a;
|
|
64
|
+
(_a = super.onchange) === null || _a === void 0 ? void 0 : _a.call(this, after, before);
|
|
65
|
+
if (after && property in after)
|
|
66
|
+
figureLegendSourcesChanged(this);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* `fmsim.Machine`: an LV machine of a type, equipment unless chosen -- it stands as tall as fmsim's own machine of that
|
|
72
|
+
* type when the board writes no height (things-scene asks the component, `effectiveDepth`).
|
|
73
|
+
*/
|
|
74
|
+
export function LVMachine(Base) {
|
|
75
|
+
return class extends Kind(Base, 'machineType', () => 'equipment') {
|
|
76
|
+
get effectiveDepth() {
|
|
77
|
+
return MACHINE_HEIGHTS[this.lvType];
|
|
78
|
+
}
|
|
79
|
+
onchange(after, before) {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
super.onchange(after, before);
|
|
82
|
+
/* Another type stands at another height: the 3D object takes it */
|
|
83
|
+
if (after && 'machineType' in after) {
|
|
84
|
+
const real = this._realObject;
|
|
85
|
+
(_a = real === null || real === void 0 ? void 0 : real.updateDimension) === null || _a === void 0 ? void 0 : _a.call(real);
|
|
86
|
+
(_b = real === null || real === void 0 ? void 0 : real.updateTransform) === null || _b === void 0 ? void 0 : _b.call(real);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/** `fmsim.Unit`: an LV unit of a type, a port unless chosen -- a tag LV handles it by */
|
|
92
|
+
export function LVUnit(Base) {
|
|
93
|
+
return Kind(Base, 'unitType', () => 'port');
|
|
94
|
+
}
|
|
95
|
+
/** `fmsim.Vehicle`: an LV vehicle -- it travels between nodes; its type, unless chosen, an AGV on the floor and an OHT on the ceiling */
|
|
96
|
+
export function LVVehicle(Base) {
|
|
97
|
+
return Kind(VehicleTravel(Base), 'vehicleType', figure => { var _a; return (((_a = figure === null || figure === void 0 ? void 0 : figure.constructor) === null || _a === void 0 ? void 0 : _a.placement) === 'ceiling' ? 'oht' : 'agv'); });
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `fmsim.CarrierHolder` on a figure: carriers change hands at the transport surface, so a holder that takes them on its
|
|
101
|
+
* top stands that tall when nothing else says -- as fmsim's own AGV and shuttle do. A machine's height wins (whichever is
|
|
102
|
+
* worn over the other); a holder that hangs them or hangs itself from the ceiling (an OHT) keeps its own.
|
|
103
|
+
*/
|
|
104
|
+
export function FigureCarrierHolder(Base) {
|
|
105
|
+
return class extends CarrierHolder(Base) {
|
|
106
|
+
get effectiveDepth() {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
const given = super.effectiveDepth;
|
|
109
|
+
if (given !== undefined)
|
|
110
|
+
return given;
|
|
111
|
+
const hung = ((_a = this.state) === null || _a === void 0 ? void 0 : _a.carrierMount) === 'HANG' || ((_b = this.constructor) === null || _b === void 0 ? void 0 : _b.placement) === 'ceiling';
|
|
112
|
+
return hung ? undefined : TRANSPORT_SURFACE_HEIGHT;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The legend a status figure shows its STATUS by: its own choice (`legendName`, as fmsim's own have), then the board row
|
|
118
|
+
* of its kind's type; none chosen, no answer (its capability's table, fmsim's default legends).
|
|
119
|
+
*/
|
|
120
|
+
export function statusLegend({ component, role }) {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
if (role !== STATUS_LEGEND_ROLE)
|
|
123
|
+
return undefined;
|
|
124
|
+
const own = (_a = component === null || component === void 0 ? void 0 : component.state) === null || _a === void 0 ? void 0 : _a.legendName;
|
|
125
|
+
const root = component === null || component === void 0 ? void 0 : component.root;
|
|
126
|
+
const row = component === null || component === void 0 ? void 0 : component.statusLegendRow;
|
|
127
|
+
const legend = (typeof own === 'string' && own && ((_b = root === null || root === void 0 ? void 0 : root.state) === null || _b === void 0 ? void 0 : _b.style) ? parseLegendIfString(root.state, root.state.style[own]) : undefined) ||
|
|
128
|
+
(row ? boardLegendOfRow(component, row) : undefined);
|
|
129
|
+
return legend && typeof legend === 'object' ? colourAndEffect(legend) : undefined;
|
|
130
|
+
}
|
|
131
|
+
registerFigureLegendResolver(statusLegend);
|
|
132
|
+
registerFigureCapability(MACHINE, base => LVMachine(base));
|
|
133
|
+
registerFigureCapability(UNIT, base => LVUnit(base));
|
|
134
|
+
registerFigureCapability(VEHICLE, base => LVVehicle(base));
|
|
135
|
+
registerFigureCapability(Object.assign(Object.assign({}, STATUS), { properties: statusProperties({ legends: themesColorMap }) }), base => StatusFigure(base));
|
|
136
|
+
registerFigureCapability(Object.assign(Object.assign({}, CARRIER_HOLDER), { properties: carrierHolderProperties({ legends: themesColorMap, animations: themesAnimationMap, mount: true }) }), base => FigureCarrierHolder(base));
|
|
137
|
+
//# sourceMappingURL=lv-figures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lv-figures.js","sourceRoot":"","sources":["../../src/features/lv-figures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAC3H,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC1J,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACtF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS;IACpC,OAAO,IAAI,IAAI,OAAO,I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AAwB,iCACjB,cAAc,KAAE,UAAU,EAAE,uBAAuB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAU,KAC3I,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAU,CAC3C,CAAA","sourcesContent":["import { figureLegendSourcesChanged, registerFigureCapability, registerFigureLegendResolver } from '@hatiolab/things-scene'\nimport { CARRIER_HOLDER, MACHINE, STATUS, STATUS_LEGEND_ROLE, UNIT, VEHICLE, carrierHolderProperties, statusProperties } from '@fmsim/figure-capabilities'\nimport { themesAnimationMap, themesColorMap } from '@fmsim/api'\nimport { boardLegendOfRow, colourAndEffect, parseLegendIfString } from './legend-rows'\nimport { MACHINE_HEIGHTS, TRANSPORT_SURFACE_HEIGHT } from './lv-heights'\nimport { VehicleTravel } from './vehicle-travel'\nimport { CarrierHolder } from '../mcs-carrier-holder'\n\n/*\n * fmsim's figure capabilities (ADR-0167 decision 22): what a figure is in LV -- fmsim.Machine, fmsim.Unit or\n * fmsim.Vehicle, one at most -- and the features worn with any of them, fmsim.Status and fmsim.CarrierHolder. A kind\n * says its type (`lvType`), the board row a status follows; the features are the mixins fmsim's own wear.\n */\n\n/**\n * STATUS as the figure takes it: a code, so a number (MCS sends 4001) is given as its text ('4001'). The status table reads\n * STATUS as a text and a figure refuses data whose value is not of the declared kind; the component's own data is not changed.\n */\nexport function statusAsCode(data: any): any {\n return data && typeof data === 'object' && typeof data.STATUS === 'number' ? { ...data, STATUS: String(data.STATUS) } : data\n}\n\n/**\n * `fmsim.Status`: the figure follows the board row of its kind's type, a change of its legend has its tables chosen\n * again, and its STATUS reaches the figure as a code. The colour is its capability's table, drawn by things-scene.\n */\nexport function StatusFigure<T extends new (...args: any[]) => any>(Base: T) {\n return class extends Base {\n _statusInputs?: unknown\n\n /** The figure's inputs, given the data's STATUS as a code when they are made (a new release starts them again) */\n get figureInputs(): any {\n const inputs = super.figureInputs\n if (inputs && inputs !== this._statusInputs) {\n this._statusInputs = inputs\n if (typeof (this as any).state?.data?.STATUS === 'number') inputs.setData(statusAsCode((this as any).state.data))\n }\n return inputs\n }\n\n /** The board row its status follows: its kind's type, none without a kind */\n get statusLegendRow(): string | undefined {\n return (this as any).lvType\n }\n\n get legendRowsUsed(): string[] {\n const row = this.statusLegendRow\n return [...((super.legendRowsUsed as string[] | undefined) ?? []), ...(row ? [row] : [])]\n }\n\n onchange(after: Record<string, any>, before: Record<string, any>) {\n super.onchange?.(after && 'data' in after ? { ...after, data: statusAsCode(after.data) } : after, before)\n if (after && 'legendName' in after) figureLegendSourcesChanged(this)\n }\n }\n}\n\n/** An LV kind: its type, chosen or its default, is `lvType`; another type has the figure's legends chosen again. */\nfunction Kind<T extends new (...args: any[]) => any>(Base: T, property: string, defaultOf: (figure: any) => string) {\n return class extends Base {\n get lvType(): string {\n const chosen = (this as any).state?.[property]\n return typeof chosen === 'string' && chosen ? chosen : defaultOf(this)\n }\n\n onchange(after: Record<string, any>, before: Record<string, any>) {\n super.onchange?.(after, before)\n if (after && property in after) figureLegendSourcesChanged(this)\n }\n }\n}\n\n/**\n * `fmsim.Machine`: an LV machine of a type, equipment unless chosen -- it stands as tall as fmsim's own machine of that\n * type when the board writes no height (things-scene asks the component, `effectiveDepth`).\n */\nexport function LVMachine<T extends new (...args: any[]) => any>(Base: T) {\n return class extends Kind(Base, 'machineType', () => 'equipment') {\n get effectiveDepth(): number | undefined {\n return MACHINE_HEIGHTS[this.lvType]\n }\n\n onchange(after: Record<string, any>, before: Record<string, any>) {\n super.onchange(after, before)\n /* Another type stands at another height: the 3D object takes it */\n if (after && 'machineType' in after) {\n const real = (this as any)._realObject\n real?.updateDimension?.()\n real?.updateTransform?.()\n }\n }\n }\n}\n\n/** `fmsim.Unit`: an LV unit of a type, a port unless chosen -- a tag LV handles it by */\nexport function LVUnit<T extends new (...args: any[]) => any>(Base: T) {\n return Kind(Base, 'unitType', () => 'port')\n}\n\n/** `fmsim.Vehicle`: an LV vehicle -- it travels between nodes; its type, unless chosen, an AGV on the floor and an OHT on the ceiling */\nexport function LVVehicle<T extends new (...args: any[]) => any>(Base: T) {\n return Kind(VehicleTravel(Base), 'vehicleType', figure => (figure?.constructor?.placement === 'ceiling' ? 'oht' : 'agv'))\n}\n\n/**\n * `fmsim.CarrierHolder` on a figure: carriers change hands at the transport surface, so a holder that takes them on its\n * top stands that tall when nothing else says -- as fmsim's own AGV and shuttle do. A machine's height wins (whichever is\n * worn over the other); a holder that hangs them or hangs itself from the ceiling (an OHT) keeps its own.\n */\nexport function FigureCarrierHolder<T extends new (...args: any[]) => any>(Base: T) {\n return class extends CarrierHolder(Base) {\n get effectiveDepth(): number | undefined {\n const given = super.effectiveDepth\n if (given !== undefined) return given\n const hung = (this as any).state?.carrierMount === 'HANG' || (this as any).constructor?.placement === 'ceiling'\n return hung ? undefined : TRANSPORT_SURFACE_HEIGHT\n }\n }\n}\n\n/**\n * The legend a status figure shows its STATUS by: its own choice (`legendName`, as fmsim's own have), then the board row\n * of its kind's type; none chosen, no answer (its capability's table, fmsim's default legends).\n */\nexport function statusLegend({ component, role }: { component: any; role: string }): unknown {\n if (role !== STATUS_LEGEND_ROLE) return undefined\n const own = component?.state?.legendName\n const root = component?.root\n const row = component?.statusLegendRow\n const legend =\n (typeof own === 'string' && own && root?.state?.style ? parseLegendIfString(root.state, root.state.style[own]) : undefined) ||\n (row ? boardLegendOfRow(component, row) : undefined)\n return legend && typeof legend === 'object' ? colourAndEffect(legend) : undefined\n}\n\nregisterFigureLegendResolver(statusLegend)\nregisterFigureCapability(MACHINE, base => LVMachine(base) as never)\nregisterFigureCapability(UNIT, base => LVUnit(base) as never)\nregisterFigureCapability(VEHICLE, base => LVVehicle(base) as never)\nregisterFigureCapability({ ...STATUS, properties: statusProperties({ legends: themesColorMap }) as never }, base => StatusFigure(base) as never)\nregisterFigureCapability(\n { ...CARRIER_HOLDER, properties: carrierHolderProperties({ legends: themesColorMap, animations: themesAnimationMap, mount: true }) as never },\n base => FigureCarrierHolder(base) as never\n)\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LV's heights (ADR-0167 decision 21): fmsim gives no height on the board -- a machine stands as tall as its type, in
|
|
3
|
+
* transport surfaces, the height every port and transport stands at so carriers move between them level. fmsim's own
|
|
4
|
+
* machines and a figure wearing fmsim.Machine read the one table.
|
|
5
|
+
*/
|
|
6
|
+
/** 포트 기본 높이 (절대값). 모든 이송장치의 상단 높이 = 이 값 — 캐리어가 이송장치 간 높이 차 없이 이동하는 기준 */
|
|
7
|
+
export const TRANSPORT_SURFACE_HEIGHT = 30;
|
|
8
|
+
/** The height a machine of each type stands at, by its legend row name */
|
|
9
|
+
export const MACHINE_HEIGHTS = {
|
|
10
|
+
equipment: 3 * TRANSPORT_SURFACE_HEIGHT,
|
|
11
|
+
buffer: TRANSPORT_SURFACE_HEIGHT,
|
|
12
|
+
conveyor: TRANSPORT_SURFACE_HEIGHT
|
|
13
|
+
};
|
|
14
|
+
/** How opaque fmsim's own machine of each type is drawn: equipment is seen through, so the ports and carriers in it show */
|
|
15
|
+
export const MACHINE_OPACITY = {
|
|
16
|
+
equipment: 0.75,
|
|
17
|
+
buffer: 1,
|
|
18
|
+
conveyor: 1
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=lv-heights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lv-heights.js","sourceRoot":"","sources":["../../src/features/lv-heights.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAE1C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,SAAS,EAAE,CAAC,GAAG,wBAAwB;IACvC,MAAM,EAAE,wBAAwB;IAChC,QAAQ,EAAE,wBAAwB;CACnC,CAAA;AAED,4HAA4H;AAC5H,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC;CACZ,CAAA","sourcesContent":["/**\n * LV's heights (ADR-0167 decision 21): fmsim gives no height on the board -- a machine stands as tall as its type, in\n * transport surfaces, the height every port and transport stands at so carriers move between them level. fmsim's own\n * machines and a figure wearing fmsim.Machine read the one table.\n */\n\n/** 포트 기본 높이 (절대값). 모든 이송장치의 상단 높이 = 이 값 — 캐리어가 이송장치 간 높이 차 없이 이동하는 기준 */\nexport const TRANSPORT_SURFACE_HEIGHT = 30\n\n/** The height a machine of each type stands at, by its legend row name */\nexport const MACHINE_HEIGHTS: Record<string, number> = {\n equipment: 3 * TRANSPORT_SURFACE_HEIGHT,\n buffer: TRANSPORT_SURFACE_HEIGHT,\n conveyor: TRANSPORT_SURFACE_HEIGHT\n}\n\n/** How opaque fmsim's own machine of each type is drawn: equipment is seen through, so the ports and carriers in it show */\nexport const MACHINE_OPACITY: Record<string, number> = {\n equipment: 0.75,\n buffer: 1,\n conveyor: 1\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveLegend, resolveLegendEntries } from '@hatiolab/things-scene';
|
|
2
|
-
import { LEGEND_CARRIER, legendColor } from '@fmsim/figure-capabilities';
|
|
3
|
-
/* 범례 항목 모양과 캐리어 기본 범례는 피규어 능력과 한 곳(@fmsim/figure-capabilities, ADR-0167) */
|
|
4
|
-
export { LEGEND_CARRIER, legendColor };
|
|
2
|
+
import { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor } from '@fmsim/figure-capabilities';
|
|
3
|
+
/* 범례 항목 모양과 캐리어 · 상태 기본 범례는 피규어 능력과 한 곳(@fmsim/figure-capabilities, ADR-0167) */
|
|
4
|
+
export { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor };
|
|
5
5
|
/**
|
|
6
6
|
* 코드의 범례 항목: 그 코드의 항목, 없으면 `default` (ADR-0166 판정 6). things-scene 의 한 조회(resolveLegend)로 읽는다 — 피규어의 표와
|
|
7
7
|
* 보드 매핑이 읽는 것과 같다.
|
|
@@ -28,52 +28,6 @@ export function legendRangeEntryOf(value, legend) {
|
|
|
28
28
|
return resolveLegendEntries(value, entries, legend.default);
|
|
29
29
|
}
|
|
30
30
|
export const LEGEND_NULL = { default: '#F0F0F0' };
|
|
31
|
-
export const LEGEND_MACHINE = {
|
|
32
|
-
'1000': '#707070', // DISCONNECTED
|
|
33
|
-
'1001': '#8BDA5B', // UP
|
|
34
|
-
'1002': '#EB3245', // OUTOFSERVICE
|
|
35
|
-
'1003': '#5630D0', // PM
|
|
36
|
-
'1004': '#FFFFFF', // NOTONLINE
|
|
37
|
-
'1005': '#404040', // DOWN
|
|
38
|
-
'1006': '#F4F226', // NOTAUTO
|
|
39
|
-
'1007': '#FD9B00', // ALARM
|
|
40
|
-
'1008': '#4AA7FE', // FULL
|
|
41
|
-
default: '#F0F0F0'
|
|
42
|
-
};
|
|
43
|
-
export const LEGEND_VEHICLE = {
|
|
44
|
-
'4000': '#EB3245', // OUTOFSERVICE
|
|
45
|
-
'4001': '#8BDA5B', // ASSIGNED
|
|
46
|
-
// '4002': '#cbf266', // ASSIGNED_ACQUIRING
|
|
47
|
-
// '4003': '#cbf266', // ASSIGNED_DEPOSITING
|
|
48
|
-
// '4004': '#cbf266', // ASSIGNED_ENROUTE
|
|
49
|
-
// '4005': '#cbf266', // ASSIGNED_PARKED
|
|
50
|
-
'4006': '#FD9B00', // NOTASSIGNED
|
|
51
|
-
'4007': '#32D1C4', // INSTALLED
|
|
52
|
-
'4008': '#9790EC', // CHARGING
|
|
53
|
-
'4009': '#4AA7FE', // CHARGED
|
|
54
|
-
'4010': '#404040', // REMOVED
|
|
55
|
-
default: '#F0F0F0'
|
|
56
|
-
};
|
|
57
|
-
export const LEGEND_UNIT = {
|
|
58
|
-
'2000': '#FD9B00', // BANNED
|
|
59
|
-
'2001': '#404040', // DOWN
|
|
60
|
-
'2002': '#8BDA5B', // EMPTY
|
|
61
|
-
'2003': '#FFFFFF', // EMPTY_RESERVED
|
|
62
|
-
'2004': '#32D1C4', // FULL_RESERVED
|
|
63
|
-
'2005': '#4AA7FE', // FULL
|
|
64
|
-
'2006': '#EB3245', // NOTINSERVICE
|
|
65
|
-
default: '#F0F0F0'
|
|
66
|
-
};
|
|
67
|
-
export const LEGEND_CRANE = {
|
|
68
|
-
'3000': '#EB3245', // OUTOFSERVICE
|
|
69
|
-
// '3001': '#404040', // DOWN
|
|
70
|
-
// '3002': '#8BDA5B', // EMPTY
|
|
71
|
-
'3003': '#FFFFFF', // IDLE
|
|
72
|
-
'3004': '#32D1C4', // ACTIVE
|
|
73
|
-
// '3005': '#4AA7FE', // FULL
|
|
74
|
-
// '3006': '#EB3245', // NOTINSERVICE
|
|
75
|
-
default: '#F0F0F0'
|
|
76
|
-
};
|
|
77
31
|
/**
|
|
78
32
|
* carrier legend(테마) 해석 — carrier 컴포넌트(carrier.ts get legend)와 동일 로직 단일 소스.
|
|
79
33
|
* parent 에 carrierLegendName 이 지정되면 그 style 을, 아니면 board 전역 carrierLegendTheme,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcs-status-default.js","sourceRoot":"","sources":["../../src/features/mcs-status-default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAkC,MAAM,wBAAwB,CAAA;AAC5G,OAAO,EAAE,cAAc,EAAE,WAAW,EAAiC,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"mcs-status-default.js","sourceRoot":"","sources":["../../src/features/mcs-status-default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAkC,MAAM,wBAAwB,CAAA;AAC5G,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,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AAc;;IACjD,MAAM,iBAAiB,GAAG,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,0CAAE,KAAK,0CAAE,iBAAiB,CAAA;IACrE,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,CAAA,MAAA,MAAC,SAAS,CAAC,IAAY,0CAAE,KAAK,0CAAG,iBAAiB,CAAC,KAAI,cAAc,CAAA;IAC9E,CAAC;IACD,OAAO,CAAA,MAAC,SAAS,CAAC,IAAY,0CAAE,kBAAkB,KAAI,cAAc,CAAA;AACtE,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAW;IACrC,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS,EAAM,uCAAuC;IACvC,uCAAuC;IAC7D,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAW;IACzC,MAAM,EAAE,SAAS,EAAE,kBAAkB;IACrC,OAAO,EAAE,SAAS,EAAE,mBAAmB;IACvC,OAAO,EAAE,SAAS,EAAE,mBAAmB;IACvC,QAAQ,EAAE,SAAS,EAAE,mBAAmB;IACxC,OAAO,EAAE,SAAS;CACnB,CAAA","sourcesContent":["import { resolveLegend, resolveLegendEntries, type LegendEntry as RangeEntry } from '@hatiolab/things-scene'\nimport { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor, type Legend, type LegendEntry } from '@fmsim/figure-capabilities'\n\n/* 범례 항목 모양과 캐리어 · 상태 기본 범례는 피규어 능력과 한 곳(@fmsim/figure-capabilities, ADR-0167) */\nexport { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor, type Legend, type LegendEntry }\n\n/**\n * 코드의 범례 항목: 그 코드의 항목, 없으면 `default` (ADR-0166 판정 6). things-scene 의 한 조회(resolveLegend)로 읽는다 — 피규어의 표와\n * 보드 매핑이 읽는 것과 같다.\n */\nexport function legendEntryOf(code: unknown, legend: Legend | null | undefined): LegendEntry | undefined {\n return resolveLegend(code, legend)\n}\n\n/**\n * 수의 구간 범례 항목: 키 `from~to`(from 이상 to 미만, 한쪽 열림 가능)에서 그 값을 품은 항목, 없으면 `default`. 값이 없거나 수가 아니면\n * `default` 다(ADR-0166 판정 6 — 0 으로 읽지 않는다). things-scene 의 한 조회(resolveLegendEntries)로 읽는다.\n */\nexport function legendRangeEntryOf(value: unknown, legend: Legend | null | undefined): LegendEntry | undefined {\n if (!legend) return undefined\n const entries: RangeEntry<LegendEntry>[] = []\n for (const [key, entry] of Object.entries(legend)) {\n if (key === 'default') continue\n const [from = '', to = ''] = key.split('~')\n if (!key.includes('~')) continue\n entries.push({ min: from === '' ? null : from, max: to === '' ? null : to, result: entry })\n }\n return resolveLegendEntries(value, entries, legend.default)\n}\n\nexport const LEGEND_NULL: Legend = { default: '#F0F0F0' }\n\n/**\n * carrier legend(테마) 해석 — carrier 컴포넌트(carrier.ts get legend)와 동일 로직 단일 소스.\n * parent 에 carrierLegendName 이 지정되면 그 style 을, 아니면 board 전역 carrierLegendTheme,\n * 둘 다 없으면 LEGEND_CARRIER 기본값. carrier 컴포넌트·스토커 게이지(2D/3D)가 공유한다.\n */\nexport function resolveCarrierLegend(component: any): Legend {\n const carrierLegendName = component?.parent?.state?.carrierLegendName\n if (carrierLegendName) {\n return (component.root as any)?.style?.[carrierLegendName] || LEGEND_CARRIER\n }\n return (component.root as any)?.carrierLegendTheme || LEGEND_CARRIER\n}\n\nexport const LEGEND_CAPACITY: Legend = {\n '0~20': '#5630D0',\n '20~80': '#8BDA5B',\n '80~': '#FD9B00', // 80% 이상 (= 100% 초과도 포함). 'from~' 형식이라\n // legendRangeEntryOf 가 value >= 80 매칭.\n default: '#F0F0F0'\n}\n\nexport const BATTERY_RATE_LEGEND: Legend = {\n '0~20': '#EB3245', // 0-20%: 빨간색 (위험)\n '20~40': '#FD9B00', // 20-40%: 주황색 (경고)\n '40~60': '#F4F226', // 40-60%: 노란색 (주의)\n '60~100': '#8BDA5B', // 60-100%: 녹색 (정상)\n default: '#F0F0F0'\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { drawingScaleFor, sceneHeightsOf } from '@hatiolab/things-scene';
|
|
2
|
+
/*
|
|
3
|
+
* Where an OHT runs: on its line's rail, hung from the work environment's ceiling. The rail's top is the ceiling less the
|
|
4
|
+
* line's hang (`railHang`, mm); an OHT -- fmsim's own or a figure wearing fmsim.Vehicle -- hangs its top from the rail of
|
|
5
|
+
* the line it runs on. Nothing here is a height of its own: each follows the ceiling of the room the board draws.
|
|
6
|
+
*/
|
|
7
|
+
/** The top of an OHT line's rail, in drawing units: the scene's ceiling less the line's hang. */
|
|
8
|
+
export function railTopOf(line) {
|
|
9
|
+
var _a;
|
|
10
|
+
const ceiling = sceneHeightsOf(line).ceiling;
|
|
11
|
+
const hang = Number((_a = line === null || line === void 0 ? void 0 : line.state) === null || _a === void 0 ? void 0 : _a.railHang) || 0;
|
|
12
|
+
return ceiling - hang / drawingScaleFor(line).mmPerUnit;
|
|
13
|
+
}
|
|
14
|
+
/** The OHT line a vehicle runs on: the one its data names (NODEMACHINE), its parent object, or the line holding it. */
|
|
15
|
+
export function ohtLineOf(vehicle) {
|
|
16
|
+
var _a, _b, _c, _d;
|
|
17
|
+
const isLine = (c) => { var _a; return ((_a = c === null || c === void 0 ? void 0 : c.state) === null || _a === void 0 ? void 0 : _a.type) === 'OHTLine'; };
|
|
18
|
+
for (const id of [(_a = vehicle === null || vehicle === void 0 ? void 0 : vehicle.data) === null || _a === void 0 ? void 0 : _a.NODEMACHINE, (_b = vehicle === null || vehicle === void 0 ? void 0 : vehicle.state) === null || _b === void 0 ? void 0 : _b.parentObjectId]) {
|
|
19
|
+
if (!id)
|
|
20
|
+
continue;
|
|
21
|
+
const line = (((_d = (_c = vehicle.root) === null || _c === void 0 ? void 0 : _c.findAllById) === null || _d === void 0 ? void 0 : _d.call(_c, id)) || []).find(isLine);
|
|
22
|
+
if (line)
|
|
23
|
+
return line;
|
|
24
|
+
}
|
|
25
|
+
return isLine(vehicle === null || vehicle === void 0 ? void 0 : vehicle.parent) ? vehicle.parent : undefined;
|
|
26
|
+
}
|
|
27
|
+
/** The height an OHT hangs its top from, in drawing units: its line's rail, or the ceiling when it runs on none. */
|
|
28
|
+
export function ohtRailTop(vehicle) {
|
|
29
|
+
const line = ohtLineOf(vehicle);
|
|
30
|
+
return line ? railTopOf(line) : sceneHeightsOf(vehicle).ceiling;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=oht-rail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oht-rail.js","sourceRoot":"","sources":["../../src/features/oht-rail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAExE;;;;GAIG;AAEH,iGAAiG;AACjG,MAAM,UAAU,SAAS,CAAC,IAAS;;IACjC,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,CAAA;IAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC/C,OAAO,OAAO,GAAG,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,SAAS,CAAA;AACzD,CAAC;AAED,uHAAuH;AACvH,MAAM,UAAU,SAAS,CAAC,OAAY;;IACpC,MAAM,MAAM,GAAG,CAAC,CAAM,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,0CAAE,IAAI,MAAK,SAAS,CAAA,EAAA,CAAA;IACvD,KAAK,MAAM,EAAE,IAAI,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,0CAAE,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,cAAc,CAAC,EAAE,CAAC;QAC9E,IAAI,CAAC,EAAE;YAAE,SAAQ;QACjB,MAAM,IAAI,GAAG,CAAC,CAAA,MAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,WAAW,mDAAG,EAAE,CAAC,KAAI,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACjE,IAAI,IAAI;YAAE,OAAO,IAAI,CAAA;IACvB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AAC7D,CAAC;AAED,oHAAoH;AACpH,MAAM,UAAU,UAAU,CAAC,OAAY;IACrC,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,CAAA;AACjE,CAAC","sourcesContent":["import { drawingScaleFor, sceneHeightsOf } from '@hatiolab/things-scene'\n\n/*\n * Where an OHT runs: on its line's rail, hung from the work environment's ceiling. The rail's top is the ceiling less the\n * line's hang (`railHang`, mm); an OHT -- fmsim's own or a figure wearing fmsim.Vehicle -- hangs its top from the rail of\n * the line it runs on. Nothing here is a height of its own: each follows the ceiling of the room the board draws.\n */\n\n/** The top of an OHT line's rail, in drawing units: the scene's ceiling less the line's hang. */\nexport function railTopOf(line: any): number {\n const ceiling = sceneHeightsOf(line).ceiling\n const hang = Number(line?.state?.railHang) || 0\n return ceiling - hang / drawingScaleFor(line).mmPerUnit\n}\n\n/** The OHT line a vehicle runs on: the one its data names (NODEMACHINE), its parent object, or the line holding it. */\nexport function ohtLineOf(vehicle: any): any {\n const isLine = (c: any) => c?.state?.type === 'OHTLine'\n for (const id of [vehicle?.data?.NODEMACHINE, vehicle?.state?.parentObjectId]) {\n if (!id) continue\n const line = (vehicle.root?.findAllById?.(id) || []).find(isLine)\n if (line) return line\n }\n return isLine(vehicle?.parent) ? vehicle.parent : undefined\n}\n\n/** The height an OHT hangs its top from, in drawing units: its line's rail, or the ceiling when it runs on none. */\nexport function ohtRailTop(vehicle: any): number {\n const line = ohtLineOf(vehicle)\n return line ? railTopOf(line) : sceneHeightsOf(vehicle).ceiling\n}\n"]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ceilingZPos } from '@hatiolab/things-scene';
|
|
2
|
+
import { ohtRailTop } from './oht-rail';
|
|
1
3
|
/** The node a vehicle's data names: a `Node` of the board with that id and node machine. */
|
|
2
4
|
function findNode(vehicle, nodeId, nodeMachine) {
|
|
3
5
|
var _a, _b, _c;
|
|
@@ -19,6 +21,20 @@ export function VehicleTravel(Base) {
|
|
|
19
21
|
super(...arguments);
|
|
20
22
|
this._lastWaypoint = null;
|
|
21
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Where a figure hung from the ceiling (an OHT) stands: its top at the rail of the line it runs on, as fmsim's own
|
|
26
|
+
* OHT -- not the ceiling. Things-scene takes it before the ceiling (a written zPos still wins); others say nothing.
|
|
27
|
+
*/
|
|
28
|
+
get effectiveZPos() {
|
|
29
|
+
var _a;
|
|
30
|
+
const own = super.effectiveZPos;
|
|
31
|
+
if (((_a = this.constructor) === null || _a === void 0 ? void 0 : _a.placement) !== 'ceiling')
|
|
32
|
+
return own;
|
|
33
|
+
const ro = this._realObject;
|
|
34
|
+
if (!ro || !Number.isFinite(ro.effectiveDepth))
|
|
35
|
+
return own;
|
|
36
|
+
return ceilingZPos(ro.placementMode, ohtRailTop(this), ro.effectiveDepth);
|
|
37
|
+
}
|
|
22
38
|
/** The angle, in radians, the vehicle's front makes with the way it travels. */
|
|
23
39
|
get travelHeading() {
|
|
24
40
|
var _a;
|
|
@@ -49,7 +65,8 @@ export function VehicleTravel(Base) {
|
|
|
49
65
|
this.trigger('waypoint', {
|
|
50
66
|
from: beforeNode || afterNode,
|
|
51
67
|
to: afterNode,
|
|
52
|
-
duration: 5000
|
|
68
|
+
duration: 5000,
|
|
69
|
+
yawOffset: Math.PI / 2 + this.travelHeading
|
|
53
70
|
});
|
|
54
71
|
}
|
|
55
72
|
else if (beforeNode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicle-travel.js","sourceRoot":"","sources":["../../src/features/vehicle-travel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vehicle-travel.js","sourceRoot":"","sources":["../../src/features/vehicle-travel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,4FAA4F;AAC5F,SAAS,QAAQ,CAAC,OAAY,EAAE,MAAc,EAAE,WAAmB;;IACjE,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,CAAA,MAAA,MAAA,OAAO,CAAC,IAAI,EAAC,WAAW,mDAAG,MAAM,CAAC,KAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAW,CAAA;IAEnH,OAAO,MAAA,KAAK,CAAC,IAAI,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,WAAW,CAAC,mCAAI,IAAI,CAAA;AAC7E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAwC,IAAO;IAC1E,OAAO,KAAM,SAAQ,IAAI;QAAlB;;YACL,kBAAa,GAAmD,IAAI,CAAA;QAwEtE,CAAC;QAtEC;;;WAGG;QACH,IAAI,aAAa;;YACf,MAAM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K,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAEnE;gBAAC,IAAY,CAAC,QAAQ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAC7C;gBAAC,IAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,CAAA;YACjE,CAAC;iBAAM,CAAC;gBACN,qCAAqC;gBACrC,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAA;gBACjC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAC/D;gBAAC,IAAY,CAAC,QAAQ,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAA;YACpC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { ceilingZPos } from '@hatiolab/things-scene'\nimport type Node from '../node'\nimport { ohtRailTop } from './oht-rail'\n\n/** The node a vehicle's data names: a `Node` of the board with that id and node machine. */\nfunction findNode(vehicle: any, nodeId: string, nodeMachine: string): Node | null {\n if (!nodeId || !nodeMachine) {\n return null\n }\n\n const nodes = (vehicle.root.findAllById?.(nodeId) || []).filter((node: any) => node.state.type == 'Node') as Node[]\n\n return nodes.find((node: Node) => node.nodeMachine === nodeMachine) ?? null\n}\n\n/**\n * A vehicle's travel between the nodes of the board (`fmsim.Vehicle`, ADR-0167 decision 18): it goes to the centre of\n * the Node its NODEID and NODEMACHINE name, turned the way it came, or -- the board's vehicle animation on -- it is drawn\n * on the way (waypoint). One mixin worn by fmsim's own AGV and OHT and by a figure alike. A figure's front need not be\n * its travel's: `vehicleHeading` (degrees) turns it, 0 for fmsim's own.\n */\nexport function VehicleTravel<T extends new (...args: any[]) => any>(Base: T) {\n return class extends Base {\n _lastWaypoint: { NodeId: string; NodeMachine: string } | null = null\n\n /**\n * Where a figure hung from the ceiling (an OHT) stands: its top at the rail of the line it runs on, as fmsim's own\n * OHT -- not the ceiling. Things-scene takes it before the ceiling (a written zPos still wins); others say nothing.\n */\n get effectiveZPos(): number | undefined {\n const own = super.effectiveZPos\n if ((this as any).constructor?.placement !== 'ceiling') return own\n const ro = (this as any)._realObject\n if (!ro || !Number.isFinite(ro.effectiveDepth)) return own\n return ceilingZPos(ro.placementMode, ohtRailTop(this), ro.effectiveDepth)\n }\n\n /** The angle, in radians, the vehicle's front makes with the way it travels. */\n get travelHeading(): number {\n return ((Number((this as any).state?.vehicleHeading) || 0) * Math.PI) / 180\n }\n\n onchangeData(after: Record<string, any>, before: Record<string, any>): void {\n super.onchangeData(after, before)\n\n const { NODEID: beforeNodeId, NODEMACHINE: beforeNodeMachine } = before.data || {}\n const { NODEID: NodeId, NODEMACHINE: NodeMachine } = after.data || {}\n\n if (\n NodeId === undefined ||\n NodeMachine === undefined ||\n (beforeNodeId === NodeId && beforeNodeMachine === NodeMachine) ||\n (this._lastWaypoint && this._lastWaypoint.NodeId === NodeId && this._lastWaypoint.NodeMachine === NodeMachine)\n ) {\n return // not changed\n }\n\n const afterNode = findNode(this, NodeId, NodeMachine)\n if (!afterNode) {\n // 보드는 전체 노드의 부분 뷰 — 모든 노드를 그리지 않는다. 위치 NODEID 가 이 보드에\n // 없는 노드를 가리키는 건 오류가 아니라 정상(그 노드는 이 보드에 미표시)이므로,\n // 경고 없이 조용히 배치를 생략한다. (데이터 갱신마다 도는 hot path — 거짓 경보 방지.)\n return\n }\n\n const beforeNode = this._lastWaypoint ? findNode(this, this._lastWaypoint.NodeId, this._lastWaypoint.NodeMachine) : afterNode\n\n // 실제 존재하는 노드 중 가장 최근에 이동한 노드\n this._lastWaypoint = { NodeId, NodeMachine }\n\n if ((this as any).root.vehicleAnimation) {\n ;(this as any).trigger('waypoint', {\n from: beforeNode || afterNode,\n to: afterNode,\n duration: 5000,\n yawOffset: Math.PI / 2 + this.travelHeading\n })\n } else if (beforeNode) {\n const fromCenter = beforeNode.center\n const toCenter = afterNode.center\n\n const { x: startX, y: startY } = beforeNode.transcoordS2T(fromCenter.x, fromCenter.y)\n const { x: endX, y: endY } = afterNode.transcoordS2T(toCenter.x, toCenter.y)\n\n const theta = Math.atan2(endY - startY, endX - startX) + Math.PI / 2\n\n ;(this as any).location = { x: endX, y: endY }\n ;(this as any).setState('rotation', theta + this.travelHeading)\n } else {\n // beforeNode 없음: afterNode 위치로 즉시 이동\n const toCenter = afterNode.center\n const { x, y } = afterNode.transcoordS2T(toCenter.x, toCenter.y)\n ;(this as any).location = { x, y }\n }\n }\n }\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -79,6 +79,10 @@ export { default as Crane } from './crane';
|
|
|
79
79
|
export { default as Shelf } from './shelf';
|
|
80
80
|
export { default as Carrier } from './carrier';
|
|
81
81
|
export { CARRIER_HOLDER_PROPERTIES, CarrierHolder, carrierHolderLegend } from './mcs-carrier-holder';
|
|
82
|
+
export { LVMachine, LVUnit, LVVehicle, StatusFigure, statusAsCode, statusLegend } from './features/lv-figures';
|
|
83
|
+
export { MACHINE_HEIGHTS, TRANSPORT_SURFACE_HEIGHT } from './features/lv-heights';
|
|
84
|
+
export { boardLegendOf, boardLegendOfRow, legendRowsOnBoard } from './features/legend-rows';
|
|
85
|
+
export { legendPanel } from './features/legend-panel';
|
|
82
86
|
// ── topology ──
|
|
83
87
|
export { default as Node } from './node';
|
|
84
88
|
export { default as NodePath } from './node-path';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,iCAAiC,CAAA;AAExC,kCAAkC;AAClC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,yBAAyB,CAAA;AAChC,OAAO,oBAAoB,CAAA;AAC3B,OAAO,oBAAoB,CAAA;AAC3B,OAA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AM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEjD,mBAAmB;AACnB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAE7D,6DAA6D;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA","sourcesContent":["// ── side-effect: scene override ──\nimport './scene/root-container-override'\n\n// ── side-effect: 3D factories ──\nimport './factories/machine-3d'\nimport './factories/conveyor-3d'\nimport './factories/agv-3d'\nimport './factories/oht-3d'\nimport './factories/shuttle-3d'\nimport './factories/crane-3d'\nimport './factories/crane-rail-3d'\n// 기본 factory (RealObjectDomTexture) 쓰는 컴포넌트들의 z-priority override\nimport './factories/z-priority-defaults'\n\n// ── side-effect: @sceneComponent 등록 (tree-shaking 방지) ──\n// bars & overlays\nimport './zone-capacity-bar'\nimport './stocker-capacity-bar'\nimport './stocker-carrier-bar'\nimport './stocker-abnormal-bar'\nimport './port-flow'\n\n// facilities\nimport './agv-line'\nimport './buffer'\nimport './conveyor'\nimport './conveyor-join'\nimport './equipment'\nimport './oht-line'\nimport './stocker'\nimport './crane-rail'\nimport './scanner'\n\n// vehicles\nimport './agv'\nimport './oht'\nimport './shuttle'\n\n// units\nimport './port'\nimport './crane'\nimport './shelf'\nimport './carrier'\n\n// topology\nimport './node'\nimport './node-path'\n\n// containers\nimport './floating-container'\nimport './static-container'\nimport './clickable-popup'\n\n// ── groups ──\nexport { default as MachineGroups } from './groups'\n\n// ── legends ──\nexport { legendColor, legendEntryOf, legendRangeEntryOf, type Legend, type LegendEntry } from './features/mcs-status-default'\n\n// ── base classes ──\nexport { default as MCSMachine } from './mcs-machine'\nexport { default as MCSUnit } from './mcs-unit'\nexport { default as MCSCarrierHolder } from './mcs-carrier-holder'\nexport { default as MCSVehicle } from './mcs-vehicle'\nexport { default as MCSTransport } from './mcs-transport'\n\n// ── bars & overlays ──\nexport { default as ZoneCapacityBar } from './zone-capacity-bar'\nexport { default as StockerCapacityBar } from './stocker-capacity-bar'\nexport { default as StockerCarrierBar } from './stocker-carrier-bar'\nexport { default as StockerAbnormalBar } from './stocker-abnormal-bar'\nexport { default as PortFlow } from './port-flow'\n\n// ── facilities ──\nexport { default as AGVLine } from './agv-line'\nexport { default as Buffer } from './buffer'\nexport { default as Conveyor } from './conveyor'\nexport { default as ConveyorJoin } from './conveyor-join'\nexport { default as Equipment } from './equipment'\nexport { default as OHTLine } from './oht-line'\nexport { default as Stocker } from './stocker'\nexport { default as CraneRail } from './crane-rail'\nexport { default as Scanner } from './scanner'\n\n// ── vehicles ──\nexport { default as AGV } from './agv'\nexport { default as OHT } from './oht'\nexport { default as Shuttle } from './shuttle'\n\n// ── units ──\nexport { default as Port } from './port'\nexport { default as Crane } from './crane'\nexport { default as Shelf } from './shelf'\nexport { default as Carrier } from './carrier'\nexport { CARRIER_HOLDER_PROPERTIES, CarrierHolder, carrierHolderLegend } from './mcs-carrier-holder'\nexport { LVMachine, LVUnit, LVVehicle, StatusFigure, statusAsCode, statusLegend } from './features/lv-figures'\nexport { MACHINE_HEIGHTS, TRANSPORT_SURFACE_HEIGHT } from './features/lv-heights'\nexport { boardLegendOf, boardLegendOfRow, legendRowsOnBoard } from './features/legend-rows'\nexport { legendPanel } from './features/legend-panel'\n\n// ── topology ──\nexport { default as Node } from './node'\nexport { default as NodePath } from './node-path'\n\n// ── containers ──\nexport { default as FloatingContainer } from './floating-container'\nexport { default as StaticContainer } from './static-container'\nexport { default as ClickablePopup } from './clickable-popup'\n\n// ── CARRIERTYPE 을 아이템 타입 코드로 맞추는 규칙 (01번 6.8절, ADR-0155) ──\nexport { normalizeTypeCode } from './utils/carrier-type-code'\n"]}
|