@clikvn/showroom-visualizer 0.3.0-dev-12 → 0.3.0-dev-14

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clikvn/showroom-visualizer",
3
3
  "description": "Showroom Visualizer",
4
- "version": "0.3.0-dev-12",
4
+ "version": "0.3.0-dev-14",
5
5
  "author": "Clik JSC",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -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"}
@@ -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"}