@clikvn/showroom-visualizer 0.0.1-dev
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 +7 -0
- package/.idea/showroom-visualizer.iml +9 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +22 -0
- package/base.json +21 -0
- package/dist/commons/SkinLayer/components/Button/index.d.ts +11 -0
- package/dist/commons/SkinLayer/components/Button/index.d.ts.map +1 -0
- package/dist/commons/SkinLayer/components/index.d.ts +1 -0
- package/dist/commons/SkinLayer/components/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/Layout/index.d.ts +3 -0
- package/dist/components/SkinLayer/Layout/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/LogoAndTitle/index.d.ts +4 -0
- package/dist/components/SkinLayer/LogoAndTitle/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/PinActionButtons/index.d.ts +9 -0
- package/dist/components/SkinLayer/PinActionButtons/index.d.ts.map +1 -0
- package/dist/components/SkinLayer/index.d.ts +2 -0
- package/dist/components/SkinLayer/index.d.ts.map +1 -0
- package/dist/components/Visualizer/VirtualTour/index.d.ts +3 -0
- package/dist/components/Visualizer/VirtualTour/index.d.ts.map +1 -0
- package/dist/components/Visualizer/index.d.ts +2 -0
- package/dist/components/Visualizer/index.d.ts.map +1 -0
- package/dist/constants/SkinLayer/actionButtons.d.ts +8 -0
- package/dist/constants/SkinLayer/actionButtons.d.ts.map +1 -0
- package/dist/constants/SkinLayer/index.d.ts +25 -0
- package/dist/constants/SkinLayer/index.d.ts.map +1 -0
- package/dist/constants/Visualizer/index.d.ts +200 -0
- package/dist/constants/Visualizer/index.d.ts.map +1 -0
- package/dist/constants/Visualizer/language.d.ts +6 -0
- package/dist/constants/Visualizer/language.d.ts.map +1 -0
- package/dist/constants/Visualizer/poi.d.ts +30 -0
- package/dist/constants/Visualizer/poi.d.ts.map +1 -0
- package/dist/constants/Visualizer/tour.d.ts +57 -0
- package/dist/constants/Visualizer/tour.d.ts.map +1 -0
- package/dist/constants/Visualizer/variables.d.ts +19 -0
- package/dist/constants/Visualizer/variables.d.ts.map +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/context/TourContext.d.ts +8 -0
- package/dist/context/TourContext.d.ts.map +1 -0
- package/dist/features/ShowroomVisualizer/index.d.ts +25 -0
- package/dist/features/ShowroomVisualizer/index.d.ts.map +1 -0
- package/dist/features/VirtualTourVisualizer/index.d.ts +28 -0
- package/dist/features/VirtualTourVisualizer/index.d.ts.map +1 -0
- package/dist/features/VirtualTourVisualizerUI/index.d.ts +26 -0
- package/dist/features/VirtualTourVisualizerUI/index.d.ts.map +1 -0
- package/dist/fonts/icomoon.eot +0 -0
- package/dist/fonts/icomoon.svg +609 -0
- package/dist/fonts/icomoon.ttf +0 -0
- package/dist/fonts/icomoon.woff +0 -0
- package/dist/hooks/SkinLayer/useConfiguration.d.ts +30 -0
- package/dist/hooks/SkinLayer/useConfiguration.d.ts.map +1 -0
- package/dist/hooks/SkinLayer/useLayout.d.ts +46 -0
- package/dist/hooks/SkinLayer/useLayout.d.ts.map +1 -0
- package/dist/hooks/Visualizer/useConfiguration.d.ts +33 -0
- package/dist/hooks/Visualizer/useConfiguration.d.ts.map +1 -0
- package/dist/hooks/Visualizer/useTourVisualizer.d.ts +3 -0
- package/dist/hooks/Visualizer/useTourVisualizer.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.html +22 -0
- package/dist/models/Visualizer/Krpano.d.ts +38 -0
- package/dist/models/Visualizer/Krpano.d.ts.map +1 -0
- package/dist/models/Visualizer/Plugins/BasePlugin.d.ts +64 -0
- package/dist/models/Visualizer/Plugins/BasePlugin.d.ts.map +1 -0
- package/dist/models/Visualizer/Plugins/Gyro.d.ts +12 -0
- package/dist/models/Visualizer/Plugins/Gyro.d.ts.map +1 -0
- package/dist/models/Visualizer/Plugins/Radar.d.ts +21 -0
- package/dist/models/Visualizer/Plugins/Radar.d.ts.map +1 -0
- package/dist/models/Visualizer/Plugins/Sound.d.ts +11 -0
- package/dist/models/Visualizer/Plugins/Sound.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/BgPoi.d.ts +18 -0
- package/dist/models/Visualizer/Poi/BgPoi.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/FloorPoi.d.ts +27 -0
- package/dist/models/Visualizer/Poi/FloorPoi.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/NavigationPoi.d.ts +45 -0
- package/dist/models/Visualizer/Poi/NavigationPoi.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/Poi.d.ts +77 -0
- package/dist/models/Visualizer/Poi/Poi.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiGallery.d.ts +35 -0
- package/dist/models/Visualizer/Poi/PoiGallery.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiInfo.d.ts +20 -0
- package/dist/models/Visualizer/Poi/PoiInfo.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiItemInfo.d.ts +44 -0
- package/dist/models/Visualizer/Poi/PoiItemInfo.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiLensFlare.d.ts +19 -0
- package/dist/models/Visualizer/Poi/PoiLensFlare.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiMoving.d.ts +54 -0
- package/dist/models/Visualizer/Poi/PoiMoving.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiMultimedia/PoiMultimedia.d.ts +22 -0
- package/dist/models/Visualizer/Poi/PoiMultimedia/PoiMultimedia.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiMultimedia/PoiSound.d.ts +22 -0
- package/dist/models/Visualizer/Poi/PoiMultimedia/PoiSound.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiMultimedia/PoiVideo.d.ts +15 -0
- package/dist/models/Visualizer/Poi/PoiMultimedia/PoiVideo.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiNadirLogo.d.ts +12 -0
- package/dist/models/Visualizer/Poi/PoiNadirLogo.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiPhoto.d.ts +13 -0
- package/dist/models/Visualizer/Poi/PoiPhoto.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiPolygon.d.ts +31 -0
- package/dist/models/Visualizer/Poi/PoiPolygon.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiPopup.d.ts +21 -0
- package/dist/models/Visualizer/Poi/PoiPopup.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiPromotion.d.ts +40 -0
- package/dist/models/Visualizer/Poi/PoiPromotion.d.ts.map +1 -0
- package/dist/models/Visualizer/Poi/PoiTexture.d.ts +40 -0
- package/dist/models/Visualizer/Poi/PoiTexture.d.ts.map +1 -0
- package/dist/models/Visualizer/Scene.d.ts +103 -0
- package/dist/models/Visualizer/Scene.d.ts.map +1 -0
- package/dist/models/Visualizer/Tour.d.ts +168 -0
- package/dist/models/Visualizer/Tour.d.ts.map +1 -0
- package/dist/models/Visualizer/TourSound/TourBackgroundSound.d.ts +10 -0
- package/dist/models/Visualizer/TourSound/TourBackgroundSound.d.ts.map +1 -0
- package/dist/models/Visualizer/TourSound/TourSound.d.ts +56 -0
- package/dist/models/Visualizer/TourSound/TourSound.d.ts.map +1 -0
- package/dist/models.d.ts +1 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/register.d.ts +28 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/services/Visualizer/index.d.ts +3 -0
- package/dist/services/Visualizer/index.d.ts.map +1 -0
- package/dist/services/Visualizer/request.d.ts +2 -0
- package/dist/services/Visualizer/request.d.ts.map +1 -0
- package/dist/services/Visualizer/tour.service.d.ts +13 -0
- package/dist/services/Visualizer/tour.service.d.ts.map +1 -0
- package/dist/types/SkinLayer/common.type.d.ts +64 -0
- package/dist/types/SkinLayer/common.type.d.ts.map +1 -0
- package/dist/types/SkinLayer/functionButton.type.d.ts +11 -0
- package/dist/types/SkinLayer/functionButton.type.d.ts.map +1 -0
- package/dist/types/SkinLayer/index.d.ts +6 -0
- package/dist/types/SkinLayer/index.d.ts.map +1 -0
- package/dist/types/SkinLayer/pinActionButton.type.d.ts +32 -0
- package/dist/types/SkinLayer/pinActionButton.type.d.ts.map +1 -0
- package/dist/types/SkinLayer/storage.type.d.ts +21 -0
- package/dist/types/SkinLayer/storage.type.d.ts.map +1 -0
- package/dist/types/SkinLayer/visualizer.type.d.ts +22 -0
- package/dist/types/SkinLayer/visualizer.type.d.ts.map +1 -0
- package/dist/types/Visualizer/common.type.d.ts +64 -0
- package/dist/types/Visualizer/common.type.d.ts.map +1 -0
- package/dist/types/Visualizer/floorplan.type.d.ts +14 -0
- package/dist/types/Visualizer/floorplan.type.d.ts.map +1 -0
- package/dist/types/Visualizer/floorplanPolygon.type.d.ts +11 -0
- package/dist/types/Visualizer/floorplanPolygon.type.d.ts.map +1 -0
- package/dist/types/Visualizer/index.d.ts +18 -0
- package/dist/types/Visualizer/index.d.ts.map +1 -0
- package/dist/types/Visualizer/itemInfo.type.d.ts +50 -0
- package/dist/types/Visualizer/itemInfo.type.d.ts.map +1 -0
- package/dist/types/Visualizer/krpano.type.d.ts +55 -0
- package/dist/types/Visualizer/krpano.type.d.ts.map +1 -0
- package/dist/types/Visualizer/marker.type.d.ts +9 -0
- package/dist/types/Visualizer/marker.type.d.ts.map +1 -0
- package/dist/types/Visualizer/metadata.type.d.ts +34 -0
- package/dist/types/Visualizer/metadata.type.d.ts.map +1 -0
- package/dist/types/Visualizer/plugin.type.d.ts +77 -0
- package/dist/types/Visualizer/plugin.type.d.ts.map +1 -0
- package/dist/types/Visualizer/poi.type.d.ts +188 -0
- package/dist/types/Visualizer/poi.type.d.ts.map +1 -0
- package/dist/types/Visualizer/point.type.d.ts +7 -0
- package/dist/types/Visualizer/point.type.d.ts.map +1 -0
- package/dist/types/Visualizer/scene.type.d.ts +54 -0
- package/dist/types/Visualizer/scene.type.d.ts.map +1 -0
- package/dist/types/Visualizer/signal.type.d.ts +49 -0
- package/dist/types/Visualizer/signal.type.d.ts.map +1 -0
- package/dist/types/Visualizer/storage.type.d.ts +21 -0
- package/dist/types/Visualizer/storage.type.d.ts.map +1 -0
- package/dist/types/Visualizer/theme.type.d.ts +14 -0
- package/dist/types/Visualizer/theme.type.d.ts.map +1 -0
- package/dist/types/Visualizer/tour.type.d.ts +65 -0
- package/dist/types/Visualizer/tour.type.d.ts.map +1 -0
- package/dist/types/Visualizer/tourSound.type.d.ts +35 -0
- package/dist/types/Visualizer/tourSound.type.d.ts.map +1 -0
- package/dist/types/Visualizer/visualizer.type.d.ts +24 -0
- package/dist/types/Visualizer/visualizer.type.d.ts.map +1 -0
- package/dist/utils/Visualizer/file.utils.d.ts +2 -0
- package/dist/utils/Visualizer/file.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/fullscreen.utils.d.ts +4 -0
- package/dist/utils/Visualizer/fullscreen.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/function.utils.d.ts +19 -0
- package/dist/utils/Visualizer/function.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/image.utils.d.ts +8 -0
- package/dist/utils/Visualizer/image.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/index.d.ts +11 -0
- package/dist/utils/Visualizer/index.d.ts.map +1 -0
- package/dist/utils/Visualizer/krpano.utils.d.ts +49 -0
- package/dist/utils/Visualizer/krpano.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/krpanoHtml.utils.d.ts +36 -0
- package/dist/utils/Visualizer/krpanoHtml.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/localStorage.utils.d.ts +4 -0
- package/dist/utils/Visualizer/localStorage.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/pricing.utils.d.ts +3 -0
- package/dist/utils/Visualizer/pricing.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/tour.utils.d.ts +12 -0
- package/dist/utils/Visualizer/tour.utils.d.ts.map +1 -0
- package/dist/utils/Visualizer/url.utils.d.ts +3 -0
- package/dist/utils/Visualizer/url.utils.d.ts.map +1 -0
- package/dist/web.d.ts +8 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +1 -0
- package/dist/window.d.ts +18 -0
- package/dist/window.d.ts.map +1 -0
- package/package.json +107 -0
- package/rollup.config.js +71 -0
- package/tailwind.config.cjs +149 -0
package/dist/window.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VirtualTourVisualizerType } from './types/SkinLayer';
|
|
2
|
+
export declare const initVisualizer: (props: VirtualTourVisualizerType & {
|
|
3
|
+
id?: string;
|
|
4
|
+
}) => void;
|
|
5
|
+
export declare const destroy: () => void;
|
|
6
|
+
type ShowroomVisualizer = {
|
|
7
|
+
initVisualizer: typeof initVisualizer;
|
|
8
|
+
destroy: typeof destroy;
|
|
9
|
+
};
|
|
10
|
+
export declare const parseVisualizer: () => {
|
|
11
|
+
initVisualizer: (props: VirtualTourVisualizerType & {
|
|
12
|
+
id?: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const injectVisualizerToWindow: (visualizer: ShowroomVisualizer) => void;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAI9D,eAAO,MAAM,cAAc,GACzB,OAAO,yBAAyB,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,SAanD,CAAC;AAEF,eAAO,MAAM,OAAO,YAEnB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,OAAO,EAAE,OAAO,OAAO,CAAC;CACzB,CAAC;AAQF,eAAO,MAAM,eAAe;4BA9BnB,yBAAyB,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE;;CAiClD,CAAC;AAEH,eAAO,MAAM,wBAAwB,GAAI,YAAY,kBAAkB,SAGtE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@clikvn/showroom-visualizer",
|
|
3
|
+
"description": "Showrrom Visualizer",
|
|
4
|
+
"version": "0.0.1-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
|
+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
21
|
+
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
22
|
+
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
|
23
|
+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
24
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
25
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
26
|
+
"@ts-stack/markdown": "1.4.0",
|
|
27
|
+
"@types/moment": "^2.13.0",
|
|
28
|
+
"class-variance-authority": "^0.7.1",
|
|
29
|
+
"classnames": "^2.5.1",
|
|
30
|
+
"clsx": "^2.1.1",
|
|
31
|
+
"date-fns": "^4.1.0",
|
|
32
|
+
"device-detector-js": "^3.0.3",
|
|
33
|
+
"framer-motion": "^11.18.0",
|
|
34
|
+
"howler": "^2.2.4",
|
|
35
|
+
"lodash": "^4.17.21",
|
|
36
|
+
"moment": "^2.30.1",
|
|
37
|
+
"node-fetch": "^3.3.2",
|
|
38
|
+
"react": "^18.3.1",
|
|
39
|
+
"react-dom": "^18.3.1",
|
|
40
|
+
"react-markdown": "^9.0.3",
|
|
41
|
+
"remark-gfm": "^4.0.0",
|
|
42
|
+
"signals": "^1.0.0",
|
|
43
|
+
"swr": "^2.3.0",
|
|
44
|
+
"usehooks-ts": "^3.1.0",
|
|
45
|
+
"web-vitals": "^2.1.0"
|
|
46
|
+
},
|
|
47
|
+
"eslintConfig": {
|
|
48
|
+
"extends": [
|
|
49
|
+
"react-app",
|
|
50
|
+
"react-app/jest"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"browserslist": {
|
|
54
|
+
"production": [
|
|
55
|
+
">0.2%",
|
|
56
|
+
"not dead",
|
|
57
|
+
"not op_mini all"
|
|
58
|
+
],
|
|
59
|
+
"development": [
|
|
60
|
+
"last 1 chrome version",
|
|
61
|
+
"last 1 firefox version",
|
|
62
|
+
"last 1 safari version"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@rollup-extras/plugin-copy": "^1.11.1",
|
|
67
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
68
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
69
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
70
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
71
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
72
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
73
|
+
"@testing-library/jest-dom": "^5.14.1",
|
|
74
|
+
"@testing-library/react": "^13.0.0",
|
|
75
|
+
"@testing-library/user-event": "^13.2.1",
|
|
76
|
+
"@types/howler": "^2.2.12",
|
|
77
|
+
"@types/jest": "^29.5.14",
|
|
78
|
+
"@types/lodash": "^4.17.20",
|
|
79
|
+
"@types/node": "^22.9.0",
|
|
80
|
+
"@types/node-fetch": "^2.6.13",
|
|
81
|
+
"@types/react": "^18.3.12",
|
|
82
|
+
"@types/react-dom": "^18.3.1",
|
|
83
|
+
"@types/signals": "^1.0.4",
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
85
|
+
"@typescript-eslint/parser": "^8.20.0",
|
|
86
|
+
"autoprefixer": "^10.4.20",
|
|
87
|
+
"eslint": "^8.57.0",
|
|
88
|
+
"eslint-config-prettier": "^10.0.1",
|
|
89
|
+
"eslint-plugin-prettier": "^5.2.2",
|
|
90
|
+
"prettier": "^3.4.2",
|
|
91
|
+
"react-scripts": "5.0.1",
|
|
92
|
+
"rollup": "^4.26.0",
|
|
93
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
94
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
95
|
+
"rollup-plugin-replace": "^2.2.0",
|
|
96
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
97
|
+
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
98
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
99
|
+
"tailwind-merge": "^2.6.0",
|
|
100
|
+
"tailwindcss": "^3.4.15",
|
|
101
|
+
"tailwindcss-animate": "^1.0.7",
|
|
102
|
+
"typescript": "^5.6.3"
|
|
103
|
+
},
|
|
104
|
+
"engines": {
|
|
105
|
+
"node": ">=18.18.0"
|
|
106
|
+
}
|
|
107
|
+
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
17
|
+
const indexConfig = {
|
|
18
|
+
context: 'this',
|
|
19
|
+
plugins: [
|
|
20
|
+
resolve({ extensions, browser: true }),
|
|
21
|
+
commonjs(),
|
|
22
|
+
uglify(),
|
|
23
|
+
json(),
|
|
24
|
+
babel({
|
|
25
|
+
babelHelpers: 'bundled',
|
|
26
|
+
exclude: 'node_modules/**',
|
|
27
|
+
extensions,
|
|
28
|
+
}),
|
|
29
|
+
copy({
|
|
30
|
+
targets: [
|
|
31
|
+
{
|
|
32
|
+
src: [
|
|
33
|
+
'src/assets/fonts/icomoon.woff',
|
|
34
|
+
'src/assets/fonts/icomoon.ttf',
|
|
35
|
+
'src/assets/fonts/icomoon.svg',
|
|
36
|
+
'src/assets/fonts/icomoon.eot',
|
|
37
|
+
],
|
|
38
|
+
dest: 'fonts',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
replace({
|
|
43
|
+
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
44
|
+
}),
|
|
45
|
+
postcss({
|
|
46
|
+
plugins: [autoprefixer(), tailwindcss()],
|
|
47
|
+
extract: false,
|
|
48
|
+
modules: false,
|
|
49
|
+
autoModules: false,
|
|
50
|
+
minimize: true,
|
|
51
|
+
inject: false,
|
|
52
|
+
}),
|
|
53
|
+
typescript(),
|
|
54
|
+
typescriptPaths({ preserveExtensions: true }),
|
|
55
|
+
terser({ output: { comments: false } }),
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const configs = [
|
|
60
|
+
{
|
|
61
|
+
input: './src/web.ts',
|
|
62
|
+
output: {
|
|
63
|
+
file: 'dist/web.js',
|
|
64
|
+
format: 'esm',
|
|
65
|
+
inlineDynamicImports: true,
|
|
66
|
+
},
|
|
67
|
+
...indexConfig,
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
export default configs;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
|
+
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
3
|
+
const plugin = require('tailwindcss/plugin')
|
|
4
|
+
|
|
5
|
+
function rem2px(input, fontSize = 16) {
|
|
6
|
+
if (input == null) {
|
|
7
|
+
return input;
|
|
8
|
+
}
|
|
9
|
+
switch (typeof input) {
|
|
10
|
+
case 'object':
|
|
11
|
+
if (Array.isArray(input)) {
|
|
12
|
+
return input.map((val) => rem2px(val, fontSize));
|
|
13
|
+
}
|
|
14
|
+
// eslint-disable-next-line no-case-declarations
|
|
15
|
+
const ret = {};
|
|
16
|
+
for (const key in input) {
|
|
17
|
+
ret[key] = rem2px(input[key], fontSize);
|
|
18
|
+
}
|
|
19
|
+
return ret;
|
|
20
|
+
case 'string':
|
|
21
|
+
return input.replace(
|
|
22
|
+
/(\d*\.?\d+)rem$/,
|
|
23
|
+
(_, val) => `${parseFloat(val) * fontSize}px`
|
|
24
|
+
);
|
|
25
|
+
case 'function':
|
|
26
|
+
return eval(
|
|
27
|
+
input
|
|
28
|
+
.toString()
|
|
29
|
+
.replace(
|
|
30
|
+
/(\d*\.?\d+)rem/g,
|
|
31
|
+
(_, val) => `${parseFloat(val) * fontSize}px`
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
default:
|
|
35
|
+
return input;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** @type {import('tailwindcss').Config} */
|
|
40
|
+
module.exports = {
|
|
41
|
+
darkMode: ['class'],
|
|
42
|
+
content: ['./src/**/*.{js,jsx,ts,tsx}'],
|
|
43
|
+
theme: {
|
|
44
|
+
...rem2px(defaultTheme),
|
|
45
|
+
fontFamily: {
|
|
46
|
+
sans: ['Be Vietnam Pro', 'sans-serif'],
|
|
47
|
+
mono: ['Be Vietnam Pro', 'sans-serif'],
|
|
48
|
+
},
|
|
49
|
+
extend: {
|
|
50
|
+
keyframes: {
|
|
51
|
+
'fade-in': {
|
|
52
|
+
'0%': {
|
|
53
|
+
opacity: '0',
|
|
54
|
+
},
|
|
55
|
+
'100%': {
|
|
56
|
+
opacity: '1',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
'poi-item-info-bg-animation': {
|
|
60
|
+
'0%': {
|
|
61
|
+
'background-color': 'rgba(0, 0, 0, 0)',
|
|
62
|
+
},
|
|
63
|
+
'100%': {
|
|
64
|
+
'background-color': 'rgba(0, 0, 0, 0.48)',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
'poi-item-info-animation': {
|
|
68
|
+
'0%': {
|
|
69
|
+
width: '0',
|
|
70
|
+
},
|
|
71
|
+
'100%': {
|
|
72
|
+
width: '100%',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
/*animation: {
|
|
77
|
+
'fade-in': 'fade-in 0.3s ease-out',
|
|
78
|
+
},
|
|
79
|
+
borderRadius: {
|
|
80
|
+
lg: 'var(--radius)',
|
|
81
|
+
md: 'calc(var(--radius) - 2px)',
|
|
82
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
83
|
+
},*/
|
|
84
|
+
colors: {
|
|
85
|
+
background: 'hsl(var(--background))',
|
|
86
|
+
foreground: 'hsl(var(--foreground))',
|
|
87
|
+
card: {
|
|
88
|
+
DEFAULT: 'hsl(var(--card))',
|
|
89
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
90
|
+
},
|
|
91
|
+
popover: {
|
|
92
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
93
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
94
|
+
},
|
|
95
|
+
primary: {
|
|
96
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
97
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
98
|
+
},
|
|
99
|
+
secondary: {
|
|
100
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
101
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
102
|
+
},
|
|
103
|
+
muted: {
|
|
104
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
105
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
106
|
+
},
|
|
107
|
+
accent: {
|
|
108
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
109
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
110
|
+
},
|
|
111
|
+
destructive: {
|
|
112
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
113
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
114
|
+
},
|
|
115
|
+
border: 'hsl(var(--border))',
|
|
116
|
+
input: 'hsl(var(--input))',
|
|
117
|
+
ring: 'hsl(var(--ring))',
|
|
118
|
+
chart: {
|
|
119
|
+
1: 'hsl(var(--chart-1))',
|
|
120
|
+
2: 'hsl(var(--chart-2))',
|
|
121
|
+
3: 'hsl(var(--chart-3))',
|
|
122
|
+
4: 'hsl(var(--chart-4))',
|
|
123
|
+
5: 'hsl(var(--chart-5))',
|
|
124
|
+
},
|
|
125
|
+
sidebar: {
|
|
126
|
+
DEFAULT: 'hsl(var(--sidebar-background))',
|
|
127
|
+
foreground: 'hsl(var(--sidebar-foreground))',
|
|
128
|
+
primary: 'hsl(var(--sidebar-primary))',
|
|
129
|
+
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
|
130
|
+
accent: 'hsl(var(--sidebar-accent))',
|
|
131
|
+
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
|
132
|
+
border: 'hsl(var(--sidebar-border))',
|
|
133
|
+
ring: 'hsl(var(--sidebar-ring))',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
plugins: [
|
|
139
|
+
require('tailwindcss-animate'),
|
|
140
|
+
require('@tailwindcss/typography'),
|
|
141
|
+
plugin(function ({ addVariant }) {
|
|
142
|
+
addVariant('wrapped', ({ container }) => {
|
|
143
|
+
container.walkRules(rule => {
|
|
144
|
+
rule.selector = `.clik-chatbot-wrapper ${rule.selector}`
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
}),
|
|
148
|
+
],
|
|
149
|
+
};
|