shop-components 0.3.0 → 0.3.2

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.
Files changed (73) hide show
  1. package/dist/dev/libs/gltf-progressive/src/extension.d.ts +50 -0
  2. package/dist/dev/libs/gltf-progressive/src/extension.model.d.ts +24 -0
  3. package/dist/dev/libs/gltf-progressive/src/index.d.ts +15 -0
  4. package/dist/dev/libs/gltf-progressive/src/loaders.d.ts +28 -0
  5. package/dist/dev/libs/gltf-progressive/src/lods.debug.d.ts +4 -0
  6. package/dist/dev/libs/gltf-progressive/src/lods.manager.d.ts +79 -0
  7. package/dist/dev/libs/gltf-progressive/src/lods.promise.d.ts +36 -0
  8. package/dist/dev/libs/gltf-progressive/src/plugins/index.d.ts +2 -0
  9. package/dist/dev/libs/gltf-progressive/src/plugins/modelviewer.d.ts +1 -0
  10. package/dist/dev/libs/gltf-progressive/src/plugins/plugin.d.ts +12 -0
  11. package/dist/dev/libs/gltf-progressive/src/utils.d.ts +5 -0
  12. package/dist/dev/libs/gltf-progressive/src/utils.internal.d.ts +21 -0
  13. package/dist/dev/libs/gltf-progressive/src/version.d.ts +1 -0
  14. package/dist/dev/libs/gltf-progressive/src/worker/index.d.ts +1 -0
  15. package/dist/dev/libs/gltf-progressive/src/worker/loader.mainthread.d.ts +44 -0
  16. package/dist/dev/libs/gltf-progressive/vite.config.d.ts +2 -0
  17. package/dist/dev/main.d.ts +3 -0
  18. package/dist/{stories/device-viewer → dev/src}/amr.d.ts +22 -2
  19. package/dist/{stories/device-viewer → dev/src}/index.stories.d.ts +1 -2
  20. package/dist/{stories/device-viewer → dev/src}/scene.d.ts +3 -5
  21. package/dist/{stories/device-viewer → dev/src}/slot.d.ts +1 -0
  22. package/dist/shop-components.cjs +103 -193
  23. package/dist/shop-components.mjs +3234 -3705
  24. package/package.json +6 -9
  25. package/dist/stories/cropper/index.d.ts +0 -67
  26. package/dist/stories/cropper/index.stories.d.ts +0 -11
  27. package/dist/stories/device-viewer/index.d.ts +0 -84
  28. package/dist/stories/device-viewer/lines.d.ts +0 -36
  29. package/dist/stories/devices/index.d.ts +0 -5
  30. package/dist/stories/devices/index.stories.d.ts +0 -13
  31. package/dist/stories/devices/src/connector.d.ts +0 -8
  32. package/dist/stories/devices/src/constraints/constraint.d.ts +0 -16
  33. package/dist/stories/devices/src/constraints/same-device-constraint.d.ts +0 -9
  34. package/dist/stories/devices/src/constraints/single-connection-constraint.d.ts +0 -9
  35. package/dist/stories/devices/src/device.d.ts +0 -11
  36. package/dist/stories/devices/src/pin.d.ts +0 -43
  37. package/dist/stories/main.d.ts +0 -3
  38. package/dist/stories/plugin.d.ts +0 -5
  39. package/dist/stories/plugins/change-slot/index.d.ts +0 -0
  40. package/dist/stories/step-viewer/index.d.ts +0 -17
  41. package/dist/stories/step-viewer/index.stories.d.ts +0 -19
  42. /package/dist/{stories/main → dev}/index.d.ts +0 -0
  43. /package/dist/{stories → dev/libs}/sglb/index.d.ts +0 -0
  44. /package/dist/{stories → dev/libs}/utils/index.d.ts +0 -0
  45. /package/dist/{stories/device-viewer → dev/src}/assembly.d.ts +0 -0
  46. /package/dist/{stories/device-viewer → dev/src}/belt.d.ts +0 -0
  47. /package/dist/{stories/device-viewer → dev/src}/dimension/index.d.ts +0 -0
  48. /package/dist/{stories/device-viewer → dev/src}/dimension/line3.d.ts +0 -0
  49. /package/dist/{stories/device-viewer → dev/src}/dimension/size-box.d.ts +0 -0
  50. /package/dist/{stories/device-viewer → dev/src}/dimension/size-line.d.ts +0 -0
  51. /package/dist/{stories/device-viewer → dev/src}/goods-box.d.ts +0 -0
  52. /package/dist/{stories/device-viewer → dev/src}/group-roller.d.ts +0 -0
  53. /package/dist/{stories/device-viewer → dev/src}/libs/BVH/index.d.ts +0 -0
  54. /package/dist/{stories/device-viewer → dev/src}/libs/gizmo/gizmo.d.ts +0 -0
  55. /package/dist/{stories/device-viewer → dev/src}/libs/progress-shadow/ProgressiveShadows.d.ts +0 -0
  56. /package/dist/{stories/device-viewer → dev/src}/logo.d.ts +0 -0
  57. /package/dist/{stories/device-viewer → dev/src}/main.d.ts +0 -0
  58. /package/dist/{stories/device-viewer → dev/src}/mechanism/mechanism.d.ts +0 -0
  59. /package/dist/{stories/device-viewer → dev/src}/outerline.d.ts +0 -0
  60. /package/dist/{stories/device-viewer → dev/src}/pin/pin.d.ts +0 -0
  61. /package/dist/{stories/device-viewer → dev/src}/roller.d.ts +0 -0
  62. /package/dist/{stories/device-viewer → dev/src}/row.d.ts +0 -0
  63. /package/dist/{stories/device-viewer → dev/src}/slot/slot-item.d.ts +0 -0
  64. /package/dist/{stories/device-viewer → dev/src}/sound.d.ts +0 -0
  65. /package/dist/{stories/device-viewer → dev/src}/text2.d.ts +0 -0
  66. /package/dist/{stories/device-viewer → dev/src}/text3.d.ts +0 -0
  67. /package/dist/{stories/device-viewer → dev/src}/ui/camera-position.d.ts +0 -0
  68. /package/dist/{stories/device-viewer → dev/src}/ui/right-menu.d.ts +0 -0
  69. /package/dist/{stories/device-viewer → dev/src}/utils/geometory.d.ts +0 -0
  70. /package/dist/{stories/device-viewer → dev/src}/utils/index.d.ts +0 -0
  71. /package/dist/{stories/device-viewer → dev/src}/worker/generate-mesh-bvh-worker.d.ts +0 -0
  72. /package/dist/{stories/device-viewer → dev/src}/worker/generateAsync.worker.d.ts +0 -0
  73. /package/dist/{stories/device-viewer → dev/src}/worker/path-tracing-scene-worker.d.ts +0 -0
package/package.json CHANGED
@@ -1,18 +1,15 @@
1
1
  {
2
2
  "name": "shop-components",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Shop components",
5
5
  "main": "dist/shop-components.umd.js",
6
6
  "module": "dist/shop-components.mjs",
7
7
  "types": "dist/main.d.ts",
8
8
  "scripts": {
9
9
  "dts": "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
- "dev": "vite dev --open",
12
- "storybook": "storybook dev -p 6006",
13
- "build": "storybook build -o dist",
14
- "vite": "vite build",
15
- "version": "auto-changelog -p && git add CHANGELOG.md"
10
+ "dev": "vite dev",
11
+ "build": "vite build",
12
+ "v": "auto-changelog -p && git add CHANGELOG.md"
16
13
  },
17
14
  "files": [
18
15
  "dist",
@@ -43,8 +40,8 @@
43
40
  "stats-fps.js": "0.0.6",
44
41
  "stylus": "^0.63.0",
45
42
  "terser": "^5.44.0",
46
- "three": "0.180.0",
47
- "three-gpu-pathtracer": "0.0.23",
43
+ "three": "^0.180.0",
44
+ "three-gpu-pathtracer": "^0.0.23",
48
45
  "three-mesh-bvh": "^0.7.5",
49
46
  "troika-three-text": "^0.49.1",
50
47
  "tweakpane": "^4.0.3"
@@ -1,67 +0,0 @@
1
- import { LitElement, PropertyValues } from 'lit';
2
- import { Application } from 'pixi.js';
3
- import { BufferGeometry, Texture as Texture3 } from 'three';
4
- import { Viewport } from 'pixi-viewport';
5
- export interface CropperConfigs {
6
- canvasWidth: number;
7
- canvasHeight: number;
8
- scaleX: number;
9
- scaleY: number;
10
- x: number;
11
- y: number;
12
- ox: number;
13
- oy: number;
14
- url: string;
15
- }
16
- export declare class Cropper extends LitElement {
17
- static styles: import("lit").CSSResult;
18
- private _domBoundingRect;
19
- app: Application<import("pixi.js").ICanvas>;
20
- viewport: Viewport;
21
- imageSize: {
22
- width: number;
23
- height: number;
24
- };
25
- logoSize: {
26
- width: number;
27
- height: number;
28
- };
29
- get supports(): string[];
30
- private _imageUrl;
31
- private _canvasScale;
32
- texture: Texture3;
33
- private _timer;
34
- private _sprite;
35
- private _loading;
36
- get loading(): boolean;
37
- get canvas(): import("pixi.js").ICanvas;
38
- container: HTMLDivElement | undefined;
39
- boundRect: HTMLDivElement | undefined;
40
- axiosX: HTMLDivElement | undefined;
41
- axiosY: HTMLDivElement | undefined;
42
- pathD: string;
43
- get imageScale(): {
44
- x: number;
45
- y: number;
46
- };
47
- get imageRealSize(): {
48
- width: number;
49
- height: number;
50
- };
51
- getConfigs: () => CropperConfigs;
52
- constructor();
53
- private _onChanged;
54
- private _wheelEvent;
55
- resize(width: number, height: number): void;
56
- protected firstUpdated(_changedProperties: PropertyValues): void;
57
- setUV(geometry: BufferGeometry): void;
58
- add(url: string, logoSize: {
59
- width: number;
60
- height: number;
61
- }): Promise<void>;
62
- clear(): void;
63
- updateConfigs: ({ canvasWidth, x, y, scaleX, url }: CropperConfigs) => Promise<void>;
64
- fit(): void;
65
- disconnectedCallback(): void;
66
- protected render(): unknown;
67
- }
@@ -1,11 +0,0 @@
1
- import { Cropper } from './index';
2
- declare const _default: {
3
- title: string;
4
- tags: string[];
5
- render: () => Cropper;
6
- argTypes: {};
7
- };
8
- export default _default;
9
- export declare const Primary: {
10
- args: {};
11
- };
@@ -1,84 +0,0 @@
1
- import { LitElement, PropertyValues } from 'lit';
2
- import { Scene3D, Skin, Slot } from './scene';
3
- import { Cropper } from '../cropper';
4
- import { DeviceInfo } from './slot';
5
- import { Logo } from './logo';
6
- export interface Props {
7
- test: string;
8
- count: number;
9
- onChange: () => {};
10
- }
11
- export declare class DeviceViewer extends LitElement {
12
- scene: Scene3D;
13
- deviceInfoCache: DeviceInfo | undefined;
14
- cropper: Cropper;
15
- container: HTMLDivElement | undefined;
16
- canvas: HTMLDivElement | undefined;
17
- drag: HTMLButtonElement | undefined;
18
- constructor();
19
- protected firstUpdated(_changedProperties: PropertyValues): void;
20
- protected updated(_changedProperties: PropertyValues): void;
21
- disconnectedCallback(): void;
22
- test: string;
23
- count: number;
24
- theme: undefined | string;
25
- onChange: undefined | Function;
26
- usePathTracing: boolean;
27
- showSlots: boolean;
28
- showSize: boolean;
29
- pointCloudMode: boolean;
30
- actions: string[];
31
- shelfLevel: number;
32
- shapeKeys: Map<any, any>;
33
- colors: Skin[];
34
- selectedLogo: Logo | undefined;
35
- logos: Logo[];
36
- slots: Slot[];
37
- logoSize: {
38
- width: number;
39
- height: number;
40
- };
41
- progressBar: HTMLDivElement | undefined;
42
- cropperContainer: HTMLDivElement | undefined;
43
- lineCircles: HTMLDivElement[] | undefined;
44
- lineWrapper: HTMLDivElement | undefined;
45
- sizeLength: HTMLDivElement | undefined;
46
- sizeWidth: HTMLDivElement | undefined;
47
- sizeHeight: HTMLDivElement | undefined;
48
- fit: () => void;
49
- generateBVH: () => void;
50
- getAmrInfo: () => void;
51
- download: () => Promise<void>;
52
- clearAMR: () => void;
53
- exportAMR: () => Promise<void>;
54
- addAMR: () => void;
55
- slotList: Map<string, Slot>;
56
- focusSlot: (s: Slot) => void;
57
- playAction: (name: string) => void;
58
- pauseAction: (name: string) => void;
59
- clean: () => void;
60
- recreate: () => void;
61
- setShapeKey: (key: string, val: any) => void;
62
- setShowSlots: (showSlots: boolean) => void;
63
- setShowSize: (showSize: boolean) => void;
64
- cancel: () => void;
65
- changeShelfLevel: (e: any) => void;
66
- changeAmrHeight: (e: any) => void;
67
- togglePointCloudMode: () => void;
68
- changeAmrLevel: (e: any) => void;
69
- changeAmrShelvesLevel: (e: any) => void;
70
- setMaxHeight: (e: any) => void;
71
- changeGoodsSize: (e: any) => void;
72
- changeColor: (s: Skin, value: string) => void;
73
- selectLogo: (l: Logo) => void;
74
- selectImage: (e: Event) => void;
75
- resetLogo: (l: Logo) => void;
76
- clearLogo: (l: Logo) => void;
77
- loadConfigs: () => void;
78
- saveConfigs: (l: Logo) => void;
79
- dragstart: (e: DragEvent) => void;
80
- dragend: (e: DragEvent) => void;
81
- getShapeKeyValue: (key: string) => any;
82
- protected render(): unknown;
83
- static styles: import("lit").CSSResult;
84
- }
@@ -1,36 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { Vector2 } from 'three';
3
- export declare class Line {
4
- name: string;
5
- slot: string;
6
- start: Vector2;
7
- end: Vector2;
8
- readonly split = "--";
9
- uuid: string;
10
- valid: boolean;
11
- editable: boolean;
12
- highlight: boolean;
13
- constructor(name: string, slot: string, start: Vector2, end: Vector2);
14
- update(start: Vector2, end: Vector2): void;
15
- }
16
- export declare class DeviceLines extends LitElement {
17
- offset: Vector2;
18
- heightOffset: number;
19
- lines: Map<string, Line>;
20
- container: HTMLDivElement | undefined;
21
- constructor(offset: Vector2, heightOffset?: number);
22
- setOffset(x: number, y: number): void;
23
- setHeightOffset(height: number): void;
24
- hide(): void;
25
- show(): void;
26
- addLine(line: Line): void;
27
- clear(): void;
28
- removeLine(line: Line): void;
29
- getLineByName(name: string): Line[];
30
- getLineBySlot(slot: string): Line[];
31
- getPath(line: Line): string;
32
- updateLine(line: Line): void;
33
- forceUpdate(): void;
34
- protected render(): unknown;
35
- static styles: import("lit").CSSResult;
36
- }
@@ -1,5 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export default class ShopDevices extends LitElement {
3
- constructor();
4
- protected render(): unknown;
5
- }
@@ -1,13 +0,0 @@
1
- import ShopDevices from './index';
2
- declare const _default: {
3
- title: string;
4
- render: (args: any) => ShopDevices;
5
- argTypes: {};
6
- };
7
- export default _default;
8
- export declare const Primary: {
9
- args: {
10
- test: string;
11
- count: number;
12
- };
13
- };
@@ -1,8 +0,0 @@
1
- import Pin from './pin';
2
- export default class Connector {
3
- readonly uuid: string;
4
- connections: Pin[];
5
- constructor(uuid?: string);
6
- addConnection(pin: Pin): void;
7
- describe(): void;
8
- }
@@ -1,16 +0,0 @@
1
- export interface ConstraintExecResult {
2
- valid: boolean;
3
- message?: string;
4
- }
5
- export declare abstract class Constraintable {
6
- protected _valid: boolean;
7
- protected constructor();
8
- get isValid(): boolean;
9
- abstract exec(): ConstraintExecResult;
10
- }
11
- export default class Constraint extends Constraintable {
12
- constructor();
13
- exec(): ConstraintExecResult;
14
- addConnection(): void;
15
- describe(): void;
16
- }
@@ -1,9 +0,0 @@
1
- import { ConstraintExecResult, Constraintable } from './constraint';
2
- import Pin from '../pin';
3
- export default class SameDeviceConstraint extends Constraintable {
4
- source: Pin;
5
- target: Pin;
6
- constructor(source: Pin, target: Pin);
7
- setTarget(target: Pin): this;
8
- exec(): ConstraintExecResult;
9
- }
@@ -1,9 +0,0 @@
1
- import { Constraintable, ConstraintExecResult } from './constraint';
2
- import Pin from '../pin';
3
- export default class SingleConnectionConstraint extends Constraintable {
4
- source: Pin;
5
- target: Pin;
6
- constructor(source: Pin, target: Pin);
7
- setTarget(target: Pin): this;
8
- exec(): ConstraintExecResult;
9
- }
@@ -1,11 +0,0 @@
1
- import Pin from './pin';
2
- export default class Device {
3
- private _deviceId;
4
- private _name;
5
- pins: Pin[];
6
- get deviceId(): string;
7
- get name(): string;
8
- constructor(_deviceId: string, _name: string);
9
- addPin(pin: Pin): void;
10
- describe(): void;
11
- }
@@ -1,43 +0,0 @@
1
- export declare enum PIN_TYPES {
2
- VCC = "VCC",
3
- '24VDC IN-' = "24VDC IN-",
4
- GND = "GND",
5
- 'DI-NPN' = "DI-NPN",
6
- PDO = "PDO",
7
- '485-B' = "485-B",
8
- '485-A' = "485-A",
9
- '232-T' = "232-T",
10
- '232-R' = "232-R",
11
- 'CAN-L' = "CAN-L",
12
- 'CAN-H' = "CAN-H",
13
- 'SWITCH-N' = "SWITCH-N",
14
- 'SWITCH-O' = "SWITCH-O",
15
- 'BOOT-KEY' = "BOOT-KEY",
16
- 'BOOT-LIGHT' = "BOOT-LIGHT",
17
- 'MANUAL-CHARGING' = "MANUAL-CHARGING",
18
- 'EMC IN' = "EMC IN",
19
- 'EMC P-' = "EMC P-",
20
- 'EMC P+' = "EMC P+",
21
- LAN = "LAN",
22
- USB = "USB",
23
- HDMI = "HDMI",
24
- SPK = "SPK",
25
- MIC = "MIC",
26
- WIFI = "WIFI",
27
- 'Contactor O' = "Contactor O",
28
- 'Contactor N' = "Contactor N"
29
- }
30
- export default class Pin {
31
- private pinID;
32
- private pinType;
33
- private group;
34
- private voltageMin;
35
- private voltageMax;
36
- private currentMax;
37
- private _deviceId;
38
- private _constraints;
39
- get deviceId(): string;
40
- set deviceId(deviceId: string);
41
- constructor(pinID: string, pinType: PIN_TYPES, group: any, voltageMin: number, voltageMax: number, currentMax: number);
42
- describe(): void;
43
- }
@@ -1,3 +0,0 @@
1
- export * from './device-viewer/main';
2
- export * from './sglb/index';
3
- export * from './utils/index';
@@ -1,5 +0,0 @@
1
- import { Scene3D } from './device-viewer/scene';
2
- export declare abstract class Plugin {
3
- private static _app;
4
- static init(app: Scene3D): void;
5
- }
File without changes
@@ -1,17 +0,0 @@
1
- import { LitElement, PropertyValues } from 'lit';
2
- export interface Props {
3
- e3dx: string;
4
- files: string[];
5
- }
6
- export default class StepViewer extends LitElement {
7
- container: HTMLDivElement | undefined;
8
- constructor();
9
- files: string[];
10
- protected firstUpdated(_changedProperties: PropertyValues): void;
11
- protected updated(_changedProperties: PropertyValues): void;
12
- blobURLToFile(blobURL: string, fileName?: string): Promise<File | null>;
13
- private _upload;
14
- private _startTask;
15
- protected render(): unknown;
16
- static styles: import("lit").CSSResult;
17
- }
@@ -1,19 +0,0 @@
1
- import StepViewer, { Props } from './index';
2
- declare const _default: {
3
- title: string;
4
- render: (args: Props) => StepViewer;
5
- argTypes: {
6
- files: {
7
- control: {
8
- type: string;
9
- accept: string;
10
- };
11
- };
12
- };
13
- };
14
- export default _default;
15
- export declare const Primary: {
16
- args: {
17
- files: never[];
18
- };
19
- };
File without changes
File without changes
File without changes