@fmsim/figure-capabilities 3.0.0-beta.4 → 3.0.0-beta.7
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/carrier-holder.d.ts +4 -4
- package/dist/carrier-holder.js +10 -14
- package/dist/carrier-holder.js.map +1 -1
- package/dist/carrier.js +3 -7
- package/dist/carrier.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/legend-rows.d.ts +31 -0
- package/dist/legend-rows.js +38 -0
- package/dist/legend-rows.js.map +1 -0
- package/dist/legends.d.ts +9 -0
- package/dist/legends.js +53 -0
- package/dist/legends.js.map +1 -1
- package/dist/lv.d.ts +24 -0
- package/dist/lv.js +68 -0
- package/dist/lv.js.map +1 -0
- package/dist/status.d.ts +42 -0
- package/dist/status.js +71 -0
- package/dist/status.js.map +1 -0
- package/dist/vehicle.d.ts +0 -15
- package/dist/vehicle.js +0 -27
- package/dist/vehicle.js.map +1 -1
- package/package.json +2 -2
package/dist/carrier-holder.d.ts
CHANGED
|
@@ -26,9 +26,9 @@ export declare function carrierHolderProperties(options?: CarrierHolderLegendOpt
|
|
|
26
26
|
property?: undefined;
|
|
27
27
|
})[];
|
|
28
28
|
/**
|
|
29
|
-
* `fmsim.CarrierHolder` (ADR-0167
|
|
30
|
-
* figure alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the
|
|
31
|
-
* CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME,
|
|
32
|
-
* gives the carriers on its places its two carrier legends.
|
|
29
|
+
* `fmsim.CarrierHolder` (ADR-0167 decisions 11 and 22): a holder of MCS carriers, worn by fmsim's own holders and by a
|
|
30
|
+
* figure of any kind alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the
|
|
31
|
+
* holder's carriers -- the representative CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME,
|
|
32
|
+
* CARRIERTYPE, EMPTYTYPE and CARRIERSTATUS -- and gives the carriers on its places its two carrier legends.
|
|
33
33
|
*/
|
|
34
34
|
export declare const CARRIER_HOLDER: FigureCapabilityDescriptor;
|
package/dist/carrier-holder.js
CHANGED
|
@@ -43,27 +43,23 @@ export function carrierHolderProperties(options = {}) {
|
|
|
43
43
|
];
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
|
-
* `fmsim.CarrierHolder` (ADR-0167
|
|
47
|
-
* figure alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the
|
|
48
|
-
* CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME,
|
|
49
|
-
* gives the carriers on its places its two carrier legends.
|
|
46
|
+
* `fmsim.CarrierHolder` (ADR-0167 decisions 11 and 22): a holder of MCS carriers, worn by fmsim's own holders and by a
|
|
47
|
+
* figure of any kind alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the
|
|
48
|
+
* holder's carriers -- the representative CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME,
|
|
49
|
+
* CARRIERTYPE, EMPTYTYPE and CARRIERSTATUS -- and gives the carriers on its places its two carrier legends.
|
|
50
50
|
*/
|
|
51
51
|
export const CARRIER_HOLDER = {
|
|
52
52
|
name: 'fmsim.CarrierHolder',
|
|
53
53
|
label: 'Carrier holder',
|
|
54
54
|
note: 'MCS 캐리어를 받는다 — 홀더 데이터에서 캐리어를 만들고, 자리에 올라간 캐리어에 캐리어 범례와 애니메이션을 넘긴다',
|
|
55
|
-
version: '
|
|
56
|
-
needs: [
|
|
55
|
+
version: '2',
|
|
56
|
+
needs: [
|
|
57
|
+
['Holdable', 'FlowNode'],
|
|
58
|
+
['Capacity', 'FlowNode']
|
|
59
|
+
],
|
|
57
60
|
properties: carrierHolderProperties({ mount: true }),
|
|
58
61
|
/* Its carriers come from MCS data: where fmsim registers it, an items binding of the figure's rests (ADR-0167 decision 17). */
|
|
59
62
|
takes: () => ({ items: true }),
|
|
60
|
-
data: [
|
|
61
|
-
{ name: 'STATUS' },
|
|
62
|
-
{ name: 'CARRIERNAME' },
|
|
63
|
-
{ name: 'MULTICARRIERS' },
|
|
64
|
-
{ name: 'CARRIERTYPE' },
|
|
65
|
-
{ name: 'EMPTYTYPE' },
|
|
66
|
-
{ name: 'CARRIERSTATUS' }
|
|
67
|
-
]
|
|
63
|
+
data: [{ name: 'CARRIERNAME' }, { name: 'MULTICARRIERS' }, { name: 'CARRIERTYPE' }, { name: 'EMPTYTYPE' }, { name: 'CARRIERSTATUS' }]
|
|
68
64
|
};
|
|
69
65
|
//# sourceMappingURL=carrier-holder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier-holder.js","sourceRoot":"","sources":["../src/carrier-holder.ts"],"names":[],"mappings":"AAUA,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,CAAU,CAAA;AAErD;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAsC,EAAE;;IAC9E,OAAO;QACL;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,qBAAqB;YAC5B,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE;gBACR,OAAO,EAAE,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE;aAC/B;SACF;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,wBAAwB;YAC/B,IAAI,EAAE,sBAAsB;YAC5B,QAAQ,EAAE;gBACR,OAAO,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,EAAE;aAClC;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,iBAAiB;SACxB;QACD,GAAG,CAAC,OAAO,CAAC,KAAK;YACf,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,eAAe;oBACtB,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE;w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GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAA+B;IACxD,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,mEAAmE;IACzE,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE;QACL,CAAC,UAAU,EAAE,UAAU,CAAC;QACxB,CAAC,UAAU,EAAE,UAAU,CAAC;KACzB;IACD,UAAU,EAAE,uBAAuB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAU;IAC7D,+HAA+H;IAC/H,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;CACtI,CAAA","sourcesContent":["import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene'\n\n/** The lists a holder's legend properties offer: what the board that runs it has (fmsim reads them from its API). */\nexport interface CarrierHolderLegendOptions {\n legends?: unknown\n animations?: unknown\n /** Whether the holder chooses how its carriers rest, on it or hung below (ADR-0167 decision 18): a figure does. */\n mount?: boolean\n}\n\n/** How a holder's carriers rest: on its top, or hung below it (an OHT). */\nexport const CARRIER_MOUNTS = ['ON', 'HANG'] as const\n\n/**\n * The properties a carrier holder adds (ADR-0167 decision 11): its two carrier legends and whether carriers show their\n * text. The legend lists are the running board's: given where the descriptor is registered, none in the modeller.\n */\nexport function carrierHolderProperties(options: CarrierHolderLegendOptions = {}) {\n return [\n {\n type: 'select',\n label: 'carrier-legend-name',\n name: 'carrierLegendName',\n property: {\n options: options.legends ?? []\n }\n },\n {\n type: 'select',\n label: 'carrier-animation-name',\n name: 'carrierAnimationName',\n property: {\n options: options.animations ?? []\n }\n },\n {\n type: 'boolean',\n label: 'show-carrier-text',\n name: 'showCarrierText'\n },\n ...(options.mount\n ? [\n {\n type: 'select',\n label: 'carrier-mount',\n name: 'carrierMount',\n property: {\n options: [...CARRIER_MOUNTS]\n }\n }\n ]\n : [])\n ]\n}\n\n/**\n * `fmsim.CarrierHolder` (ADR-0167 decisions 11 and 22): a holder of MCS carriers, worn by fmsim's own holders and by a\n * figure of any kind alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the\n * holder's carriers -- the representative CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME,\n * CARRIERTYPE, EMPTYTYPE and CARRIERSTATUS -- and gives the carriers on its places its two carrier legends.\n */\nexport const CARRIER_HOLDER: FigureCapabilityDescriptor = {\n name: 'fmsim.CarrierHolder',\n label: 'Carrier holder',\n note: 'MCS 캐리어를 받는다 — 홀더 데이터에서 캐리어를 만들고, 자리에 올라간 캐리어에 캐리어 범례와 애니메이션을 넘긴다',\n version: '2',\n needs: [\n ['Holdable', 'FlowNode'],\n ['Capacity', 'FlowNode']\n ],\n properties: carrierHolderProperties({ mount: true }) as never,\n /* Its carriers come from MCS data: where fmsim registers it, an items binding of the figure's rests (ADR-0167 decision 17). */\n takes: () => ({ items: true }),\n data: [{ name: 'CARRIERNAME' }, { name: 'MULTICARRIERS' }, { name: 'CARRIERTYPE' }, { name: 'EMPTYTYPE' }, { name: 'CARRIERSTATUS' }]\n}\n"]}
|
package/dist/carrier.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { ANIMATION_DEFAULT } from './animation-default.js';
|
|
2
|
-
import { LEGEND_CARRIER,
|
|
2
|
+
import { LEGEND_CARRIER, legendTableEntry } from './legends.js';
|
|
3
3
|
/** The codes of a carrier's load (EMPTYTYPE) fmsim fixes: a figure's thickness is given for these only (ADR-0167 12). */
|
|
4
4
|
export const CARRIER_LOAD_CODES = ['FULL', 'EMPTY', 'EMPTYEMPTY'];
|
|
5
5
|
/** The thickness a figure starts with for each code: full, then empty. */
|
|
6
6
|
export const CARRIER_FILL_START = { FULL: 100, EMPTY: 0, EMPTYEMPTY: 0 };
|
|
7
7
|
const SETTING_KEYS = ['loadParts', 'bodyParts', 'fill'];
|
|
8
|
-
/** A table entry from one of fmsim's default legends: its colour
|
|
9
|
-
|
|
10
|
-
const color = legendColor(entry);
|
|
11
|
-
const effect = entry && typeof entry === 'object' ? entry.effect : undefined;
|
|
12
|
-
return Object.assign(Object.assign({}, (color ? { color } : {})), (effect && typeof effect === 'object' ? { effect: effect } : {}));
|
|
13
|
-
}
|
|
8
|
+
/** A table entry from one of fmsim's default legends: its colour and effect. */
|
|
9
|
+
const lookOf = (entry) => legendTableEntry(entry);
|
|
14
10
|
/** Why a figure's settings cannot be taken: parts and the input that are not the figure's, keys and values out of place. */
|
|
15
11
|
export function carrierSettingsIssues(settings, asset) {
|
|
16
12
|
var _a;
|
package/dist/carrier.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier.js","sourceRoot":"","sources":["../src/carrier.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1D,yHAAyH;AACzH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAU,CAAA;AAC1E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAA;AAExE,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA;AAQvD,0GAA0G;AAC1G,SAAS,MAAM,CAAC,KAAc;IAC5B,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;IAChC,MAAM,MAAM,GAAG,KAAK,IAAI,OAAO,KAAK,KA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CACtB,CAAA","sourcesContent":["import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene'\nimport type { FigureAsset, FigureDataBinding, FigureDataTableEntry } from '@hatiolab/figure-model'\n\nimport { ANIMATION_DEFAULT } from './animation-default.js'\nimport { LEGEND_CARRIER, legendColor } from './legends.js'\n\n/** The codes of a carrier's load (EMPTYTYPE) fmsim fixes: a figure's thickness is given for these only (ADR-0167 12). */\nexport const CARRIER_LOAD_CODES = ['FULL', 'EMPTY', 'EMPTYEMPTY'] as const\n/** The thickness a figure starts with for each code: full, then empty. */\nexport const CARRIER_FILL_START = { FULL: 100, EMPTY: 0, EMPTYEMPTY: 0 }\n\nconst SETTING_KEYS = ['loadParts', 'bodyParts', 'fill']\n\ninterface CarrierSettings {\n loadParts?: string[]\n bodyParts?: string[]\n fill?: { input: string; values?: Record<string, number> }\n}\n\n/** A table entry from one of fmsim's default legends: its colour (a colour or `{ color }`) and effect. */\nfunction lookOf(entry: unknown): FigureDataTableEntry {\n const color = legendColor(entry)\n const effect = entry && typeof entry === 'object' ? (entry as { effect?: unknown }).effect : undefined\n return { ...(color ? { color } : {}), ...(effect && typeof effect === 'object' ? { effect: effect as FigureDataTableEntry['effect'] } : {}) }\n}\n\n/** Why a figure's settings cannot be taken: parts and the input that are not the figure's, keys and values out of place. */\nexport function carrierSettingsIssues(settings: Record<string, unknown> | undefined, asset: FigureAsset): string[] {\n const s = (settings ?? {}) as CarrierSettings & Record<string, unknown>\n const parts = new Set(asset.appearance.map(a => a.target))\n const out: string[] = []\n for (const key of Object.keys(s)) if (!SETTING_KEYS.includes(key)) out.push(`${key} 은(는) 이 능력의 설정이 아닙니다.`)\n if (!Array.isArray(s.loadParts) || !s.loadParts.length) out.push('적재물 부품을 하나 이상 고릅니다.')\n for (const key of ['loadParts', 'bodyParts'] as const)\n for (const part of Array.isArray(s[key]) ? s[key]! : []) if (!parts.has(part)) out.push(`${part} 부품이 없습니다.`)\n if (s.fill !== undefined) {\n const input = asset.document.model.inputs.find(i => i.id === s.fill!.input && i.role === 'state')\n if (!input) out.push(`적재량 입력 ${String(s.fill.input)} 이(가) 이 피규어의 상태 입력이 아닙니다.`)\n for (const [code, value] of Object.entries(s.fill.values ?? {})) {\n if (!(CARRIER_LOAD_CODES as readonly string[]).includes(code)) out.push(`${code} 은(는) 정해진 코드(FULL · EMPTY · EMPTYEMPTY)가 아닙니다.`)\n else if (input && !(Number.isFinite(value) && value >= input.min! && value <= input.max!)) out.push(`${code} 의 적재량 ${value} 이(가) 범위 ${input.min}~${input.max} 밖입니다.`)\n }\n }\n return out\n}\n\n/**\n * The tables the capability hands the ADR-0166 engine: the load's colour (role carrier-legend, fmsim's carrier legend\n * by default) on the load parts, the condition's colour and blink (role carrier-animation, fmsim's default animation) on\n * the body parts or else the load parts, and the thickness by the figure's own fixed table -- no legend, so a legend\n * never gives it.\n */\nexport function carrierDataInterface(settings: Record<string, unknown> | undefined): { schema: { name: string; label: string; kind: 'text' }[]; bindings: FigureDataBinding[] } | undefined {\n const s = (settings ?? {}) as CarrierSettings\n const load = s.loadParts ?? []\n if (!load.length) return undefined\n const body = s.bodyParts?.length ? s.bodyParts : load\n const loadTable = Object.fromEntries(Object.entries(LEGEND_CARRIER).map(([code, entry]) => [code, lookOf(entry)]))\n const conditionTable = Object.fromEntries(Object.entries(ANIMATION_DEFAULT).map(([code, entry]) => [code, lookOf(entry)]))\n const bindings: FigureDataBinding[] = [\n { id: 'fmsim-carrier-load', label: '적재', accessor: 'EMPTYTYPE', rule: 'table', lookup: 'code', targets: { parts: [...load] }, table: loadTable, legend: { role: 'carrier-legend' } },\n { id: 'fmsim-carrier-condition', label: '상태', accessor: 'CARRIERSTATUS', rule: 'table', lookup: 'code', targets: { parts: [...body] }, table: conditionTable, legend: { role: 'carrier-animation' } }\n ]\n if (s.fill?.input) {\n const values = { ...CARRIER_FILL_START, ...(s.fill.values ?? {}) }\n const full = { values: { [s.fill.input]: values.FULL } }\n bindings.push({\n id: 'fmsim-carrier-fill',\n label: '적재량',\n accessor: 'EMPTYTYPE',\n rule: 'table',\n lookup: 'code',\n targets: { inputs: [s.fill.input] },\n /* Another code, or none, is full (ADR-0167 12). */\n table: { ...Object.fromEntries(CARRIER_LOAD_CODES.map(code => [code, { values: { [s.fill!.input]: values[code] } }])), default: full }\n })\n }\n return {\n schema: [\n { name: 'EMPTYTYPE', label: '적재', kind: 'text' },\n { name: 'CARRIERSTATUS', label: '상태', kind: 'text' }\n ],\n bindings\n }\n}\n\n/**\n * What the capability takes over (ADR-0167 decision 17): the load and body parts' looks and the load's input. Where fmsim\n * registers it, a binding of the figure's on them rests; operato-board, which does not, draws by the binding.\n */\nexport function carrierTargets(settings: Record<string, unknown> | undefined): { parts: string[]; inputs: string[] } {\n const s = (settings ?? {}) as CarrierSettings\n return { parts: [...new Set([...(s.loadParts ?? []), ...(s.bodyParts ?? [])])], inputs: s.fill?.input ? [s.fill.input] : [] }\n}\n\n/**\n * `fmsim.Carrier` (ADR-0167 decision 12): a carrier's look that works when it is put on -- no binding of the author's.\n * The author picks the load parts, the body parts if any, and, for a figure whose thickness follows its load (roll,\n * foil, reel), the input made by 「상태에 따라 크기」 and its value for FULL, EMPTY and EMPTYEMPTY.\n */\nexport const CARRIER_FIGURE: FigureCapabilityDescriptor = {\n name: 'fmsim.Carrier',\n label: 'Carrier',\n note: 'fmsim 캐리어 — 켜기만 하면 적재물 부품에 캐리어 범례의 색, 몸체 부품에 캐리어 애니메이션의 색 · 점멸이 들고, 두께가 바뀌는 피규어는 적재량을 고정 표로 정한다',\n version: '1',\n needs: ['item'],\n data: [{ name: 'EMPTYTYPE' }, { name: 'CARRIERSTATUS' }, { name: 'CARRIERNAME' }, { name: 'CARRIERTYPE' }],\n settings: [\n { key: 'loadParts', kind: 'parts', label: '적재물 부품', required: true },\n { key: 'bodyParts', kind: 'parts', label: '몸체 부품' },\n { key: 'fill', kind: 'input-table', label: '적재량', keys: CARRIER_LOAD_CODES, start: CARRIER_FILL_START }\n ],\n check: carrierSettingsIssues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,EAAE,QAAQ,EAAE,IAAI,EAAE;QACpE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QACnD,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE;KACxG;IACD,KAAK,EAAE,qBAAqB;IAC5B,aAAa,EAAE,oBAAoB;IACnC,KAAK,EAAE,cAAc;CACtB,CAAA","sourcesContent":["import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene'\nimport type { FigureAsset, FigureDataBinding, FigureDataTableEntry } from '@hatiolab/figure-model'\n\nimport { ANIMATION_DEFAULT } from './animation-default.js'\nimport { LEGEND_CARRIER, legendTableEntry } from './legends.js'\n\n/** The codes of a carrier's load (EMPTYTYPE) fmsim fixes: a figure's thickness is given for these only (ADR-0167 12). */\nexport const CARRIER_LOAD_CODES = ['FULL', 'EMPTY', 'EMPTYEMPTY'] as const\n/** The thickness a figure starts with for each code: full, then empty. */\nexport const CARRIER_FILL_START = { FULL: 100, EMPTY: 0, EMPTYEMPTY: 0 }\n\nconst SETTING_KEYS = ['loadParts', 'bodyParts', 'fill']\n\ninterface CarrierSettings {\n loadParts?: string[]\n bodyParts?: string[]\n fill?: { input: string; values?: Record<string, number> }\n}\n\n/** A table entry from one of fmsim's default legends: its colour and effect. */\nconst lookOf = (entry: unknown) => legendTableEntry(entry) as FigureDataTableEntry\n\n/** Why a figure's settings cannot be taken: parts and the input that are not the figure's, keys and values out of place. */\nexport function carrierSettingsIssues(settings: Record<string, unknown> | undefined, asset: FigureAsset): string[] {\n const s = (settings ?? {}) as CarrierSettings & Record<string, unknown>\n const parts = new Set(asset.appearance.map(a => a.target))\n const out: string[] = []\n for (const key of Object.keys(s)) if (!SETTING_KEYS.includes(key)) out.push(`${key} 은(는) 이 능력의 설정이 아닙니다.`)\n if (!Array.isArray(s.loadParts) || !s.loadParts.length) out.push('적재물 부품을 하나 이상 고릅니다.')\n for (const key of ['loadParts', 'bodyParts'] as const)\n for (const part of Array.isArray(s[key]) ? s[key]! : []) if (!parts.has(part)) out.push(`${part} 부품이 없습니다.`)\n if (s.fill !== undefined) {\n const input = asset.document.model.inputs.find(i => i.id === s.fill!.input && i.role === 'state')\n if (!input) out.push(`적재량 입력 ${String(s.fill.input)} 이(가) 이 피규어의 상태 입력이 아닙니다.`)\n for (const [code, value] of Object.entries(s.fill.values ?? {})) {\n if (!(CARRIER_LOAD_CODES as readonly string[]).includes(code)) out.push(`${code} 은(는) 정해진 코드(FULL · EMPTY · EMPTYEMPTY)가 아닙니다.`)\n else if (input && !(Number.isFinite(value) && value >= input.min! && value <= input.max!)) out.push(`${code} 의 적재량 ${value} 이(가) 범위 ${input.min}~${input.max} 밖입니다.`)\n }\n }\n return out\n}\n\n/**\n * The tables the capability hands the ADR-0166 engine: the load's colour (role carrier-legend, fmsim's carrier legend\n * by default) on the load parts, the condition's colour and blink (role carrier-animation, fmsim's default animation) on\n * the body parts or else the load parts, and the thickness by the figure's own fixed table -- no legend, so a legend\n * never gives it.\n */\nexport function carrierDataInterface(settings: Record<string, unknown> | undefined): { schema: { name: string; label: string; kind: 'text' }[]; bindings: FigureDataBinding[] } | undefined {\n const s = (settings ?? {}) as CarrierSettings\n const load = s.loadParts ?? []\n if (!load.length) return undefined\n const body = s.bodyParts?.length ? s.bodyParts : load\n const loadTable = Object.fromEntries(Object.entries(LEGEND_CARRIER).map(([code, entry]) => [code, lookOf(entry)]))\n const conditionTable = Object.fromEntries(Object.entries(ANIMATION_DEFAULT).map(([code, entry]) => [code, lookOf(entry)]))\n const bindings: FigureDataBinding[] = [\n { id: 'fmsim-carrier-load', label: '적재', accessor: 'EMPTYTYPE', rule: 'table', lookup: 'code', targets: { parts: [...load] }, table: loadTable, legend: { role: 'carrier-legend' } },\n { id: 'fmsim-carrier-condition', label: '상태', accessor: 'CARRIERSTATUS', rule: 'table', lookup: 'code', targets: { parts: [...body] }, table: conditionTable, legend: { role: 'carrier-animation' } }\n ]\n if (s.fill?.input) {\n const values = { ...CARRIER_FILL_START, ...(s.fill.values ?? {}) }\n const full = { values: { [s.fill.input]: values.FULL } }\n bindings.push({\n id: 'fmsim-carrier-fill',\n label: '적재량',\n accessor: 'EMPTYTYPE',\n rule: 'table',\n lookup: 'code',\n targets: { inputs: [s.fill.input] },\n /* Another code, or none, is full (ADR-0167 12). */\n table: { ...Object.fromEntries(CARRIER_LOAD_CODES.map(code => [code, { values: { [s.fill!.input]: values[code] } }])), default: full }\n })\n }\n return {\n schema: [\n { name: 'EMPTYTYPE', label: '적재', kind: 'text' },\n { name: 'CARRIERSTATUS', label: '상태', kind: 'text' }\n ],\n bindings\n }\n}\n\n/**\n * What the capability takes over (ADR-0167 decision 17): the load and body parts' looks and the load's input. Where fmsim\n * registers it, a binding of the figure's on them rests; operato-board, which does not, draws by the binding.\n */\nexport function carrierTargets(settings: Record<string, unknown> | undefined): { parts: string[]; inputs: string[] } {\n const s = (settings ?? {}) as CarrierSettings\n return { parts: [...new Set([...(s.loadParts ?? []), ...(s.bodyParts ?? [])])], inputs: s.fill?.input ? [s.fill.input] : [] }\n}\n\n/**\n * `fmsim.Carrier` (ADR-0167 decision 12): a carrier's look that works when it is put on -- no binding of the author's.\n * The author picks the load parts, the body parts if any, and, for a figure whose thickness follows its load (roll,\n * foil, reel), the input made by 「상태에 따라 크기」 and its value for FULL, EMPTY and EMPTYEMPTY.\n */\nexport const CARRIER_FIGURE: FigureCapabilityDescriptor = {\n name: 'fmsim.Carrier',\n label: 'Carrier',\n note: 'fmsim 캐리어 — 켜기만 하면 적재물 부품에 캐리어 범례의 색, 몸체 부품에 캐리어 애니메이션의 색 · 점멸이 들고, 두께가 바뀌는 피규어는 적재량을 고정 표로 정한다',\n version: '1',\n needs: ['item'],\n data: [{ name: 'EMPTYTYPE' }, { name: 'CARRIERSTATUS' }, { name: 'CARRIERNAME' }, { name: 'CARRIERTYPE' }],\n settings: [\n { key: 'loadParts', kind: 'parts', label: '적재물 부품', required: true },\n { key: 'bodyParts', kind: 'parts', label: '몸체 부품' },\n { key: 'fill', kind: 'input-table', label: '적재량', keys: CARRIER_LOAD_CODES, start: CARRIER_FILL_START }\n ],\n check: carrierSettingsIssues,\n dataInterface: carrierDataInterface,\n takes: carrierTargets\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { ANIMATION_DEFAULT, type AnimationConfig, type AnimationPreset } from './animation-default.js';
|
|
2
|
-
export { LEGEND_CARRIER, legendColor, type Legend, type LegendEntry } from './legends.js';
|
|
2
|
+
export { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor, legendTableEntry, type Legend, type LegendEntry } from './legends.js';
|
|
3
|
+
export { FMSIM_LEGEND_ROWS, legendRowOf, legendRows, registerLegendRow, type LegendRow } from './legend-rows.js';
|
|
4
|
+
export { STATUS, STATUS_DEFAULT, STATUS_LEGEND_ROLE, statusDataInterface, statusProperties, statusSettingsIssues, statusTargets } from './status.js';
|
|
5
|
+
export { LV_KINDS, MACHINE, MACHINE_TYPES, UNIT, UNIT_TYPES, VEHICLE, VEHICLE_TYPES, kindIssues } from './lv.js';
|
|
3
6
|
export { CARRIER_HOLDER, CARRIER_MOUNTS, carrierHolderProperties, type CarrierHolderLegendOptions } from './carrier-holder.js';
|
|
4
|
-
export {
|
|
7
|
+
export { VEHICLE_HEADINGS, vehicleIssues } from './vehicle.js';
|
|
5
8
|
export { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js';
|
|
6
|
-
/** Every capability fmsim defines, for a modeller to register. */
|
|
9
|
+
/** Every capability fmsim defines, for a modeller to register: LV's kinds, then the features worn with any of them. */
|
|
7
10
|
export declare const FMSIM_FIGURE_CAPABILITIES: import("@hatiolab/things-scene").FigureCapabilityDescriptor[];
|
package/dist/index.js
CHANGED
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
* the descriptors alone.
|
|
5
5
|
*/
|
|
6
6
|
export { ANIMATION_DEFAULT } from './animation-default.js';
|
|
7
|
-
export { LEGEND_CARRIER, legendColor } from './legends.js';
|
|
7
|
+
export { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor, legendTableEntry } from './legends.js';
|
|
8
|
+
export { FMSIM_LEGEND_ROWS, legendRowOf, legendRows, registerLegendRow } from './legend-rows.js';
|
|
9
|
+
export { STATUS, STATUS_DEFAULT, STATUS_LEGEND_ROLE, statusDataInterface, statusProperties, statusSettingsIssues, statusTargets } from './status.js';
|
|
10
|
+
export { LV_KINDS, MACHINE, MACHINE_TYPES, UNIT, UNIT_TYPES, VEHICLE, VEHICLE_TYPES, kindIssues } from './lv.js';
|
|
8
11
|
export { CARRIER_HOLDER, CARRIER_MOUNTS, carrierHolderProperties } from './carrier-holder.js';
|
|
9
|
-
export {
|
|
12
|
+
export { VEHICLE_HEADINGS, vehicleIssues } from './vehicle.js';
|
|
10
13
|
export { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js';
|
|
11
|
-
import { CARRIER_HOLDER } from './carrier-holder.js';
|
|
12
14
|
import { CARRIER_FIGURE } from './carrier.js';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
import { CARRIER_HOLDER } from './carrier-holder.js';
|
|
16
|
+
import { MACHINE, UNIT, VEHICLE } from './lv.js';
|
|
17
|
+
import { STATUS } from './status.js';
|
|
18
|
+
/** Every capability fmsim defines, for a modeller to register: LV's kinds, then the features worn with any of them. */
|
|
19
|
+
export const FMSIM_FIGURE_CAPABILITIES = [MACHINE, UNIT, VEHICLE, STATUS, CARRIER_HOLDER, CARRIER_FIGURE];
|
|
16
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,iBAAiB,EAA8C,MAAM,wBAAwB,CAAA;AACtG,OAAO,EAAE,cAAc,EAAE,WAAW,EAAiC,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,iBAAiB,EAA8C,MAAM,wBAAwB,CAAA;AACtG,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAiC,MAAM,cAAc,CAAA;AACtK,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAkB,MAAM,kBAAkB,CAAA;AAChH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACpJ,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAChH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,uBAAuB,EAAmC,MAAM,qBAAqB,CAAA;AAC9H,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElJ,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,uHAAuH;AACvH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAA","sourcesContent":["/*\n * What fmsim puts on a figure (ADR-0167): its capabilities' descriptors, their pure functions and fmsim's default\n * tables -- no scene, DOM or API. fmsim's machine registers them with its mixins; operato-figure's modeller registers\n * the descriptors alone.\n */\nexport { ANIMATION_DEFAULT, type AnimationConfig, type AnimationPreset } from './animation-default.js'\nexport { LEGEND_CARRIER, LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendColor, legendTableEntry, type Legend, type LegendEntry } from './legends.js'\nexport { FMSIM_LEGEND_ROWS, legendRowOf, legendRows, registerLegendRow, type LegendRow } from './legend-rows.js'\nexport { STATUS, STATUS_DEFAULT, STATUS_LEGEND_ROLE, statusDataInterface, statusProperties, statusSettingsIssues, statusTargets } from './status.js'\nexport { LV_KINDS, MACHINE, MACHINE_TYPES, UNIT, UNIT_TYPES, VEHICLE, VEHICLE_TYPES, kindIssues } from './lv.js'\nexport { CARRIER_HOLDER, CARRIER_MOUNTS, carrierHolderProperties, type CarrierHolderLegendOptions } from './carrier-holder.js'\nexport { VEHICLE_HEADINGS, vehicleIssues } from './vehicle.js'\nexport { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js'\n\nimport { CARRIER_FIGURE } from './carrier.js'\nimport { CARRIER_HOLDER } from './carrier-holder.js'\nimport { MACHINE, UNIT, VEHICLE } from './lv.js'\nimport { STATUS } from './status.js'\n\n/** Every capability fmsim defines, for a modeller to register: LV's kinds, then the features worn with any of them. */\nexport const FMSIM_FIGURE_CAPABILITIES = [MACHINE, UNIT, VEHICLE, STATUS, CARRIER_HOLDER, CARRIER_FIGURE]\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The legend rows of a board (ADR-0167 decision 20): each row is one legend choice of the board's LEGENDS panel, kept
|
|
3
|
+
* in the board property it has always had. fmsim's components and capabilities say which rows they follow; the panel
|
|
4
|
+
* is drawn from the rows registered here, and a new legend is one more row.
|
|
5
|
+
*/
|
|
6
|
+
export interface LegendRow {
|
|
7
|
+
/** The row's name: what a component says it follows */
|
|
8
|
+
name: string;
|
|
9
|
+
/** The panel's label (an i18n key) */
|
|
10
|
+
label: string;
|
|
11
|
+
/** The board property the chosen legend's name is kept in */
|
|
12
|
+
property: string;
|
|
13
|
+
/** The kind of legend it takes */
|
|
14
|
+
kind: 'color-map' | 'color-ranges' | 'animation-map';
|
|
15
|
+
/** The built-in component types that follow it */
|
|
16
|
+
types?: string[];
|
|
17
|
+
/** A row of a STATUS colour: a type an LV kind (fmsim.Machine, fmsim.Unit, fmsim.Vehicle) names */
|
|
18
|
+
status?: boolean;
|
|
19
|
+
/** A row the carrier holders follow, built-in or figure */
|
|
20
|
+
carrier?: boolean;
|
|
21
|
+
/** Rows kept apart in the panel as they are: the stocker's (decision 20, not taken up this time) */
|
|
22
|
+
section?: 'stocker';
|
|
23
|
+
}
|
|
24
|
+
/** fmsim's rows, in the order the panel has always shown them. */
|
|
25
|
+
export declare const FMSIM_LEGEND_ROWS: readonly LegendRow[];
|
|
26
|
+
/** Adds a row, or replaces the row of that name. */
|
|
27
|
+
export declare function registerLegendRow(row: LegendRow): void;
|
|
28
|
+
/** The rows registered, in their order. */
|
|
29
|
+
export declare function legendRows(): readonly LegendRow[];
|
|
30
|
+
/** The row of a name, if registered. */
|
|
31
|
+
export declare function legendRowOf(name: unknown): LegendRow | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** fmsim's rows, in the order the panel has always shown them. */
|
|
2
|
+
export const FMSIM_LEGEND_ROWS = [
|
|
3
|
+
{ name: 'equipment', label: 'equipment-legend-name', property: 'equipmentLegendName', kind: 'color-map', types: ['Equipment'], status: true },
|
|
4
|
+
{ name: 'buffer', label: 'buffer-legend-name', property: 'bufferLegendName', kind: 'color-map', types: ['Buffer'], status: true },
|
|
5
|
+
{ name: 'agvline', label: 'agvline-legend-name', property: 'agvlineLegendName', kind: 'color-map', types: ['AGVLine'], status: true },
|
|
6
|
+
{ name: 'ohtline', label: 'ohtline-legend-name', property: 'ohtlineLegendName', kind: 'color-map', types: ['OHTLine'], status: true },
|
|
7
|
+
{ name: 'conveyor', label: 'conveyor-legend-name', property: 'conveyorLegendName', kind: 'color-map', types: ['Conveyor', 'ConveyorJoin'], status: true },
|
|
8
|
+
{ name: 'port', label: 'port-legend-name', property: 'portLegendName', kind: 'color-map', types: ['Port'], status: true },
|
|
9
|
+
{ name: 'agv', label: 'agv-legend-name', property: 'agvLegendName', kind: 'color-map', types: ['AGV'], status: true },
|
|
10
|
+
{ name: 'oht', label: 'oht-legend-name', property: 'ohtLegendName', kind: 'color-map', types: ['OHT'], status: true },
|
|
11
|
+
{ name: 'shuttle', label: 'shuttle-legend-name', property: 'shuttleLegendName', kind: 'color-map', types: ['Shuttle'], status: true },
|
|
12
|
+
{ name: 'crane', label: 'crane-legend-name', property: 'craneLegendName', kind: 'color-map', types: ['Crane'], status: true },
|
|
13
|
+
{ name: 'shelf', label: 'shelf-legend-name', property: 'shelfLegendName', kind: 'color-map', types: ['Shelf'], status: true },
|
|
14
|
+
{ name: 'carrier', label: 'carrier-legend-name', property: 'carrierLegendName', kind: 'color-map', carrier: true },
|
|
15
|
+
{ name: 'carrier-animation', label: 'carrier-animation-name', property: 'carrierAnimationName', kind: 'animation-map', carrier: true },
|
|
16
|
+
{ name: 'battery-rate', label: 'battery-rate-legend-name', property: 'batteryRateLegendName', kind: 'color-ranges', types: ['AGV'] },
|
|
17
|
+
{ name: 'stocker', label: 'stoker-legend-name', property: 'stokerLegendName', kind: 'color-map', types: ['STOCKER'], section: 'stocker' },
|
|
18
|
+
{ name: 'stocker-capacity', label: 'stocker-capacity-legend-name', property: 'stockerCapacityLegendName', kind: 'color-ranges', section: 'stocker' },
|
|
19
|
+
{ name: 'zone-capacity', label: 'zone-capacity-legend-name', property: 'zoneCapacityLegendName', kind: 'color-ranges', section: 'stocker' }
|
|
20
|
+
];
|
|
21
|
+
const rows = [...FMSIM_LEGEND_ROWS];
|
|
22
|
+
/** Adds a row, or replaces the row of that name. */
|
|
23
|
+
export function registerLegendRow(row) {
|
|
24
|
+
const at = rows.findIndex(r => r.name === row.name);
|
|
25
|
+
if (at < 0)
|
|
26
|
+
rows.push(row);
|
|
27
|
+
else
|
|
28
|
+
rows[at] = row;
|
|
29
|
+
}
|
|
30
|
+
/** The rows registered, in their order. */
|
|
31
|
+
export function legendRows() {
|
|
32
|
+
return rows;
|
|
33
|
+
}
|
|
34
|
+
/** The row of a name, if registered. */
|
|
35
|
+
export function legendRowOf(name) {
|
|
36
|
+
return typeof name === 'string' ? rows.find(r => r.name === name) : undefined;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=legend-rows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legend-rows.js","sourceRoot":"","sources":["../src/legend-rows.ts"],"names":[],"mappings":"AAwBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAyB;IACrD,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7I,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAA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AE,OAAO,EAAE,SAAS,EAAE;CAC5I,CAAA;AAED,MAAM,IAAI,GAAgB,CAAC,GAAG,iBAAiB,CAAC,CAAA;AAEhD,oDAAoD;AACpD,MAAM,UAAU,iBAAiB,CAAC,GAAc;IAC9C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAA;IACnD,IAAI,EAAE,GAAG,CAAC;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;;QACrB,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAA;AACrB,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,CAAA;AACb,CAAC;AAED,wCAAwC;AACxC,MAAM,UAAU,WAAW,CAAC,IAAa;IACvC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC/E,CAAC","sourcesContent":["/**\n * The legend rows of a board (ADR-0167 decision 20): each row is one legend choice of the board's LEGENDS panel, kept\n * in the board property it has always had. fmsim's components and capabilities say which rows they follow; the panel\n * is drawn from the rows registered here, and a new legend is one more row.\n */\nexport interface LegendRow {\n /** The row's name: what a component says it follows */\n name: string\n /** The panel's label (an i18n key) */\n label: string\n /** The board property the chosen legend's name is kept in */\n property: string\n /** The kind of legend it takes */\n kind: 'color-map' | 'color-ranges' | 'animation-map'\n /** The built-in component types that follow it */\n types?: string[]\n /** A row of a STATUS colour: a type an LV kind (fmsim.Machine, fmsim.Unit, fmsim.Vehicle) names */\n status?: boolean\n /** A row the carrier holders follow, built-in or figure */\n carrier?: boolean\n /** Rows kept apart in the panel as they are: the stocker's (decision 20, not taken up this time) */\n section?: 'stocker'\n}\n\n/** fmsim's rows, in the order the panel has always shown them. */\nexport const FMSIM_LEGEND_ROWS: readonly LegendRow[] = [\n { name: 'equipment', label: 'equipment-legend-name', property: 'equipmentLegendName', kind: 'color-map', types: ['Equipment'], status: true },\n { name: 'buffer', label: 'buffer-legend-name', property: 'bufferLegendName', kind: 'color-map', types: ['Buffer'], status: true },\n { name: 'agvline', label: 'agvline-legend-name', property: 'agvlineLegendName', kind: 'color-map', types: ['AGVLine'], status: true },\n { name: 'ohtline', label: 'ohtline-legend-name', property: 'ohtlineLegendName', kind: 'color-map', types: ['OHTLine'], status: true },\n { name: 'conveyor', label: 'conveyor-legend-name', property: 'conveyorLegendName', kind: 'color-map', types: ['Conveyor', 'ConveyorJoin'], status: true },\n { name: 'port', label: 'port-legend-name', property: 'portLegendName', kind: 'color-map', types: ['Port'], status: true },\n { name: 'agv', label: 'agv-legend-name', property: 'agvLegendName', kind: 'color-map', types: ['AGV'], status: true },\n { name: 'oht', label: 'oht-legend-name', property: 'ohtLegendName', kind: 'color-map', types: ['OHT'], status: true },\n { name: 'shuttle', label: 'shuttle-legend-name', property: 'shuttleLegendName', kind: 'color-map', types: ['Shuttle'], status: true },\n { name: 'crane', label: 'crane-legend-name', property: 'craneLegendName', kind: 'color-map', types: ['Crane'], status: true },\n { name: 'shelf', label: 'shelf-legend-name', property: 'shelfLegendName', kind: 'color-map', types: ['Shelf'], status: true },\n { name: 'carrier', label: 'carrier-legend-name', property: 'carrierLegendName', kind: 'color-map', carrier: true },\n { name: 'carrier-animation', label: 'carrier-animation-name', property: 'carrierAnimationName', kind: 'animation-map', carrier: true },\n { name: 'battery-rate', label: 'battery-rate-legend-name', property: 'batteryRateLegendName', kind: 'color-ranges', types: ['AGV'] },\n { name: 'stocker', label: 'stoker-legend-name', property: 'stokerLegendName', kind: 'color-map', types: ['STOCKER'], section: 'stocker' },\n { name: 'stocker-capacity', label: 'stocker-capacity-legend-name', property: 'stockerCapacityLegendName', kind: 'color-ranges', section: 'stocker' },\n { name: 'zone-capacity', label: 'zone-capacity-legend-name', property: 'zoneCapacityLegendName', kind: 'color-ranges', section: 'stocker' }\n]\n\nconst rows: LegendRow[] = [...FMSIM_LEGEND_ROWS]\n\n/** Adds a row, or replaces the row of that name. */\nexport function registerLegendRow(row: LegendRow): void {\n const at = rows.findIndex(r => r.name === row.name)\n if (at < 0) rows.push(row)\n else rows[at] = row\n}\n\n/** The rows registered, in their order. */\nexport function legendRows(): readonly LegendRow[] {\n return rows\n}\n\n/** The row of a name, if registered. */\nexport function legendRowOf(name: unknown): LegendRow | undefined {\n return typeof name === 'string' ? rows.find(r => r.name === name) : undefined\n}\n"]}
|
package/dist/legends.d.ts
CHANGED
|
@@ -11,5 +11,14 @@ export interface Legend {
|
|
|
11
11
|
}
|
|
12
12
|
/** 범례 항목의 색: 문자열이면 그 색, `{ color }` 면 그 color. 둘 다 아니면 undefined */
|
|
13
13
|
export declare function legendColor(entry: unknown): string | undefined;
|
|
14
|
+
/** 범례 항목을 피규어 표 항목으로: 색(색 하나 또는 `{ color }`)과 효과만 (ADR-0166 7) */
|
|
15
|
+
export declare function legendTableEntry(entry: unknown): {
|
|
16
|
+
color?: string;
|
|
17
|
+
effect?: Record<string, unknown>;
|
|
18
|
+
};
|
|
14
19
|
/** 캐리어 적재(EMPTYTYPE)의 fmsim 기본 범례: 2D 캐리어 · 스토커 게이지와 fmsim.Carrier 피규어의 기본표가 같이 쓴다 */
|
|
15
20
|
export declare const LEGEND_CARRIER: Legend;
|
|
21
|
+
export declare const LEGEND_MACHINE: Legend;
|
|
22
|
+
export declare const LEGEND_VEHICLE: Legend;
|
|
23
|
+
export declare const LEGEND_UNIT: Legend;
|
|
24
|
+
export declare const LEGEND_CRANE: Legend;
|
package/dist/legends.js
CHANGED
|
@@ -5,6 +5,12 @@ export function legendColor(entry) {
|
|
|
5
5
|
const color = entry && typeof entry === 'object' ? entry.color : undefined;
|
|
6
6
|
return typeof color === 'string' ? color : undefined;
|
|
7
7
|
}
|
|
8
|
+
/** 범례 항목을 피규어 표 항목으로: 색(색 하나 또는 `{ color }`)과 효과만 (ADR-0166 7) */
|
|
9
|
+
export function legendTableEntry(entry) {
|
|
10
|
+
const color = legendColor(entry);
|
|
11
|
+
const effect = entry && typeof entry === 'object' ? entry.effect : undefined;
|
|
12
|
+
return Object.assign(Object.assign({}, (color ? { color } : {})), (effect && typeof effect === 'object' ? { effect: effect } : {}));
|
|
13
|
+
}
|
|
8
14
|
/** 캐리어 적재(EMPTYTYPE)의 fmsim 기본 범례: 2D 캐리어 · 스토커 게이지와 fmsim.Carrier 피규어의 기본표가 같이 쓴다 */
|
|
9
15
|
export const LEGEND_CARRIER = {
|
|
10
16
|
FULL: '#4AA7FE',
|
|
@@ -12,4 +18,51 @@ export const LEGEND_CARRIER = {
|
|
|
12
18
|
EMPTYEMPTY: '#019D59',
|
|
13
19
|
default: '#F0F0F0'
|
|
14
20
|
};
|
|
21
|
+
/* fmsim 의 상태(STATUS) 기본 범례: 설비 1000번대 · 유닛 2000번대 · 크레인 3000번대 · 차량 4000번대 — 코드가 겹치지 않는다 */
|
|
22
|
+
export const LEGEND_MACHINE = {
|
|
23
|
+
'1000': '#707070', // DISCONNECTED
|
|
24
|
+
'1001': '#8BDA5B', // UP
|
|
25
|
+
'1002': '#EB3245', // OUTOFSERVICE
|
|
26
|
+
'1003': '#5630D0', // PM
|
|
27
|
+
'1004': '#FFFFFF', // NOTONLINE
|
|
28
|
+
'1005': '#404040', // DOWN
|
|
29
|
+
'1006': '#F4F226', // NOTAUTO
|
|
30
|
+
'1007': '#FD9B00', // ALARM
|
|
31
|
+
'1008': '#4AA7FE', // FULL
|
|
32
|
+
default: '#F0F0F0'
|
|
33
|
+
};
|
|
34
|
+
export const LEGEND_VEHICLE = {
|
|
35
|
+
'4000': '#EB3245', // OUTOFSERVICE
|
|
36
|
+
'4001': '#8BDA5B', // ASSIGNED
|
|
37
|
+
// '4002': '#cbf266', // ASSIGNED_ACQUIRING
|
|
38
|
+
// '4003': '#cbf266', // ASSIGNED_DEPOSITING
|
|
39
|
+
// '4004': '#cbf266', // ASSIGNED_ENROUTE
|
|
40
|
+
// '4005': '#cbf266', // ASSIGNED_PARKED
|
|
41
|
+
'4006': '#FD9B00', // NOTASSIGNED
|
|
42
|
+
'4007': '#32D1C4', // INSTALLED
|
|
43
|
+
'4008': '#9790EC', // CHARGING
|
|
44
|
+
'4009': '#4AA7FE', // CHARGED
|
|
45
|
+
'4010': '#404040', // REMOVED
|
|
46
|
+
default: '#F0F0F0'
|
|
47
|
+
};
|
|
48
|
+
export const LEGEND_UNIT = {
|
|
49
|
+
'2000': '#FD9B00', // BANNED
|
|
50
|
+
'2001': '#404040', // DOWN
|
|
51
|
+
'2002': '#8BDA5B', // EMPTY
|
|
52
|
+
'2003': '#FFFFFF', // EMPTY_RESERVED
|
|
53
|
+
'2004': '#32D1C4', // FULL_RESERVED
|
|
54
|
+
'2005': '#4AA7FE', // FULL
|
|
55
|
+
'2006': '#EB3245', // NOTINSERVICE
|
|
56
|
+
default: '#F0F0F0'
|
|
57
|
+
};
|
|
58
|
+
export const LEGEND_CRANE = {
|
|
59
|
+
'3000': '#EB3245', // OUTOFSERVICE
|
|
60
|
+
// '3001': '#404040', // DOWN
|
|
61
|
+
// '3002': '#8BDA5B', // EMPTY
|
|
62
|
+
'3003': '#FFFFFF', // IDLE
|
|
63
|
+
'3004': '#32D1C4', // ACTIVE
|
|
64
|
+
// '3005': '#4AA7FE', // FULL
|
|
65
|
+
// '3006': '#EB3245', // NOTINSERVICE
|
|
66
|
+
default: '#F0F0F0'
|
|
67
|
+
};
|
|
15
68
|
//# sourceMappingURL=legends.js.map
|
package/dist/legends.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legends.js","sourceRoot":"","sources":["../src/legends.ts"],"names":[],"mappings":"AAUA,oEAAoE;AACpE,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,MAAM,KAAK,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAA6B,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;IACnG,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACtD,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,SAAS;CACnB,CAAA","sourcesContent":["/**\n * 범례 항목: 색 하나, 또는 표 항목과 같은 모양의 객체 `{ color, effect, values, … }` (ADR-0166 7). 객체 항목의 다른 칸(2D 애니메이션\n * 등)은 그 옆에 남는다. 색만 쓰는 곳은 legendColor 로 읽는다.\n */\nexport type LegendEntry = string | { color?: string; [field: string]: unknown }\n\nexport interface Legend {\n [key: string]: LegendEntry\n}\n\n/** 범례 항목의 색: 문자열이면 그 색, `{ color }` 면 그 color. 둘 다 아니면 undefined */\nexport function legendColor(entry: unknown): string | undefined {\n if (typeof entry === 'string') return entry\n const color = entry && typeof entry === 'object' ? (entry as { color?: unknown }).color : undefined\n return typeof color === 'string' ? color : undefined\n}\n\n/** 캐리어 적재(EMPTYTYPE)의 fmsim 기본 범례: 2D 캐리어 · 스토커 게이지와 fmsim.Carrier 피규어의 기본표가 같이 쓴다 */\nexport const LEGEND_CARRIER: Legend = {\n FULL: '#4AA7FE',\n EMPTY: '#8BDA5B',\n EMPTYEMPTY: '#019D59',\n default: '#F0F0F0'\n}\n"]}
|
|
1
|
+
{"version":3,"file":"legends.js","sourceRoot":"","sources":["../src/legends.ts"],"names":[],"mappings":"AAUA,oEAAoE;AACpE,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC3C,MAAM,KAAK,GAA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AO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC,MAAM,EAAE,SAAS,EAAE,eAAe;IAClC,MAAM,EAAE,SAAS,EAAE,WAAW;IAC9B,2CAA2C;IAC3C,4CAA4C;IAC5C,yCAAyC;IACzC,wCAAwC;IACxC,MAAM,EAAE,SAAS,EAAE,cAAc;IACjC,MAAM,EAAE,SAAS,EAAE,YAAY;IAC/B,MAAM,EAAE,SAAS,EAAE,WAAW;IAC9B,MAAM,EAAE,SAAS,EAAE,UAAU;IAC7B,MAAM,EAAE,SAAS,EAAE,UAAU;IAC7B,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAW;IACjC,MAAM,EAAE,SAAS,EAAE,SAAS;IAC5B,MAAM,EAAE,SAAS,EAAE,OAAO;IAC1B,MAAM,EAAE,SAAS,EAAE,QAAQ;IAC3B,MAAM,EAAE,SAAS,EAAE,iBAAiB;IACpC,MAAM,EAAE,SAAS,EAAE,gBAAgB;IACnC,MAAM,EAAE,SAAS,EAAE,OAAO;IAC1B,MAAM,EAAE,SAAS,EAAE,eAAe;IAClC,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAW;IAClC,MAAM,EAAE,SAAS,EAAE,eAAe;IAClC,6BAA6B;IAC7B,8BAA8B;IAC9B,MAAM,EAAE,SAAS,EAAE,OAAO;IAC1B,MAAM,EAAE,SAAS,EAAE,SAAS;IAC5B,6BAA6B;IAC7B,qCAAqC;IACrC,OAAO,EAAE,SAAS;CACnB,CAAA","sourcesContent":["/**\n * 범례 항목: 색 하나, 또는 표 항목과 같은 모양의 객체 `{ color, effect, values, … }` (ADR-0166 7). 객체 항목의 다른 칸(2D 애니메이션\n * 등)은 그 옆에 남는다. 색만 쓰는 곳은 legendColor 로 읽는다.\n */\nexport type LegendEntry = string | { color?: string; [field: string]: unknown }\n\nexport interface Legend {\n [key: string]: LegendEntry\n}\n\n/** 범례 항목의 색: 문자열이면 그 색, `{ color }` 면 그 color. 둘 다 아니면 undefined */\nexport function legendColor(entry: unknown): string | undefined {\n if (typeof entry === 'string') return entry\n const color = entry && typeof entry === 'object' ? (entry as { color?: unknown }).color : undefined\n return typeof color === 'string' ? color : undefined\n}\n\n/** 범례 항목을 피규어 표 항목으로: 색(색 하나 또는 `{ color }`)과 효과만 (ADR-0166 7) */\nexport function legendTableEntry(entry: unknown): { color?: string; effect?: Record<string, unknown> } {\n const color = legendColor(entry)\n const effect = entry && typeof entry === 'object' ? (entry as { effect?: unknown }).effect : undefined\n return { ...(color ? { color } : {}), ...(effect && typeof effect === 'object' ? { effect: effect as Record<string, unknown> } : {}) }\n}\n\n/** 캐리어 적재(EMPTYTYPE)의 fmsim 기본 범례: 2D 캐리어 · 스토커 게이지와 fmsim.Carrier 피규어의 기본표가 같이 쓴다 */\nexport const LEGEND_CARRIER: Legend = {\n FULL: '#4AA7FE',\n EMPTY: '#8BDA5B',\n EMPTYEMPTY: '#019D59',\n default: '#F0F0F0'\n}\n\n/* fmsim 의 상태(STATUS) 기본 범례: 설비 1000번대 · 유닛 2000번대 · 크레인 3000번대 · 차량 4000번대 — 코드가 겹치지 않는다 */\nexport const LEGEND_MACHINE: Legend = {\n '1000': '#707070', // DISCONNECTED\n '1001': '#8BDA5B', // UP\n '1002': '#EB3245', // OUTOFSERVICE\n '1003': '#5630D0', // PM\n '1004': '#FFFFFF', // NOTONLINE\n '1005': '#404040', // DOWN\n '1006': '#F4F226', // NOTAUTO\n '1007': '#FD9B00', // ALARM\n '1008': '#4AA7FE', // FULL\n default: '#F0F0F0'\n}\n\nexport const LEGEND_VEHICLE: Legend = {\n '4000': '#EB3245', // OUTOFSERVICE\n '4001': '#8BDA5B', // ASSIGNED\n // '4002': '#cbf266', // ASSIGNED_ACQUIRING\n // '4003': '#cbf266', // ASSIGNED_DEPOSITING\n // '4004': '#cbf266', // ASSIGNED_ENROUTE\n // '4005': '#cbf266', // ASSIGNED_PARKED\n '4006': '#FD9B00', // NOTASSIGNED\n '4007': '#32D1C4', // INSTALLED\n '4008': '#9790EC', // CHARGING\n '4009': '#4AA7FE', // CHARGED\n '4010': '#404040', // REMOVED\n default: '#F0F0F0'\n}\n\nexport const LEGEND_UNIT: Legend = {\n '2000': '#FD9B00', // BANNED\n '2001': '#404040', // DOWN\n '2002': '#8BDA5B', // EMPTY\n '2003': '#FFFFFF', // EMPTY_RESERVED\n '2004': '#32D1C4', // FULL_RESERVED\n '2005': '#4AA7FE', // FULL\n '2006': '#EB3245', // NOTINSERVICE\n default: '#F0F0F0'\n}\n\nexport const LEGEND_CRANE: Legend = {\n '3000': '#EB3245', // OUTOFSERVICE\n // '3001': '#404040', // DOWN\n // '3002': '#8BDA5B', // EMPTY\n '3003': '#FFFFFF', // IDLE\n '3004': '#32D1C4', // ACTIVE\n // '3005': '#4AA7FE', // FULL\n // '3006': '#EB3245', // NOTINSERVICE\n default: '#F0F0F0'\n}\n"]}
|
package/dist/lv.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene';
|
|
2
|
+
import type { FigureAsset } from '@hatiolab/figure-model';
|
|
3
|
+
/** The machine types a figure may stand as: each a board legend row, and a height fmsim's own machines stand at */
|
|
4
|
+
export declare const MACHINE_TYPES: readonly ["equipment", "buffer", "conveyor"];
|
|
5
|
+
/** The unit types */
|
|
6
|
+
export declare const UNIT_TYPES: readonly ["port", "shelf"];
|
|
7
|
+
/** The vehicle types; empty, a figure on the floor is an AGV and one on the ceiling an OHT */
|
|
8
|
+
export declare const VEHICLE_TYPES: readonly ["agv", "oht", "shuttle", "crane"];
|
|
9
|
+
/** The LV kinds: a figure is one of them at most */
|
|
10
|
+
export declare const LV_KINDS: readonly ["fmsim.Machine", "fmsim.Unit", "fmsim.Vehicle"];
|
|
11
|
+
/** Why a figure cannot be this kind: it wears another kind too. */
|
|
12
|
+
export declare function kindIssues(name: string, asset: FigureAsset): string[];
|
|
13
|
+
/**
|
|
14
|
+
* `fmsim.Machine`: a figure is an LV machine of a type -- the board row its status follows, and the height fmsim's own
|
|
15
|
+
* machine of that type stands at when the board says none (fmsim gives no height on the board).
|
|
16
|
+
*/
|
|
17
|
+
export declare const MACHINE: FigureCapabilityDescriptor;
|
|
18
|
+
/** `fmsim.Unit`: a figure is an LV unit of a type -- the board row its status follows. A tag: units do nothing of their own yet. */
|
|
19
|
+
export declare const UNIT: FigureCapabilityDescriptor;
|
|
20
|
+
/**
|
|
21
|
+
* `fmsim.Vehicle`: a figure is an LV vehicle -- it travels to the Node its NODEID and NODEMACHINE name, an OHT hung from
|
|
22
|
+
* its line's rail, and its type is the board row its status follows.
|
|
23
|
+
*/
|
|
24
|
+
export declare const VEHICLE: FigureCapabilityDescriptor;
|
package/dist/lv.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { VEHICLE_HEADINGS, vehicleIssues } from './vehicle.js';
|
|
2
|
+
/*
|
|
3
|
+
* What a figure is in LV (ADR-0167 decision 22): a Machine, a Unit or a Vehicle -- one of them, or none. A kind is the tag
|
|
4
|
+
* LV handles the figure by: its type is the board legend row the figure's STATUS follows, as a built-in's component type
|
|
5
|
+
* is. A kind adds only what is its own (a machine's height, a vehicle's travel); the status colour and the carriers are
|
|
6
|
+
* features of their own (fmsim.Status, fmsim.CarrierHolder), worn with any kind.
|
|
7
|
+
*/
|
|
8
|
+
/** The machine types a figure may stand as: each a board legend row, and a height fmsim's own machines stand at */
|
|
9
|
+
export const MACHINE_TYPES = ['equipment', 'buffer', 'conveyor'];
|
|
10
|
+
/** The unit types */
|
|
11
|
+
export const UNIT_TYPES = ['port', 'shelf'];
|
|
12
|
+
/** The vehicle types; empty, a figure on the floor is an AGV and one on the ceiling an OHT */
|
|
13
|
+
export const VEHICLE_TYPES = ['agv', 'oht', 'shuttle', 'crane'];
|
|
14
|
+
/** The LV kinds: a figure is one of them at most */
|
|
15
|
+
export const LV_KINDS = ['fmsim.Machine', 'fmsim.Unit', 'fmsim.Vehicle'];
|
|
16
|
+
/** Why a figure cannot be this kind: it wears another kind too. */
|
|
17
|
+
export function kindIssues(name, asset) {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
const others = ((_c = (_b = (_a = asset === null || asset === void 0 ? void 0 : asset.document) === null || _a === void 0 ? void 0 : _a.capabilities) === null || _b === void 0 ? void 0 : _b.names) !== null && _c !== void 0 ? _c : []).filter(n => n !== name && LV_KINDS.includes(n));
|
|
20
|
+
return others.length ? [`LV 에서는 하나로만 다룬다 — ${others.join(', ')} 와 함께 켤 수 없다`] : [];
|
|
21
|
+
}
|
|
22
|
+
const typeProperty = (name, types) => ({
|
|
23
|
+
type: 'select',
|
|
24
|
+
label: name.replace(/[A-Z]/g, c => '-' + c.toLowerCase()),
|
|
25
|
+
name,
|
|
26
|
+
property: { options: ['', ...types] }
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* `fmsim.Machine`: a figure is an LV machine of a type -- the board row its status follows, and the height fmsim's own
|
|
30
|
+
* machine of that type stands at when the board says none (fmsim gives no height on the board).
|
|
31
|
+
*/
|
|
32
|
+
export const MACHINE = {
|
|
33
|
+
name: 'fmsim.Machine',
|
|
34
|
+
label: 'Machine',
|
|
35
|
+
note: 'LV 설비 — 설비 타입(장비 · 버퍼 · 컨베이어)이 상태 범례 줄과 높이를 정한다',
|
|
36
|
+
version: '2',
|
|
37
|
+
needs: [],
|
|
38
|
+
properties: [typeProperty('machineType', MACHINE_TYPES)],
|
|
39
|
+
check: (_settings, asset) => kindIssues('fmsim.Machine', asset)
|
|
40
|
+
};
|
|
41
|
+
/** `fmsim.Unit`: a figure is an LV unit of a type -- the board row its status follows. A tag: units do nothing of their own yet. */
|
|
42
|
+
export const UNIT = {
|
|
43
|
+
name: 'fmsim.Unit',
|
|
44
|
+
label: 'Unit',
|
|
45
|
+
note: 'LV 유닛 — 유닛 타입(포트 · 선반)이 상태 범례 줄을 정한다',
|
|
46
|
+
version: '2',
|
|
47
|
+
needs: [],
|
|
48
|
+
properties: [typeProperty('unitType', UNIT_TYPES)],
|
|
49
|
+
check: (_settings, asset) => kindIssues('fmsim.Unit', asset)
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* `fmsim.Vehicle`: a figure is an LV vehicle -- it travels to the Node its NODEID and NODEMACHINE name, an OHT hung from
|
|
53
|
+
* its line's rail, and its type is the board row its status follows.
|
|
54
|
+
*/
|
|
55
|
+
export const VEHICLE = {
|
|
56
|
+
name: 'fmsim.Vehicle',
|
|
57
|
+
label: 'Vehicle',
|
|
58
|
+
note: 'LV 차량 — NODEID · NODEMACHINE 이 가리키는 노드로 다닌다. 차량 타입(비면 바닥 AGV · 천장 OHT)이 상태 범례 줄을 정한다',
|
|
59
|
+
version: '3',
|
|
60
|
+
needs: [],
|
|
61
|
+
properties: [
|
|
62
|
+
typeProperty('vehicleType', VEHICLE_TYPES),
|
|
63
|
+
{ type: 'select', label: 'vehicle-heading', name: 'vehicleHeading', property: { options: [...VEHICLE_HEADINGS] } }
|
|
64
|
+
],
|
|
65
|
+
data: [{ name: 'NODEID' }, { name: 'NODEMACHINE' }],
|
|
66
|
+
check: (settings, asset) => [...kindIssues('fmsim.Vehicle', asset), ...vehicleIssues(settings, asset)]
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=lv.js.map
|
package/dist/lv.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lv.js","sourceRoot":"","sources":["../src/lv.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE9D;;;;;GAKG;AAEH,mHAAmH;AACnH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAA;AACzE,qBAAqB;AACrB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAA;AACp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port { VEHICLE_HEADINGS, vehicleIssues } from './vehicle.js'\n\n/*\n * What a figure is in LV (ADR-0167 decision 22): a Machine, a Unit or a Vehicle -- one of them, or none. A kind is the tag\n * LV handles the figure by: its type is the board legend row the figure's STATUS follows, as a built-in's component type\n * is. A kind adds only what is its own (a machine's height, a vehicle's travel); the status colour and the carriers are\n * features of their own (fmsim.Status, fmsim.CarrierHolder), worn with any kind.\n */\n\n/** The machine types a figure may stand as: each a board legend row, and a height fmsim's own machines stand at */\nexport const MACHINE_TYPES = ['equipment', 'buffer', 'conveyor'] as const\n/** The unit types */\nexport const UNIT_TYPES = ['port', 'shelf'] as const\n/** The vehicle types; empty, a figure on the floor is an AGV and one on the ceiling an OHT */\nexport const VEHICLE_TYPES = ['agv', 'oht', 'shuttle', 'crane'] as const\n\n/** The LV kinds: a figure is one of them at most */\nexport const LV_KINDS = ['fmsim.Machine', 'fmsim.Unit', 'fmsim.Vehicle'] as const\n\n/** Why a figure cannot be this kind: it wears another kind too. */\nexport function kindIssues(name: string, asset: FigureAsset): string[] {\n const others = (asset?.document?.capabilities?.names ?? []).filter(n => n !== name && (LV_KINDS as readonly string[]).includes(n))\n return others.length ? [`LV 에서는 하나로만 다룬다 — ${others.join(', ')} 와 함께 켤 수 없다`] : []\n}\n\nconst typeProperty = (name: string, types: readonly string[]) => ({\n type: 'select',\n label: name.replace(/[A-Z]/g, c => '-' + c.toLowerCase()),\n name,\n property: { options: ['', ...types] }\n})\n\n/**\n * `fmsim.Machine`: a figure is an LV machine of a type -- the board row its status follows, and the height fmsim's own\n * machine of that type stands at when the board says none (fmsim gives no height on the board).\n */\nexport const MACHINE: FigureCapabilityDescriptor = {\n name: 'fmsim.Machine',\n label: 'Machine',\n note: 'LV 설비 — 설비 타입(장비 · 버퍼 · 컨베이어)이 상태 범례 줄과 높이를 정한다',\n version: '2',\n needs: [],\n properties: [typeProperty('machineType', MACHINE_TYPES)] as never,\n check: (_settings, asset) => kindIssues('fmsim.Machine', asset)\n}\n\n/** `fmsim.Unit`: a figure is an LV unit of a type -- the board row its status follows. A tag: units do nothing of their own yet. */\nexport const UNIT: FigureCapabilityDescriptor = {\n name: 'fmsim.Unit',\n label: 'Unit',\n note: 'LV 유닛 — 유닛 타입(포트 · 선반)이 상태 범례 줄을 정한다',\n version: '2',\n needs: [],\n properties: [typeProperty('unitType', UNIT_TYPES)] as never,\n check: (_settings, asset) => kindIssues('fmsim.Unit', asset)\n}\n\n/**\n * `fmsim.Vehicle`: a figure is an LV vehicle -- it travels to the Node its NODEID and NODEMACHINE name, an OHT hung from\n * its line's rail, and its type is the board row its status follows.\n */\nexport const VEHICLE: FigureCapabilityDescriptor = {\n name: 'fmsim.Vehicle',\n label: 'Vehicle',\n note: 'LV 차량 — NODEID · NODEMACHINE 이 가리키는 노드로 다닌다. 차량 타입(비면 바닥 AGV · 천장 OHT)이 상태 범례 줄을 정한다',\n version: '3',\n needs: [],\n properties: [\n typeProperty('vehicleType', VEHICLE_TYPES),\n { type: 'select', label: 'vehicle-heading', name: 'vehicleHeading', property: { options: [...VEHICLE_HEADINGS] } }\n ] as never,\n data: [{ name: 'NODEID' }, { name: 'NODEMACHINE' }],\n check: (settings, asset) => [...kindIssues('fmsim.Vehicle', asset), ...vehicleIssues(settings, asset)]\n}\n"]}
|
package/dist/status.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene';
|
|
2
|
+
import type { FigureAsset, FigureDataBinding } from '@hatiolab/figure-model';
|
|
3
|
+
/** The legend role of the status table */
|
|
4
|
+
export declare const STATUS_LEGEND_ROLE = "fmsim-status";
|
|
5
|
+
/**
|
|
6
|
+
* The figure's own status table: fmsim's default legends together -- equipment 1000s, units 2000s, cranes 3000s,
|
|
7
|
+
* vehicles 4000s, whose codes do not meet -- so one table covers a figure of any kind, or of none.
|
|
8
|
+
*/
|
|
9
|
+
export declare const STATUS_DEFAULT: {
|
|
10
|
+
default: import("./legends.js").LegendEntry;
|
|
11
|
+
};
|
|
12
|
+
/** Why a figure's settings cannot be taken: no status part, parts that are not the figure's, keys out of place. */
|
|
13
|
+
export declare function statusSettingsIssues(settings: Record<string, unknown> | undefined, asset: FigureAsset): string[];
|
|
14
|
+
/** The table the capability hands the ADR-0166 engine: STATUS's colour on the status parts, by fmsim's default legends. */
|
|
15
|
+
export declare function statusDataInterface(settings: Record<string, unknown> | undefined): {
|
|
16
|
+
schema: {
|
|
17
|
+
name: string;
|
|
18
|
+
label: string;
|
|
19
|
+
kind: 'text';
|
|
20
|
+
}[];
|
|
21
|
+
bindings: FigureDataBinding[];
|
|
22
|
+
} | undefined;
|
|
23
|
+
/** What the capability takes over (decision 17): the status parts' looks. */
|
|
24
|
+
export declare function statusTargets(settings: Record<string, unknown> | undefined): {
|
|
25
|
+
parts: string[];
|
|
26
|
+
};
|
|
27
|
+
/** The property a placed figure adds: its own status legend, as fmsim's own have. The list is the running board's. */
|
|
28
|
+
export declare function statusProperties(options?: {
|
|
29
|
+
legends?: unknown;
|
|
30
|
+
}): {
|
|
31
|
+
type: string;
|
|
32
|
+
label: string;
|
|
33
|
+
name: string;
|
|
34
|
+
property: {
|
|
35
|
+
options: {};
|
|
36
|
+
};
|
|
37
|
+
}[];
|
|
38
|
+
/**
|
|
39
|
+
* `fmsim.Status`: a figure shows its MCS STATUS as fmsim's own do -- on the parts the author picks, by its own legend,
|
|
40
|
+
* else the board row of its kind's type, else fmsim's default legends.
|
|
41
|
+
*/
|
|
42
|
+
export declare const STATUS: FigureCapabilityDescriptor;
|
package/dist/status.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendTableEntry } from './legends.js';
|
|
2
|
+
/*
|
|
3
|
+
* The STATUS colour of a figure (ADR-0167 decision 22): a feature of its own, worn with any LV kind or none. The author
|
|
4
|
+
* picks the parts that take the colour; fmsim answers the legend role by the instance's own legend, then the board row
|
|
5
|
+
* of the kind's type the figure wears (fmsim.Machine, fmsim.Unit, fmsim.Vehicle).
|
|
6
|
+
*/
|
|
7
|
+
/** The legend role of the status table */
|
|
8
|
+
export const STATUS_LEGEND_ROLE = 'fmsim-status';
|
|
9
|
+
const SETTING_KEYS = ['statusParts'];
|
|
10
|
+
/**
|
|
11
|
+
* The figure's own status table: fmsim's default legends together -- equipment 1000s, units 2000s, cranes 3000s,
|
|
12
|
+
* vehicles 4000s, whose codes do not meet -- so one table covers a figure of any kind, or of none.
|
|
13
|
+
*/
|
|
14
|
+
export const STATUS_DEFAULT = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, LEGEND_MACHINE), LEGEND_UNIT), LEGEND_CRANE), LEGEND_VEHICLE), { default: LEGEND_MACHINE.default });
|
|
15
|
+
/** Why a figure's settings cannot be taken: no status part, parts that are not the figure's, keys out of place. */
|
|
16
|
+
export function statusSettingsIssues(settings, asset) {
|
|
17
|
+
const s = (settings !== null && settings !== void 0 ? settings : {});
|
|
18
|
+
const parts = new Set(asset.appearance.map(a => a.target));
|
|
19
|
+
const out = [];
|
|
20
|
+
for (const key of Object.keys(s))
|
|
21
|
+
if (!SETTING_KEYS.includes(key))
|
|
22
|
+
out.push(`${key} 은(는) 이 능력의 설정이 아닙니다.`);
|
|
23
|
+
if (!Array.isArray(s.statusParts) || !s.statusParts.length)
|
|
24
|
+
out.push('상태 색을 받을 부품을 하나 이상 고릅니다.');
|
|
25
|
+
for (const part of Array.isArray(s.statusParts) ? s.statusParts : [])
|
|
26
|
+
if (!parts.has(part))
|
|
27
|
+
out.push(`${part} 부품이 없습니다.`);
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
/** The table the capability hands the ADR-0166 engine: STATUS's colour on the status parts, by fmsim's default legends. */
|
|
31
|
+
export function statusDataInterface(settings) {
|
|
32
|
+
var _a;
|
|
33
|
+
const parts = (_a = (settings !== null && settings !== void 0 ? settings : {}).statusParts) !== null && _a !== void 0 ? _a : [];
|
|
34
|
+
if (!parts.length)
|
|
35
|
+
return undefined;
|
|
36
|
+
const table = Object.fromEntries(Object.entries(STATUS_DEFAULT).map(([code, entry]) => [code, legendTableEntry(entry)]));
|
|
37
|
+
return {
|
|
38
|
+
schema: [{ name: 'STATUS', label: '상태', kind: 'text' }],
|
|
39
|
+
bindings: [
|
|
40
|
+
{ id: 'fmsim-status', label: '상태', accessor: 'STATUS', rule: 'table', lookup: 'code', targets: { parts: [...parts] }, table, legend: { role: STATUS_LEGEND_ROLE } }
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** What the capability takes over (decision 17): the status parts' looks. */
|
|
45
|
+
export function statusTargets(settings) {
|
|
46
|
+
var _a;
|
|
47
|
+
return { parts: [...((_a = (settings !== null && settings !== void 0 ? settings : {}).statusParts) !== null && _a !== void 0 ? _a : [])] };
|
|
48
|
+
}
|
|
49
|
+
/** The property a placed figure adds: its own status legend, as fmsim's own have. The list is the running board's. */
|
|
50
|
+
export function statusProperties(options = {}) {
|
|
51
|
+
var _a;
|
|
52
|
+
return [{ type: 'select', label: 'legend-name', name: 'legendName', property: { options: (_a = options.legends) !== null && _a !== void 0 ? _a : [] } }];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* `fmsim.Status`: a figure shows its MCS STATUS as fmsim's own do -- on the parts the author picks, by its own legend,
|
|
56
|
+
* else the board row of its kind's type, else fmsim's default legends.
|
|
57
|
+
*/
|
|
58
|
+
export const STATUS = {
|
|
59
|
+
name: 'fmsim.Status',
|
|
60
|
+
label: 'Status',
|
|
61
|
+
note: 'MCS 상태 — STATUS 의 색을 고른 부품에. 범례는 인스턴스의 고르기, 없으면 보드 LEGENDS 에서 그 피규어 타입의 줄',
|
|
62
|
+
version: '2',
|
|
63
|
+
needs: [],
|
|
64
|
+
properties: statusProperties(),
|
|
65
|
+
data: [{ name: 'STATUS' }],
|
|
66
|
+
settings: [{ key: 'statusParts', kind: 'parts', label: '상태 부품', required: true }],
|
|
67
|
+
check: statusSettingsIssues,
|
|
68
|
+
dataInterface: statusDataInterface,
|
|
69
|
+
takes: statusTargets
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE1G;;;;GAIG;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAA;AAEhD,MAAM,YAAY,GAAG,CAAC,aAAa,CAAC,CAAA;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,6EAAQ,cAAc,GAAK,WAAW,GAAK,YAAY,GAAK,cAAc,KAAE,OAAO,EAAE,cAAc,CAAC,OAAO,GAAE,CAAA;AAMxI,mHAAmH;AACnH,MAAM,UAAU,oBAAoB,CAAC,QAA6C,EAAE,KAAkB;IACpG,MAAM,CAAC,GAAG,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAA6C,CAAA;IACtE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC1D,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,uBAAuB,CAAC,CAAA;IAC1G,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM;QAAE,GAAG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6E;AAC7E,MAAM,UAAU,aAAa,CAAC,QAA6C;;IACzE,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,MAAC,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAoB,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC,EAAE,CAAA;AACjF,CAAC;AAED,sHAAsH;AACtH,MAAM,UAAU,gBAAgB,CAAC,UAAiC,EAAE;;IAClE,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAA,OAAO,CAAC,OAAO,mCAAI,EAAE,EAAE,EAAE,CAAC,CAAA;AACrH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+B;IAChD,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,2EAA2E;IACjF,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,gBAAgB,EAAW;IACvC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjF,KAAK,EAAE,oBAAoB;IAC3B,aAAa,EAAE,mBAAmB;IAClC,KAAK,EAAE,aAAa;CACrB,CAAA","sourcesContent":["import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene'\nimport type { FigureAsset, FigureDataBinding, FigureDataTableEntry } from '@hatiolab/figure-model'\n\nimport { LEGEND_CRANE, LEGEND_MACHINE, LEGEND_UNIT, LEGEND_VEHICLE, legendTableEntry } from './legends.js'\n\n/*\n * The STATUS colour of a figure (ADR-0167 decision 22): a feature of its own, worn with any LV kind or none. The author\n * picks the parts that take the colour; fmsim answers the legend role by the instance's own legend, then the board row\n * of the kind's type the figure wears (fmsim.Machine, fmsim.Unit, fmsim.Vehicle).\n */\n\n/** The legend role of the status table */\nexport const STATUS_LEGEND_ROLE = 'fmsim-status'\n\nconst SETTING_KEYS = ['statusParts']\n\n/**\n * The figure's own status table: fmsim's default legends together -- equipment 1000s, units 2000s, cranes 3000s,\n * vehicles 4000s, whose codes do not meet -- so one table covers a figure of any kind, or of none.\n */\nexport const STATUS_DEFAULT = { ...LEGEND_MACHINE, ...LEGEND_UNIT, ...LEGEND_CRANE, ...LEGEND_VEHICLE, default: LEGEND_MACHINE.default }\n\ninterface StatusSettings {\n statusParts?: string[]\n}\n\n/** Why a figure's settings cannot be taken: no status part, parts that are not the figure's, keys out of place. */\nexport function statusSettingsIssues(settings: Record<string, unknown> | undefined, asset: FigureAsset): string[] {\n const s = (settings ?? {}) as StatusSettings & Record<string, unknown>\n const parts = new Set(asset.appearance.map(a => a.target))\n const out: string[] = []\n for (const key of Object.keys(s)) if (!SETTING_KEYS.includes(key)) out.push(`${key} 은(는) 이 능력의 설정이 아닙니다.`)\n if (!Array.isArray(s.statusParts) || !s.statusParts.length) out.push('상태 색을 받을 부품을 하나 이상 고릅니다.')\n for (const part of Array.isArray(s.statusParts) ? s.statusParts : []) if (!parts.has(part)) out.push(`${part} 부품이 없습니다.`)\n return out\n}\n\n/** The table the capability hands the ADR-0166 engine: STATUS's colour on the status parts, by fmsim's default legends. */\nexport function statusDataInterface(\n settings: Record<string, unknown> | undefined\n): { schema: { name: string; label: string; kind: 'text' }[]; bindings: FigureDataBinding[] } | undefined {\n const parts = ((settings ?? {}) as StatusSettings).statusParts ?? []\n if (!parts.length) return undefined\n const table = Object.fromEntries(Object.entries(STATUS_DEFAULT).map(([code, entry]) => [code, legendTableEntry(entry) as FigureDataTableEntry]))\n return {\n schema: [{ name: 'STATUS', label: '상태', kind: 'text' }],\n bindings: [\n { id: 'fmsim-status', label: '상태', accessor: 'STATUS', rule: 'table', lookup: 'code', targets: { parts: [...parts] }, table, legend: { role: STATUS_LEGEND_ROLE } }\n ]\n }\n}\n\n/** What the capability takes over (decision 17): the status parts' looks. */\nexport function statusTargets(settings: Record<string, unknown> | undefined): { parts: string[] } {\n return { parts: [...(((settings ?? {}) as StatusSettings).statusParts ?? [])] }\n}\n\n/** The property a placed figure adds: its own status legend, as fmsim's own have. The list is the running board's. */\nexport function statusProperties(options: { legends?: unknown } = {}) {\n return [{ type: 'select', label: 'legend-name', name: 'legendName', property: { options: options.legends ?? [] } }]\n}\n\n/**\n * `fmsim.Status`: a figure shows its MCS STATUS as fmsim's own do -- on the parts the author picks, by its own legend,\n * else the board row of its kind's type, else fmsim's default legends.\n */\nexport const STATUS: FigureCapabilityDescriptor = {\n name: 'fmsim.Status',\n label: 'Status',\n note: 'MCS 상태 — STATUS 의 색을 고른 부품에. 범례는 인스턴스의 고르기, 없으면 보드 LEGENDS 에서 그 피규어 타입의 줄',\n version: '2',\n needs: [],\n properties: statusProperties() as never,\n data: [{ name: 'STATUS' }],\n settings: [{ key: 'statusParts', kind: 'parts', label: '상태 부품', required: true }],\n check: statusSettingsIssues,\n dataInterface: statusDataInterface,\n takes: statusTargets\n}\n"]}
|
package/dist/vehicle.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene';
|
|
2
1
|
import type { FigureAsset } from '@hatiolab/figure-model';
|
|
3
2
|
/** The turns a vehicle figure's front may make with its travel, in degrees: its model need not face the way it goes. */
|
|
4
3
|
export declare const VEHICLE_HEADINGS: readonly ["0", "90", "180", "270"];
|
|
5
|
-
/** The property a vehicle figure adds: the angle its front makes with the way it travels. */
|
|
6
|
-
export declare function vehicleProperties(): {
|
|
7
|
-
type: string;
|
|
8
|
-
label: string;
|
|
9
|
-
name: string;
|
|
10
|
-
property: {
|
|
11
|
-
options: ("0" | "90" | "180" | "270")[];
|
|
12
|
-
};
|
|
13
|
-
}[];
|
|
14
4
|
/**
|
|
15
5
|
* Why a figure cannot be a vehicle: its own data bindings move its position or heading, which the vehicle's travel
|
|
16
6
|
* moves (ADR-0167 decision 18). Two writers of one position is no vehicle; the capability takes no pose from a binding.
|
|
17
7
|
*/
|
|
18
8
|
export declare function vehicleIssues(_settings: Record<string, unknown> | undefined, asset: FigureAsset): string[];
|
|
19
|
-
/**
|
|
20
|
-
* `fmsim.Vehicle` (ADR-0167 decision 18): a figure AGV or OHT travels on the board as fmsim's own do, to the Node its
|
|
21
|
-
* NODEID and NODEMACHINE name. It only travels: the carriers it carries come from `fmsim.CarrierHolder` worn with it.
|
|
22
|
-
*/
|
|
23
|
-
export declare const VEHICLE: FigureCapabilityDescriptor;
|
package/dist/vehicle.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
/** The turns a vehicle figure's front may make with its travel, in degrees: its model need not face the way it goes. */
|
|
2
2
|
export const VEHICLE_HEADINGS = ['0', '90', '180', '270'];
|
|
3
|
-
/** The property a vehicle figure adds: the angle its front makes with the way it travels. */
|
|
4
|
-
export function vehicleProperties() {
|
|
5
|
-
return [
|
|
6
|
-
{
|
|
7
|
-
type: 'select',
|
|
8
|
-
label: 'vehicle-heading',
|
|
9
|
-
name: 'vehicleHeading',
|
|
10
|
-
property: {
|
|
11
|
-
options: [...VEHICLE_HEADINGS]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
];
|
|
15
|
-
}
|
|
16
3
|
/**
|
|
17
4
|
* Why a figure cannot be a vehicle: its own data bindings move its position or heading, which the vehicle's travel
|
|
18
5
|
* moves (ADR-0167 decision 18). Two writers of one position is no vehicle; the capability takes no pose from a binding.
|
|
@@ -23,18 +10,4 @@ export function vehicleIssues(_settings, asset) {
|
|
|
23
10
|
const posed = bindings.filter(b => 'behavior' in b && b.behavior.kind === 'pose').map(b => { var _a; return (_a = b.label) !== null && _a !== void 0 ? _a : b.id; });
|
|
24
11
|
return posed.length ? [`위치 · 방향을 움직이는 데이터 연결이 있다: ${posed.join(', ')}`] : [];
|
|
25
12
|
}
|
|
26
|
-
/**
|
|
27
|
-
* `fmsim.Vehicle` (ADR-0167 decision 18): a figure AGV or OHT travels on the board as fmsim's own do, to the Node its
|
|
28
|
-
* NODEID and NODEMACHINE name. It only travels: the carriers it carries come from `fmsim.CarrierHolder` worn with it.
|
|
29
|
-
*/
|
|
30
|
-
export const VEHICLE = {
|
|
31
|
-
name: 'fmsim.Vehicle',
|
|
32
|
-
label: 'Vehicle',
|
|
33
|
-
note: 'MCS 차량 — NODEID · NODEMACHINE 이 가리키는 노드로 다닌다(AGV · OHT). 캐리어는 Carrier holder 를 함께 켠다',
|
|
34
|
-
version: '1',
|
|
35
|
-
needs: [],
|
|
36
|
-
properties: vehicleProperties(),
|
|
37
|
-
data: [{ name: 'NODEID' }, { name: 'NODEMACHINE' }],
|
|
38
|
-
check: vehicleIssues
|
|
39
|
-
};
|
|
40
13
|
//# sourceMappingURL=vehicle.js.map
|
package/dist/vehicle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicle.js","sourceRoot":"","sources":["../src/vehicle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vehicle.js","sourceRoot":"","sources":["../src/vehicle.ts"],"names":[],"mappings":"AAEA,wHAAwH;AACxH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;AAElE;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,SAA8C,EAAE,KAAkB;;IAC9F,MAAM,QAAQ,GAAG,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,0CAAE,QAAQ,mCAAI,EAAE,CAAA;IACrD,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,KAAK,mCAAI,CAAC,CAAC,EAAE,CAAA,EAAA,CAAC,CAAA;IAC3G,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,6BAA6B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC9E,CAAC","sourcesContent":["import type { FigureAsset } from '@hatiolab/figure-model'\n\n/** The turns a vehicle figure's front may make with its travel, in degrees: its model need not face the way it goes. */\nexport const VEHICLE_HEADINGS = ['0', '90', '180', '270'] as const\n\n/**\n * Why a figure cannot be a vehicle: its own data bindings move its position or heading, which the vehicle's travel\n * moves (ADR-0167 decision 18). Two writers of one position is no vehicle; the capability takes no pose from a binding.\n */\nexport function vehicleIssues(_settings: Record<string, unknown> | undefined, asset: FigureAsset): string[] {\n const bindings = asset?.dataInterface?.bindings ?? []\n const posed = bindings.filter(b => 'behavior' in b && b.behavior.kind === 'pose').map(b => b.label ?? b.id)\n return posed.length ? [`위치 · 방향을 움직이는 데이터 연결이 있다: ${posed.join(', ')}`] : []\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fmsim/figure-capabilities",
|
|
3
3
|
"description": "fmsim 이 피규어에 입히는 능력의 정의(descriptor)와 그 순수 함수, fmsim 기본표. 장면·DOM·API 의존이 없어 operato-figure 모델러와 fmsim 장면이 같이 읽는다 (ADR-0167).",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "3.0.0-beta.
|
|
5
|
+
"version": "3.0.0-beta.7",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "^5.8.2"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "3d79ed4f842108b845268b5d4b229927ff77700f"
|
|
34
34
|
}
|