@clikvn/showroom-visualizer 0.2.6 → 0.3.0-dev-01
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/.claude/settings.local.json +19 -0
- package/README.md +31 -31
- package/base.json +21 -21
- package/dist/components/SkinLayer/DefaultLayout/index.d.ts +8 -0
- package/dist/components/SkinLayer/DefaultLayout/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/PoiDetailSlideIn/Detail.d.ts.map +1 -1
- package/dist/context/CustomLayoutContext.d.ts +20 -0
- package/dist/context/CustomLayoutContext.d.ts.map +1 -0
- package/dist/context/SwizzleContext.d.ts +21 -0
- package/dist/context/SwizzleContext.d.ts.map +1 -0
- package/dist/fonts/icomoon.svg +633 -633
- package/dist/hooks/headless/index.d.ts +150 -0
- package/dist/hooks/headless/index.d.ts.map +1 -0
- package/dist/hooks/headless/useFloorplanControl.d.ts +18 -0
- package/dist/hooks/headless/useFloorplanControl.d.ts.map +1 -0
- package/dist/hooks/headless/usePOIInteraction.d.ts +23 -0
- package/dist/hooks/headless/usePOIInteraction.d.ts.map +1 -0
- package/dist/hooks/headless/useScenarioControl.d.ts +22 -0
- package/dist/hooks/headless/useScenarioControl.d.ts.map +1 -0
- package/dist/hooks/headless/useSceneNavigation.d.ts +26 -0
- package/dist/hooks/headless/useSceneNavigation.d.ts.map +1 -0
- package/dist/hooks/headless/useTourCore.d.ts +23 -0
- package/dist/hooks/headless/useTourCore.d.ts.map +1 -0
- package/dist/hooks/headless/useViewportControl.d.ts +22 -0
- package/dist/hooks/headless/useViewportControl.d.ts.map +1 -0
- package/dist/index.html +87 -9
- package/dist/index.js +1 -0
- package/dist/types/SkinLayer/listeners.type.d.ts +1 -0
- package/dist/types/SkinLayer/listeners.type.d.ts.map +1 -1
- package/dist/types/custom-layout.d.ts +63 -0
- package/dist/types/custom-layout.d.ts.map +1 -0
- package/dist/types/swizzle.d.ts +59 -0
- package/dist/types/swizzle.d.ts.map +1 -0
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/package.json +124 -124
- package/rollup.config.js +97 -97
- package/tailwind.config.cjs +151 -151
- package/dist/components/SkinLayer/Drawer/PoiHeader/index.d.ts +0 -16
- package/dist/components/SkinLayer/Drawer/PoiHeader/index.d.ts.map +0 -1
- package/dist/components/SkinLayer/Drawer/index.d.ts +0 -29
- package/dist/components/SkinLayer/Drawer/index.d.ts.map +0 -1
- package/dist/components/SkinLayer/PlayAll/index.d.ts +0 -8
- package/dist/components/SkinLayer/PlayAll/index.d.ts.map +0 -1
- package/dist/features/VirtualTourVisualizer/index.d.ts +0 -20
- package/dist/features/VirtualTourVisualizer/index.d.ts.map +0 -1
- package/dist/features/VirtualTourVisualizerUI/index.d.ts +0 -17
- package/dist/features/VirtualTourVisualizerUI/index.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
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}
|
package/README.md
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<!-- markdownlint-disable MD030 -->
|
|
2
|
-
|
|
3
|
-
# showroom-visualizer
|
|
4
|
-
|
|
5
|
-
Javascript library to display Clik Showroom Visualizer with UI on your website
|
|
6
|
-
|
|
7
|
-
```html
|
|
8
|
-
<!-- public/index.html -->
|
|
9
|
-
<script type="module">
|
|
10
|
-
import ShowroomVisualizer from 'http://localhost:3000/web.js';
|
|
11
|
-
ShowroomVisualizer.initVisualizer({
|
|
12
|
-
apiHost: 'https://ci-api.clik.vn/vt360',
|
|
13
|
-
config: {
|
|
14
|
-
tourCode: 'TOUR_FXYCEN7ZZVW6',
|
|
15
|
-
language: 'EN'
|
|
16
|
-
},
|
|
17
|
-
onLoaded: tool => {
|
|
18
|
-
window.tool = tool;
|
|
19
|
-
},
|
|
20
|
-
mobile: false
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
<div style="width: 100vw; height: 100vh">
|
|
24
|
-
<showroom-visualizer></showroom-visualizer>
|
|
25
|
-
</div>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
add <Scripts /> in ShowroomVisualizer load js ÂR
|
|
1
|
+
<!-- markdownlint-disable MD030 -->
|
|
2
|
+
|
|
3
|
+
# showroom-visualizer
|
|
4
|
+
|
|
5
|
+
Javascript library to display Clik Showroom Visualizer with UI on your website
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- public/index.html -->
|
|
9
|
+
<script type="module">
|
|
10
|
+
import ShowroomVisualizer from 'http://localhost:3000/web.js';
|
|
11
|
+
ShowroomVisualizer.initVisualizer({
|
|
12
|
+
apiHost: 'https://ci-api.clik.vn/vt360',
|
|
13
|
+
config: {
|
|
14
|
+
tourCode: 'TOUR_FXYCEN7ZZVW6',
|
|
15
|
+
language: 'EN'
|
|
16
|
+
},
|
|
17
|
+
onLoaded: tool => {
|
|
18
|
+
window.tool = tool;
|
|
19
|
+
},
|
|
20
|
+
mobile: false
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
<div style="width: 100vw; height: 100vh">
|
|
24
|
+
<showroom-visualizer></showroom-visualizer>
|
|
25
|
+
</div>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
add <Scripts /> in ShowroomVisualizer load js ÂR
|
|
32
32
|
serve dist --cors
|
package/base.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"display": "Default",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"composite": false,
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"inlineSources": false,
|
|
11
|
-
"isolatedModules": true,
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"noUnusedLocals": false,
|
|
14
|
-
"noUnusedParameters": false,
|
|
15
|
-
"preserveWatchOutput": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"strict": true,
|
|
18
|
-
"downlevelIteration": true
|
|
19
|
-
},
|
|
20
|
-
"exclude": ["node_modules"]
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Default",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"composite": false,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"inlineSources": false,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"noUnusedLocals": false,
|
|
14
|
+
"noUnusedParameters": false,
|
|
15
|
+
"preserveWatchOutput": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strict": true,
|
|
18
|
+
"downlevelIteration": true
|
|
19
|
+
},
|
|
20
|
+
"exclude": ["node_modules"]
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SkinLayer/DefaultLayout/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,EAAE,EAAuB,MAAM,OAAO,CAAC;AAc/D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAkC9D,KAAK,KAAK,GAAG;IACX,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,KAAK,CA4UrB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWithTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/SkinLayer/PinActionButtons/ButtonWithTooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ButtonWithTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/SkinLayer/PinActionButtons/ButtonWithTooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAiD,MAAM,OAAO,CAAC;AAK1E,KAAK,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5D,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAmLhD,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Detail.d.ts","sourceRoot":"","sources":["../../../../src/components/SkinLayer/PoiDetailSlideIn/Detail.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAMnC,QAAA,MAAM,aAAa,GAAI,+CAKpB;IACD,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAChE,
|
|
1
|
+
{"version":3,"file":"Detail.d.ts","sourceRoot":"","sources":["../../../../src/components/SkinLayer/PoiDetailSlideIn/Detail.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAMnC,QAAA,MAAM,aAAa,GAAI,+CAKpB;IACD,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAChE,4CAiOA,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import { CustomLayoutConfig } from '../types/custom-layout';
|
|
3
|
+
type CustomLayoutContextType = {
|
|
4
|
+
customLayout: CustomLayoutConfig;
|
|
5
|
+
getCustomComponent: <T = unknown>(path: string[], defaultComponent: ComponentType<T>) => ComponentType<T>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Hook để access custom layout configuration
|
|
9
|
+
*/
|
|
10
|
+
export declare const useCustomLayout: () => CustomLayoutContextType;
|
|
11
|
+
type Props = {
|
|
12
|
+
customLayout?: CustomLayoutConfig;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* CustomLayoutProvider - Wrap app với provider này để enable component overrides
|
|
17
|
+
*/
|
|
18
|
+
export declare const CustomLayoutProvider: React.FC<Props>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=CustomLayoutContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomLayoutContext.d.ts","sourceRoot":"","sources":["../../src/context/CustomLayoutContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,SAAS,EAKV,MAAM,OAAO,CAAC;AACf,OAAO,EACL,kBAAkB,EAEnB,MAAM,wBAAwB,CAAC;AAEhC,KAAK,uBAAuB,GAAG;IAC7B,YAAY,EAAE,kBAAkB,CAAC;IACjC,kBAAkB,EAAE,CAAC,CAAC,GAAG,OAAO,EAC9B,IAAI,EAAE,MAAM,EAAE,EACd,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,KAC/B,aAAa,CAAC,CAAC,CAAC,CAAC;CACvB,CAAC;AAOF;;GAEG;AACH,eAAO,MAAM,eAAe,+BAAwC,CAAC;AAErE,KAAK,KAAK,GAAG;IACX,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6ChD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|