@gxp-dev/tools 2.0.62 → 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 +207 -132
- 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,221 +1,225 @@
|
|
|
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
|
-
|
|
2
|
+
<div class="layout-switcher">
|
|
3
|
+
<p class="switcher-description">
|
|
4
|
+
Switch between different layout templates to preview how your plugin
|
|
5
|
+
renders in various contexts.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<div class="layout-options">
|
|
9
|
+
<div
|
|
10
|
+
v-for="layout in layouts"
|
|
11
|
+
:key="layout.id"
|
|
12
|
+
:class="['layout-option', { active: currentLayout === layout.id }]"
|
|
13
|
+
@click="$emit('change-layout', layout.id)"
|
|
14
|
+
>
|
|
15
|
+
<div class="layout-preview" :class="layout.id">
|
|
16
|
+
<div class="preview-header"></div>
|
|
17
|
+
<div class="preview-sidebar" v-if="layout.hasSidebar"></div>
|
|
18
|
+
<div class="preview-content"></div>
|
|
19
|
+
<div class="preview-footer" v-if="layout.hasFooter"></div>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="layout-info">
|
|
22
|
+
<h4 class="layout-name">{{ layout.name }}</h4>
|
|
23
|
+
<p class="layout-desc">{{ layout.description }}</p>
|
|
24
|
+
</div>
|
|
25
|
+
<div v-if="currentLayout === layout.id" class="active-indicator">
|
|
26
|
+
Active
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="layout-details">
|
|
32
|
+
<h4>Current Layout: {{ getCurrentLayoutName() }}</h4>
|
|
33
|
+
<p class="layout-hint">
|
|
34
|
+
Layouts are defined in <code>theme-layouts/</code> directory. Each
|
|
35
|
+
layout receives portal settings, navigation, and assets as props.
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
38
39
|
</template>
|
|
39
40
|
|
|
40
41
|
<script setup>
|
|
41
|
-
import { computed } from
|
|
42
|
+
import { computed } from "vue"
|
|
42
43
|
|
|
43
44
|
const props = defineProps({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
45
|
+
currentLayout: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "public",
|
|
48
|
+
},
|
|
49
|
+
})
|
|
49
50
|
|
|
50
|
-
const emit = defineEmits([
|
|
51
|
+
const emit = defineEmits(["change-layout"])
|
|
51
52
|
|
|
52
53
|
const layouts = [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
54
|
+
{
|
|
55
|
+
id: "public",
|
|
56
|
+
name: "Public Layout",
|
|
57
|
+
description:
|
|
58
|
+
"Full-width layout for public-facing pages with no authentication required.",
|
|
59
|
+
hasSidebar: false,
|
|
60
|
+
hasFooter: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "private",
|
|
64
|
+
name: "Private Layout",
|
|
65
|
+
description:
|
|
66
|
+
"Layout with sidebar navigation for authenticated user experiences.",
|
|
67
|
+
hasSidebar: true,
|
|
68
|
+
hasFooter: true,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "system",
|
|
72
|
+
name: "System Layout",
|
|
73
|
+
description:
|
|
74
|
+
"Minimal layout for system pages like login, error screens, etc.",
|
|
75
|
+
hasSidebar: false,
|
|
76
|
+
hasFooter: false,
|
|
77
|
+
},
|
|
78
|
+
]
|
|
75
79
|
|
|
76
80
|
function getCurrentLayoutName() {
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
const layout = layouts.find((l) => l.id === props.currentLayout)
|
|
82
|
+
return layout ? layout.name : props.currentLayout
|
|
79
83
|
}
|
|
80
84
|
</script>
|
|
81
85
|
|
|
82
86
|
<style scoped>
|
|
83
87
|
.layout-switcher {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
gap: 20px;
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
.switcher-description {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
color: #888;
|
|
95
|
+
font-size: 13px;
|
|
96
|
+
margin: 0;
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
.layout-options {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
display: grid;
|
|
101
|
+
grid-template-columns: repeat(3, 1fr);
|
|
102
|
+
gap: 16px;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
.layout-option {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
background: #2d2d2d;
|
|
107
|
+
border-radius: 8px;
|
|
108
|
+
padding: 16px;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
border: 2px solid transparent;
|
|
111
|
+
transition: all 0.2s;
|
|
112
|
+
position: relative;
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
.layout-option:hover {
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
border-color: #3d3d3d;
|
|
117
|
+
background: #333;
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
.layout-option.active {
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
border-color: #61dafb;
|
|
122
|
+
background: #2a3a4a;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
.layout-preview {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
height: 80px;
|
|
127
|
+
background: #1e1e1e;
|
|
128
|
+
border-radius: 4px;
|
|
129
|
+
margin-bottom: 12px;
|
|
130
|
+
position: relative;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
display: grid;
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
.layout-preview.public {
|
|
132
|
-
|
|
136
|
+
grid-template-rows: 20px 1fr 16px;
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
.layout-preview.private {
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
grid-template-columns: 30px 1fr;
|
|
141
|
+
grid-template-rows: 20px 1fr 16px;
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
.layout-preview.system {
|
|
141
|
-
|
|
145
|
+
grid-template-rows: 1fr;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
.preview-header {
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
background: #3d3d3d;
|
|
150
|
+
grid-column: 1 / -1;
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
.preview-sidebar {
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
background: #2d2d2d;
|
|
155
|
+
grid-row: 2 / -1;
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
.preview-content {
|
|
155
|
-
|
|
159
|
+
background: #252525;
|
|
156
160
|
}
|
|
157
161
|
|
|
158
162
|
.preview-footer {
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
background: #3d3d3d;
|
|
164
|
+
grid-column: 1 / -1;
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
.layout-info {
|
|
164
|
-
|
|
168
|
+
text-align: center;
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
.layout-name {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
margin: 0 0 4px 0;
|
|
173
|
+
font-size: 13px;
|
|
174
|
+
font-weight: 500;
|
|
175
|
+
color: #e0e0e0;
|
|
172
176
|
}
|
|
173
177
|
|
|
174
178
|
.layout-desc {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
margin: 0;
|
|
180
|
+
font-size: 11px;
|
|
181
|
+
color: #888;
|
|
182
|
+
line-height: 1.4;
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
.active-indicator {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
position: absolute;
|
|
187
|
+
top: 8px;
|
|
188
|
+
right: 8px;
|
|
189
|
+
background: #61dafb;
|
|
190
|
+
color: #1e1e1e;
|
|
191
|
+
padding: 2px 8px;
|
|
192
|
+
border-radius: 4px;
|
|
193
|
+
font-size: 10px;
|
|
194
|
+
font-weight: 600;
|
|
195
|
+
text-transform: uppercase;
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
.layout-details {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
199
|
+
background: #2d2d2d;
|
|
200
|
+
border-radius: 8px;
|
|
201
|
+
padding: 16px;
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
.layout-details h4 {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
margin: 0 0 8px 0;
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
color: #61dafb;
|
|
204
208
|
}
|
|
205
209
|
|
|
206
210
|
.layout-hint {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
margin: 0;
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
color: #888;
|
|
214
|
+
line-height: 1.5;
|
|
211
215
|
}
|
|
212
216
|
|
|
213
217
|
.layout-hint code {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
background: #3d3d3d;
|
|
219
|
+
padding: 2px 6px;
|
|
220
|
+
border-radius: 3px;
|
|
221
|
+
font-family: "SF Mono", Monaco, monospace;
|
|
222
|
+
font-size: 11px;
|
|
223
|
+
color: #e0e0e0;
|
|
220
224
|
}
|
|
221
225
|
</style>
|