zelune 1.6.4 → 1.6.5
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/CHANGELOG.md +12 -0
- package/dist/assets/{CheckoutScreen-6IdrpKgm.js → CheckoutScreen-CoLb16nl.js} +1 -1
- package/dist/assets/{HomeScreen-Dxe9L4I2.js → HomeScreen-DtWSrKS1.js} +1 -1
- package/dist/assets/{LoginScreen-Dp1awI4F.js → LoginScreen-C1EtAYek.js} +1 -1
- package/dist/assets/{ProductDetailScreen-Wa5_nlRP.js → ProductDetailScreen-a9PXPTEY.js} +1 -1
- package/dist/assets/{ProfileScreen-riAU6vVh.js → ProfileScreen-ChKW9gJP.js} +1 -1
- package/dist/assets/{index-hEzd4JVy.js → index-xam7XuSg.js} +143 -76
- package/dist/index.html +1 -1
- package/mcp/server.mjs +647 -68
- package/package.json +1 -1
- package/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the **Zelune — React Native Visual Canvas & MCP** project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.6.5] - 2026-10-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Standalone TSX Browser Compiler & Studio Runtime Screen-Loading Fixes — Resolved (`src/server/tsxBrowserCompiler.ts`, `src/server/studioHttpServer.ts`, `src/runtime/MockNavigationContext.tsx`, `src/main.tsx`, `plugins/viteVirtualScreensPlugin.ts`, `src/screens/index.ts`, `src/canvas/CanvasApp.tsx`)**:
|
|
9
|
+
- **Preserved Nested JSX Children During Bottom-Up AST Transformation (`src/server/tsxBrowserCompiler.ts`)**: Fixed `convertJsxChildrenToExprs` dropping child `JSXElement` / `JSXFragment` nodes that had already been transformed bottom-up into `CallExpression`s, which caused screens in `v1.6.4` to render empty root containers.
|
|
10
|
+
- **Preserved Optional Chaining (`?.`) & Added Full TypeScript Import/Re-Export Elision (`src/server/tsxBrowserCompiler.ts`)**: Guarded `delete node.optional` so `OptionalMemberExpression` and `OptionalCallExpression` (`?.`) are never stripped; added `tsc`/`esbuild`-equivalent unused/type-only import and barrel re-export elision (`import { SomeInterface } from '../types'`), `export type *` stripping, `this: T` fake parameter stripping, and constructor `TSParameterProperty` lowering.
|
|
11
|
+
- **Static `require(...)` Asset/Module Rewriting & Safe Browser Globals (`src/server/tsxBrowserCompiler.ts`, `src/runtime/MockNavigationContext.tsx`)**: Transformed static `require('../assets/...')` calls into `/@zelune/asset?file=...` URIs (or hoisted ESM imports) and restored safe browser `window.process`, `window.__DEV__`, `window.global`, and `window.require` globals without `new Proxy` or external URL literals.
|
|
12
|
+
- **Universal Namespace Exports, Singleton Context Routing & Dynamic Screen Fallback (`src/server/studioHttpServer.ts`, `src/server/tsxBrowserCompiler.ts`, `src/main.tsx`, `plugins/viteVirtualScreensPlugin.ts`, `src/canvas/CanvasApp.tsx`)**: Exposed all `MockNavigationContext` exports on `/@zelune/shim/stub.js` by default for `import * as ...` namespace imports, routed local `MockNavigationContext`/`reactNativeShim` imports to the singleton `/@zelune/shim/*` modules, merged `react-dom` (`createPortal`, `flushSync`) into `window.__ZELUNE_RUNTIME__.ReactDOM`, made `/@zelune/module` symlink- and relative-path-aware, and added `getDynamicScreenComponent` fallback for newly added screens.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- **Removed Top Bar `+ Add Element` Button (`src/canvas/CanvasApp.tsx`)**: Removed the `+ Add Element` button from the top Studio bar to keep the header clean and minimal while retaining the full Component Builder Palette inside the Right Inspector panel.
|
|
16
|
+
|
|
5
17
|
## [1.6.4] - 2026-10-24
|
|
6
18
|
|
|
7
19
|
### Security
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useNavigation, j as jsxRuntimeExports, V as View, b as TouchableOpacity, T as Text, S as StyleSheet } from "./index-
|
|
1
|
+
import { u as useNavigation, j as jsxRuntimeExports, V as View, b as TouchableOpacity, T as Text, S as StyleSheet } from "./index-xam7XuSg.js";
|
|
2
2
|
function CheckoutScreen() {
|
|
3
3
|
const navigation = useNavigation();
|
|
4
4
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { style: styles.container, dataSet: { agyFile: "src/screens/CheckoutScreen.tsx", agyLine: "14", agyCol: "4", agyAstPath: "0", agyTag: "View" }, "data-agy-file": "src/screens/CheckoutScreen.tsx", "data-agy-line": "14", "data-agy-col": "4", "data-agy-ast-path": "0", "data-agy-tag": "View", children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useNavigation, r as reactExports, j as jsxRuntimeExports, c as ScrollView, V as View, T as Text, b as TouchableOpacity, S as StyleSheet } from "./index-
|
|
1
|
+
import { u as useNavigation, r as reactExports, j as jsxRuntimeExports, c as ScrollView, V as View, T as Text, b as TouchableOpacity, S as StyleSheet } from "./index-xam7XuSg.js";
|
|
2
2
|
function HomeScreen() {
|
|
3
3
|
const navigation = useNavigation();
|
|
4
4
|
const [activeTab, setActiveTab] = reactExports.useState("Featured");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useNavigation, r as reactExports, j as jsxRuntimeExports, V as View, T as Text, a as TextInput, b as TouchableOpacity, S as StyleSheet } from "./index-
|
|
1
|
+
import { u as useNavigation, r as reactExports, j as jsxRuntimeExports, V as View, T as Text, a as TextInput, b as TouchableOpacity, S as StyleSheet } from "./index-xam7XuSg.js";
|
|
2
2
|
function LoginScreen() {
|
|
3
3
|
const navigation = useNavigation();
|
|
4
4
|
const [email, setEmail] = reactExports.useState("alex@zelune.studio");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useNavigation, r as reactExports, j as jsxRuntimeExports, V as View, b as TouchableOpacity, T as Text, S as StyleSheet } from "./index-
|
|
1
|
+
import { u as useNavigation, r as reactExports, j as jsxRuntimeExports, V as View, b as TouchableOpacity, T as Text, S as StyleSheet } from "./index-xam7XuSg.js";
|
|
2
2
|
function ProductDetailScreen() {
|
|
3
3
|
const navigation = useNavigation();
|
|
4
4
|
const [selectedFinish, setSelectedFinish] = reactExports.useState("Obsidian");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useNavigation, j as jsxRuntimeExports, V as View, T as Text, b as TouchableOpacity, S as StyleSheet } from "./index-
|
|
1
|
+
import { u as useNavigation, j as jsxRuntimeExports, V as View, T as Text, b as TouchableOpacity, S as StyleSheet } from "./index-xam7XuSg.js";
|
|
2
2
|
function ProfileScreen() {
|
|
3
3
|
const navigation = useNavigation();
|
|
4
4
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(View, { style: styles.container, dataSet: { agyFile: "src/screens/ProfileScreen.tsx", agyLine: "14", agyCol: "4", agyAstPath: "0", agyTag: "View" }, "data-agy-file": "src/screens/ProfileScreen.tsx", "data-agy-line": "14", "data-agy-col": "4", "data-agy-ast-path": "0", "data-agy-tag": "View", children: [
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
var _a;
|
|
5
|
+
function _mergeNamespaces(n, m) {
|
|
6
|
+
for (var i = 0; i < m.length; i++) {
|
|
7
|
+
const e = m[i];
|
|
8
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default" && !(k in n)) {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
if (d) {
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
|
|
23
|
+
}
|
|
4
24
|
(function polyfill() {
|
|
5
25
|
const relList = document.createElement("link").relList;
|
|
6
26
|
if (relList && relList.supports && relList.supports("modulepreload")) {
|
|
@@ -357,7 +377,6 @@ function requireJsxRuntime() {
|
|
|
357
377
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
358
378
|
var reactExports = requireReact();
|
|
359
379
|
const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
|
|
360
|
-
var client = {};
|
|
361
380
|
var reactDom = { exports: {} };
|
|
362
381
|
var reactDom_production_min = {};
|
|
363
382
|
var scheduler = { exports: {} };
|
|
@@ -7047,6 +7066,13 @@ function requireReactDom() {
|
|
|
7047
7066
|
}
|
|
7048
7067
|
return reactDom.exports;
|
|
7049
7068
|
}
|
|
7069
|
+
var reactDomExports = requireReactDom();
|
|
7070
|
+
const index$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
|
|
7071
|
+
const ReactDOMBase = /* @__PURE__ */ _mergeNamespaces({
|
|
7072
|
+
__proto__: null,
|
|
7073
|
+
default: index$1
|
|
7074
|
+
}, [reactDomExports]);
|
|
7075
|
+
var client = {};
|
|
7050
7076
|
var hasRequiredClient;
|
|
7051
7077
|
function requireClient() {
|
|
7052
7078
|
if (hasRequiredClient) return client;
|
|
@@ -7059,7 +7085,7 @@ function requireClient() {
|
|
|
7059
7085
|
return client;
|
|
7060
7086
|
}
|
|
7061
7087
|
var clientExports = requireClient();
|
|
7062
|
-
const
|
|
7088
|
+
const ReactDOMClient = /* @__PURE__ */ getDefaultExportFromCjs(clientExports);
|
|
7063
7089
|
/**
|
|
7064
7090
|
* @license lucide-react v0.454.0 - ISC
|
|
7065
7091
|
*
|
|
@@ -35969,7 +35995,7 @@ function applyColorAlpha(colorStr, alphaRatio) {
|
|
|
35969
35995
|
return colorStr;
|
|
35970
35996
|
}
|
|
35971
35997
|
function lookupColorToken(rawToken, themeColors) {
|
|
35972
|
-
var
|
|
35998
|
+
var _a2, _b;
|
|
35973
35999
|
if (rawToken.startsWith("[") && rawToken.endsWith("]")) {
|
|
35974
36000
|
return rawToken.slice(1, -1);
|
|
35975
36001
|
}
|
|
@@ -36007,7 +36033,7 @@ function lookupColorToken(rawToken, themeColors) {
|
|
|
36007
36033
|
}
|
|
36008
36034
|
if (!resolvedHex) return void 0;
|
|
36009
36035
|
if (alphaPart !== void 0) {
|
|
36010
|
-
const customOpacity = typeof window !== "undefined" ? (_b = (
|
|
36036
|
+
const customOpacity = typeof window !== "undefined" ? (_b = (_a2 = window.__ZELUNE_TAILWIND_THEME__) == null ? void 0 : _a2.opacity) == null ? void 0 : _b[alphaPart] : void 0;
|
|
36011
36037
|
let alphaRatio = typeof customOpacity === "string" || typeof customOpacity === "number" ? Number.parseFloat(String(customOpacity)) : Number.NaN;
|
|
36012
36038
|
if (!Number.isFinite(alphaRatio)) {
|
|
36013
36039
|
const numeric = Number.parseFloat(alphaPart);
|
|
@@ -37234,12 +37260,12 @@ const TextInput = reactExports.forwardRef(function TextInput2(props, ref) {
|
|
|
37234
37260
|
useSimulatedLayout(props.onLayout);
|
|
37235
37261
|
reactExports.useImperativeHandle(ref, () => ({
|
|
37236
37262
|
focus: () => {
|
|
37237
|
-
var
|
|
37238
|
-
return (
|
|
37263
|
+
var _a2;
|
|
37264
|
+
return (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
37239
37265
|
},
|
|
37240
37266
|
blur: () => {
|
|
37241
|
-
var
|
|
37242
|
-
return (
|
|
37267
|
+
var _a2;
|
|
37268
|
+
return (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
|
|
37243
37269
|
},
|
|
37244
37270
|
clear: () => {
|
|
37245
37271
|
if (inputRef.current) inputRef.current.value = "";
|
|
@@ -38898,8 +38924,8 @@ function create(initializer) {
|
|
|
38898
38924
|
return Object.assign(useBoundStore, api);
|
|
38899
38925
|
}
|
|
38900
38926
|
function useStore(store, selector) {
|
|
38901
|
-
var
|
|
38902
|
-
const rawState = typeof store === "function" ? store() : ((
|
|
38927
|
+
var _a2;
|
|
38928
|
+
const rawState = typeof store === "function" ? store() : ((_a2 = store == null ? void 0 : store.getState) == null ? void 0 : _a2.call(store)) ?? {};
|
|
38903
38929
|
return typeof selector === "function" ? selector(rawState) : rawState;
|
|
38904
38930
|
}
|
|
38905
38931
|
class QueryClient {
|
|
@@ -39352,12 +39378,35 @@ const safeContextFallbackBase = {
|
|
|
39352
39378
|
notifications: STABLE_EMPTY_ARRAY,
|
|
39353
39379
|
bookings: STABLE_EMPTY_ARRAY,
|
|
39354
39380
|
listings: STABLE_EMPTY_ARRAY,
|
|
39381
|
+
featuredListings: STABLE_EMPTY_ARRAY,
|
|
39355
39382
|
vehicles: STABLE_EMPTY_ARRAY,
|
|
39356
39383
|
cars: STABLE_EMPTY_ARRAY,
|
|
39384
|
+
dealers: STABLE_EMPTY_ARRAY,
|
|
39385
|
+
featuredDealers: STABLE_EMPTY_ARRAY,
|
|
39386
|
+
categories: STABLE_EMPTY_ARRAY,
|
|
39387
|
+
brands: STABLE_EMPTY_ARRAY,
|
|
39388
|
+
makes: STABLE_EMPTY_ARRAY,
|
|
39389
|
+
models: STABLE_EMPTY_ARRAY,
|
|
39390
|
+
products: STABLE_EMPTY_ARRAY,
|
|
39391
|
+
services: STABLE_EMPTY_ARRAY,
|
|
39392
|
+
reviews: STABLE_EMPTY_ARRAY,
|
|
39357
39393
|
orders: STABLE_EMPTY_ARRAY,
|
|
39358
39394
|
transactions: STABLE_EMPTY_ARRAY,
|
|
39359
39395
|
messages: STABLE_EMPTY_ARRAY,
|
|
39360
39396
|
chats: STABLE_EMPTY_ARRAY,
|
|
39397
|
+
accounts: STABLE_EMPTY_ARRAY,
|
|
39398
|
+
wallets: STABLE_EMPTY_ARRAY,
|
|
39399
|
+
loans: STABLE_EMPTY_ARRAY,
|
|
39400
|
+
members: STABLE_EMPTY_ARRAY,
|
|
39401
|
+
groups: STABLE_EMPTY_ARRAY,
|
|
39402
|
+
contributions: STABLE_EMPTY_ARRAY,
|
|
39403
|
+
addresses: STABLE_EMPTY_ARRAY,
|
|
39404
|
+
cards: STABLE_EMPTY_ARRAY,
|
|
39405
|
+
paymentMethods: STABLE_EMPTY_ARRAY,
|
|
39406
|
+
filters: {},
|
|
39407
|
+
filterState: {},
|
|
39408
|
+
searchQuery: "",
|
|
39409
|
+
selectedCategory: "All",
|
|
39361
39410
|
unreadCount: 0,
|
|
39362
39411
|
count: 0,
|
|
39363
39412
|
total: 0,
|
|
@@ -39372,13 +39421,50 @@ const safeContextFallbackBase = {
|
|
|
39372
39421
|
refetch: async () => void 0,
|
|
39373
39422
|
updateProfile: async () => ({ error: null }),
|
|
39374
39423
|
toggleTheme: () => void 0,
|
|
39375
|
-
setTheme: () => void 0
|
|
39424
|
+
setTheme: () => void 0,
|
|
39425
|
+
setSearchQuery: () => void 0,
|
|
39426
|
+
setFilters: () => void 0,
|
|
39427
|
+
resetFilters: () => void 0,
|
|
39428
|
+
addItem: () => void 0,
|
|
39429
|
+
removeItem: () => void 0,
|
|
39430
|
+
clearCart: () => void 0,
|
|
39431
|
+
toggleFavorite: () => void 0,
|
|
39432
|
+
isFavorite: () => false
|
|
39376
39433
|
};
|
|
39377
39434
|
safeContextFallbackBase[Symbol$1.iterator] = function* () {
|
|
39378
39435
|
yield safeContextFallbackBase;
|
|
39379
39436
|
yield () => void 0;
|
|
39380
39437
|
};
|
|
39381
39438
|
const SAFE_CONTEXT_FALLBACK = safeContextFallbackBase;
|
|
39439
|
+
if (typeof window !== "undefined") {
|
|
39440
|
+
const win = window;
|
|
39441
|
+
const previewOrigin = ((_a = window.location) == null ? void 0 : _a.origin) || "zelune-preview";
|
|
39442
|
+
win.global = window;
|
|
39443
|
+
win.__DEV__ = true;
|
|
39444
|
+
if (!win.process || typeof win.process !== "object") {
|
|
39445
|
+
win.process = {
|
|
39446
|
+
env: {
|
|
39447
|
+
NODE_ENV: "development",
|
|
39448
|
+
EXPO_PUBLIC_PLATFORM: "web",
|
|
39449
|
+
EXPO_PUBLIC_SUPABASE_URL: previewOrigin,
|
|
39450
|
+
EXPO_PUBLIC_SUPABASE_ANON_KEY: "zelune-preview-public-key",
|
|
39451
|
+
EXPO_PUBLIC_API_URL: previewOrigin,
|
|
39452
|
+
EXPO_PUBLIC_APP_URL: previewOrigin
|
|
39453
|
+
},
|
|
39454
|
+
platform: "browser",
|
|
39455
|
+
version: "",
|
|
39456
|
+
cwd: () => "/"
|
|
39457
|
+
};
|
|
39458
|
+
}
|
|
39459
|
+
if (typeof win.require !== "function") {
|
|
39460
|
+
win.require = (modId) => {
|
|
39461
|
+
if (typeof modId === "string" && /\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)$/i.test(modId)) {
|
|
39462
|
+
return { uri: modId, default: modId };
|
|
39463
|
+
}
|
|
39464
|
+
return SAFE_CHAINABLE_PROXY;
|
|
39465
|
+
};
|
|
39466
|
+
}
|
|
39467
|
+
}
|
|
39382
39468
|
const origCreateContext = React.createContext;
|
|
39383
39469
|
const origUseContext = React.useContext;
|
|
39384
39470
|
const wrappedCreateContext = function zeluneCreateContext(defaultValue, ...rest) {
|
|
@@ -40023,24 +40109,24 @@ function createIsolatedScreenComponent(screenId, filePath, loader) {
|
|
|
40023
40109
|
const BUILTIN_SCREEN_COMPONENTS = {
|
|
40024
40110
|
"Login": createIsolatedScreenComponent("Login", "src/screens/LoginScreen.tsx", (attempt) => attempt > 0 ? __vitePreload(() => import(
|
|
40025
40111
|
/* @vite-ignore */
|
|
40026
|
-
"/
|
|
40027
|
-
), true ? [] : void 0) : __vitePreload(() => import("./LoginScreen-
|
|
40112
|
+
"/@zelune/module?file=" + encodeURIComponent("src/screens/LoginScreen.tsx") + "&t=" + Date.now()
|
|
40113
|
+
), true ? [] : void 0) : __vitePreload(() => import("./LoginScreen-C1EtAYek.js"), true ? [] : void 0)),
|
|
40028
40114
|
"Home": createIsolatedScreenComponent("Home", "src/screens/HomeScreen.tsx", (attempt) => attempt > 0 ? __vitePreload(() => import(
|
|
40029
40115
|
/* @vite-ignore */
|
|
40030
|
-
"/
|
|
40031
|
-
), true ? [] : void 0) : __vitePreload(() => import("./HomeScreen-
|
|
40116
|
+
"/@zelune/module?file=" + encodeURIComponent("src/screens/HomeScreen.tsx") + "&t=" + Date.now()
|
|
40117
|
+
), true ? [] : void 0) : __vitePreload(() => import("./HomeScreen-DtWSrKS1.js"), true ? [] : void 0)),
|
|
40032
40118
|
"ProductDetail": createIsolatedScreenComponent("ProductDetail", "src/screens/ProductDetailScreen.tsx", (attempt) => attempt > 0 ? __vitePreload(() => import(
|
|
40033
40119
|
/* @vite-ignore */
|
|
40034
|
-
"/
|
|
40035
|
-
), true ? [] : void 0) : __vitePreload(() => import("./ProductDetailScreen-
|
|
40120
|
+
"/@zelune/module?file=" + encodeURIComponent("src/screens/ProductDetailScreen.tsx") + "&t=" + Date.now()
|
|
40121
|
+
), true ? [] : void 0) : __vitePreload(() => import("./ProductDetailScreen-a9PXPTEY.js"), true ? [] : void 0)),
|
|
40036
40122
|
"Checkout": createIsolatedScreenComponent("Checkout", "src/screens/CheckoutScreen.tsx", (attempt) => attempt > 0 ? __vitePreload(() => import(
|
|
40037
40123
|
/* @vite-ignore */
|
|
40038
|
-
"/
|
|
40039
|
-
), true ? [] : void 0) : __vitePreload(() => import("./CheckoutScreen-
|
|
40124
|
+
"/@zelune/module?file=" + encodeURIComponent("src/screens/CheckoutScreen.tsx") + "&t=" + Date.now()
|
|
40125
|
+
), true ? [] : void 0) : __vitePreload(() => import("./CheckoutScreen-CoLb16nl.js"), true ? [] : void 0)),
|
|
40040
40126
|
"Profile": createIsolatedScreenComponent("Profile", "src/screens/ProfileScreen.tsx", (attempt) => attempt > 0 ? __vitePreload(() => import(
|
|
40041
40127
|
/* @vite-ignore */
|
|
40042
|
-
"/
|
|
40043
|
-
), true ? [] : void 0) : __vitePreload(() => import("./ProfileScreen-
|
|
40128
|
+
"/@zelune/module?file=" + encodeURIComponent("src/screens/ProfileScreen.tsx") + "&t=" + Date.now()
|
|
40129
|
+
), true ? [] : void 0) : __vitePreload(() => import("./ProfileScreen-ChKW9gJP.js"), true ? [] : void 0))
|
|
40044
40130
|
};
|
|
40045
40131
|
const BUILTIN_SCREEN_ORDER = ["Login", "Home", "ProductDetail", "Checkout", "Profile"];
|
|
40046
40132
|
function buildRuntimeScreenRegistry() {
|
|
@@ -40062,6 +40148,15 @@ function buildRuntimeScreenRegistry() {
|
|
|
40062
40148
|
const __registry = buildRuntimeScreenRegistry();
|
|
40063
40149
|
const SCREEN_COMPONENTS = __registry.components;
|
|
40064
40150
|
const SCREEN_ORDER = __registry.order;
|
|
40151
|
+
function getDynamicScreenComponent(screenId, filePath) {
|
|
40152
|
+
if (SCREEN_COMPONENTS[screenId]) return SCREEN_COMPONENTS[screenId];
|
|
40153
|
+
const comp = createIsolatedScreenComponent(screenId, filePath, () => __vitePreload(() => import(
|
|
40154
|
+
/* @vite-ignore */
|
|
40155
|
+
"/@zelune/module?file=" + encodeURIComponent(filePath) + "&t=" + Date.now()
|
|
40156
|
+
), true ? [] : void 0));
|
|
40157
|
+
SCREEN_COMPONENTS[screenId] = comp;
|
|
40158
|
+
return comp;
|
|
40159
|
+
}
|
|
40065
40160
|
class ScreenErrorBoundary extends React.Component {
|
|
40066
40161
|
constructor(props) {
|
|
40067
40162
|
super(props);
|
|
@@ -40138,11 +40233,11 @@ class ScreenErrorBoundary extends React.Component {
|
|
|
40138
40233
|
}
|
|
40139
40234
|
}
|
|
40140
40235
|
function findNearestAgyElement(target, container) {
|
|
40141
|
-
var
|
|
40236
|
+
var _a2, _b;
|
|
40142
40237
|
if (!target || !(target instanceof HTMLElement) || !container) return null;
|
|
40143
40238
|
let curr = target;
|
|
40144
40239
|
while (curr && curr !== container && container.contains(curr)) {
|
|
40145
|
-
if (((
|
|
40240
|
+
if (((_a2 = curr.dataset) == null ? void 0 : _a2.agyAstPath) && ((_b = curr.dataset) == null ? void 0 : _b.agyFile)) {
|
|
40146
40241
|
return curr;
|
|
40147
40242
|
}
|
|
40148
40243
|
curr = curr.parentElement;
|
|
@@ -40171,7 +40266,7 @@ const ScreenArtboard = React.memo(({
|
|
|
40171
40266
|
onPatchElement,
|
|
40172
40267
|
onReorderElement
|
|
40173
40268
|
}) => {
|
|
40174
|
-
var
|
|
40269
|
+
var _a2, _b, _c, _d;
|
|
40175
40270
|
const viewportRef = reactExports.useRef(null);
|
|
40176
40271
|
const inlineInputRef = reactExports.useRef(null);
|
|
40177
40272
|
const [hoverBox, setHoverBox] = reactExports.useState(null);
|
|
@@ -40187,7 +40282,7 @@ const ScreenArtboard = React.memo(({
|
|
|
40187
40282
|
const prevSelectionKeyRef = reactExports.useRef(null);
|
|
40188
40283
|
const isSelectedOnThisScreen = Boolean(selectedElement) && (selectedElement == null ? void 0 : selectedElement.screenId) === screen.id;
|
|
40189
40284
|
const activeInspected = isSelectedOnThisScreen && inspectedElement && inspectedElement.astPath === (selectedElement == null ? void 0 : selectedElement.astPath) ? inspectedElement : null;
|
|
40190
|
-
const isAbsolutePositioned = ((
|
|
40285
|
+
const isAbsolutePositioned = ((_a2 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _a2.position) === "absolute";
|
|
40191
40286
|
const getSelectedDomNode = reactExports.useCallback(() => {
|
|
40192
40287
|
const container = viewportRef.current;
|
|
40193
40288
|
if (!container || !selectedElement || selectedElement.screenId !== screen.id) {
|
|
@@ -40252,11 +40347,11 @@ const ScreenArtboard = React.memo(({
|
|
|
40252
40347
|
}, [isEditingInlineText]);
|
|
40253
40348
|
const startInlineTextEdit = reactExports.useCallback(
|
|
40254
40349
|
(explicitDomEl) => {
|
|
40255
|
-
var
|
|
40350
|
+
var _a3, _b2, _c2;
|
|
40256
40351
|
const domEl = explicitDomEl ?? getSelectedDomNode();
|
|
40257
40352
|
if (!domEl) return;
|
|
40258
40353
|
const domTag = domEl.dataset.agyTag || "";
|
|
40259
|
-
const isDomTextNode = domTag === "Text" || domTag.endsWith(".Text") || domEl.querySelectorAll("[data-agy-ast-path]").length === 0 && Boolean((
|
|
40354
|
+
const isDomTextNode = domTag === "Text" || domTag.endsWith(".Text") || domEl.querySelectorAll("[data-agy-ast-path]").length === 0 && Boolean((_a3 = domEl.textContent) == null ? void 0 : _a3.trim());
|
|
40260
40355
|
if (activeInspected && activeInspected.astPath === domEl.dataset.agyAstPath) {
|
|
40261
40356
|
if (!activeInspected.isTextEditable && !isDomTextNode) return;
|
|
40262
40357
|
const initialVal2 = activeInspected.textContent ?? ((_b2 = domEl.textContent) == null ? void 0 : _b2.trim()) ?? "";
|
|
@@ -40316,7 +40411,7 @@ const ScreenArtboard = React.memo(({
|
|
|
40316
40411
|
window.addEventListener("pointerup", handlePointerUp);
|
|
40317
40412
|
};
|
|
40318
40413
|
const handleResizePointerDown = (e, dir) => {
|
|
40319
|
-
var
|
|
40414
|
+
var _a3, _b2;
|
|
40320
40415
|
if (e.button !== 0 || !selectedBox || !selectedElement) return;
|
|
40321
40416
|
e.stopPropagation();
|
|
40322
40417
|
e.preventDefault();
|
|
@@ -40325,7 +40420,7 @@ const ScreenArtboard = React.memo(({
|
|
|
40325
40420
|
const startClientX = e.clientX;
|
|
40326
40421
|
const startClientY = e.clientY;
|
|
40327
40422
|
const initialBox = { ...selectedBox };
|
|
40328
|
-
const initialLeft = Number(((
|
|
40423
|
+
const initialLeft = Number(((_a3 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _a3.left) ?? initialBox.left);
|
|
40329
40424
|
const initialTop = Number(((_b2 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _b2.top) ?? initialBox.top);
|
|
40330
40425
|
let parentInnerWidth = position.width;
|
|
40331
40426
|
if (targetDomEl.parentElement) {
|
|
@@ -40412,7 +40507,7 @@ const ScreenArtboard = React.memo(({
|
|
|
40412
40507
|
window.addEventListener("pointercancel", handlePointerUp);
|
|
40413
40508
|
};
|
|
40414
40509
|
const handleRadiusPointerDown = (e, corner) => {
|
|
40415
|
-
var
|
|
40510
|
+
var _a3;
|
|
40416
40511
|
if (e.button !== 0 || !selectedBox || !selectedElement) return;
|
|
40417
40512
|
e.stopPropagation();
|
|
40418
40513
|
e.preventDefault();
|
|
@@ -40420,7 +40515,7 @@ const ScreenArtboard = React.memo(({
|
|
|
40420
40515
|
if (!targetDomEl) return;
|
|
40421
40516
|
const startClientX = e.clientX;
|
|
40422
40517
|
const startClientY = e.clientY;
|
|
40423
|
-
const initialRadius = Number(((
|
|
40518
|
+
const initialRadius = Number(((_a3 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _a3.borderRadius) ?? 0) || 0;
|
|
40424
40519
|
const maxRadius = Math.max(0, Math.round(Math.min(selectedBox.width, selectedBox.height) / 2));
|
|
40425
40520
|
setActiveGizmoAction("radius");
|
|
40426
40521
|
let nextRadius = initialRadius;
|
|
@@ -40457,13 +40552,13 @@ const ScreenArtboard = React.memo(({
|
|
|
40457
40552
|
};
|
|
40458
40553
|
const startMoveElementInteraction = reactExports.useCallback(
|
|
40459
40554
|
(startClientX, startClientY, initialAltKey) => {
|
|
40460
|
-
var
|
|
40555
|
+
var _a3, _b2, _c2;
|
|
40461
40556
|
if (!selectedBox || !selectedElement) return;
|
|
40462
40557
|
const targetDomEl = getSelectedDomNode();
|
|
40463
40558
|
const container = viewportRef.current;
|
|
40464
40559
|
if (!targetDomEl || !container) return;
|
|
40465
40560
|
const initialBox = { ...selectedBox };
|
|
40466
|
-
const initialLeft = Number(((
|
|
40561
|
+
const initialLeft = Number(((_a3 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _a3.left) ?? initialBox.left);
|
|
40467
40562
|
const initialTop = Number(((_b2 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _b2.top) ?? initialBox.top);
|
|
40468
40563
|
const initialMarginTop = Number(((_c2 = activeInspected == null ? void 0 : activeInspected.styles) == null ? void 0 : _c2.marginTop) ?? 0) || 0;
|
|
40469
40564
|
const prevTransform = targetDomEl.style.transform;
|
|
@@ -40540,8 +40635,8 @@ const ScreenArtboard = React.memo(({
|
|
|
40540
40635
|
const pointerY = (moveEvent.clientY - containerRect.top) / zoom;
|
|
40541
40636
|
const siblings = Array.from(parentEl.children).filter(
|
|
40542
40637
|
(child) => {
|
|
40543
|
-
var
|
|
40544
|
-
return child instanceof HTMLElement && child !== targetDomEl && Boolean((
|
|
40638
|
+
var _a4;
|
|
40639
|
+
return child instanceof HTMLElement && child !== targetDomEl && Boolean((_a4 = child.dataset) == null ? void 0 : _a4.agyAstPath);
|
|
40545
40640
|
}
|
|
40546
40641
|
);
|
|
40547
40642
|
if (siblings.length === 0) {
|
|
@@ -42868,8 +42963,8 @@ const InspectorPanel = ({
|
|
|
42868
42963
|
type: "button",
|
|
42869
42964
|
className: "zelune-interactive",
|
|
42870
42965
|
onClick: () => {
|
|
42871
|
-
var
|
|
42872
|
-
return (
|
|
42966
|
+
var _a2;
|
|
42967
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.showModal();
|
|
42873
42968
|
},
|
|
42874
42969
|
style: {
|
|
42875
42970
|
display: "flex",
|
|
@@ -42977,8 +43072,8 @@ const InspectorPanel = ({
|
|
|
42977
43072
|
type: "button",
|
|
42978
43073
|
className: "zelune-interactive",
|
|
42979
43074
|
onClick: () => {
|
|
42980
|
-
var
|
|
42981
|
-
return (
|
|
43075
|
+
var _a2;
|
|
43076
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
42982
43077
|
},
|
|
42983
43078
|
style: {
|
|
42984
43079
|
background: "transparent",
|
|
@@ -43054,8 +43149,8 @@ const InspectorPanel = ({
|
|
|
43054
43149
|
type: "button",
|
|
43055
43150
|
className: "zelune-interactive",
|
|
43056
43151
|
onClick: () => {
|
|
43057
|
-
var
|
|
43058
|
-
return (
|
|
43152
|
+
var _a2;
|
|
43153
|
+
return (_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
43059
43154
|
},
|
|
43060
43155
|
style: {
|
|
43061
43156
|
padding: "8px 13px",
|
|
@@ -43279,10 +43374,10 @@ const CanvasApp = () => {
|
|
|
43279
43374
|
const sorted = sortScreensByOrder(screensJson.screens);
|
|
43280
43375
|
setScreens(sorted);
|
|
43281
43376
|
setActiveScreenId((prev) => {
|
|
43282
|
-
var
|
|
43377
|
+
var _a2;
|
|
43283
43378
|
if (prev && sorted.some((s2) => s2.id === prev)) return prev;
|
|
43284
43379
|
const home = sorted.find((s2) => s2.id.toLowerCase() === "home");
|
|
43285
|
-
return home ? home.id : ((
|
|
43380
|
+
return home ? home.id : ((_a2 = sorted[0]) == null ? void 0 : _a2.id) ?? null;
|
|
43286
43381
|
});
|
|
43287
43382
|
if (screensJson.history) {
|
|
43288
43383
|
setHistoryState(screensJson.history);
|
|
@@ -43428,7 +43523,7 @@ const CanvasApp = () => {
|
|
|
43428
43523
|
);
|
|
43429
43524
|
const handleInsertElement = reactExports.useCallback(
|
|
43430
43525
|
async (payload) => {
|
|
43431
|
-
var
|
|
43526
|
+
var _a2;
|
|
43432
43527
|
setIsSaving(true);
|
|
43433
43528
|
setStatusMessage(null);
|
|
43434
43529
|
try {
|
|
@@ -43441,7 +43536,7 @@ const CanvasApp = () => {
|
|
|
43441
43536
|
if (data.ok && data.element) {
|
|
43442
43537
|
setInspectedData(data.element);
|
|
43443
43538
|
if (data.history) setHistoryState(data.history);
|
|
43444
|
-
const ownerScreen = ((
|
|
43539
|
+
const ownerScreen = ((_a2 = screens.find((s2) => s2.filePath === data.element.file)) == null ? void 0 : _a2.id) ?? activeScreenId ?? "Home";
|
|
43445
43540
|
setSelectedElement({
|
|
43446
43541
|
screenId: ownerScreen,
|
|
43447
43542
|
file: data.element.file,
|
|
@@ -43994,35 +44089,6 @@ const CanvasApp = () => {
|
|
|
43994
44089
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "zelune-reveal-label", children: "Flow Graph" })
|
|
43995
44090
|
]
|
|
43996
44091
|
}
|
|
43997
|
-
),
|
|
43998
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
43999
|
-
"button",
|
|
44000
|
-
{
|
|
44001
|
-
type: "button",
|
|
44002
|
-
className: "zelune-interactive",
|
|
44003
|
-
onClick: () => {
|
|
44004
|
-
setIsRightPanelOpen(true);
|
|
44005
|
-
window.dispatchEvent(new CustomEvent("zelune:open-insert-palette"));
|
|
44006
|
-
},
|
|
44007
|
-
title: "Add Button, Section, Input, or Component to Active Screen",
|
|
44008
|
-
style: {
|
|
44009
|
-
display: "inline-flex",
|
|
44010
|
-
alignItems: "center",
|
|
44011
|
-
gap: 5,
|
|
44012
|
-
padding: "6px 10px",
|
|
44013
|
-
borderRadius: 7,
|
|
44014
|
-
border: "1px solid rgba(56, 189, 248, 0.4)",
|
|
44015
|
-
backgroundColor: "rgba(56, 189, 248, 0.12)",
|
|
44016
|
-
color: colorScheme === "dark" ? "#38BDF8" : "#0284C7",
|
|
44017
|
-
fontSize: 12,
|
|
44018
|
-
fontWeight: 600,
|
|
44019
|
-
cursor: "pointer"
|
|
44020
|
-
},
|
|
44021
|
-
children: [
|
|
44022
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 14, style: { flexShrink: 0 } }),
|
|
44023
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Add Element" })
|
|
44024
|
-
]
|
|
44025
|
-
}
|
|
44026
44092
|
)
|
|
44027
44093
|
] }),
|
|
44028
44094
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
@@ -44543,7 +44609,7 @@ const CanvasApp = () => {
|
|
|
44543
44609
|
width: DEFAULT_WIDTH,
|
|
44544
44610
|
height: DEFAULT_HEIGHT
|
|
44545
44611
|
};
|
|
44546
|
-
const ScreenComponent = SCREEN_COMPONENTS[screen.id];
|
|
44612
|
+
const ScreenComponent = SCREEN_COMPONENTS[screen.id] ?? getDynamicScreenComponent(screen.id, screen.filePath);
|
|
44547
44613
|
const isSelectedScreen = (selectedElement == null ? void 0 : selectedElement.screenId) === screen.id;
|
|
44548
44614
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
44549
44615
|
ScreenArtboard,
|
|
@@ -44607,12 +44673,13 @@ const CanvasApp = () => {
|
|
|
44607
44673
|
if (typeof window !== "undefined") {
|
|
44608
44674
|
window.__ZELUNE_RUNTIME__ = {
|
|
44609
44675
|
React,
|
|
44610
|
-
ReactDOM,
|
|
44676
|
+
ReactDOM: { ...ReactDOMBase, ...ReactDOMClient },
|
|
44611
44677
|
ReactNative: ReactNativeShim,
|
|
44612
44678
|
MockNav: MockNavShim,
|
|
44613
44679
|
LucideIcons
|
|
44614
44680
|
};
|
|
44615
44681
|
}
|
|
44682
|
+
const ReactDOM = ReactDOMClient;
|
|
44616
44683
|
class StudioRootErrorBoundary extends React.Component {
|
|
44617
44684
|
constructor() {
|
|
44618
44685
|
super(...arguments);
|
package/dist/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
} catch {}
|
|
13
13
|
</script>
|
|
14
14
|
<title>Zelune — React Native Visual Canvas & AST Studio</title>
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-xam7XuSg.js"></script>
|
|
16
16
|
<link rel="stylesheet" crossorigin href="/assets/index-C7nrS82N.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|