@gxp-dev/tools 2.0.5 → 2.0.6
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/dist/tui/App.d.ts +13 -0
- package/dist/tui/App.d.ts.map +1 -0
- package/dist/tui/App.js +480 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/components/CommandInput.d.ts +13 -0
- package/dist/tui/components/CommandInput.d.ts.map +1 -0
- package/dist/tui/components/CommandInput.js +180 -0
- package/dist/tui/components/CommandInput.js.map +1 -0
- package/dist/tui/components/GeminiPanel.d.ts +7 -0
- package/dist/tui/components/GeminiPanel.d.ts.map +1 -0
- package/dist/tui/components/GeminiPanel.js +99 -0
- package/dist/tui/components/GeminiPanel.js.map +1 -0
- package/dist/tui/components/Header.d.ts +6 -0
- package/dist/tui/components/Header.d.ts.map +1 -0
- package/dist/tui/components/Header.js +6 -0
- package/dist/tui/components/Header.js.map +1 -0
- package/dist/tui/components/LogPanel.d.ts +8 -0
- package/dist/tui/components/LogPanel.d.ts.map +1 -0
- package/dist/tui/components/LogPanel.js +89 -0
- package/dist/tui/components/LogPanel.js.map +1 -0
- package/dist/tui/components/TabBar.d.ts +9 -0
- package/dist/tui/components/TabBar.d.ts.map +1 -0
- package/dist/tui/components/TabBar.js +23 -0
- package/dist/tui/components/TabBar.js.map +1 -0
- package/dist/tui/components/WelcomeScreen.d.ts +2 -0
- package/dist/tui/components/WelcomeScreen.d.ts.map +1 -0
- package/dist/tui/components/WelcomeScreen.js +14 -0
- package/dist/tui/components/WelcomeScreen.js.map +1 -0
- package/dist/tui/index.d.ts +8 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +47 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/package.json +1 -0
- package/dist/tui/services/ExtensionService.d.ts +11 -0
- package/dist/tui/services/ExtensionService.d.ts.map +1 -0
- package/dist/tui/services/ExtensionService.js +101 -0
- package/dist/tui/services/ExtensionService.js.map +1 -0
- package/dist/tui/services/GeminiService.d.ts +40 -0
- package/dist/tui/services/GeminiService.d.ts.map +1 -0
- package/dist/tui/services/GeminiService.js +327 -0
- package/dist/tui/services/GeminiService.js.map +1 -0
- package/dist/tui/services/ServiceManager.d.ts +40 -0
- package/dist/tui/services/ServiceManager.d.ts.map +1 -0
- package/dist/tui/services/ServiceManager.js +283 -0
- package/dist/tui/services/ServiceManager.js.map +1 -0
- package/dist/tui/services/SocketService.d.ts +19 -0
- package/dist/tui/services/SocketService.d.ts.map +1 -0
- package/dist/tui/services/SocketService.js +163 -0
- package/dist/tui/services/SocketService.js.map +1 -0
- package/dist/tui/services/ViteService.d.ts +8 -0
- package/dist/tui/services/ViteService.d.ts.map +1 -0
- package/dist/tui/services/ViteService.js +89 -0
- package/dist/tui/services/ViteService.js.map +1 -0
- package/dist/tui/services/index.d.ts +6 -0
- package/dist/tui/services/index.d.ts.map +1 -0
- package/dist/tui/services/index.js +6 -0
- package/dist/tui/services/index.js.map +1 -0
- package/package.json +6 -1
- package/.github/workflows/npm-publish.yml +0 -48
- package/CLAUDE.md +0 -400
- package/REFACTOR_PLAN.md +0 -194
- package/browser-extensions/README.md +0 -1
- package/browser-extensions/chrome/background.js +0 -857
- package/browser-extensions/chrome/content.js +0 -51
- package/browser-extensions/chrome/devtools.html +0 -9
- package/browser-extensions/chrome/devtools.js +0 -23
- package/browser-extensions/chrome/icons/gx_off_128.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_16.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_32.png +0 -0
- package/browser-extensions/chrome/icons/gx_off_64.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_128.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_16.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_32.png +0 -0
- package/browser-extensions/chrome/icons/gx_on_64.png +0 -0
- package/browser-extensions/chrome/inspector.js +0 -1087
- package/browser-extensions/chrome/manifest.json +0 -70
- package/browser-extensions/chrome/panel.html +0 -638
- package/browser-extensions/chrome/panel.js +0 -862
- package/browser-extensions/chrome/popup.html +0 -399
- package/browser-extensions/chrome/popup.js +0 -515
- package/browser-extensions/chrome/rules.json +0 -1
- package/browser-extensions/chrome/test-chrome.html +0 -145
- package/browser-extensions/chrome/test-mixed-content.html +0 -190
- package/browser-extensions/chrome/test-uri-pattern.html +0 -199
- package/browser-extensions/firefox/README.md +0 -134
- package/browser-extensions/firefox/background.js +0 -804
- package/browser-extensions/firefox/content.js +0 -120
- package/browser-extensions/firefox/debug-errors.html +0 -229
- package/browser-extensions/firefox/debug-https.html +0 -113
- package/browser-extensions/firefox/devtools.html +0 -9
- package/browser-extensions/firefox/devtools.js +0 -24
- package/browser-extensions/firefox/icons/gx_off_128.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_16.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_32.png +0 -0
- package/browser-extensions/firefox/icons/gx_off_64.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_128.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_16.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_32.png +0 -0
- package/browser-extensions/firefox/icons/gx_on_64.png +0 -0
- package/browser-extensions/firefox/inspector.js +0 -1087
- package/browser-extensions/firefox/manifest.json +0 -67
- package/browser-extensions/firefox/panel.html +0 -638
- package/browser-extensions/firefox/panel.js +0 -862
- package/browser-extensions/firefox/popup.html +0 -525
- package/browser-extensions/firefox/popup.js +0 -536
- package/browser-extensions/firefox/test-gramercy.html +0 -126
- package/browser-extensions/firefox/test-imports.html +0 -58
- package/browser-extensions/firefox/test-masking.html +0 -147
- package/browser-extensions/firefox/test-uri-pattern.html +0 -199
- package/docs/DOCUSAURUS_IMPORT.md +0 -378
- package/docs/_category_.json +0 -8
- package/docs/app-manifest.md +0 -272
- package/docs/building-for-platform.md +0 -315
- package/docs/dev-tools.md +0 -291
- package/docs/getting-started.md +0 -180
- package/docs/gxp-store.md +0 -305
- package/docs/index.md +0 -44
- package/runtime/PortalContainer.vue +0 -326
- package/runtime/dev-tools/DevToolsModal.vue +0 -217
- package/runtime/dev-tools/LayoutSwitcher.vue +0 -221
- package/runtime/dev-tools/MockDataEditor.vue +0 -621
- package/runtime/dev-tools/SocketSimulator.vue +0 -562
- package/runtime/dev-tools/StoreInspector.vue +0 -644
- package/runtime/dev-tools/index.js +0 -6
- package/runtime/gxpStringsPlugin.js +0 -428
- package/runtime/index.html +0 -22
- package/runtime/main.js +0 -32
- package/runtime/mock-api/auth-middleware.js +0 -97
- package/runtime/mock-api/image-generator.js +0 -221
- package/runtime/mock-api/index.js +0 -197
- package/runtime/mock-api/response-generator.js +0 -394
- package/runtime/mock-api/route-generator.js +0 -323
- package/runtime/mock-api/socket-triggers.js +0 -371
- package/runtime/mock-api/spec-loader.js +0 -300
- package/runtime/server.js +0 -180
- package/runtime/stores/gxpPortalConfigStore.js +0 -554
- package/runtime/stores/index.js +0 -6
- package/runtime/vite-inspector-plugin.js +0 -749
- package/runtime/vite-source-tracker-plugin.js +0 -232
- package/runtime/vite.config.js +0 -402
- package/scripts/launch-chrome.js +0 -90
- package/scripts/pack-chrome.js +0 -91
- package/socket-events/AiSessionMessageCreated.json +0 -18
- package/socket-events/SocialStreamPostCreated.json +0 -24
- package/socket-events/SocialStreamPostVariantCompleted.json +0 -23
- package/template/README.md +0 -332
- package/template/app-manifest.json +0 -32
- package/template/dev-assets/images/avatar-placeholder.png +0 -0
- package/template/dev-assets/images/background-placeholder.jpg +0 -0
- package/template/dev-assets/images/banner-placeholder.jpg +0 -0
- package/template/dev-assets/images/icon-placeholder.png +0 -0
- package/template/dev-assets/images/logo-placeholder.png +0 -0
- package/template/dev-assets/images/product-placeholder.jpg +0 -0
- package/template/dev-assets/images/thumbnail-placeholder.jpg +0 -0
- package/template/env.example +0 -51
- package/template/gitignore +0 -53
- package/template/index.html +0 -22
- package/template/main.js +0 -28
- package/template/src/DemoPage.vue +0 -459
- package/template/src/Plugin.vue +0 -38
- package/template/src/stores/index.js +0 -9
- package/template/src/stores/test-data.json +0 -173
- package/template/theme-layouts/AdditionalStyling.css +0 -0
- package/template/theme-layouts/PrivateLayout.vue +0 -39
- package/template/theme-layouts/PublicLayout.vue +0 -39
- package/template/theme-layouts/SystemLayout.vue +0 -39
- package/template/vite.config.js +0 -333
- package/tsconfig.tui.json +0 -21
- package/vite.config.js +0 -164
package/scripts/launch-chrome.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Get the dev server URL from environment variables
|
|
8
|
-
* @returns {string} The URL to open in the browser
|
|
9
|
-
*/
|
|
10
|
-
function getDevServerUrl() {
|
|
11
|
-
// Check for explicit START_URL first
|
|
12
|
-
if (process.env.START_URL) {
|
|
13
|
-
return process.env.START_URL;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Build URL from environment variables
|
|
17
|
-
const useHttps = process.env.USE_HTTPS !== "false";
|
|
18
|
-
const protocol = useHttps ? "https" : "http";
|
|
19
|
-
const port = process.env.NODE_PORT || 3060;
|
|
20
|
-
|
|
21
|
-
return `${protocol}://localhost:${port}`;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Launches Chrome with the browser extension loaded
|
|
26
|
-
*/
|
|
27
|
-
async function launchChromeWithExtension() {
|
|
28
|
-
// Dynamic import for chrome-launcher (ES module)
|
|
29
|
-
const { launch } = await import("chrome-launcher");
|
|
30
|
-
// Use environment variable if set (from CLI), otherwise use default path
|
|
31
|
-
const extensionPath =
|
|
32
|
-
process.env.CHROME_EXTENSION_PATH ||
|
|
33
|
-
path.resolve(__dirname, "../browser-extensions/chrome");
|
|
34
|
-
|
|
35
|
-
// Verify extension directory exists
|
|
36
|
-
if (!fs.existsSync(extensionPath)) {
|
|
37
|
-
console.error("❌ Chrome extension directory not found:", extensionPath);
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Verify manifest.json exists
|
|
42
|
-
const manifestPath = path.join(extensionPath, "manifest.json");
|
|
43
|
-
if (!fs.existsSync(manifestPath)) {
|
|
44
|
-
console.error("❌ Chrome extension manifest.json not found");
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Get the starting URL
|
|
49
|
-
const startingUrl = getDevServerUrl();
|
|
50
|
-
|
|
51
|
-
console.log("🚀 Launching Chrome with extension...");
|
|
52
|
-
console.log("📁 Extension path:", extensionPath);
|
|
53
|
-
console.log("🌐 Opening URL:", startingUrl);
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
const chrome = await launch({
|
|
57
|
-
chromeFlags: [
|
|
58
|
-
`--load-extension=${extensionPath}`,
|
|
59
|
-
"--disable-extensions-except=" + extensionPath,
|
|
60
|
-
"--disable-extensions-file-access-check",
|
|
61
|
-
"--user-data-dir=/tmp/chrome-extension-test",
|
|
62
|
-
"--new-window",
|
|
63
|
-
"--no-first-run",
|
|
64
|
-
"--no-default-browser-check",
|
|
65
|
-
],
|
|
66
|
-
startingUrl: startingUrl,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
console.log("✅ Chrome launched successfully!");
|
|
70
|
-
console.log("🔧 Chrome debugging port:", chrome.port);
|
|
71
|
-
console.log("📋 Extension should be loaded in developer mode");
|
|
72
|
-
console.log("🌐 Navigate to chrome://extensions/ to see your extension");
|
|
73
|
-
|
|
74
|
-
// Keep the process alive
|
|
75
|
-
process.on("SIGINT", async () => {
|
|
76
|
-
console.log("\n🛑 Shutting down Chrome...");
|
|
77
|
-
await chrome.kill();
|
|
78
|
-
process.exit(0);
|
|
79
|
-
});
|
|
80
|
-
} catch (error) {
|
|
81
|
-
console.error("❌ Failed to launch Chrome:", error.message);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (require.main === module) {
|
|
87
|
-
launchChromeWithExtension();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
module.exports = launchChromeWithExtension;
|
package/scripts/pack-chrome.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const shell = require("shelljs");
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Packages Chrome extension into a distributable format
|
|
9
|
-
*/
|
|
10
|
-
function packChromeExtension() {
|
|
11
|
-
const extensionPath =
|
|
12
|
-
process.env.CHROME_EXTENSION_PATH ||
|
|
13
|
-
path.resolve(__dirname, "../browser-extensions/chrome");
|
|
14
|
-
const distPath =
|
|
15
|
-
process.env.CHROME_BUILD_OUTPUT ||
|
|
16
|
-
path.resolve(__dirname, "../dist/chrome");
|
|
17
|
-
|
|
18
|
-
console.log("📦 Packaging Chrome extension...");
|
|
19
|
-
|
|
20
|
-
// Verify extension directory exists
|
|
21
|
-
if (!fs.existsSync(extensionPath)) {
|
|
22
|
-
console.error("❌ Chrome extension directory not found:", extensionPath);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Create dist directory
|
|
27
|
-
if (!fs.existsSync(distPath)) {
|
|
28
|
-
fs.mkdirSync(distPath, { recursive: true });
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Read manifest to get version
|
|
32
|
-
const manifestPath = path.join(extensionPath, "manifest.json");
|
|
33
|
-
let version = "1.0.0";
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
|
|
37
|
-
version = manifest.version || "1.0.0";
|
|
38
|
-
console.log(`📋 Extension version: ${version}`);
|
|
39
|
-
} catch (error) {
|
|
40
|
-
console.warn("⚠️ Could not read manifest version, using default");
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Create zip file
|
|
44
|
-
const zipName = `gx-chrome-extension-v${version}.zip`;
|
|
45
|
-
const zipPath = path.join(distPath, zipName);
|
|
46
|
-
|
|
47
|
-
console.log("🗜️ Creating zip archive...");
|
|
48
|
-
|
|
49
|
-
// Change to extension directory and create zip
|
|
50
|
-
const currentDir = process.cwd();
|
|
51
|
-
|
|
52
|
-
try {
|
|
53
|
-
process.chdir(extensionPath);
|
|
54
|
-
|
|
55
|
-
// Remove existing zip if it exists
|
|
56
|
-
if (fs.existsSync(zipPath)) {
|
|
57
|
-
fs.unlinkSync(zipPath);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Create zip using native zip command (works on macOS/Linux)
|
|
61
|
-
const result = shell.exec(
|
|
62
|
-
`zip -r "${zipPath}" . -x "*.DS_Store" "*.git*" "node_modules/*"`,
|
|
63
|
-
{ silent: true }
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
if (result.code === 0) {
|
|
67
|
-
console.log("✅ Chrome extension packaged successfully!");
|
|
68
|
-
console.log("📁 Package location:", zipPath);
|
|
69
|
-
console.log("");
|
|
70
|
-
console.log("📋 Manual installation instructions:");
|
|
71
|
-
console.log("1. Open Chrome and go to chrome://extensions/");
|
|
72
|
-
console.log('2. Enable "Developer mode" (toggle in top right)');
|
|
73
|
-
console.log('3. Click "Load unpacked" and select:', extensionPath);
|
|
74
|
-
console.log("4. Or drag and drop the zip file to install");
|
|
75
|
-
} else {
|
|
76
|
-
console.error("❌ Failed to create zip archive");
|
|
77
|
-
process.exit(1);
|
|
78
|
-
}
|
|
79
|
-
} catch (error) {
|
|
80
|
-
console.error("❌ Error packaging extension:", error.message);
|
|
81
|
-
process.exit(1);
|
|
82
|
-
} finally {
|
|
83
|
-
process.chdir(currentDir);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (require.main === module) {
|
|
88
|
-
packChromeExtension();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
module.exports = packChromeExtension;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"event": "AiSessionMessageCreated",
|
|
3
|
-
"channel": "private.AiInterface.ai_interface_background_remover",
|
|
4
|
-
"data": {
|
|
5
|
-
"id": 1234,
|
|
6
|
-
"ai_session_id": 567,
|
|
7
|
-
"message": "Background removal process completed successfully",
|
|
8
|
-
"type": "completion",
|
|
9
|
-
"metadata": {
|
|
10
|
-
"processing_time": 2.3,
|
|
11
|
-
"input_image": "/dev-assets/images/product-placeholder.jpg",
|
|
12
|
-
"output_image": "/dev-assets/images/background-placeholder.jpg",
|
|
13
|
-
"confidence": 0.95
|
|
14
|
-
},
|
|
15
|
-
"created_at": "2024-01-15T10:30:00Z",
|
|
16
|
-
"updated_at": "2024-01-15T10:30:00Z"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"event": "SocialStreamPostCreated",
|
|
3
|
-
"channel": "private.SocialStream.social_stream",
|
|
4
|
-
"data": {
|
|
5
|
-
"id": 789,
|
|
6
|
-
"social_stream_id": 123,
|
|
7
|
-
"content": "Check out this amazing photo from our event!",
|
|
8
|
-
"author": {
|
|
9
|
-
"id": 456,
|
|
10
|
-
"name": "John Doe",
|
|
11
|
-
"avatar": "/dev-assets/images/avatar-placeholder.png"
|
|
12
|
-
},
|
|
13
|
-
"media": {
|
|
14
|
-
"type": "image",
|
|
15
|
-
"url": "/dev-assets/images/product-placeholder.jpg",
|
|
16
|
-
"thumbnail": "/dev-assets/images/thumbnail-placeholder.jpg"
|
|
17
|
-
},
|
|
18
|
-
"hashtags": ["#event", "#photography", "#memories"],
|
|
19
|
-
"likes_count": 0,
|
|
20
|
-
"comments_count": 0,
|
|
21
|
-
"created_at": "2024-01-15T10:35:00Z",
|
|
22
|
-
"updated_at": "2024-01-15T10:35:00Z"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"event": "SocialStreamPostVariantCompleted",
|
|
3
|
-
"channel": "private.SocialStream.social_stream",
|
|
4
|
-
"data": {
|
|
5
|
-
"id": 789,
|
|
6
|
-
"social_stream_post_id": 789,
|
|
7
|
-
"variant_type": "ai_generated_style",
|
|
8
|
-
"variant_data": {
|
|
9
|
-
"style": "vintage",
|
|
10
|
-
"filter": "sepia_tone",
|
|
11
|
-
"processed_image": "http://localhost:3069/dev-assets/images/banner-placeholder.jpg",
|
|
12
|
-
"processing_details": {
|
|
13
|
-
"ai_model": "StyleTransfer-v2.1",
|
|
14
|
-
"processing_time": 4.7,
|
|
15
|
-
"quality_score": 0.89
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"status": "completed",
|
|
19
|
-
"completed_at": "2024-01-15T10:37:30Z",
|
|
20
|
-
"created_at": "2024-01-15T10:35:15Z",
|
|
21
|
-
"updated_at": "2024-01-15T10:37:30Z"
|
|
22
|
-
}
|
|
23
|
-
}
|
package/template/README.md
DELETED
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
# GxP Plugin Project
|
|
2
|
-
|
|
3
|
-
This project was created with `@gramercytech/gx-devtools` and includes the `@gramercytech/gx-componentkit` component library for rapid kiosk development.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Start HTTP development server
|
|
9
|
-
npm run dev-http
|
|
10
|
-
|
|
11
|
-
# Start HTTPS development server with Socket.IO
|
|
12
|
-
npm run dev
|
|
13
|
-
|
|
14
|
-
# Build for production
|
|
15
|
-
npm run build
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Project Structure
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
your-project/
|
|
22
|
-
├── src/
|
|
23
|
-
│ ├── Plugin.vue # Your app entry point (customize this!)
|
|
24
|
-
│ ├── DemoPage.vue # Example component
|
|
25
|
-
│ ├── components/ # Your custom components
|
|
26
|
-
│ ├── composables/ # Your custom logic
|
|
27
|
-
│ ├── stores/ # Pinia stores
|
|
28
|
-
│ │ └── index.js # Store setup
|
|
29
|
-
│ └── socket-events/ # Socket event templates
|
|
30
|
-
├── theme-layouts/ # Layout templates (System, Private, Public)
|
|
31
|
-
│ ├── SystemLayout.vue
|
|
32
|
-
│ ├── PrivateLayout.vue
|
|
33
|
-
│ ├── PublicLayout.vue
|
|
34
|
-
│ └── AdditionalStyling.css
|
|
35
|
-
├── dev-assets/ # Development placeholder images
|
|
36
|
-
├── socket-events/ # Socket event JSON files for simulation
|
|
37
|
-
├── main.js # Development entry point
|
|
38
|
-
├── vite.config.js # Vite build configuration
|
|
39
|
-
├── app-manifest.json # Plugin manifest
|
|
40
|
-
├── index.html # Development HTML template
|
|
41
|
-
└── .env # Environment configuration
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## How It Works
|
|
45
|
-
|
|
46
|
-
### Plugin.vue - Your App Entry Point
|
|
47
|
-
|
|
48
|
-
`src/Plugin.vue` is the root component of your application. During development, it's wrapped by the toolkit's PortalContainer (which emulates the GxP platform). In production, the platform loads your Plugin.vue directly.
|
|
49
|
-
|
|
50
|
-
```vue
|
|
51
|
-
<template>
|
|
52
|
-
<div class="my-plugin">
|
|
53
|
-
<h1>{{ stringsList?.welcome_text || 'Welcome!' }}</h1>
|
|
54
|
-
<!-- Your custom content here -->
|
|
55
|
-
</div>
|
|
56
|
-
</template>
|
|
57
|
-
|
|
58
|
-
<script setup>
|
|
59
|
-
// Props injected by the platform
|
|
60
|
-
const props = defineProps({
|
|
61
|
-
pluginVars: Object, // Custom variables from admin panel
|
|
62
|
-
dependencyList: Object, // Selected dependencies
|
|
63
|
-
assetUrls: Object, // Asset URLs (signed URLs for images, etc.)
|
|
64
|
-
stringsList: Object, // Localized strings
|
|
65
|
-
permissionFlags: Array, // Permission flags
|
|
66
|
-
theme: Object, // Theme configuration
|
|
67
|
-
router: Object // Platform router for navigation
|
|
68
|
-
});
|
|
69
|
-
</script>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Theme Layouts
|
|
73
|
-
|
|
74
|
-
The `theme-layouts/` directory contains layout templates that wrap your Plugin component. The platform uses these to provide consistent UI structure:
|
|
75
|
-
|
|
76
|
-
- **SystemLayout.vue** - System-level pages (errors, maintenance)
|
|
77
|
-
- **PrivateLayout.vue** - Authenticated user pages
|
|
78
|
-
- **PublicLayout.vue** - Public-facing pages
|
|
79
|
-
|
|
80
|
-
You can customize these layouts to match your kiosk's design.
|
|
81
|
-
|
|
82
|
-
## Development
|
|
83
|
-
|
|
84
|
-
### Available Scripts
|
|
85
|
-
|
|
86
|
-
| Script | Description |
|
|
87
|
-
|--------|-------------|
|
|
88
|
-
| `npm run dev` | Start HTTPS dev server with Socket.IO |
|
|
89
|
-
| `npm run dev-app` | Start HTTPS dev server only |
|
|
90
|
-
| `npm run dev-http` | Start HTTP dev server (no SSL) |
|
|
91
|
-
| `npm run build` | Build for production |
|
|
92
|
-
| `npm run setup-ssl` | Generate SSL certificates |
|
|
93
|
-
| `npm run socket:list` | List available socket events |
|
|
94
|
-
| `npm run socket:send` | Send test socket events |
|
|
95
|
-
| `npm run assets:list` | List development assets |
|
|
96
|
-
| `npm run assets:init` | Initialize asset directories |
|
|
97
|
-
| `npm run assets:generate` | Generate placeholder images |
|
|
98
|
-
|
|
99
|
-
### Dev Tools Modal
|
|
100
|
-
|
|
101
|
-
During development, press **Ctrl+Shift+D** (or **Cmd+Shift+D** on Mac) to open the Dev Tools Modal. You can also click the gear icon in the bottom-right corner.
|
|
102
|
-
|
|
103
|
-
The Dev Tools Modal provides:
|
|
104
|
-
|
|
105
|
-
1. **Store Inspector** - View and edit store state:
|
|
106
|
-
- `pluginVars` - Custom variables
|
|
107
|
-
- `stringsList` - Localized strings
|
|
108
|
-
- `assetList` - Asset URLs
|
|
109
|
-
- `triggerState` - Trigger states
|
|
110
|
-
- `dependencyList` - Dependencies
|
|
111
|
-
|
|
112
|
-
2. **Layout Switcher** - Toggle between System, Private, and Public layouts
|
|
113
|
-
|
|
114
|
-
3. **Socket Simulator** - Send test socket events to your app
|
|
115
|
-
|
|
116
|
-
4. **Mock Data Editor** - Edit theme colors, navigation items, user session, and permissions
|
|
117
|
-
|
|
118
|
-
You can also control dev tools from the browser console:
|
|
119
|
-
```javascript
|
|
120
|
-
window.gxDevTools.open() // Open modal
|
|
121
|
-
window.gxDevTools.close() // Close modal
|
|
122
|
-
window.gxDevTools.toggle() // Toggle modal
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Environment Variables
|
|
126
|
-
|
|
127
|
-
Configure your development environment in `.env`:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Development server port
|
|
131
|
-
VITE_DEV_PORT=3060
|
|
132
|
-
|
|
133
|
-
# Socket.IO server port
|
|
134
|
-
VITE_SOCKET_PORT=3069
|
|
135
|
-
|
|
136
|
-
# SSL certificates (if using HTTPS)
|
|
137
|
-
VITE_SSL_CERT=.certs/localhost.pem
|
|
138
|
-
VITE_SSL_KEY=.certs/localhost-key.pem
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Platform Props
|
|
142
|
-
|
|
143
|
-
Your Plugin.vue component receives these props from the platform:
|
|
144
|
-
|
|
145
|
-
### pluginVars
|
|
146
|
-
Custom variables configured in the admin panel:
|
|
147
|
-
```javascript
|
|
148
|
-
const { pluginVars } = props;
|
|
149
|
-
console.log(pluginVars.primary_color); // "#FFD600"
|
|
150
|
-
console.log(pluginVars.projectId); // 39
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### assetUrls
|
|
154
|
-
URLs for configured assets:
|
|
155
|
-
```vue
|
|
156
|
-
<img :src="assetUrls.main_logo" alt="Logo" />
|
|
157
|
-
<img :src="assetUrls.background_image" alt="Background" />
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### stringsList
|
|
161
|
-
Localized strings:
|
|
162
|
-
```vue
|
|
163
|
-
<h1>{{ stringsList.welcome_text }}</h1>
|
|
164
|
-
<p>{{ stringsList.instruction_text }}</p>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### theme
|
|
168
|
-
Theme configuration (colors, fonts, etc.):
|
|
169
|
-
```vue
|
|
170
|
-
<GxThemeWrapper :theme="theme">
|
|
171
|
-
<!-- Your content inherits theme variables -->
|
|
172
|
-
</GxThemeWrapper>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### router
|
|
176
|
-
Platform router for navigation (Inertia.js-style):
|
|
177
|
-
```javascript
|
|
178
|
-
// Basic navigation
|
|
179
|
-
router.visit('/camera');
|
|
180
|
-
|
|
181
|
-
// POST data to a route
|
|
182
|
-
router.visit('/share', {
|
|
183
|
-
method: 'post',
|
|
184
|
-
data: { image: photoUrl, caption: 'My photo!' }
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
// Navigation with options
|
|
188
|
-
router.visit('/results', {
|
|
189
|
-
preserveScroll: true,
|
|
190
|
-
preserveState: true,
|
|
191
|
-
replace: true,
|
|
192
|
-
onStart: () => {},
|
|
193
|
-
onFinish: () => {},
|
|
194
|
-
onError: (errors) => {}
|
|
195
|
-
});
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
## GX ComponentKit
|
|
199
|
-
|
|
200
|
-
This project includes `@gramercytech/gx-componentkit` with pre-built components:
|
|
201
|
-
|
|
202
|
-
### Page Components
|
|
203
|
-
- `GxPageStart` - Welcome/start screen with idle timeout
|
|
204
|
-
- `GxPageInstructions` - Instruction display page
|
|
205
|
-
- `GxPageCamera` - Camera capture interface
|
|
206
|
-
- `GxPageResults` - Results display page
|
|
207
|
-
- `GxPageShare` - Social sharing interface
|
|
208
|
-
- `GxPageFinal` - Thank you/completion page
|
|
209
|
-
- `GxPageLoading` - Loading overlay
|
|
210
|
-
|
|
211
|
-
### UI Components
|
|
212
|
-
- `GxModal` - Customizable modal dialogs
|
|
213
|
-
- `GxCountdown` - Timer/countdown component
|
|
214
|
-
- `GxVideoPlayer` - Video player with custom controls
|
|
215
|
-
- `GxThemeWrapper` - Theme provider component
|
|
216
|
-
|
|
217
|
-
### Composables
|
|
218
|
-
- `useMedia()` - Camera, video, and audio utilities
|
|
219
|
-
- `useAnimations()` - Animation helpers
|
|
220
|
-
- `useScanning()` - Barcode/QR scanning
|
|
221
|
-
- `useErrors()` - Error state management
|
|
222
|
-
|
|
223
|
-
### Usage Example
|
|
224
|
-
```vue
|
|
225
|
-
<script setup>
|
|
226
|
-
import {
|
|
227
|
-
GxModal,
|
|
228
|
-
GxCountdown,
|
|
229
|
-
GxVideoPlayer,
|
|
230
|
-
useMedia
|
|
231
|
-
} from '@gramercytech/gx-componentkit';
|
|
232
|
-
|
|
233
|
-
const { startCamera, takePhoto } = useMedia();
|
|
234
|
-
</script>
|
|
235
|
-
|
|
236
|
-
<template>
|
|
237
|
-
<GxCountdown :duration="30" @finished="handleFinished" />
|
|
238
|
-
<GxVideoPlayer :src="videoUrl" @play="handlePlay" />
|
|
239
|
-
</template>
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
## Custom Styling
|
|
243
|
-
|
|
244
|
-
Theme CSS variables are automatically available:
|
|
245
|
-
|
|
246
|
-
```css
|
|
247
|
-
.my-component {
|
|
248
|
-
background: var(--gx-primary-color);
|
|
249
|
-
color: var(--gx-text-color);
|
|
250
|
-
border: 2px solid var(--gx-primary-color);
|
|
251
|
-
}
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
## Socket Events
|
|
255
|
-
|
|
256
|
-
Test real-time features with socket simulation:
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
# List available socket events
|
|
260
|
-
npm run socket:list
|
|
261
|
-
|
|
262
|
-
# Send a socket event
|
|
263
|
-
npm run socket:send
|
|
264
|
-
|
|
265
|
-
# Send to specific channel
|
|
266
|
-
gxdev socket send --event SocialStreamPostCreated --identifier "stream_123"
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
Socket event templates are in `socket-events/` directory. Add your own JSON files to simulate custom events.
|
|
270
|
-
|
|
271
|
-
## Asset Management
|
|
272
|
-
|
|
273
|
-
```bash
|
|
274
|
-
# List all development assets
|
|
275
|
-
npm run assets:list
|
|
276
|
-
|
|
277
|
-
# Initialize asset directories
|
|
278
|
-
npm run assets:init
|
|
279
|
-
|
|
280
|
-
# Generate placeholder images (requires ImageMagick)
|
|
281
|
-
npm run assets:generate
|
|
282
|
-
gxdev assets generate --size 800x600 --name product-image
|
|
283
|
-
gxdev assets generate --name logo --size 200x200 --color "#FF5722" --text "My Logo"
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### ImageMagick Installation
|
|
287
|
-
```bash
|
|
288
|
-
# macOS
|
|
289
|
-
brew install imagemagick
|
|
290
|
-
|
|
291
|
-
# Ubuntu/Debian
|
|
292
|
-
sudo apt-get install imagemagick
|
|
293
|
-
|
|
294
|
-
# Windows - download from https://imagemagick.org/script/download.php
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
## Building for Production
|
|
298
|
-
|
|
299
|
-
```bash
|
|
300
|
-
npm run build
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
This creates a `dist/` folder with:
|
|
304
|
-
- `plugin.es.js` - Your compiled plugin (ES module)
|
|
305
|
-
- `style.css` - Compiled styles
|
|
306
|
-
|
|
307
|
-
The build excludes development files (main.js, index.html) and externalizes Vue (the platform provides it).
|
|
308
|
-
|
|
309
|
-
## Project Architecture
|
|
310
|
-
|
|
311
|
-
```
|
|
312
|
-
Plugin.vue (your entry point)
|
|
313
|
-
├── imports YourHeader.vue
|
|
314
|
-
├── imports YourContent.vue
|
|
315
|
-
│ ├── imports ProductList.vue
|
|
316
|
-
│ ├── imports ShoppingCart.vue
|
|
317
|
-
│ └── imports YourModal.vue
|
|
318
|
-
└── imports YourFooter.vue
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
Everything imported into Plugin.vue (directly or indirectly) is included in the build. The platform loads your Plugin.vue and injects the necessary props.
|
|
322
|
-
|
|
323
|
-
## Learn More
|
|
324
|
-
|
|
325
|
-
- [GX ComponentKit Documentation](https://github.com/gramercytech/gx-componentkit)
|
|
326
|
-
- [GxP Platform Documentation](https://www.gramercytech.com/gxp)
|
|
327
|
-
- [Vue 3 Documentation](https://vuejs.org/)
|
|
328
|
-
- [Vite Documentation](https://vitejs.dev/)
|
|
329
|
-
|
|
330
|
-
## Support
|
|
331
|
-
|
|
332
|
-
For questions about this template or gx-componentkit integration, please contact the development team or check the documentation links above.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "GxToolkit",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "GxToolkit Plugin",
|
|
5
|
-
"manifest_version": 3,
|
|
6
|
-
"asset_dir": "/src/assets/",
|
|
7
|
-
"settings": {
|
|
8
|
-
"primary_color": "#FFD600",
|
|
9
|
-
"background_color": "#ffffff",
|
|
10
|
-
"text_color": "#333333",
|
|
11
|
-
"start_background_color": "#000596",
|
|
12
|
-
"start_text_color": "#FFFFFF",
|
|
13
|
-
"final_background_color": "#4CAF50",
|
|
14
|
-
"final_text_color": "#ffffff"
|
|
15
|
-
},
|
|
16
|
-
"strings": {
|
|
17
|
-
"default": {
|
|
18
|
-
"welcome_text": "Hello World",
|
|
19
|
-
"loading_text": "Loading...",
|
|
20
|
-
"error_title": "Oops!",
|
|
21
|
-
"error_message": "Something went wrong. Please try again.",
|
|
22
|
-
"continue_button": "Continue",
|
|
23
|
-
"back_button": "Back"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"assets": {
|
|
27
|
-
"main_logo": "/dev-assets/images/logo-placeholder.png",
|
|
28
|
-
"background_image": "/dev-assets/images/background-placeholder.jpg"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": [],
|
|
31
|
-
"permissions": []
|
|
32
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/env.example
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# GxToolkit Environment Configuration
|
|
2
|
-
# Copy this file to .env and customize the values for your project
|
|
3
|
-
|
|
4
|
-
# GxP Environment to determine API endpoints and documentation
|
|
5
|
-
# Options: production, staging, testing, development, local, mock
|
|
6
|
-
#
|
|
7
|
-
# - mock: Uses local mock API server at http(s)://localhost:{NODE_PORT}/mock-api
|
|
8
|
-
# Generates a random bearer token for each session
|
|
9
|
-
#
|
|
10
|
-
# - production: https://api.gramercy.cloud
|
|
11
|
-
# - staging: https://api.efz-staging.env.eventfinity.app
|
|
12
|
-
# - testing: https://api.zenith-develop-testing.env.eventfinity.app
|
|
13
|
-
# - development: https://api.zenith-develop.env.eventfinity.app
|
|
14
|
-
# - local: https://dashboard.eventfinity.test
|
|
15
|
-
#
|
|
16
|
-
API_ENV=mock
|
|
17
|
-
|
|
18
|
-
# API Key for authentication (required for non-mock environments)
|
|
19
|
-
# Used as the Bearer token for API requests
|
|
20
|
-
#API_KEY=your-api-key-here
|
|
21
|
-
|
|
22
|
-
#API_PROJECT_ID=
|
|
23
|
-
|
|
24
|
-
# Development server configuration
|
|
25
|
-
NODE_PORT=3060
|
|
26
|
-
CLIENT_PORT=3060
|
|
27
|
-
SOCKET_IO_PORT=3061
|
|
28
|
-
|
|
29
|
-
# Logging configuration
|
|
30
|
-
NODE_LOG_LEVEL=info
|
|
31
|
-
TUNNEL_LOG_LEVEL=error
|
|
32
|
-
|
|
33
|
-
# Component configuration
|
|
34
|
-
COMPONENT_PATH=./src/Plugin.vue
|
|
35
|
-
|
|
36
|
-
# HTTPS configuration (automatically set by gxdev dev command)
|
|
37
|
-
USE_HTTPS=true
|
|
38
|
-
CERT_PATH=.certs/localhost.pem
|
|
39
|
-
KEY_PATH=.certs/localhost-key.pem
|
|
40
|
-
|
|
41
|
-
# Development features
|
|
42
|
-
NODE_DEBUG=false
|
|
43
|
-
SOCKET_IO_ENABLED=true
|
|
44
|
-
|
|
45
|
-
# Mock API Configuration
|
|
46
|
-
# Enable to generate mock API responses from OpenAPI/AsyncAPI specs
|
|
47
|
-
MOCK_API_ENABLED=false
|
|
48
|
-
# Global response delay in milliseconds (simulates network latency)
|
|
49
|
-
MOCK_API_DELAY=0
|
|
50
|
-
# Spec cache TTL in milliseconds (default: 5 minutes)
|
|
51
|
-
MOCK_API_CACHE_TTL=300000
|