@jnrs/lingshu-smart 2.2.8 → 2.2.9
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/App.vue.d.ts +1 -2
- package/dist/assets/data/editor_default_setting.d.ts +1 -8
- package/dist/assets/data/editor_preset_menu.d.ts +1 -8
- package/dist/components/editor/ControlBar/CaseManger.vue.d.ts +15 -3
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +411 -2
- package/dist/components/editor/ControlBar/ExportImportDialog.vue.d.ts +2 -3
- package/dist/components/editor/ControlBar/MainButton.vue.d.ts +2 -3
- package/dist/components/editor/ControlBar/StepButton.vue.d.ts +1 -2
- package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.d.ts +1 -2
- package/dist/components/editor/DrawingBoard.vue.d.ts +1 -2
- package/dist/components/editor/MenuCard/Equipments.vue.d.ts +1 -2
- package/dist/components/editor/MenuCard/Layers.vue.d.ts +1 -2
- package/dist/components/editor/MenuCard/index.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/Base.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/DataSets.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/Interaction.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/Position.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/index.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/models/MachineTool.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/models/Rail.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/models/SingleJointRobot.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Scene/Background.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Scene/index.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/index.vue.d.ts +1 -2
- package/dist/components/editor/index.vue.d.ts +13 -4
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +27281 -4
- package/dist/components/preview/index.vue.d.ts +5 -6
- package/dist/composables/useStepRecord.d.ts +4 -12
- package/dist/constants/options.d.ts +1 -8
- package/dist/controller/AppController.d.ts +3 -10
- package/dist/controller/EditorController.d.ts +2 -9
- package/dist/index.js +1 -1
- package/dist/json/cases.json +577 -20
- package/dist/locales/i18next.d.ts +1 -1
- package/dist/locales/index.d.ts +2 -2
- package/dist/locales/index.js +13 -3
- package/dist/main.d.ts +0 -3
- package/dist/playground/EditPageDemo.vue.d.ts +1 -2
- package/dist/playground/ViewPageDemo.vue.d.ts +27 -2
- package/dist/stores/useAppStore.d.ts +5 -12
- package/dist/stores/useDataStore.d.ts +11 -18
- package/dist/stores/useEditorStore.d.ts +20 -27
- package/dist/types/app.types.d.ts +1 -1
- package/dist/types/base.types.d.ts +1 -1
- package/dist/types/components/config.types.d.ts +1 -1
- package/dist/types/components/operating.types.d.ts +1 -1
- package/dist/types/enums.d.ts +1 -1
- package/dist/types/guards.d.ts +5 -12
- package/dist/types/index.d.ts +2 -2
- package/dist/types/models/config.types.d.ts +49 -47
- package/dist/types/models/operating.types.d.ts +53 -53
- package/dist/ui/abstract/ComponentAbs.d.ts +2 -9
- package/dist/ui/abstract/ModelAbs.d.ts +2 -10
- package/dist/ui/components/Entrance.d.ts +1 -8
- package/dist/ui/components/Light.d.ts +1 -8
- package/dist/ui/components/Progress.d.ts +1 -8
- package/dist/ui/components/Resource.d.ts +1 -8
- package/dist/ui/components/StationSlot.d.ts +1 -23
- package/dist/ui/components/StationSlotGroup.d.ts +1 -8
- package/dist/ui/factories/createGlass.d.ts +0 -6
- package/dist/ui/factories/createModel.d.ts +2 -9
- package/dist/ui/factories/createShadow.d.ts +1 -9
- package/dist/ui/factories/createText.d.ts +0 -7
- package/dist/ui/models/CleaningMachine.d.ts +1 -1
- package/dist/ui/models/DoubleJointRobot.d.ts +19 -20
- package/dist/ui/models/LoadingStation.d.ts +1 -1
- package/dist/ui/models/MachineTool.d.ts +1 -1
- package/dist/ui/models/MarkingMachine.d.ts +1 -1
- package/dist/ui/models/Rail.d.ts +1 -1
- package/dist/ui/models/ResourceStore.d.ts +1 -1
- package/dist/ui/models/SingleJointRobot.d.ts +3 -3
- package/dist/ui/shapes/NamePlate.d.ts +0 -7
- package/dist/ui/shapes/ScrewHole.d.ts +0 -7
- package/dist/ui/shapes/Texture.d.ts +1 -8
- package/dist/ui/utils/attr.d.ts +2 -9
- package/dist/utils/type-guards.d.ts +1 -1
- package/package.json +3 -3
- package/dist/App.vue.js +0 -30
- package/dist/assets/data/editor_default.d.ts +0 -16
- package/dist/assets/data/editor_default.js +0 -59
- package/dist/assets/data/editor_default_setting.js +0 -58
- package/dist/assets/data/editor_preset.d.ts +0 -9
- package/dist/assets/data/editor_preset.js +0 -51
- package/dist/assets/data/editor_preset_menu.js +0 -290
- package/dist/components/editor/ControlBar/CaseManger.vue.js +0 -465
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.js +0 -108
- package/dist/components/editor/ControlBar/ExportImportDialog.vue.js +0 -280
- package/dist/components/editor/ControlBar/MainButton.vue.js +0 -183
- package/dist/components/editor/ControlBar/StepButton.vue.js +0 -147
- package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.js +0 -98
- package/dist/components/editor/DrawingBoard.vue.js +0 -31
- package/dist/components/editor/MenuCard/Equipments.vue.js +0 -129
- package/dist/components/editor/MenuCard/Layers.vue.js +0 -201
- package/dist/components/editor/MenuCard/index.vue.js +0 -84
- package/dist/components/editor/OptionCard/Equipment/Base.vue.js +0 -96
- package/dist/components/editor/OptionCard/Equipment/Binds.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Binds.vue.js +0 -443
- package/dist/components/editor/OptionCard/Equipment/Bot.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Bot.vue.js +0 -81
- package/dist/components/editor/OptionCard/Equipment/DataSets.vue.js +0 -304
- package/dist/components/editor/OptionCard/Equipment/DockStore.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/DockStore.vue.js +0 -597
- package/dist/components/editor/OptionCard/Equipment/Interaction.vue.js +0 -287
- package/dist/components/editor/OptionCard/Equipment/Position.backup.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Position.backup.vue.js +0 -440
- package/dist/components/editor/OptionCard/Equipment/Position.vue.js +0 -436
- package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.js +0 -1131
- package/dist/components/editor/OptionCard/Equipment/Store.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Store.vue.js +0 -453
- package/dist/components/editor/OptionCard/Equipment/Trailer.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Trailer.vue.js +0 -1109
- package/dist/components/editor/OptionCard/Equipment/index.vue.js +0 -100
- package/dist/components/editor/OptionCard/Equipment/models/MachineTool.vue.js +0 -99
- package/dist/components/editor/OptionCard/Equipment/models/Rail.vue.js +0 -225
- package/dist/components/editor/OptionCard/Equipment/models/SingleGripperRobot.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/models/SingleGripperRobot.vue.js +0 -99
- package/dist/components/editor/OptionCard/Scene/Background.vue.js +0 -543
- package/dist/components/editor/OptionCard/Scene/index.vue.js +0 -200
- package/dist/components/editor/OptionCard/index.vue.js +0 -73
- package/dist/components/editor/index.vue.js +0 -156
- package/dist/components/preview/index.vue.js +0 -104
- package/dist/composables/useStepRecord.js +0 -135
- package/dist/constants/options.js +0 -55
- package/dist/controller/AppController.js +0 -168
- package/dist/controller/EditorController.js +0 -173
- package/dist/locales/en.js +0 -5
- package/dist/locales/i18next.js +0 -6
- package/dist/locales/zhCn.js +0 -5
- package/dist/main.js +0 -13
- package/dist/playground/EditPageDemo.vue.js +0 -57
- package/dist/playground/ViewPageDemo.vue.js +0 -277
- package/dist/stores/index.js +0 -3
- package/dist/stores/useAppStore.js +0 -78
- package/dist/stores/useDataStore.js +0 -116
- package/dist/stores/useEditorStore.js +0 -263
- package/dist/types/app.types.js +0 -2
- package/dist/types/base.types.js +0 -1
- package/dist/types/components/config.types.js +0 -1
- package/dist/types/components/operating.types.js +0 -1
- package/dist/types/enums.js +0 -46
- package/dist/types/guards.js +0 -28
- package/dist/types/index.js +0 -8
- package/dist/types/models/config.types.js +0 -1
- package/dist/types/models/operating.types.js +0 -1
- package/dist/ui/abstract/ComponentAbs.js +0 -64
- package/dist/ui/abstract/ModelAbs.js +0 -119
- package/dist/ui/components/Entrance.js +0 -83
- package/dist/ui/components/Light.js +0 -167
- package/dist/ui/components/Progress.js +0 -84
- package/dist/ui/components/Resource.js +0 -70
- package/dist/ui/components/StationSlot.js +0 -207
- package/dist/ui/components/StationSlotGroup.js +0 -110
- package/dist/ui/factories/createGlass.js +0 -51
- package/dist/ui/factories/createModel.js +0 -35
- package/dist/ui/factories/createShadow.js +0 -52
- package/dist/ui/factories/createText.js +0 -46
- package/dist/ui/models/CleaningMachine.js +0 -141
- package/dist/ui/models/DoubleJointRobot.js +0 -545
- package/dist/ui/models/LoadingStation.js +0 -167
- package/dist/ui/models/MachineTool.js +0 -184
- package/dist/ui/models/MarkingMachine.js +0 -148
- package/dist/ui/models/Rail.js +0 -117
- package/dist/ui/models/ResourceStore.js +0 -101
- package/dist/ui/models/SingleBot.d.ts +0 -20
- package/dist/ui/models/SingleBot.js +0 -202
- package/dist/ui/models/SingleGripperRobot.d.ts +0 -19
- package/dist/ui/models/SingleGripperRobot.js +0 -272
- package/dist/ui/models/SingleJointRobot.js +0 -346
- package/dist/ui/shapes/NamePlate.js +0 -85
- package/dist/ui/shapes/ScrewHole.js +0 -57
- package/dist/ui/shapes/Texture.js +0 -51
- package/dist/ui/utils/attr.js +0 -50
- package/dist/utils/index.js +0 -92
- package/dist/utils/type-guards.js +0 -105
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 校验 IScene
|
|
3
|
-
*/
|
|
4
|
-
function isIScene(scene) {
|
|
5
|
-
if (!scene || typeof scene !== 'object')
|
|
6
|
-
return false;
|
|
7
|
-
// 校验 width 和 height
|
|
8
|
-
if (typeof scene.width !== 'number' || typeof scene.height !== 'number') {
|
|
9
|
-
console.error('isIScene: width must be a number');
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
// 校验 zoomType
|
|
13
|
-
const validZoomType = scene.zoomType === 'fit' || typeof scene.zoomType === 'number';
|
|
14
|
-
if (!validZoomType) {
|
|
15
|
-
console.error('isIScene: zoomType must be "fit" or a number');
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
// 校验 fill
|
|
19
|
-
if (scene.fill) {
|
|
20
|
-
const f = scene.fill;
|
|
21
|
-
if (typeof f !== 'object')
|
|
22
|
-
return false;
|
|
23
|
-
const validTypes = ['solid', 'linear', 'radial', 'image'];
|
|
24
|
-
if (!validTypes.includes(f.type))
|
|
25
|
-
return false;
|
|
26
|
-
if (typeof f.color !== 'string')
|
|
27
|
-
return false;
|
|
28
|
-
if (typeof f.opacity !== 'number')
|
|
29
|
-
return false;
|
|
30
|
-
if (f.stops && !Array.isArray(f.stops))
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
if (scene.stroke && typeof scene.stroke !== 'object') {
|
|
34
|
-
console.error('isIScene: stroke must be an object');
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* 校验 ILayer
|
|
41
|
-
*/
|
|
42
|
-
function isILayer(layer) {
|
|
43
|
-
if (!layer || typeof layer !== 'object')
|
|
44
|
-
return false;
|
|
45
|
-
if (typeof layer.uuid !== 'string') {
|
|
46
|
-
console.error('isILayer: uuid must be a string');
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
if (typeof layer.className !== 'string') {
|
|
50
|
-
console.error('isILayer: className must be a string');
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
// 递归检查 children
|
|
54
|
-
if (layer.children) {
|
|
55
|
-
if (!Array.isArray(layer.children))
|
|
56
|
-
return false;
|
|
57
|
-
// 这里直接调用 isValidLayer,因为是 function 声明,顺序无所谓
|
|
58
|
-
if (!layer.children.every((child) => isILayer(child)))
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
if (layer.fill && typeof layer.fill !== 'object')
|
|
62
|
-
return false;
|
|
63
|
-
if (layer.selected !== undefined && typeof layer.selected !== 'boolean')
|
|
64
|
-
return false;
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* 校验 ICase
|
|
69
|
-
*/
|
|
70
|
-
function isICase(item) {
|
|
71
|
-
if (!item || typeof item !== 'object')
|
|
72
|
-
return false;
|
|
73
|
-
if (typeof item.uuid !== 'string') {
|
|
74
|
-
console.error('isICase: uuid must be a string');
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
if (typeof item.title !== 'string') {
|
|
78
|
-
console.error('isICase: title must be a string');
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
if (typeof item.isActive !== 'boolean') {
|
|
82
|
-
console.error('isICase: isActive must be a boolean');
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
if (!Array.isArray(item.layers))
|
|
86
|
-
return false;
|
|
87
|
-
// 调用辅助函数
|
|
88
|
-
if (!item.layers.every((layer) => isILayer(layer)))
|
|
89
|
-
return false;
|
|
90
|
-
if (!isIScene(item.scene))
|
|
91
|
-
return false;
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* 顶层数组守卫
|
|
96
|
-
*/
|
|
97
|
-
function isICaseArray(data) {
|
|
98
|
-
if (!Array.isArray(data)) {
|
|
99
|
-
console.error('isICaseArray: data must be an array');
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
return data.every((item) => isICase(item));
|
|
103
|
-
}
|
|
104
|
-
// 统一导出
|
|
105
|
-
export { isICase, isICaseArray, isILayer, isIScene };
|