@gxp-dev/tools 2.0.63 → 2.0.64
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 +32 -31
- package/bin/gx-devtools.js +74 -54
- package/bin/lib/cli.js +23 -21
- package/bin/lib/commands/add-dependency.js +366 -325
- package/bin/lib/commands/assets.js +137 -139
- package/bin/lib/commands/build.js +169 -174
- package/bin/lib/commands/datastore.js +181 -183
- package/bin/lib/commands/dev.js +127 -131
- package/bin/lib/commands/extensions.js +147 -149
- package/bin/lib/commands/extract-config.js +73 -67
- package/bin/lib/commands/index.js +12 -12
- package/bin/lib/commands/init.js +342 -240
- package/bin/lib/commands/publish.js +69 -75
- package/bin/lib/commands/socket.js +69 -69
- package/bin/lib/commands/ssl.js +14 -14
- package/bin/lib/constants.js +10 -24
- package/bin/lib/tui/App.tsx +761 -705
- package/bin/lib/tui/components/AIPanel.tsx +191 -171
- package/bin/lib/tui/components/CommandInput.tsx +394 -343
- package/bin/lib/tui/components/GeminiPanel.tsx +175 -151
- package/bin/lib/tui/components/Header.tsx +23 -21
- package/bin/lib/tui/components/LogPanel.tsx +244 -220
- package/bin/lib/tui/components/TabBar.tsx +50 -48
- package/bin/lib/tui/components/WelcomeScreen.tsx +126 -71
- package/bin/lib/tui/index.tsx +37 -39
- package/bin/lib/tui/services/AIService.ts +518 -462
- package/bin/lib/tui/services/ExtensionService.ts +140 -129
- package/bin/lib/tui/services/GeminiService.ts +367 -337
- package/bin/lib/tui/services/ServiceManager.ts +344 -322
- package/bin/lib/tui/services/SocketService.ts +168 -168
- package/bin/lib/tui/services/ViteService.ts +88 -88
- package/bin/lib/tui/services/index.ts +47 -22
- package/bin/lib/utils/ai-scaffold.js +291 -280
- package/bin/lib/utils/extract-config.js +157 -140
- package/bin/lib/utils/files.js +82 -86
- package/bin/lib/utils/index.js +7 -7
- package/bin/lib/utils/paths.js +34 -34
- package/bin/lib/utils/prompts.js +194 -169
- package/bin/lib/utils/ssl.js +79 -81
- package/browser-extensions/README.md +0 -1
- package/browser-extensions/chrome/background.js +244 -237
- package/browser-extensions/chrome/content.js +32 -29
- package/browser-extensions/chrome/devtools.html +7 -7
- package/browser-extensions/chrome/devtools.js +19 -19
- package/browser-extensions/chrome/inspector.js +802 -767
- package/browser-extensions/chrome/manifest.json +71 -63
- package/browser-extensions/chrome/panel.html +674 -636
- package/browser-extensions/chrome/panel.js +722 -712
- package/browser-extensions/chrome/popup.html +586 -543
- package/browser-extensions/chrome/popup.js +282 -244
- package/browser-extensions/chrome/rules.json +1 -1
- package/browser-extensions/chrome/test-chrome.html +216 -136
- package/browser-extensions/chrome/test-mixed-content.html +284 -189
- package/browser-extensions/chrome/test-uri-pattern.html +221 -198
- package/browser-extensions/firefox/README.md +9 -6
- package/browser-extensions/firefox/background.js +221 -218
- package/browser-extensions/firefox/content.js +55 -52
- package/browser-extensions/firefox/debug-errors.html +386 -228
- package/browser-extensions/firefox/debug-https.html +153 -105
- package/browser-extensions/firefox/devtools.html +7 -7
- package/browser-extensions/firefox/devtools.js +23 -20
- package/browser-extensions/firefox/inspector.js +802 -767
- package/browser-extensions/firefox/manifest.json +68 -68
- package/browser-extensions/firefox/panel.html +674 -636
- package/browser-extensions/firefox/panel.js +722 -712
- package/browser-extensions/firefox/popup.html +572 -535
- package/browser-extensions/firefox/popup.js +281 -236
- package/browser-extensions/firefox/test-gramercy.html +170 -125
- package/browser-extensions/firefox/test-imports.html +59 -55
- package/browser-extensions/firefox/test-masking.html +231 -140
- package/browser-extensions/firefox/test-uri-pattern.html +221 -198
- package/dist/tui/App.d.ts +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +154 -150
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/components/AIPanel.d.ts.map +1 -1
- package/dist/tui/components/AIPanel.js +42 -35
- package/dist/tui/components/AIPanel.js.map +1 -1
- package/dist/tui/components/CommandInput.d.ts +1 -1
- package/dist/tui/components/CommandInput.d.ts.map +1 -1
- package/dist/tui/components/CommandInput.js +92 -62
- package/dist/tui/components/CommandInput.js.map +1 -1
- package/dist/tui/components/GeminiPanel.d.ts.map +1 -1
- package/dist/tui/components/GeminiPanel.js +37 -30
- package/dist/tui/components/GeminiPanel.js.map +1 -1
- package/dist/tui/components/Header.d.ts.map +1 -1
- package/dist/tui/components/Header.js +1 -1
- package/dist/tui/components/Header.js.map +1 -1
- package/dist/tui/components/LogPanel.d.ts +1 -1
- package/dist/tui/components/LogPanel.d.ts.map +1 -1
- package/dist/tui/components/LogPanel.js +26 -24
- package/dist/tui/components/LogPanel.js.map +1 -1
- package/dist/tui/components/TabBar.d.ts +2 -2
- package/dist/tui/components/TabBar.d.ts.map +1 -1
- package/dist/tui/components/TabBar.js +11 -11
- package/dist/tui/components/TabBar.js.map +1 -1
- package/dist/tui/components/WelcomeScreen.d.ts.map +1 -1
- package/dist/tui/components/WelcomeScreen.js +6 -6
- package/dist/tui/components/WelcomeScreen.js.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +8 -8
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/services/AIService.d.ts +2 -2
- package/dist/tui/services/AIService.d.ts.map +1 -1
- package/dist/tui/services/AIService.js +165 -125
- package/dist/tui/services/AIService.js.map +1 -1
- package/dist/tui/services/ExtensionService.d.ts +1 -1
- package/dist/tui/services/ExtensionService.d.ts.map +1 -1
- package/dist/tui/services/ExtensionService.js +33 -26
- package/dist/tui/services/ExtensionService.js.map +1 -1
- package/dist/tui/services/GeminiService.d.ts +1 -1
- package/dist/tui/services/GeminiService.d.ts.map +1 -1
- package/dist/tui/services/GeminiService.js +87 -76
- package/dist/tui/services/GeminiService.js.map +1 -1
- package/dist/tui/services/ServiceManager.d.ts +3 -3
- package/dist/tui/services/ServiceManager.d.ts.map +1 -1
- package/dist/tui/services/ServiceManager.js +72 -58
- package/dist/tui/services/ServiceManager.js.map +1 -1
- package/dist/tui/services/SocketService.d.ts.map +1 -1
- package/dist/tui/services/SocketService.js +32 -32
- package/dist/tui/services/SocketService.js.map +1 -1
- package/dist/tui/services/ViteService.d.ts.map +1 -1
- package/dist/tui/services/ViteService.js +26 -28
- package/dist/tui/services/ViteService.js.map +1 -1
- package/dist/tui/services/index.d.ts +6 -6
- package/dist/tui/services/index.d.ts.map +1 -1
- package/dist/tui/services/index.js +6 -6
- package/dist/tui/services/index.js.map +1 -1
- package/mcp/gxp-api-server.js +83 -81
- package/package.json +109 -93
- package/runtime/PortalContainer.vue +258 -234
- package/runtime/dev-tools/DevToolsModal.vue +153 -155
- package/runtime/dev-tools/LayoutSwitcher.vue +144 -140
- package/runtime/dev-tools/MockDataEditor.vue +456 -433
- package/runtime/dev-tools/SocketSimulator.vue +379 -371
- package/runtime/dev-tools/StoreInspector.vue +517 -455
- package/runtime/dev-tools/index.js +5 -5
- package/runtime/fallback-layouts/PrivateLayout.vue +2 -2
- package/runtime/fallback-layouts/PublicLayout.vue +2 -2
- package/runtime/fallback-layouts/SystemLayout.vue +2 -2
- package/runtime/gxpStringsPlugin.js +159 -134
- package/runtime/index.html +17 -19
- package/runtime/main.js +24 -22
- package/runtime/mock-api/auth-middleware.js +15 -15
- package/runtime/mock-api/image-generator.js +46 -46
- package/runtime/mock-api/index.js +55 -55
- package/runtime/mock-api/response-generator.js +116 -105
- package/runtime/mock-api/route-generator.js +107 -84
- package/runtime/mock-api/socket-triggers.js +94 -93
- package/runtime/mock-api/spec-loader.js +79 -80
- package/runtime/package.json +3 -0
- package/runtime/server.js +68 -68
- package/runtime/stores/gxpPortalConfigStore.js +204 -186
- package/runtime/stores/index.js +2 -2
- package/runtime/vite-inspector-plugin.js +858 -707
- package/runtime/vite-source-tracker-plugin.js +132 -113
- package/runtime/vite.config.js +191 -139
- package/scripts/launch-chrome.js +41 -41
- package/scripts/pack-chrome.js +38 -39
- package/socket-events/AiSessionMessageCreated.json +17 -17
- package/socket-events/SocialStreamPostCreated.json +23 -23
- package/socket-events/SocialStreamPostVariantCompleted.json +22 -22
- package/template/.claude/agents/gxp-developer.md +100 -99
- package/template/.claude/settings.json +7 -7
- package/template/AGENTS.md +30 -23
- package/template/GEMINI.md +20 -20
- package/template/README.md +70 -53
- package/template/app-manifest.json +2 -4
- package/template/configuration.json +10 -10
- package/template/default-styling.css +1 -1
- package/template/index.html +18 -20
- package/template/main.js +24 -22
- package/template/src/DemoPage.vue +415 -362
- package/template/src/Plugin.vue +76 -85
- package/template/src/stores/index.js +3 -3
- package/template/src/stores/test-data.json +164 -172
- package/template/theme-layouts/AdditionalStyling.css +50 -50
- package/template/theme-layouts/PrivateLayout.vue +8 -12
- package/template/theme-layouts/PublicLayout.vue +8 -12
- package/template/theme-layouts/SystemLayout.vue +8 -12
- package/template/vite.extend.js +45 -0
- package/template/vite.config.js +0 -409
|
@@ -1,326 +1,350 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
2
|
+
<div id="app">
|
|
3
|
+
<!-- Dev Tools Modal -->
|
|
4
|
+
<DevToolsModal
|
|
5
|
+
v-if="showDevTools"
|
|
6
|
+
:store="gxpStore"
|
|
7
|
+
:current-layout="currentLayoutName"
|
|
8
|
+
@close="showDevTools = false"
|
|
9
|
+
@change-layout="changeLayout"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<!-- Main Application -->
|
|
13
|
+
<component
|
|
14
|
+
:is="currentLayout"
|
|
15
|
+
:usr-lang="userLanguage"
|
|
16
|
+
:portal-settings="themeSettings"
|
|
17
|
+
:portal-language="portalStringsList"
|
|
18
|
+
:portal-navigation="portalNavigationList"
|
|
19
|
+
:portal-assets="portalAssetList"
|
|
20
|
+
>
|
|
21
|
+
<!-- Your Custom Plugin Content -->
|
|
22
|
+
<Plugin :router="mockRouter" />
|
|
23
|
+
</component>
|
|
24
|
+
|
|
25
|
+
<!-- Dev Tools Toggle Button (visible in corner) -->
|
|
26
|
+
<button
|
|
27
|
+
class="gx-devtools-trigger"
|
|
28
|
+
@click="showDevTools = true"
|
|
29
|
+
title="Open Dev Tools (Ctrl+Shift+D)"
|
|
30
|
+
>
|
|
31
|
+
<svg
|
|
32
|
+
width="20"
|
|
33
|
+
height="20"
|
|
34
|
+
viewBox="0 0 24 24"
|
|
35
|
+
fill="none"
|
|
36
|
+
stroke="currentColor"
|
|
37
|
+
stroke-width="2"
|
|
38
|
+
>
|
|
39
|
+
<circle cx="12" cy="12" r="3" />
|
|
40
|
+
<path
|
|
41
|
+
d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"
|
|
42
|
+
/>
|
|
43
|
+
</svg>
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
39
46
|
</template>
|
|
40
47
|
|
|
41
48
|
<style scoped>
|
|
42
49
|
#app {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
51
|
+
-webkit-font-smoothing: antialiased;
|
|
52
|
+
-moz-osx-font-smoothing: grayscale;
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
.gx-devtools-trigger {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
position: fixed;
|
|
57
|
+
bottom: 20px;
|
|
58
|
+
right: 20px;
|
|
59
|
+
width: 44px;
|
|
60
|
+
height: 44px;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
background: #1e1e1e;
|
|
63
|
+
border: 2px solid #3d3d3d;
|
|
64
|
+
color: #61dafb;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
z-index: 99998;
|
|
70
|
+
transition: all 0.2s;
|
|
71
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
.gx-devtools-trigger:hover {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
background: #2d2d2d;
|
|
76
|
+
border-color: #61dafb;
|
|
77
|
+
transform: scale(1.1);
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
.gx-devtools-trigger svg {
|
|
74
|
-
|
|
81
|
+
animation: spin 10s linear infinite;
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
@keyframes spin {
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
from {
|
|
86
|
+
transform: rotate(0deg);
|
|
87
|
+
}
|
|
88
|
+
to {
|
|
89
|
+
transform: rotate(360deg);
|
|
90
|
+
}
|
|
80
91
|
}
|
|
81
92
|
</style>
|
|
82
93
|
|
|
83
94
|
<script setup>
|
|
84
|
-
import { ref, shallowRef, onMounted, onUnmounted } from "vue"
|
|
95
|
+
import { ref, shallowRef, onMounted, onUnmounted } from "vue"
|
|
85
96
|
|
|
86
97
|
// These imports use aliases configured in vite.config.js
|
|
87
98
|
// @/ points to the client project's src/ directory
|
|
88
99
|
// @layouts/ points to the client project's theme-layouts/ directory
|
|
89
|
-
import Plugin from "@/Plugin.vue"
|
|
90
|
-
import "@layouts/AdditionalStyling.css"
|
|
91
|
-
import SystemLayout from "@layouts/SystemLayout.vue"
|
|
92
|
-
import PrivateLayout from "@layouts/PrivateLayout.vue"
|
|
93
|
-
import PublicLayout from "@layouts/PublicLayout.vue"
|
|
100
|
+
import Plugin from "@/Plugin.vue"
|
|
101
|
+
import "@layouts/AdditionalStyling.css"
|
|
102
|
+
import SystemLayout from "@layouts/SystemLayout.vue"
|
|
103
|
+
import PrivateLayout from "@layouts/PrivateLayout.vue"
|
|
104
|
+
import PublicLayout from "@layouts/PublicLayout.vue"
|
|
94
105
|
|
|
95
106
|
// Dev Tools
|
|
96
|
-
import DevToolsModal from "./dev-tools/DevToolsModal.vue"
|
|
107
|
+
import DevToolsModal from "./dev-tools/DevToolsModal.vue"
|
|
97
108
|
|
|
98
109
|
// Initialize the GxP store from client project's stores/index.js
|
|
99
110
|
// which re-exports useGxpStore from either the toolkit or a local copy
|
|
100
|
-
import { useGxpStore } from "@/stores/index.js"
|
|
101
|
-
window.useGxpStore = { useGxpStore }
|
|
111
|
+
import { useGxpStore } from "@/stores/index.js"
|
|
112
|
+
window.useGxpStore = { useGxpStore }
|
|
102
113
|
// App state management
|
|
103
|
-
const showDevTools = ref(false)
|
|
104
|
-
const currentLayout = shallowRef(PublicLayout)
|
|
105
|
-
const currentLayoutName = ref(
|
|
106
|
-
const currentPage = ref(
|
|
107
|
-
const isLoading = ref(false)
|
|
108
|
-
const loadingMessage = ref(
|
|
114
|
+
const showDevTools = ref(false)
|
|
115
|
+
const currentLayout = shallowRef(PublicLayout)
|
|
116
|
+
const currentLayoutName = ref("public")
|
|
117
|
+
const currentPage = ref("start")
|
|
118
|
+
const isLoading = ref(false)
|
|
119
|
+
const loadingMessage = ref("Loading...")
|
|
109
120
|
|
|
110
121
|
// Layout management
|
|
111
122
|
const changeLayout = (layout) => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
123
|
+
currentLayoutName.value = layout
|
|
124
|
+
switch (layout) {
|
|
125
|
+
case "system":
|
|
126
|
+
currentLayout.value = SystemLayout
|
|
127
|
+
break
|
|
128
|
+
case "private":
|
|
129
|
+
currentLayout.value = PrivateLayout
|
|
130
|
+
break
|
|
131
|
+
default:
|
|
132
|
+
currentLayout.value = PublicLayout
|
|
133
|
+
currentLayoutName.value = "public"
|
|
134
|
+
break
|
|
135
|
+
}
|
|
136
|
+
console.log(`[GxP] Layout changed to: ${currentLayoutName.value}`)
|
|
137
|
+
}
|
|
127
138
|
|
|
128
139
|
// Expose layout control to window
|
|
129
|
-
window.changeLayout = changeLayout
|
|
140
|
+
window.changeLayout = changeLayout
|
|
130
141
|
|
|
131
142
|
// Initialize the GxP store
|
|
132
|
-
const gxpStore = useGxpStore()
|
|
143
|
+
const gxpStore = useGxpStore()
|
|
133
144
|
gxpStore.sockets?.primary?.listenForStateChange?.((event) => {
|
|
134
|
-
|
|
135
|
-
})
|
|
145
|
+
console.log("🔗 GXP Store: State change event received", event)
|
|
146
|
+
})
|
|
136
147
|
|
|
137
148
|
// Navigation functions
|
|
138
149
|
const goToPage = (page) => {
|
|
139
|
-
|
|
140
|
-
}
|
|
150
|
+
currentPage.value = page
|
|
151
|
+
}
|
|
141
152
|
|
|
142
153
|
const resetToStart = () => {
|
|
143
|
-
|
|
144
|
-
}
|
|
154
|
+
currentPage.value = "start"
|
|
155
|
+
}
|
|
145
156
|
|
|
146
|
-
const showLoading = (message =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
157
|
+
const showLoading = (message = "Loading...") => {
|
|
158
|
+
loadingMessage.value = message
|
|
159
|
+
isLoading.value = true
|
|
160
|
+
}
|
|
150
161
|
|
|
151
162
|
const hideLoading = () => {
|
|
152
|
-
|
|
153
|
-
}
|
|
163
|
+
isLoading.value = false
|
|
164
|
+
}
|
|
154
165
|
|
|
155
166
|
const logout = () => {
|
|
156
|
-
|
|
157
|
-
}
|
|
167
|
+
alert("Logging Out")
|
|
168
|
+
}
|
|
158
169
|
|
|
159
170
|
// Mock router to simulate platform navigation during development
|
|
160
171
|
const mockRouter = {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const userLanguage = ""
|
|
172
|
+
visit: (url, options = {}) => {
|
|
173
|
+
console.log(`🔗 Mock Router: Navigating to ${url}`, options)
|
|
174
|
+
|
|
175
|
+
// Simulate platform navigation behavior
|
|
176
|
+
if (options.onStart) options.onStart()
|
|
177
|
+
|
|
178
|
+
// Map platform routes to local pages
|
|
179
|
+
const routeMap = {
|
|
180
|
+
"/start": "start",
|
|
181
|
+
"/plugin": "plugin",
|
|
182
|
+
"/final": "final",
|
|
183
|
+
"/camera": "plugin",
|
|
184
|
+
"/results": "plugin",
|
|
185
|
+
"/share": "plugin",
|
|
186
|
+
"/instructions": "plugin",
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const targetPage = routeMap[url] || "plugin"
|
|
190
|
+
|
|
191
|
+
// Simulate async navigation
|
|
192
|
+
setTimeout(() => {
|
|
193
|
+
goToPage(targetPage)
|
|
194
|
+
if (options.onFinish) options.onFinish()
|
|
195
|
+
}, 100)
|
|
196
|
+
},
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const userLanguage = ""
|
|
189
200
|
|
|
190
201
|
// Theme configuration
|
|
191
202
|
const themeSettings = {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
203
|
+
background_color: "#ffffff",
|
|
204
|
+
text_color: "#333333",
|
|
205
|
+
primary_color: "#FFD600",
|
|
206
|
+
start_background_color: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
207
|
+
start_text_color: "#ffffff",
|
|
208
|
+
final_background_color: "#4CAF50",
|
|
209
|
+
final_text_color: "#ffffff",
|
|
210
|
+
}
|
|
200
211
|
|
|
201
212
|
const themeColors = {
|
|
202
|
-
|
|
203
|
-
}
|
|
213
|
+
background_color: "#ffffff",
|
|
214
|
+
}
|
|
204
215
|
|
|
205
|
-
const permissionFlags = []
|
|
206
|
-
const sockets = {}
|
|
207
|
-
const userAuth = {}
|
|
216
|
+
const permissionFlags = []
|
|
217
|
+
const sockets = {}
|
|
218
|
+
const userAuth = {}
|
|
208
219
|
|
|
209
220
|
// Update dependencyList with all the dependencies that will be set through the custom admin panel
|
|
210
221
|
const dependencyList = {
|
|
211
|
-
|
|
212
|
-
}
|
|
222
|
+
project_location: 4,
|
|
223
|
+
}
|
|
213
224
|
|
|
214
225
|
// Update pluginVars with all the variables that will be set through the custom admin panel
|
|
215
226
|
const pluginVars = {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
227
|
+
primary_color: "#FFD600",
|
|
228
|
+
projectId: 39,
|
|
229
|
+
apiPageAuthId: "46|j7vCLmx2KG70Ig8R5mtUcNMFcHExvFPZEOv31kKGe1033f2b",
|
|
230
|
+
apiBaseUrl: "https://api.efcloud.app",
|
|
231
|
+
idle_timeout: "30",
|
|
232
|
+
}
|
|
222
233
|
|
|
223
|
-
const userSession = ""
|
|
234
|
+
const userSession = ""
|
|
224
235
|
|
|
225
236
|
const portalNavigationList = [
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
]
|
|
237
|
+
{ title: "Start", route: "/start" },
|
|
238
|
+
{ title: "Plugin", route: "/plugin" },
|
|
239
|
+
{ title: "Final", route: "/final" },
|
|
240
|
+
{ title: "Logout", route: "/logout", system_type: "logout" },
|
|
241
|
+
]
|
|
231
242
|
|
|
232
243
|
// Update assetList with all the assets that will be selected through the custom admin panel
|
|
233
244
|
const appAssetList = {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
245
|
+
main_logo:
|
|
246
|
+
"https://dashboard.eventfinity.test/storage/assets/69/2HyPwh1692319982.png",
|
|
247
|
+
background_image:
|
|
248
|
+
"https://dashboard.eventfinity.test/storage/assets/69/2HyPwh1692319982.png",
|
|
249
|
+
}
|
|
237
250
|
|
|
238
251
|
const portalAssetList = {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
252
|
+
main_logo:
|
|
253
|
+
"https://dashboard.eventfinity.test/storage/assets/69/2HyPwh1692319982.png",
|
|
254
|
+
background_image:
|
|
255
|
+
"https://dashboard.eventfinity.test/storage/assets/69/2HyPwh1692319982.png",
|
|
256
|
+
}
|
|
242
257
|
|
|
243
258
|
const portalStringsList = {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
259
|
+
start_line_one: "Welcome to Your App!",
|
|
260
|
+
start_line_two: "Touch to begin your experience",
|
|
261
|
+
start_touch_start: "Get started by touching the button below",
|
|
262
|
+
final_line_one: "Thank You!",
|
|
263
|
+
final_line_two: "Your experience has been completed successfully",
|
|
264
|
+
final_line_three: "Touch anywhere to start over",
|
|
265
|
+
welcome_text: "Hello World",
|
|
266
|
+
}
|
|
252
267
|
|
|
253
268
|
const appStringsList = {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
269
|
+
start_line_one: "Welcome to Your App!",
|
|
270
|
+
start_line_two: "Touch to begin your experience",
|
|
271
|
+
start_touch_start: "Get started by touching the button below",
|
|
272
|
+
final_line_one: "Thank You!",
|
|
273
|
+
final_line_two: "Your experience has been completed successfully",
|
|
274
|
+
final_line_three: "Touch anywhere to start over",
|
|
275
|
+
welcome_text: "Hello World",
|
|
276
|
+
}
|
|
262
277
|
|
|
263
278
|
// Keyboard shortcut handler
|
|
264
279
|
function handleKeydown(e) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
280
|
+
// Ctrl+Shift+D (or Cmd+Shift+D on Mac) to toggle dev tools
|
|
281
|
+
if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.key === "D") {
|
|
282
|
+
e.preventDefault()
|
|
283
|
+
showDevTools.value = !showDevTools.value
|
|
284
|
+
}
|
|
270
285
|
}
|
|
271
286
|
|
|
272
287
|
// Setup window.gxDevTools API
|
|
273
288
|
function setupDevToolsAPI() {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
289
|
+
window.gxDevTools = {
|
|
290
|
+
open: () => {
|
|
291
|
+
showDevTools.value = true
|
|
292
|
+
console.log("[GxP] Dev Tools opened")
|
|
293
|
+
},
|
|
294
|
+
close: () => {
|
|
295
|
+
showDevTools.value = false
|
|
296
|
+
console.log("[GxP] Dev Tools closed")
|
|
297
|
+
},
|
|
298
|
+
toggle: () => {
|
|
299
|
+
showDevTools.value = !showDevTools.value
|
|
300
|
+
console.log(`[GxP] Dev Tools ${showDevTools.value ? "opened" : "closed"}`)
|
|
301
|
+
},
|
|
302
|
+
isOpen: () => showDevTools.value,
|
|
303
|
+
// Convenience methods
|
|
304
|
+
store: () => gxpStore,
|
|
305
|
+
setLayout: (layout) => changeLayout(layout),
|
|
306
|
+
getLayout: () => currentLayoutName.value,
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Legacy support
|
|
310
|
+
window.toggleConfigPanel = () => window.gxDevTools.toggle()
|
|
296
311
|
}
|
|
297
312
|
|
|
298
313
|
// Expose functions for use in Plugin component
|
|
299
314
|
defineExpose({
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
})
|
|
315
|
+
goToPage,
|
|
316
|
+
resetToStart,
|
|
317
|
+
showLoading,
|
|
318
|
+
hideLoading,
|
|
319
|
+
gxpStore,
|
|
320
|
+
})
|
|
306
321
|
|
|
307
322
|
onMounted(() => {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
323
|
+
// Setup keyboard shortcut
|
|
324
|
+
document.addEventListener("keydown", handleKeydown)
|
|
325
|
+
|
|
326
|
+
// Setup dev tools API
|
|
327
|
+
setupDevToolsAPI()
|
|
328
|
+
|
|
329
|
+
// Welcome message
|
|
330
|
+
console.log(
|
|
331
|
+
"%c GxP Developer Toolkit ",
|
|
332
|
+
"background: #61dafb; color: #1e1e1e; font-size: 14px; padding: 4px 8px; border-radius: 4px;",
|
|
333
|
+
)
|
|
334
|
+
console.log(
|
|
335
|
+
"%c Dev Tools: Press Ctrl+Shift+D or click the gear icon ",
|
|
336
|
+
"color: #888; font-size: 12px;",
|
|
337
|
+
)
|
|
338
|
+
console.log(
|
|
339
|
+
"%c Console API: window.gxDevTools.open() / .close() / .toggle() ",
|
|
340
|
+
"color: #888; font-size: 12px;",
|
|
341
|
+
)
|
|
342
|
+
})
|
|
319
343
|
|
|
320
344
|
onUnmounted(() => {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
})
|
|
345
|
+
document.removeEventListener("keydown", handleKeydown)
|
|
346
|
+
delete window.gxDevTools
|
|
347
|
+
delete window.toggleConfigPanel
|
|
348
|
+
delete window.changeLayout
|
|
349
|
+
})
|
|
326
350
|
</script>
|