@wovvmap/ui-headless 0.0.0-stage → 1.2.0
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/README.md +24 -2
- package/dist/HeaderInfoController.d.ts +44 -0
- package/dist/HeaderInfoController.d.ts.map +1 -0
- package/dist/HeaderInfoController.js +112 -0
- package/dist/appearance.d.ts +26 -0
- package/dist/appearance.d.ts.map +1 -0
- package/dist/appearance.js +117 -0
- package/dist/classic/ClassicController.d.ts +124 -0
- package/dist/classic/ClassicController.d.ts.map +1 -0
- package/dist/classic/ClassicController.js +1131 -0
- package/dist/classic/classic.types.d.ts +111 -0
- package/dist/classic/classic.types.d.ts.map +1 -0
- package/dist/classic/classic.types.js +1 -0
- package/dist/classic/index.d.ts +3 -0
- package/dist/classic/index.d.ts.map +1 -0
- package/dist/classic/index.js +2 -0
- package/dist/components.d.ts +253 -0
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +30 -0
- package/dist/directions/DirectionController.d.ts +76 -0
- package/dist/directions/DirectionController.d.ts.map +1 -0
- package/dist/directions/DirectionController.js +467 -0
- package/dist/directions/direction.types.d.ts +81 -0
- package/dist/directions/direction.types.d.ts.map +1 -0
- package/dist/directions/direction.types.js +1 -0
- package/dist/directions/directionPresentation.d.ts +17 -0
- package/dist/directions/directionPresentation.d.ts.map +1 -0
- package/dist/directions/directionPresentation.js +34 -0
- package/dist/flow/DiscoveryFlowController.d.ts +36 -0
- package/dist/flow/DiscoveryFlowController.d.ts.map +1 -0
- package/dist/flow/DiscoveryFlowController.js +162 -0
- package/dist/flow/FlowHistoryController.d.ts +14 -0
- package/dist/flow/FlowHistoryController.d.ts.map +1 -0
- package/dist/flow/FlowHistoryController.js +31 -0
- package/dist/flow/index.d.ts +3 -0
- package/dist/flow/index.d.ts.map +1 -0
- package/dist/flow/index.js +2 -0
- package/dist/gallery/PromotionGalleryController.d.ts +32 -0
- package/dist/gallery/PromotionGalleryController.d.ts.map +1 -0
- package/dist/gallery/PromotionGalleryController.js +80 -0
- package/dist/gallery/index.d.ts +2 -0
- package/dist/gallery/index.d.ts.map +1 -0
- package/dist/gallery/index.js +1 -0
- package/dist/headerInfo.d.ts +27 -0
- package/dist/headerInfo.d.ts.map +1 -0
- package/dist/headerInfo.js +70 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/presentation.d.ts +49 -0
- package/dist/presentation.d.ts.map +1 -0
- package/dist/presentation.js +116 -0
- package/dist/routes/RoutePreviewController.d.ts +61 -0
- package/dist/routes/RoutePreviewController.d.ts.map +1 -0
- package/dist/routes/RoutePreviewController.js +321 -0
- package/dist/routes/playback/RoutePlaybackController.d.ts +26 -0
- package/dist/routes/playback/RoutePlaybackController.d.ts.map +1 -0
- package/dist/routes/playback/RoutePlaybackController.js +115 -0
- package/dist/routes/routePlayback.types.d.ts +38 -0
- package/dist/routes/routePlayback.types.d.ts.map +1 -0
- package/dist/routes/routePlayback.types.js +1 -0
- package/dist/routes/routePreview.types.d.ts +71 -0
- package/dist/routes/routePreview.types.d.ts.map +1 -0
- package/dist/routes/routePreview.types.js +1 -0
- package/dist/routes/routePreviewPresentation.d.ts +8 -0
- package/dist/routes/routePreviewPresentation.d.ts.map +1 -0
- package/dist/routes/routePreviewPresentation.js +26 -0
- package/dist/routes/routeStepIcons.d.ts +15 -0
- package/dist/routes/routeStepIcons.d.ts.map +1 -0
- package/dist/routes/routeStepIcons.js +102 -0
- package/dist/routes/routeStepPresentation.d.ts +5 -0
- package/dist/routes/routeStepPresentation.d.ts.map +1 -0
- package/dist/routes/routeStepPresentation.js +15 -0
- package/dist/routes/routeSteps.types.d.ts +51 -0
- package/dist/routes/routeSteps.types.d.ts.map +1 -0
- package/dist/routes/routeSteps.types.js +1 -0
- package/dist/routes/steps/RouteStepsController.d.ts +49 -0
- package/dist/routes/steps/RouteStepsController.d.ts.map +1 -0
- package/dist/routes/steps/RouteStepsController.js +312 -0
- package/dist/saved-routes/SavedRoutesController.d.ts +76 -0
- package/dist/saved-routes/SavedRoutesController.d.ts.map +1 -0
- package/dist/saved-routes/SavedRoutesController.js +366 -0
- package/dist/storeHours.d.ts +19 -0
- package/dist/storeHours.d.ts.map +1 -0
- package/dist/storeHours.js +155 -0
- package/dist/storeList.d.ts +19 -0
- package/dist/storeList.d.ts.map +1 -0
- package/dist/storeList.js +21 -0
- package/dist/theme.d.ts +42 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +56 -0
- package/package.json +32 -3
package/dist/theme.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const lightUITheme = Object.freeze({
|
|
2
|
+
primary: '#5146e5',
|
|
3
|
+
surface: '#ffffff',
|
|
4
|
+
surfaceMuted: '#f6f7fb',
|
|
5
|
+
text: '#18243d',
|
|
6
|
+
textMuted: '#64748b',
|
|
7
|
+
border: '#e1e6ef',
|
|
8
|
+
selected: '#eef0ff',
|
|
9
|
+
selectedText: '#4338ca',
|
|
10
|
+
error: '#b91c1c',
|
|
11
|
+
success: '#008a19',
|
|
12
|
+
colorScheme: 'light',
|
|
13
|
+
radius: 24,
|
|
14
|
+
spacing: 20,
|
|
15
|
+
fontFamily: 'system-ui, sans-serif',
|
|
16
|
+
});
|
|
17
|
+
export const darkUITheme = Object.freeze({
|
|
18
|
+
...lightUITheme,
|
|
19
|
+
surface: '#182235',
|
|
20
|
+
surfaceMuted: '#222f46',
|
|
21
|
+
text: '#f1f5f9',
|
|
22
|
+
textMuted: '#b8c4d8',
|
|
23
|
+
border: '#41516b',
|
|
24
|
+
selected: '#35316d',
|
|
25
|
+
selectedText: '#e0deff',
|
|
26
|
+
primary: '#a5a0ff',
|
|
27
|
+
error: '#fca5a5',
|
|
28
|
+
success: '#86efac',
|
|
29
|
+
colorScheme: 'dark',
|
|
30
|
+
});
|
|
31
|
+
/** Explicit token resolution without a mutable global provider.
|
|
32
|
+
* Hinglish: Har component apna theme le sakta hai; doosre viewer ka color nahi badlega. */
|
|
33
|
+
export function resolveUITheme(theme) {
|
|
34
|
+
if (!theme || theme === 'light')
|
|
35
|
+
return lightUITheme;
|
|
36
|
+
if (theme === 'dark')
|
|
37
|
+
return darkUITheme;
|
|
38
|
+
return { ...lightUITheme, ...theme };
|
|
39
|
+
}
|
|
40
|
+
/** Inactive controls placed on chrome inherit its contrast without changing normal cards.
|
|
41
|
+
* Hinglish: Header/footer tabs ka contrast alag mile; card/floor ki white surface same rahe. */
|
|
42
|
+
export function getChromeControlTheme(input) {
|
|
43
|
+
const theme = resolveUITheme(input);
|
|
44
|
+
if (!theme.chrome)
|
|
45
|
+
return theme;
|
|
46
|
+
return {
|
|
47
|
+
...theme,
|
|
48
|
+
onPrimary: theme.onPrimary ?? theme.surface,
|
|
49
|
+
surface: theme.chrome.inactiveBackground,
|
|
50
|
+
surfaceMuted: theme.chrome.inactiveBackground,
|
|
51
|
+
border: theme.chrome.inactiveBackground,
|
|
52
|
+
text: theme.chrome.text,
|
|
53
|
+
textMuted: theme.chrome.text,
|
|
54
|
+
hover: theme.chrome.inactiveBackground,
|
|
55
|
+
};
|
|
56
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wovvmap/ui-headless",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Framework-neutral UI view models and actions for WovVMap.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@wovvmap/contracts": "1.2.0",
|
|
27
|
+
"@wovvmap/runtime-core": "1.2.0"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc -p tsconfig.build.json",
|
|
31
|
+
"lint": "eslint src",
|
|
32
|
+
"test": "vitest run --passWithNoTests",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit"
|
|
34
|
+
}
|
|
6
35
|
}
|