@clikvn/showroom-visualizer 0.2.3-dev-02 → 0.2.3-dev-04
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/.idea/inspectionProfiles/Project_Default.xml +36 -0
- package/.idea/jsLinters/eslint.xml +7 -0
- package/.idea/misc.xml +9 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +8 -0
- package/.idea/showroom-visualizer.iml +9 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +31 -31
- package/dist/components/SkinLayer/DefaultLayout/index.d.ts.map +1 -1
- package/dist/components/SkinLayer/Drawer/PoiHeader/index.d.ts +16 -0
- package/dist/components/SkinLayer/Drawer/PoiHeader/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/Drawer/index.d.ts +29 -0
- package/dist/components/SkinLayer/Drawer/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/GalleryFullScreen/Content/ARViewer.d.ts +30 -0
- package/dist/components/SkinLayer/GalleryFullScreen/Content/ARViewer.d.ts.map +1 -0
- package/dist/components/SkinLayer/ModalItemInfo/Description.d.ts +10 -0
- package/dist/components/SkinLayer/ModalItemInfo/Description.d.ts.map +1 -0
- package/dist/components/SkinLayer/ModalItemInfo/Intro.d.ts +9 -0
- package/dist/components/SkinLayer/ModalItemInfo/Intro.d.ts.map +1 -0
- package/dist/components/SkinLayer/ModalItemInfo/Media.d.ts +13 -0
- package/dist/components/SkinLayer/ModalItemInfo/Media.d.ts.map +1 -0
- package/dist/components/SkinLayer/ModalItemInfo/index.d.ts +10 -0
- package/dist/components/SkinLayer/ModalItemInfo/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/PinActionButtons/ButtonWithTooltip.d.ts +1 -0
- package/dist/components/SkinLayer/PinActionButtons/ButtonWithTooltip.d.ts.map +1 -1
- package/dist/components/SkinLayer/PinActionButtons/index.d.ts.map +1 -1
- package/dist/components/SkinLayer/PlayAll/index.d.ts +8 -0
- package/dist/components/SkinLayer/PlayAll/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/PoiTextureOptions/HorizontalMenu/index.d.ts +13 -0
- package/dist/components/SkinLayer/PoiTextureOptions/HorizontalMenu/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/PoiTextureOptions/SemicircleMenu/index.d.ts +13 -0
- package/dist/components/SkinLayer/PoiTextureOptions/SemicircleMenu/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/PoiTextureOptions/TextureMenuItem/index.d.ts +15 -0
- package/dist/components/SkinLayer/PoiTextureOptions/TextureMenuItem/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/PoiTextureOptions/VerticalMenu/index.d.ts +13 -0
- package/dist/components/SkinLayer/PoiTextureOptions/VerticalMenu/index.d.ts.map +1 -0
- package/dist/context/CustomLayoutContext.d.ts.map +1 -1
- package/dist/context/StoreContext.d.ts +5 -0
- package/dist/context/StoreContext.d.ts.map +1 -0
- package/dist/features/ShowroomVisualizer/Scripts.d.ts +4 -0
- package/dist/features/ShowroomVisualizer/Scripts.d.ts.map +1 -0
- package/dist/features/ShowroomVisualizer/TourContainer.d.ts +9 -0
- package/dist/features/ShowroomVisualizer/TourContainer.d.ts.map +1 -0
- package/dist/features/ShowroomVisualizer/Tours.d.ts +3 -0
- package/dist/features/ShowroomVisualizer/Tours.d.ts.map +1 -0
- package/dist/features/VirtualTourVisualizer/index.d.ts +20 -0
- package/dist/features/VirtualTourVisualizer/index.d.ts.map +1 -0
- package/dist/features/VirtualTourVisualizerUI/index.d.ts +17 -0
- package/dist/features/VirtualTourVisualizerUI/index.d.ts.map +1 -0
- package/dist/hooks/Visualizer/reducer.d.ts +116 -0
- package/dist/hooks/Visualizer/reducer.d.ts.map +1 -0
- package/dist/index.html +95 -95
- package/dist/index.js +1 -1
- package/dist/types/custom-layout.d.ts +104 -0
- package/dist/types/custom-layout.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/package.json +124 -124
- package/rollup.config.js +97 -97
- package/.claude/settings.local.json +0 -19
- package/dist/context/SwizzleContext.d.ts +0 -21
- package/dist/context/SwizzleContext.d.ts.map +0 -1
- package/dist/types/swizzle.d.ts +0 -59
- package/dist/types/swizzle.d.ts.map +0 -1
- /package/dist/features/ShowroomVisualizer/{CssStyles.d.ts → cssStyles.d.ts} +0 -0
- /package/dist/features/ShowroomVisualizer/{CssStyles.d.ts.map → cssStyles.d.ts.map} +0 -0
package/package.json
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@clikvn/showroom-visualizer",
|
|
3
|
-
"description": "Showroom Visualizer",
|
|
4
|
-
"version": "0.2.3-dev-
|
|
5
|
-
"author": "Clik JSC",
|
|
6
|
-
"license": "ISC",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "rollup --watch --config rollup.config.js",
|
|
12
|
-
"build": "rollup --config rollup.config.js",
|
|
13
|
-
"lint": "eslint src",
|
|
14
|
-
"lint:fix": "eslint --fix src",
|
|
15
|
-
"prettier": "prettier --write .",
|
|
16
|
-
"pub": "publish --access public",
|
|
17
|
-
"deploy": "yarn build && yarn publish --access public"
|
|
18
|
-
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@clikvn/react-bottom-sheet": "^1.0.3",
|
|
21
|
-
"@clikvn/react-gallery-viewer": "^1.2.3-dev",
|
|
22
|
-
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
23
|
-
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
24
|
-
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
|
25
|
-
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
26
|
-
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
27
|
-
"@radix-ui/react-slot": "^1.1.1",
|
|
28
|
-
"@ts-stack/markdown": "1.4.0",
|
|
29
|
-
"@types/moment": "^2.13.0",
|
|
30
|
-
"antd": "^5.27.2",
|
|
31
|
-
"axios": "^1.11.0",
|
|
32
|
-
"class-variance-authority": "^0.7.1",
|
|
33
|
-
"classnames": "^2.5.1",
|
|
34
|
-
"clsx": "^2.1.1",
|
|
35
|
-
"date-fns": "^4.1.0",
|
|
36
|
-
"device-detector-js": "^3.0.3",
|
|
37
|
-
"embla-carousel-react": "^8.6.0",
|
|
38
|
-
"framer-motion": "^12.23.12",
|
|
39
|
-
"howler": "^2.2.4",
|
|
40
|
-
"i18next": "^25.5.1",
|
|
41
|
-
"lodash": "^4.17.21",
|
|
42
|
-
"lucide-react": "^0.544.0",
|
|
43
|
-
"moment": "^2.30.1",
|
|
44
|
-
"node-fetch": "^3.3.2",
|
|
45
|
-
"qrcode.react": "^4.2.0",
|
|
46
|
-
"rc-progress": "^4.0.0",
|
|
47
|
-
"react": "^18.3.1",
|
|
48
|
-
"react-dom": "^18.3.1",
|
|
49
|
-
"react-i18next": "^15.7.3",
|
|
50
|
-
"react-intersection-image": "^2.1.2",
|
|
51
|
-
"react-markdown": "^9.0.3",
|
|
52
|
-
"react-planet": "^1.0.1-ie11",
|
|
53
|
-
"react-slick": "^0.31.0",
|
|
54
|
-
"react-truncate-markup": "^5.1.2",
|
|
55
|
-
"react-zoom-pan-pinch": "^3.7.0",
|
|
56
|
-
"remark-gfm": "^4.0.0",
|
|
57
|
-
"signals": "^1.0.0",
|
|
58
|
-
"sonner": "^2.0.7",
|
|
59
|
-
"swr": "^2.3.0",
|
|
60
|
-
"usehooks-ts": "^3.1.0",
|
|
61
|
-
"vtt.js": "^0.13.0",
|
|
62
|
-
"web-vitals": "^2.1.0"
|
|
63
|
-
},
|
|
64
|
-
"eslintConfig": {
|
|
65
|
-
"extends": [
|
|
66
|
-
"react-app",
|
|
67
|
-
"react-app/jest"
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
"browserslist": {
|
|
71
|
-
"production": [
|
|
72
|
-
">0.2%",
|
|
73
|
-
"not dead",
|
|
74
|
-
"not op_mini all"
|
|
75
|
-
],
|
|
76
|
-
"development": [
|
|
77
|
-
"last 1 chrome version",
|
|
78
|
-
"last 1 firefox version",
|
|
79
|
-
"last 1 safari version"
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
"devDependencies": {
|
|
83
|
-
"@rollup-extras/plugin-copy": "^1.11.1",
|
|
84
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
85
|
-
"@rollup/plugin-commonjs": "^28.0.1",
|
|
86
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
87
|
-
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
88
|
-
"@rollup/plugin-typescript": "^12.1.1",
|
|
89
|
-
"@tailwindcss/typography": "^0.5.15",
|
|
90
|
-
"@testing-library/jest-dom": "^5.14.1",
|
|
91
|
-
"@testing-library/react": "^13.0.0",
|
|
92
|
-
"@testing-library/user-event": "^13.2.1",
|
|
93
|
-
"@types/howler": "^2.2.12",
|
|
94
|
-
"@types/jest": "^29.5.14",
|
|
95
|
-
"@types/lodash": "^4.17.20",
|
|
96
|
-
"@types/node": "^22.9.0",
|
|
97
|
-
"@types/node-fetch": "^2.6.13",
|
|
98
|
-
"@types/react": "^18.3.12",
|
|
99
|
-
"@types/react-dom": "^18.3.1",
|
|
100
|
-
"@types/signals": "^1.0.4",
|
|
101
|
-
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
102
|
-
"@typescript-eslint/parser": "^8.20.0",
|
|
103
|
-
"autoprefixer": "^10.4.20",
|
|
104
|
-
"eslint": "^8.57.0",
|
|
105
|
-
"eslint-config-prettier": "^10.0.1",
|
|
106
|
-
"eslint-plugin-prettier": "^5.2.2",
|
|
107
|
-
"prettier": "^3.4.2",
|
|
108
|
-
"react-scripts": "5.0.1",
|
|
109
|
-
"rollup": "^4.26.0",
|
|
110
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
111
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
112
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
113
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
114
|
-
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
115
|
-
"rollup-plugin-uglify": "^6.0.4",
|
|
116
|
-
"tailwind-merge": "^2.6.0",
|
|
117
|
-
"tailwindcss": "^3.4.15",
|
|
118
|
-
"tailwindcss-animate": "^1.0.7",
|
|
119
|
-
"typescript": "^5.6.3"
|
|
120
|
-
},
|
|
121
|
-
"engines": {
|
|
122
|
-
"node": ">=18.18.0"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@clikvn/showroom-visualizer",
|
|
3
|
+
"description": "Showroom Visualizer",
|
|
4
|
+
"version": "0.2.3-dev-04",
|
|
5
|
+
"author": "Clik JSC",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "rollup --watch --config rollup.config.js",
|
|
12
|
+
"build": "rollup --config rollup.config.js",
|
|
13
|
+
"lint": "eslint src",
|
|
14
|
+
"lint:fix": "eslint --fix src",
|
|
15
|
+
"prettier": "prettier --write .",
|
|
16
|
+
"pub": "publish --access public",
|
|
17
|
+
"deploy": "yarn build && yarn publish --access public"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@clikvn/react-bottom-sheet": "^1.0.3",
|
|
21
|
+
"@clikvn/react-gallery-viewer": "^1.2.3-dev",
|
|
22
|
+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
23
|
+
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
24
|
+
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
|
25
|
+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
26
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
27
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
28
|
+
"@ts-stack/markdown": "1.4.0",
|
|
29
|
+
"@types/moment": "^2.13.0",
|
|
30
|
+
"antd": "^5.27.2",
|
|
31
|
+
"axios": "^1.11.0",
|
|
32
|
+
"class-variance-authority": "^0.7.1",
|
|
33
|
+
"classnames": "^2.5.1",
|
|
34
|
+
"clsx": "^2.1.1",
|
|
35
|
+
"date-fns": "^4.1.0",
|
|
36
|
+
"device-detector-js": "^3.0.3",
|
|
37
|
+
"embla-carousel-react": "^8.6.0",
|
|
38
|
+
"framer-motion": "^12.23.12",
|
|
39
|
+
"howler": "^2.2.4",
|
|
40
|
+
"i18next": "^25.5.1",
|
|
41
|
+
"lodash": "^4.17.21",
|
|
42
|
+
"lucide-react": "^0.544.0",
|
|
43
|
+
"moment": "^2.30.1",
|
|
44
|
+
"node-fetch": "^3.3.2",
|
|
45
|
+
"qrcode.react": "^4.2.0",
|
|
46
|
+
"rc-progress": "^4.0.0",
|
|
47
|
+
"react": "^18.3.1",
|
|
48
|
+
"react-dom": "^18.3.1",
|
|
49
|
+
"react-i18next": "^15.7.3",
|
|
50
|
+
"react-intersection-image": "^2.1.2",
|
|
51
|
+
"react-markdown": "^9.0.3",
|
|
52
|
+
"react-planet": "^1.0.1-ie11",
|
|
53
|
+
"react-slick": "^0.31.0",
|
|
54
|
+
"react-truncate-markup": "^5.1.2",
|
|
55
|
+
"react-zoom-pan-pinch": "^3.7.0",
|
|
56
|
+
"remark-gfm": "^4.0.0",
|
|
57
|
+
"signals": "^1.0.0",
|
|
58
|
+
"sonner": "^2.0.7",
|
|
59
|
+
"swr": "^2.3.0",
|
|
60
|
+
"usehooks-ts": "^3.1.0",
|
|
61
|
+
"vtt.js": "^0.13.0",
|
|
62
|
+
"web-vitals": "^2.1.0"
|
|
63
|
+
},
|
|
64
|
+
"eslintConfig": {
|
|
65
|
+
"extends": [
|
|
66
|
+
"react-app",
|
|
67
|
+
"react-app/jest"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"browserslist": {
|
|
71
|
+
"production": [
|
|
72
|
+
">0.2%",
|
|
73
|
+
"not dead",
|
|
74
|
+
"not op_mini all"
|
|
75
|
+
],
|
|
76
|
+
"development": [
|
|
77
|
+
"last 1 chrome version",
|
|
78
|
+
"last 1 firefox version",
|
|
79
|
+
"last 1 safari version"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@rollup-extras/plugin-copy": "^1.11.1",
|
|
84
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
85
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
86
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
87
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
88
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
89
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
90
|
+
"@testing-library/jest-dom": "^5.14.1",
|
|
91
|
+
"@testing-library/react": "^13.0.0",
|
|
92
|
+
"@testing-library/user-event": "^13.2.1",
|
|
93
|
+
"@types/howler": "^2.2.12",
|
|
94
|
+
"@types/jest": "^29.5.14",
|
|
95
|
+
"@types/lodash": "^4.17.20",
|
|
96
|
+
"@types/node": "^22.9.0",
|
|
97
|
+
"@types/node-fetch": "^2.6.13",
|
|
98
|
+
"@types/react": "^18.3.12",
|
|
99
|
+
"@types/react-dom": "^18.3.1",
|
|
100
|
+
"@types/signals": "^1.0.4",
|
|
101
|
+
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
102
|
+
"@typescript-eslint/parser": "^8.20.0",
|
|
103
|
+
"autoprefixer": "^10.4.20",
|
|
104
|
+
"eslint": "^8.57.0",
|
|
105
|
+
"eslint-config-prettier": "^10.0.1",
|
|
106
|
+
"eslint-plugin-prettier": "^5.2.2",
|
|
107
|
+
"prettier": "^3.4.2",
|
|
108
|
+
"react-scripts": "5.0.1",
|
|
109
|
+
"rollup": "^4.26.0",
|
|
110
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
111
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
112
|
+
"rollup-plugin-replace": "^2.2.0",
|
|
113
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
114
|
+
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
115
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
116
|
+
"tailwind-merge": "^2.6.0",
|
|
117
|
+
"tailwindcss": "^3.4.15",
|
|
118
|
+
"tailwindcss-animate": "^1.0.7",
|
|
119
|
+
"typescript": "^5.6.3"
|
|
120
|
+
},
|
|
121
|
+
"engines": {
|
|
122
|
+
"node": ">=18.18.0"
|
|
123
|
+
}
|
|
124
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import typescript from '@rollup/plugin-typescript';
|
|
4
|
-
import { terser } from 'rollup-plugin-terser';
|
|
5
|
-
import postcss from 'rollup-plugin-postcss';
|
|
6
|
-
import { babel } from '@rollup/plugin-babel';
|
|
7
|
-
import autoprefixer from 'autoprefixer';
|
|
8
|
-
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
|
|
9
|
-
import json from '@rollup/plugin-json';
|
|
10
|
-
import { uglify } from 'rollup-plugin-uglify';
|
|
11
|
-
import replace from 'rollup-plugin-replace';
|
|
12
|
-
import tailwindcss from 'tailwindcss';
|
|
13
|
-
import copy from '@rollup-extras/plugin-copy';
|
|
14
|
-
|
|
15
|
-
const extensions = ['.ts', '.tsx', '.js'];
|
|
16
|
-
const isDev =
|
|
17
|
-
process.env.NODE_ENV === 'development' || process.env.ROLLUP_WATCH === 'true';
|
|
18
|
-
|
|
19
|
-
const indexConfig = {
|
|
20
|
-
context: 'this',
|
|
21
|
-
onwarn(warning, warn) {
|
|
22
|
-
// Bỏ qua warning về "use client" directive
|
|
23
|
-
if (
|
|
24
|
-
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
|
|
25
|
-
warning.message.includes('"use client"')
|
|
26
|
-
) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
// Hiển thị các warning khác
|
|
30
|
-
warn(warning);
|
|
31
|
-
},
|
|
32
|
-
plugins: [
|
|
33
|
-
resolve({
|
|
34
|
-
extensions,
|
|
35
|
-
browser: true,
|
|
36
|
-
dedupe: ['useTranslation', 'i18n', 'I18nextProvider'],
|
|
37
|
-
}),
|
|
38
|
-
commonjs(),
|
|
39
|
-
// Skip uglify in dev mode - tốn thời gian
|
|
40
|
-
!isDev && uglify(),
|
|
41
|
-
json(),
|
|
42
|
-
// Skip babel in dev mode - giảm thời gian compile
|
|
43
|
-
!isDev &&
|
|
44
|
-
babel({
|
|
45
|
-
babelHelpers: 'bundled',
|
|
46
|
-
exclude: 'node_modules/**',
|
|
47
|
-
extensions,
|
|
48
|
-
}),
|
|
49
|
-
copy({
|
|
50
|
-
targets: [
|
|
51
|
-
{
|
|
52
|
-
src: [
|
|
53
|
-
'src/assets/fonts/icomoon.woff',
|
|
54
|
-
'src/assets/fonts/icomoon.ttf',
|
|
55
|
-
'src/assets/fonts/icomoon.svg',
|
|
56
|
-
'src/assets/fonts/icomoon.eot',
|
|
57
|
-
],
|
|
58
|
-
dest: 'fonts',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
}),
|
|
62
|
-
replace({
|
|
63
|
-
'process.env.NODE_ENV': JSON.stringify(
|
|
64
|
-
isDev ? 'development' : 'production'
|
|
65
|
-
),
|
|
66
|
-
}),
|
|
67
|
-
postcss({
|
|
68
|
-
plugins: [autoprefixer(), tailwindcss()],
|
|
69
|
-
extract: false,
|
|
70
|
-
modules: false,
|
|
71
|
-
autoModules: false,
|
|
72
|
-
minimize: !isDev, // Skip minify CSS trong dev
|
|
73
|
-
inject: false,
|
|
74
|
-
}),
|
|
75
|
-
typescript({
|
|
76
|
-
sourceMap: isDev, // Source map chỉ trong dev
|
|
77
|
-
inlineSources: isDev,
|
|
78
|
-
}),
|
|
79
|
-
typescriptPaths({ preserveExtensions: true }),
|
|
80
|
-
// Skip terser trong dev - tốn rất nhiều thời gian
|
|
81
|
-
!isDev && terser({ output: { comments: false } }),
|
|
82
|
-
].filter(Boolean), // Remove false values
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const configs = [
|
|
86
|
-
{
|
|
87
|
-
input: './src/web.ts',
|
|
88
|
-
output: {
|
|
89
|
-
file: 'dist/web.js',
|
|
90
|
-
format: 'esm',
|
|
91
|
-
inlineDynamicImports: true,
|
|
92
|
-
},
|
|
93
|
-
...indexConfig,
|
|
94
|
-
},
|
|
95
|
-
];
|
|
96
|
-
|
|
97
|
-
export default configs;
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import typescript from '@rollup/plugin-typescript';
|
|
4
|
+
import { terser } from 'rollup-plugin-terser';
|
|
5
|
+
import postcss from 'rollup-plugin-postcss';
|
|
6
|
+
import { babel } from '@rollup/plugin-babel';
|
|
7
|
+
import autoprefixer from 'autoprefixer';
|
|
8
|
+
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
|
|
9
|
+
import json from '@rollup/plugin-json';
|
|
10
|
+
import { uglify } from 'rollup-plugin-uglify';
|
|
11
|
+
import replace from 'rollup-plugin-replace';
|
|
12
|
+
import tailwindcss from 'tailwindcss';
|
|
13
|
+
import copy from '@rollup-extras/plugin-copy';
|
|
14
|
+
|
|
15
|
+
const extensions = ['.ts', '.tsx', '.js'];
|
|
16
|
+
const isDev =
|
|
17
|
+
process.env.NODE_ENV === 'development' || process.env.ROLLUP_WATCH === 'true';
|
|
18
|
+
|
|
19
|
+
const indexConfig = {
|
|
20
|
+
context: 'this',
|
|
21
|
+
onwarn(warning, warn) {
|
|
22
|
+
// Bỏ qua warning về "use client" directive
|
|
23
|
+
if (
|
|
24
|
+
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
|
|
25
|
+
warning.message.includes('"use client"')
|
|
26
|
+
) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// Hiển thị các warning khác
|
|
30
|
+
warn(warning);
|
|
31
|
+
},
|
|
32
|
+
plugins: [
|
|
33
|
+
resolve({
|
|
34
|
+
extensions,
|
|
35
|
+
browser: true,
|
|
36
|
+
dedupe: ['useTranslation', 'i18n', 'I18nextProvider'],
|
|
37
|
+
}),
|
|
38
|
+
commonjs(),
|
|
39
|
+
// Skip uglify in dev mode - tốn thời gian
|
|
40
|
+
!isDev && uglify(),
|
|
41
|
+
json(),
|
|
42
|
+
// Skip babel in dev mode - giảm thời gian compile
|
|
43
|
+
!isDev &&
|
|
44
|
+
babel({
|
|
45
|
+
babelHelpers: 'bundled',
|
|
46
|
+
exclude: 'node_modules/**',
|
|
47
|
+
extensions,
|
|
48
|
+
}),
|
|
49
|
+
copy({
|
|
50
|
+
targets: [
|
|
51
|
+
{
|
|
52
|
+
src: [
|
|
53
|
+
'src/assets/fonts/icomoon.woff',
|
|
54
|
+
'src/assets/fonts/icomoon.ttf',
|
|
55
|
+
'src/assets/fonts/icomoon.svg',
|
|
56
|
+
'src/assets/fonts/icomoon.eot',
|
|
57
|
+
],
|
|
58
|
+
dest: 'fonts',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
}),
|
|
62
|
+
replace({
|
|
63
|
+
'process.env.NODE_ENV': JSON.stringify(
|
|
64
|
+
isDev ? 'development' : 'production'
|
|
65
|
+
),
|
|
66
|
+
}),
|
|
67
|
+
postcss({
|
|
68
|
+
plugins: [autoprefixer(), tailwindcss()],
|
|
69
|
+
extract: false,
|
|
70
|
+
modules: false,
|
|
71
|
+
autoModules: false,
|
|
72
|
+
minimize: !isDev, // Skip minify CSS trong dev
|
|
73
|
+
inject: false,
|
|
74
|
+
}),
|
|
75
|
+
typescript({
|
|
76
|
+
sourceMap: isDev, // Source map chỉ trong dev
|
|
77
|
+
inlineSources: isDev,
|
|
78
|
+
}),
|
|
79
|
+
typescriptPaths({ preserveExtensions: true }),
|
|
80
|
+
// Skip terser trong dev - tốn rất nhiều thời gian
|
|
81
|
+
!isDev && terser({ output: { comments: false } }),
|
|
82
|
+
].filter(Boolean), // Remove false values
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const configs = [
|
|
86
|
+
{
|
|
87
|
+
input: './src/web.ts',
|
|
88
|
+
output: {
|
|
89
|
+
file: 'dist/web.js',
|
|
90
|
+
format: 'esm',
|
|
91
|
+
inlineDynamicImports: true,
|
|
92
|
+
},
|
|
93
|
+
...indexConfig,
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
export default configs;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(find:*)",
|
|
5
|
-
"Bash(npm run build:*)",
|
|
6
|
-
"Bash(grep:*)",
|
|
7
|
-
"Bash(rm:*)",
|
|
8
|
-
"Bash(ls:*)",
|
|
9
|
-
"Bash(sed:*)",
|
|
10
|
-
"Bash(yarn build)",
|
|
11
|
-
"Bash(yalc push:*)",
|
|
12
|
-
"Bash(yarn dev)",
|
|
13
|
-
"Bash(yarn list:*)",
|
|
14
|
-
"Bash(mv:*)",
|
|
15
|
-
"Bash(rg:*)"
|
|
16
|
-
],
|
|
17
|
-
"deny": []
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, ComponentType } from 'react';
|
|
2
|
-
import { SwizzleConfig, SwizzlePath } from '../types/swizzle';
|
|
3
|
-
type SwizzleContextType = {
|
|
4
|
-
swizzle: SwizzleConfig;
|
|
5
|
-
getSwizzledComponent: <T = unknown>(path: SwizzlePath, defaultComponent: ComponentType<T>) => ComponentType<T>;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Hook để access swizzle configuration
|
|
9
|
-
*/
|
|
10
|
-
export declare const useSwizzle: () => SwizzleContextType;
|
|
11
|
-
type Props = {
|
|
12
|
-
swizzle?: SwizzleConfig;
|
|
13
|
-
children: ReactNode;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* SwizzleProvider - Wrap app với provider này để enable component swizzling
|
|
17
|
-
* Giống như Docusaurus swizzle pattern
|
|
18
|
-
*/
|
|
19
|
-
export declare const SwizzleProvider: React.FC<Props>;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=SwizzleContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SwizzleContext.d.ts","sourceRoot":"","sources":["../../src/context/SwizzleContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,aAAa,EAGd,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ9D,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,aAAa,CAAC;IACvB,oBAAoB,EAAE,CAAC,CAAC,GAAG,OAAO,EAChC,IAAI,EAAE,WAAW,EACjB,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,KAC/B,aAAa,CAAC,CAAC,CAAC,CAAC;CACvB,CAAC;AAOF;;GAEG;AACH,eAAO,MAAM,UAAU,0BAAmC,CAAC;AAE3D,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkG3C,CAAC"}
|
package/dist/types/swizzle.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Swizzle Config - Cho phép customize components theo nested path
|
|
3
|
-
* Giống như Docusaurus swizzle pattern
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
* ```tsx
|
|
7
|
-
* // ✅ ĐÚNG - Pass component function
|
|
8
|
-
* swizzle={{
|
|
9
|
-
* 'Floorplan.Minimap.Marker': CustomMarker,
|
|
10
|
-
* 'Floorplan.Minimap': CustomMinimap,
|
|
11
|
-
* }}
|
|
12
|
-
*
|
|
13
|
-
* // ❌ SAI - Không pass React element
|
|
14
|
-
* swizzle={{
|
|
15
|
-
* 'Floorplan.Minimap.Marker': <CustomMarker />, // ❌ Wrong!
|
|
16
|
-
* }}
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @important Pass component functions, NOT React elements!
|
|
20
|
-
*/
|
|
21
|
-
export type SwizzleConfig = {
|
|
22
|
-
Floorplan?: any;
|
|
23
|
-
'Floorplan.Map'?: any;
|
|
24
|
-
'Floorplan.Minimap'?: any;
|
|
25
|
-
'Floorplan.Minimap.Marker'?: any;
|
|
26
|
-
'Floorplan.Minimap.Polygon'?: any;
|
|
27
|
-
'Floorplan.Minimap.Radar'?: any;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Helper type để auto-complete swizzle paths
|
|
31
|
-
*/
|
|
32
|
-
export type SwizzlePath = keyof SwizzleConfig;
|
|
33
|
-
/**
|
|
34
|
-
* Registry của tất cả components có thể swizzle
|
|
35
|
-
* Dùng để documentation và validation
|
|
36
|
-
*/
|
|
37
|
-
export declare const SWIZZLEABLE_COMPONENTS: {
|
|
38
|
-
readonly Floorplan: {
|
|
39
|
-
readonly path: "src/components/SkinLayer/Floorplan/index.tsx";
|
|
40
|
-
readonly description: "Main Floorplan container with bottom sheet";
|
|
41
|
-
};
|
|
42
|
-
readonly 'Floorplan.Map': {
|
|
43
|
-
readonly path: "src/components/SkinLayer/Floorplan/Map.tsx";
|
|
44
|
-
readonly description: "Floorplan map wrapper with controls";
|
|
45
|
-
};
|
|
46
|
-
readonly 'Floorplan.Minimap': {
|
|
47
|
-
readonly path: "src/components/SkinLayer/Floorplan/Minimap/index.tsx";
|
|
48
|
-
readonly description: "Interactive minimap with markers and polygons";
|
|
49
|
-
};
|
|
50
|
-
readonly 'Floorplan.Minimap.Marker': {
|
|
51
|
-
readonly path: "src/components/SkinLayer/Floorplan/Minimap/MiniMapMarker.tsx";
|
|
52
|
-
readonly description: "Individual marker on minimap";
|
|
53
|
-
};
|
|
54
|
-
readonly 'Floorplan.Minimap.Polygon': {
|
|
55
|
-
readonly path: "src/components/SkinLayer/Floorplan/Minimap/MiniMapPolygons/index.tsx";
|
|
56
|
-
readonly description: "Polygon areas on minimap";
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=swizzle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"swizzle.d.ts","sourceRoot":"","sources":["../../src/types/swizzle.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,aAAa,GAAG;IAE1B,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,mBAAmB,CAAC,EAAE,GAAG,CAAC;IAC1B,0BAA0B,CAAC,EAAE,GAAG,CAAC;IACjC,2BAA2B,CAAC,EAAE,GAAG,CAAC;IAClC,yBAAyB,CAAC,EAAE,GAAG,CAAC;CAGjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;CAsBzB,CAAC"}
|
|
File without changes
|
|
File without changes
|