@fmsim/figure-capabilities 3.0.0-beta.1 → 3.0.0-beta.4

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.
@@ -3,7 +3,11 @@ import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene';
3
3
  export interface CarrierHolderLegendOptions {
4
4
  legends?: unknown;
5
5
  animations?: unknown;
6
+ /** Whether the holder chooses how its carriers rest, on it or hung below (ADR-0167 decision 18): a figure does. */
7
+ mount?: boolean;
6
8
  }
9
+ /** How a holder's carriers rest: on its top, or hung below it (an OHT). */
10
+ export declare const CARRIER_MOUNTS: readonly ["ON", "HANG"];
7
11
  /**
8
12
  * The properties a carrier holder adds (ADR-0167 decision 11): its two carrier legends and whether carriers show their
9
13
  * text. The legend lists are the running board's: given where the descriptor is registered, none in the modeller.
@@ -1,3 +1,5 @@
1
+ /** How a holder's carriers rest: on its top, or hung below it (an OHT). */
2
+ export const CARRIER_MOUNTS = ['ON', 'HANG'];
1
3
  /**
2
4
  * The properties a carrier holder adds (ADR-0167 decision 11): its two carrier legends and whether carriers show their
3
5
  * text. The legend lists are the running board's: given where the descriptor is registered, none in the modeller.
@@ -25,7 +27,19 @@ export function carrierHolderProperties(options = {}) {
25
27
  type: 'boolean',
26
28
  label: 'show-carrier-text',
27
29
  name: 'showCarrierText'
28
- }
30
+ },
31
+ ...(options.mount
32
+ ? [
33
+ {
34
+ type: 'select',
35
+ label: 'carrier-mount',
36
+ name: 'carrierMount',
37
+ property: {
38
+ options: [...CARRIER_MOUNTS]
39
+ }
40
+ }
41
+ ]
42
+ : [])
29
43
  ];
30
44
  }
31
45
  /**
@@ -40,7 +54,7 @@ export const CARRIER_HOLDER = {
40
54
  note: 'MCS 캐리어를 받는다 — 홀더 데이터에서 캐리어를 만들고, 자리에 올라간 캐리어에 캐리어 범례와 애니메이션을 넘긴다',
41
55
  version: '1',
42
56
  needs: [['Holdable', 'FlowNode'], ['Capacity', 'FlowNode']],
43
- properties: carrierHolderProperties(),
57
+ properties: carrierHolderProperties({ mount: true }),
44
58
  /* Its carriers come from MCS data: where fmsim registers it, an items binding of the figure's rests (ADR-0167 decision 17). */
45
59
  takes: () => ({ items: true }),
46
60
  data: [
@@ -1 +1 @@
1
- {"version":3,"file":"carrier-holder.js","sourceRoot":"","sources":["../src/carrier-holder.ts"],"names":[],"mappings":"AAQA;;;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;KACF,CAAA;AACH,CAAC;AAED;;;;;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,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC3D,UAAU,EAAE,uBAAuB,EAAW;IAC9C,+HAA+H;IAC/H,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,EAAE;QACJ,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;QACzB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,WAAW,EAAE;QACrB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;CACF,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}\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 ]\n}\n\n/**\n * `fmsim.CarrierHolder` (ADR-0167 decision 11): what a holder of MCS carriers is, worn by fmsim's own holders and by a\n * figure alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the holder's fixed data -- STATUS, the representative\n * CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME, CARRIERTYPE, EMPTYTYPE and CARRIERSTATUS -- and\n * 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: '1',\n needs: [['Holdable', 'FlowNode'], ['Capacity', 'FlowNode']],\n properties: carrierHolderProperties() 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: [\n { name: 'STATUS' },\n { name: 'CARRIERNAME' },\n { name: 'MULTICARRIERS' },\n { name: 'CARRIERTYPE' },\n { name: 'EMPTYTYPE' },\n { name: 'CARRIERSTATUS' }\n ]\n}\n"]}
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;wBACR,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;qBAC7B;iBACF;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAA;AACH,CAAC;AAED;;;;;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,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC3D,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;QACJ,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;QACzB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,WAAW,EAAE;QACrB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;CACF,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 decision 11): what a holder of MCS carriers is, worn by fmsim's own holders and by a\n * figure alike. It needs Holdable and Capacity under it, or FlowNode, which takes both in; it reads the holder's fixed data -- STATUS, the representative\n * CARRIERNAME and MULTICARRIERS bottom first, a carrier's CARRIERNAME, CARRIERTYPE, EMPTYTYPE and CARRIERSTATUS -- and\n * 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: '1',\n needs: [['Holdable', 'FlowNode'], ['Capacity', 'FlowNode']],\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: [\n { name: 'STATUS' },\n { name: 'CARRIERNAME' },\n { name: 'MULTICARRIERS' },\n { name: 'CARRIERTYPE' },\n { name: 'EMPTYTYPE' },\n { name: 'CARRIERSTATUS' }\n ]\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { ANIMATION_DEFAULT, type AnimationConfig, type AnimationPreset } from './animation-default.js';
2
2
  export { LEGEND_CARRIER, legendColor, type Legend, type LegendEntry } from './legends.js';
3
- export { CARRIER_HOLDER, carrierHolderProperties, type CarrierHolderLegendOptions } from './carrier-holder.js';
3
+ export { CARRIER_HOLDER, CARRIER_MOUNTS, carrierHolderProperties, type CarrierHolderLegendOptions } from './carrier-holder.js';
4
+ export { VEHICLE, VEHICLE_HEADINGS, vehicleIssues, vehicleProperties } from './vehicle.js';
4
5
  export { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js';
5
6
  /** Every capability fmsim defines, for a modeller to register. */
6
7
  export declare const FMSIM_FIGURE_CAPABILITIES: import("@hatiolab/things-scene").FigureCapabilityDescriptor[];
package/dist/index.js CHANGED
@@ -5,10 +5,12 @@
5
5
  */
6
6
  export { ANIMATION_DEFAULT } from './animation-default.js';
7
7
  export { LEGEND_CARRIER, legendColor } from './legends.js';
8
- export { CARRIER_HOLDER, carrierHolderProperties } from './carrier-holder.js';
8
+ export { CARRIER_HOLDER, CARRIER_MOUNTS, carrierHolderProperties } from './carrier-holder.js';
9
+ export { VEHICLE, VEHICLE_HEADINGS, vehicleIssues, vehicleProperties } from './vehicle.js';
9
10
  export { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js';
10
11
  import { CARRIER_HOLDER } from './carrier-holder.js';
11
12
  import { CARRIER_FIGURE } from './carrier.js';
13
+ import { VEHICLE } from './vehicle.js';
12
14
  /** Every capability fmsim defines, for a modeller to register. */
13
- export const FMSIM_FIGURE_CAPABILITIES = [CARRIER_HOLDER, CARRIER_FIGURE];
15
+ export const FMSIM_FIGURE_CAPABILITIES = [CARRIER_HOLDER, CARRIER_FIGURE, VEHICLE];
14
16
  //# 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;AACzF,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAmC,MAAM,qBAAqB,CAAA;AAC9G,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElJ,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,kEAAkE;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,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, legendColor, type Legend, type LegendEntry } from './legends.js'\nexport { CARRIER_HOLDER, carrierHolderProperties, type CarrierHolderLegendOptions } from './carrier-holder.js'\nexport { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js'\n\nimport { CARRIER_HOLDER } from './carrier-holder.js'\nimport { CARRIER_FIGURE } from './carrier.js'\n\n/** Every capability fmsim defines, for a modeller to register. */\nexport const FMSIM_FIGURE_CAPABILITIES = [CARRIER_HOLDER, CARRIER_FIGURE]\n"]}
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;AACzF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,uBAAuB,EAAmC,MAAM,qBAAqB,CAAA;AAC9H,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC1F,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElJ,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,kEAAkE;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,cAAc,EAAE,cAAc,EAAE,OAAO,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, legendColor, type Legend, type LegendEntry } from './legends.js'\nexport { CARRIER_HOLDER, CARRIER_MOUNTS, carrierHolderProperties, type CarrierHolderLegendOptions } from './carrier-holder.js'\nexport { VEHICLE, VEHICLE_HEADINGS, vehicleIssues, vehicleProperties } from './vehicle.js'\nexport { CARRIER_FIGURE, CARRIER_FILL_START, CARRIER_LOAD_CODES, carrierDataInterface, carrierSettingsIssues, carrierTargets } from './carrier.js'\n\nimport { CARRIER_HOLDER } from './carrier-holder.js'\nimport { CARRIER_FIGURE } from './carrier.js'\nimport { VEHICLE } from './vehicle.js'\n\n/** Every capability fmsim defines, for a modeller to register. */\nexport const FMSIM_FIGURE_CAPABILITIES = [CARRIER_HOLDER, CARRIER_FIGURE, VEHICLE]\n"]}
@@ -0,0 +1,23 @@
1
+ import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene';
2
+ import type { FigureAsset } from '@hatiolab/figure-model';
3
+ /** The turns a vehicle figure's front may make with its travel, in degrees: its model need not face the way it goes. */
4
+ 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
+ /**
15
+ * Why a figure cannot be a vehicle: its own data bindings move its position or heading, which the vehicle's travel
16
+ * moves (ADR-0167 decision 18). Two writers of one position is no vehicle; the capability takes no pose from a binding.
17
+ */
18
+ 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;
@@ -0,0 +1,40 @@
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
+ 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
+ /**
17
+ * Why a figure cannot be a vehicle: its own data bindings move its position or heading, which the vehicle's travel
18
+ * moves (ADR-0167 decision 18). Two writers of one position is no vehicle; the capability takes no pose from a binding.
19
+ */
20
+ export function vehicleIssues(_settings, asset) {
21
+ var _a, _b;
22
+ const bindings = (_b = (_a = asset === null || asset === void 0 ? void 0 : asset.dataInterface) === null || _a === void 0 ? void 0 : _a.bindings) !== null && _b !== void 0 ? _b : [];
23
+ 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
+ return posed.length ? [`위치 · 방향을 움직이는 데이터 연결이 있다: ${posed.join(', ')}`] : [];
25
+ }
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
+ //# sourceMappingURL=vehicle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vehicle.js","sourceRoot":"","sources":["../src/vehicle.ts"],"names":[],"mappings":"AAGA,wHAAwH;AACxH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;AAElE,6FAA6F;AAC7F,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,gBAAgB;YACtB,QAAQ,EAAE;gBACR,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;aAC/B;SACF;KACF,CAAA;AACH,CAAC;AAED;;;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;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAA+B;IACjD,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,sFAAsF;IAC5F,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,EAAE;IACT,UAAU,EAAE,iBAAiB,EAAW;IACxC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IACnD,KAAK,EAAE,aAAa;CACrB,CAAA","sourcesContent":["import type { FigureCapabilityDescriptor } from '@hatiolab/things-scene'\nimport 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/** The property a vehicle figure adds: the angle its front makes with the way it travels. */\nexport function vehicleProperties() {\n return [\n {\n type: 'select',\n label: 'vehicle-heading',\n name: 'vehicleHeading',\n property: {\n options: [...VEHICLE_HEADINGS]\n }\n }\n ]\n}\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\n/**\n * `fmsim.Vehicle` (ADR-0167 decision 18): a figure AGV or OHT travels on the board as fmsim's own do, to the Node its\n * NODEID and NODEMACHINE name. It only travels: the carriers it carries come from `fmsim.CarrierHolder` worn with it.\n */\nexport const VEHICLE: FigureCapabilityDescriptor = {\n name: 'fmsim.Vehicle',\n label: 'Vehicle',\n note: 'MCS 차량 — NODEID · NODEMACHINE 이 가리키는 노드로 다닌다(AGV · OHT). 캐리어는 Carrier holder 를 함께 켠다',\n version: '1',\n needs: [],\n properties: vehicleProperties() as never,\n data: [{ name: 'NODEID' }, { name: 'NODEMACHINE' }],\n check: vehicleIssues\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.1",
5
+ "version": "3.0.0-beta.4",
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": "f862081dfd1570ca17701496dd6b8ba116ee1471"
33
+ "gitHead": "95b704a73e326b7be3bbd1ef3db5ee31f7ef7184"
34
34
  }