@orunelle/theme-runtime 0.0.0-stage → 2.0.0-alpha.14

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.
Files changed (97) hide show
  1. package/dist/application.d.ts +7 -0
  2. package/dist/application.d.ts.map +1 -0
  3. package/dist/application.js +58 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +429 -0
  7. package/dist/commerce.d.ts +235 -0
  8. package/dist/commerce.d.ts.map +1 -0
  9. package/dist/commerce.js +316 -0
  10. package/dist/credentials.d.ts +11 -0
  11. package/dist/credentials.d.ts.map +1 -0
  12. package/dist/credentials.js +79 -0
  13. package/dist/fixtures.d.ts +23 -0
  14. package/dist/fixtures.d.ts.map +1 -0
  15. package/dist/fixtures.js +131 -0
  16. package/dist/host/package.json +1 -0
  17. package/dist/host/preview/editor.css +116 -0
  18. package/dist/host/preview/editor.tsx +193 -0
  19. package/dist/host/preview/src/bridge.tsx +371 -0
  20. package/dist/host/preview/src/client.tsx +15 -0
  21. package/dist/host/preview/src/env.d.ts +5 -0
  22. package/dist/host/preview/src/preview.css +40 -0
  23. package/dist/host/preview/src/server.tsx +95 -0
  24. package/dist/host/preview/src/surface.tsx +264 -0
  25. package/dist/host/serve-node.mjs +133 -0
  26. package/dist/host/storefront/public/fonts/9da48a48bf6500f8-s.p.woff2 +0 -0
  27. package/dist/host/storefront/public/fonts/e4af272ccee01ff0-s.p.woff2 +0 -0
  28. package/dist/host/storefront/public/fonts/e4efb0298547fad0-s.p.woff2 +0 -0
  29. package/dist/host/storefront/public/fonts/f022b1629605b85c-s.p.woff2 +0 -0
  30. package/dist/host/storefront/public/fonts/fb66eb17bf011c3b-s.p.woff2 +0 -0
  31. package/dist/host/storefront/public/fonts.css +7 -0
  32. package/dist/host/storefront/public/samples/pouch-navy.svg +4 -0
  33. package/dist/host/storefront/public/samples/throw-oat.svg +2 -0
  34. package/dist/host/storefront/public/samples/throw-sage.svg +2 -0
  35. package/dist/host/storefront/public/samples/tote-charcoal.svg +5 -0
  36. package/dist/host/storefront/public/samples/tote-detail.svg +1 -0
  37. package/dist/host/storefront/public/samples/tote-sand.svg +5 -0
  38. package/dist/host/storefront/src/binding.server.ts +1 -0
  39. package/dist/host/storefront/src/data.ts +2 -0
  40. package/dist/host/storefront/src/env.d.ts +5 -0
  41. package/dist/host/storefront/src/queries.ts +1 -0
  42. package/dist/host/storefront/src/routeTree.gen.ts +155 -0
  43. package/dist/host/storefront/src/router.tsx +31 -0
  44. package/dist/host/storefront/src/routes/$locale.$.tsx +135 -0
  45. package/dist/host/storefront/src/routes/$locale.index.tsx +19 -0
  46. package/dist/host/storefront/src/routes/$locale.products.$handle.tsx +57 -0
  47. package/dist/host/storefront/src/routes/$locale.tsx +36 -0
  48. package/dist/host/storefront/src/routes/__root.tsx +103 -0
  49. package/dist/host/storefront/src/routes/index.tsx +6 -0
  50. package/dist/host/storefront/src/server.ts +1 -0
  51. package/dist/host.d.ts +45 -0
  52. package/dist/host.d.ts.map +1 -0
  53. package/dist/host.js +380 -0
  54. package/dist/local-editor.d.ts +2 -0
  55. package/dist/local-editor.d.ts.map +1 -0
  56. package/dist/local-editor.js +111 -0
  57. package/dist/managed-worker.d.ts +2 -0
  58. package/dist/managed-worker.d.ts.map +1 -0
  59. package/dist/managed-worker.js +22 -0
  60. package/dist/server.d.ts +5 -0
  61. package/dist/server.d.ts.map +1 -0
  62. package/dist/server.js +98 -0
  63. package/dist/source.d.ts +19 -0
  64. package/dist/source.d.ts.map +1 -0
  65. package/dist/source.js +131 -0
  66. package/dist/tanstack/binding.server.d.ts +4 -0
  67. package/dist/tanstack/binding.server.d.ts.map +1 -0
  68. package/dist/tanstack/binding.server.js +9 -0
  69. package/dist/tanstack/data.d.ts +44 -0
  70. package/dist/tanstack/data.d.ts.map +1 -0
  71. package/dist/tanstack/data.js +320 -0
  72. package/dist/tanstack/index.d.ts +4 -0
  73. package/dist/tanstack/index.d.ts.map +1 -0
  74. package/dist/tanstack/index.js +2 -0
  75. package/dist/tanstack/queries.d.ts +6 -0
  76. package/dist/tanstack/queries.d.ts.map +1 -0
  77. package/dist/tanstack/queries.js +5 -0
  78. package/dist/template/app/client.tsx +3 -0
  79. package/dist/template/app/env.d.ts +1 -0
  80. package/dist/template/app/router.tsx +40 -0
  81. package/dist/template/app/routes/$locale.$.tsx +135 -0
  82. package/dist/template/app/routes/$locale.index.tsx +19 -0
  83. package/dist/template/app/routes/$locale.products.$handle.tsx +57 -0
  84. package/dist/template/app/routes/$locale.tsx +46 -0
  85. package/dist/template/app/routes/__root.tsx +103 -0
  86. package/dist/template/app/routes/index.tsx +6 -0
  87. package/dist/template/app/server.ts +1 -0
  88. package/dist/template/app/start.ts +2 -0
  89. package/dist/template/app/theme.ts +12 -0
  90. package/dist/template/tests/router-isolation.test.ts +14 -0
  91. package/dist/template/vite.config.ts +5 -0
  92. package/dist/template/vitest.config.ts +9 -0
  93. package/dist/vite.d.ts +7 -0
  94. package/dist/vite.d.ts.map +1 -0
  95. package/dist/vite.js +22 -0
  96. package/package.json +88 -3
  97. package/README.md +0 -3
@@ -0,0 +1,264 @@
1
+ import {
2
+ Component,
3
+ useLayoutEffect,
4
+ useMemo,
5
+ useState,
6
+ type CSSProperties,
7
+ type ReactNode,
8
+ } from "react";
9
+ import {
10
+ RouterContextProvider,
11
+ createMemoryHistory,
12
+ createRootRoute,
13
+ createRoute,
14
+ createRouter,
15
+ } from "@tanstack/react-router";
16
+ import { resolveTheme } from "@orunelle/theme-engine";
17
+ import {
18
+ StorefrontProvider,
19
+ ThemeComposition,
20
+ resolvePublicSettings,
21
+ formatMoney,
22
+ type ResolvedTheme,
23
+ type PublicProduct,
24
+ } from "@orunelle/theme-sdk";
25
+ import { resolveSettingValues } from "@orunelle/theme-contract";
26
+ import type {
27
+ PreviewBootstrap,
28
+ PreviewView,
29
+ } from "@orunelle/theme-contract/preview";
30
+ import definition from "virtual:orunelle/theme";
31
+ import { usePreviewBridge } from "./bridge";
32
+
33
+ const theme = resolveTheme(definition);
34
+ class PreviewBoundary extends Component<
35
+ { children: ReactNode; failed: () => void },
36
+ { failed: boolean }
37
+ > {
38
+ state = { failed: false };
39
+ static getDerivedStateFromError() {
40
+ return { failed: true };
41
+ }
42
+ componentDidCatch() {
43
+ this.props.failed();
44
+ }
45
+ render() {
46
+ return this.state.failed ? (
47
+ <p role="alert">
48
+ Preview could not render this draft. Your changes are retained. / تعذر
49
+ عرض المسودة. التغييرات محفوظة.
50
+ </p>
51
+ ) : (
52
+ this.props.children
53
+ );
54
+ }
55
+ }
56
+ function PreviewSurface({ bootstrap }: { bootstrap: PreviewBootstrap }) {
57
+ const initialTemplate =
58
+ Object.keys(theme.manifest.editor?.templates ?? {})[0] ?? "home";
59
+ const bridge = usePreviewBridge(bootstrap, {
60
+ template: initialTemplate,
61
+ locale: "en",
62
+ path: "/en",
63
+ });
64
+ const { configuration, view, sequence } = bridge.snapshot;
65
+ const [cart, setCart] = useState<PublicProduct[]>([]),
66
+ [notice, setNotice] = useState("");
67
+ const selected = view.resourceId
68
+ ? bootstrap.products.find((product) => product.id === view.resourceId)
69
+ : bootstrap.products[0];
70
+ const products = selected
71
+ ? [
72
+ selected,
73
+ ...bootstrap.products.filter((product) => product.id !== selected.id),
74
+ ]
75
+ : view.resourceId &&
76
+ theme.manifest.editor?.templates[view.template]?.kind === "product"
77
+ ? []
78
+ : bootstrap.products;
79
+ const resolved: ResolvedTheme = useMemo(
80
+ () => ({
81
+ ...theme,
82
+ components: {
83
+ ...theme.components,
84
+ ProductActions: () => (
85
+ <div className="product-actions">
86
+ <p className="sample-notice">
87
+ {view.locale === "ar"
88
+ ? "إجراءات شراء تجريبية فقط"
89
+ : "Sample shopping actions only"}
90
+ </p>
91
+ <button
92
+ type="button"
93
+ disabled={!selected}
94
+ onClick={() => {
95
+ if (selected) {
96
+ setCart((items) => [...items, selected]);
97
+ setNotice(
98
+ view.locale === "ar"
99
+ ? "تمت الإضافة إلى السلة التجريبية."
100
+ : "Added to sample cart.",
101
+ );
102
+ }
103
+ }}
104
+ >
105
+ {view.locale === "ar"
106
+ ? "أضف إلى السلة التجريبية"
107
+ : "Add to sample cart"}
108
+ </button>
109
+ <p role="status">{notice}</p>
110
+ </div>
111
+ ),
112
+ },
113
+ }),
114
+ [selected?.id, view.locale, notice],
115
+ );
116
+ useLayoutEffect(() => {
117
+ document.documentElement.lang = view.locale;
118
+ document.documentElement.dir = view.locale === "ar" ? "rtl" : "ltr";
119
+ }, [view.locale]);
120
+ const globals = resolvePublicSettings(
121
+ resolveSettingValues(
122
+ theme.manifest.editor?.settings ?? {},
123
+ configuration.settings,
124
+ ),
125
+ { "store.name": bootstrap.storefront.store.name },
126
+ );
127
+ const style = {
128
+ "--store-accent":
129
+ typeof globals.accent === "string" ? globals.accent : "#7042b0",
130
+ } as CSSProperties;
131
+ const kind = theme.manifest.editor?.templates[view.template]?.kind;
132
+ // The preview lists collections by name only; their products are not loaded.
133
+ const previewResources = {
134
+ products: {},
135
+ collections: Object.fromEntries(
136
+ bootstrap.resources
137
+ .filter((resource) => resource.kind === "collection")
138
+ .map((resource) => [
139
+ resource.id,
140
+ {
141
+ id: resource.id,
142
+ slug: resource.handle,
143
+ name: resource.name[view.locale],
144
+ description: "",
145
+ },
146
+ ]),
147
+ ),
148
+ };
149
+ const { Layout } = resolved.components;
150
+ const roots = configuration.templates[view.template]?.roots;
151
+ const fallback = (
152
+ <p role="status">
153
+ {view.locale === "ar"
154
+ ? "لا يوجد محتوى افتراضي لهذه الصفحة."
155
+ : "No default content is available for this page."}
156
+ </p>
157
+ );
158
+ return (
159
+ <StorefrontProvider
160
+ theme={resolved}
161
+ storefront={{
162
+ ...bootstrap.storefront,
163
+ locale: view.locale,
164
+ mode: "preview",
165
+ commerce: "fixture",
166
+ }}
167
+ configuration={configuration}
168
+ products={products}
169
+ media={bootstrap.media}
170
+ resources={previewResources}
171
+ assetBase={bootstrap.assetBase}
172
+ >
173
+ <div
174
+ className="theme-preview-surface"
175
+ data-font={String(globals.font ?? "body")}
176
+ style={style}
177
+ >
178
+ <PreviewBoundary key={sequence} failed={bridge.renderFailed}>
179
+ <Layout>
180
+ {roots?.length === 0 && (
181
+ <p className="sample-notice" role="status">
182
+ {view.locale === "ar"
183
+ ? "لا توجد أقسام؛ أضف قسمًا من المحرر."
184
+ : "No sections yet; add one in the editor."}
185
+ </p>
186
+ )}
187
+ {view.resourceId &&
188
+ !bootstrap.resources.some(
189
+ (resource) => resource.id === view.resourceId,
190
+ ) && (
191
+ <p role="status" className="sample-notice">
192
+ {view.locale === "ar"
193
+ ? "المورد غير متاح في هذه المعاينة؛ المرجع محفوظ."
194
+ : "This resource is unavailable in the preview; its reference is retained."}
195
+ </p>
196
+ )}
197
+ <ThemeComposition
198
+ scope="template"
199
+ name={view.template}
200
+ fallback={fallback}
201
+ {...(selected ? { productId: selected.id } : {})}
202
+ />
203
+ {kind === "cart" && (
204
+ <section className="account-page">
205
+ <h1>
206
+ {view.locale === "ar" ? "السلة التجريبية" : "Sample cart"}
207
+ </h1>
208
+ <p>
209
+ {view.locale === "ar"
210
+ ? "لا تُنشئ هذه المعاينة طلبات حقيقية."
211
+ : "This preview never creates real orders."}
212
+ </p>
213
+ <ul className="resource-list">
214
+ {cart.map((product, index) => (
215
+ <li key={index}>
216
+ {product.name[view.locale]} ·{" "}
217
+ {formatMoney(
218
+ product.price.amountMinor,
219
+ product.price.currency,
220
+ view.locale,
221
+ )}
222
+ </li>
223
+ ))}
224
+ </ul>
225
+ </section>
226
+ )}
227
+ </Layout>
228
+ </PreviewBoundary>
229
+ </div>
230
+ {bridge.overlay}
231
+ </StorefrontProvider>
232
+ );
233
+ }
234
+ export function makePreviewRouter(bootstrap: PreviewBootstrap) {
235
+ const root = createRootRoute({
236
+ component: () => null,
237
+ });
238
+ const route = createRoute({
239
+ getParentRoute: () => root,
240
+ path: "$",
241
+ component: () => null,
242
+ });
243
+ return createRouter({
244
+ routeTree: root.addChildren([route]),
245
+ history: createMemoryHistory({ initialEntries: ["/en"] }),
246
+ defaultPreload: false,
247
+ });
248
+ }
249
+
250
+ /** The editor owns navigation and supplies complete snapshots. Use router context
251
+ * for author Links, without a route-match hydration stream or executable inline state. */
252
+ export function PreviewDocument({
253
+ bootstrap,
254
+ router,
255
+ }: {
256
+ bootstrap: PreviewBootstrap;
257
+ router: ReturnType<typeof makePreviewRouter>;
258
+ }) {
259
+ return (
260
+ <RouterContextProvider router={router}>
261
+ <PreviewSurface bootstrap={bootstrap} />
262
+ </RouterContextProvider>
263
+ );
264
+ }
@@ -0,0 +1,133 @@
1
+ import { createServer } from "node:http";
2
+ import { chmod, readFile, stat } from "node:fs/promises";
3
+ import { resolve, sep } from "node:path";
4
+ import { pathToFileURL } from "node:url";
5
+ import { Readable } from "node:stream";
6
+
7
+ const mimeTypes = {
8
+ ".js": "text/javascript",
9
+ ".css": "text/css",
10
+ ".woff2": "font/woff2",
11
+ ".json": "application/json",
12
+ ".svg": "image/svg+xml",
13
+ ".jpg": "image/jpeg",
14
+ ".jpeg": "image/jpeg",
15
+ ".png": "image/png",
16
+ ".webp": "image/webp",
17
+ ".avif": "image/avif",
18
+ ".ico": "image/x-icon",
19
+ };
20
+
21
+ /** Local trusted-source proof adapter. It is not a sandbox for author code. */
22
+ export async function serveNode({
23
+ entry,
24
+ assets,
25
+ port = 0,
26
+ socket,
27
+ artifactDigest,
28
+ renderKey,
29
+ }) {
30
+ const { default: handler } = await import(pathToFileURL(resolve(entry)).href);
31
+ const assetRoot = resolve(assets);
32
+ const server = createServer(async (incoming, outgoing) => {
33
+ try {
34
+ if (renderKey && incoming.headers["x-orunelle-render-key"] !== renderKey) {outgoing.writeHead(404);outgoing.end("Not found");return;}
35
+ const host = incoming.headers.host ?? "";
36
+ if (
37
+ !/^(?:127\.0\.0\.1|localhost|preview\.localhost)(?::\d{1,5})?$/.test(
38
+ host,
39
+ )
40
+ ) {
41
+ outgoing.writeHead(404, { "cache-control": "private, no-store" });
42
+ outgoing.end("Storefront not found");
43
+ return;
44
+ }
45
+ const url = new URL(incoming.url ?? "/", `http://${host}`);
46
+ const asset = resolve(assetRoot, `.${decodeURIComponent(url.pathname)}`);
47
+ if (
48
+ (incoming.method === "GET" || incoming.method === "HEAD") &&
49
+ asset.startsWith(assetRoot + sep)
50
+ ) {
51
+ const info = await stat(asset).catch(() => null);
52
+ if (info?.isFile()) {
53
+ const extension = asset.slice(asset.lastIndexOf("."));
54
+ outgoing.writeHead(200, {
55
+ ...(artifactDigest
56
+ ? { "x-orunelle-artifact-digest": artifactDigest }
57
+ : {}),
58
+ "content-type": mimeTypes[extension] ?? "application/octet-stream",
59
+ "x-content-type-options": "nosniff",
60
+ });
61
+ outgoing.end(
62
+ incoming.method === "HEAD" ? undefined : await readFile(asset),
63
+ );
64
+ return;
65
+ }
66
+ }
67
+ const abort = new AbortController();
68
+ incoming.on("aborted", () => abort.abort());
69
+ outgoing.on("close", () => {
70
+ if (!outgoing.writableEnded) abort.abort();
71
+ });
72
+ const request = new Request(url, {
73
+ method: incoming.method,
74
+ headers: new Headers(
75
+ Object.entries(incoming.headers).flatMap(([key, value]) =>
76
+ value === undefined
77
+ ? []
78
+ : Array.isArray(value)
79
+ ? value.map((item) => [key, item])
80
+ : [[key, value]],
81
+ ),
82
+ ),
83
+ signal: abort.signal,
84
+ ...(["GET", "HEAD"].includes(incoming.method ?? "GET")
85
+ ? {}
86
+ : { body: Readable.toWeb(incoming), duplex: "half" }),
87
+ });
88
+ const response = await handler.fetch(request);
89
+ outgoing.statusCode = response.status;
90
+ for (const [key, value] of response.headers)
91
+ if (key !== "set-cookie") outgoing.setHeader(key, value);
92
+ const cookies = response.headers.getSetCookie();
93
+ if (cookies.length) outgoing.setHeader("set-cookie", cookies);
94
+ if (incoming.method === "HEAD" || !response.body) outgoing.end();
95
+ else
96
+ Readable.fromWeb(response.body)
97
+ .on("error", () => outgoing.destroy())
98
+ .pipe(outgoing);
99
+ } catch {
100
+ if (!outgoing.headersSent)
101
+ outgoing.writeHead(500, { "cache-control": "private, no-store" });
102
+ outgoing.end("Storefront unavailable");
103
+ }
104
+ });
105
+ server.requestTimeout = 10000;
106
+ server.headersTimeout = 5000;
107
+ server.maxConnections = 32;
108
+ await new Promise((resolveReady, reject) => {
109
+ server.once("error", reject);
110
+ if (socket) server.listen(socket, resolveReady);
111
+ else server.listen(port, "127.0.0.1", resolveReady);
112
+ });
113
+ if (socket) await chmod(socket, 0o660);
114
+ return server;
115
+ }
116
+
117
+ if (
118
+ process.argv[1] &&
119
+ import.meta.url === pathToFileURL(resolve(process.argv[1])).href
120
+ ) {
121
+ const server = await serveNode({
122
+ entry: process.env.ORUNELLE_SERVER_ENTRY ?? "dist/server/server.js",
123
+ assets: process.env.ORUNELLE_CLIENT_ASSETS ?? "dist/client",
124
+ port: Number(process.env.PORT ?? 3020),
125
+ artifactDigest: process.env.ORUNELLE_PUBLIC_ARTIFACT_DIGEST,
126
+ renderKey: process.env.ORUNELLE_PUBLIC_RENDER_KEY,
127
+ });
128
+ console.log(
129
+ JSON.stringify({ origin: `http://127.0.0.1:${server.address().port}` }),
130
+ );
131
+ for (const signal of ["SIGTERM", "SIGINT"])
132
+ process.once(signal, () => server.close(() => process.exit(0)));
133
+ }
@@ -0,0 +1,7 @@
1
+ @font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/e4af272ccee01ff0-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}
2
+ @font-face{font-family:IBM Plex Sans Arabic;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/9da48a48bf6500f8-s.p.woff2) format("woff2");unicode-range:u+06??,u+0750-077f,u+0870-0891,u+0897-08e1,u+08e3-08ff,u+200c-200e,u+2010-2011,u+204f,u+2e41,u+fb50-fdff,u+fe70-fe74,u+fe76-fefc,u+102e0-102fb,u+10e60-10e7e,u+10ec2-10ec7,u+10ec9-10eee,u+10ef?,u+1ee00-1ee03,u+1ee05-1ee1f,u+1ee21-1ee22,u+1ee24,u+1ee27,u+1ee29-1ee32,u+1ee34-1ee37,u+1ee39,u+1ee3b,u+1ee42,u+1ee47,u+1ee49,u+1ee4b,u+1ee4d-1ee4f,u+1ee51-1ee52,u+1ee54,u+1ee57,u+1ee59,u+1ee5b,u+1ee5d,u+1ee5f,u+1ee61-1ee62,u+1ee64,u+1ee67-1ee6a,u+1ee6c-1ee72,u+1ee74-1ee77,u+1ee79-1ee7c,u+1ee7e,u+1ee80-1ee89,u+1ee8b-1ee9b,u+1eea1-1eea3,u+1eea5-1eea9,u+1eeab-1eebb,u+1eef0-1eef1}
3
+ @font-face{font-family:IBM Plex Sans Arabic;font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/f022b1629605b85c-s.p.woff2) format("woff2");unicode-range:u+06??,u+0750-077f,u+0870-0891,u+0897-08e1,u+08e3-08ff,u+200c-200e,u+2010-2011,u+204f,u+2e41,u+fb50-fdff,u+fe70-fe74,u+fe76-fefc,u+102e0-102fb,u+10e60-10e7e,u+10ec2-10ec7,u+10ec9-10eee,u+10ef?,u+1ee00-1ee03,u+1ee05-1ee1f,u+1ee21-1ee22,u+1ee24,u+1ee27,u+1ee29-1ee32,u+1ee34-1ee37,u+1ee39,u+1ee3b,u+1ee42,u+1ee47,u+1ee49,u+1ee4b,u+1ee4d-1ee4f,u+1ee51-1ee52,u+1ee54,u+1ee57,u+1ee59,u+1ee5b,u+1ee5d,u+1ee5f,u+1ee61-1ee62,u+1ee64,u+1ee67-1ee6a,u+1ee6c-1ee72,u+1ee74-1ee77,u+1ee79-1ee7c,u+1ee7e,u+1ee80-1ee89,u+1ee8b-1ee9b,u+1eea1-1eea3,u+1eea5-1eea9,u+1eeab-1eebb,u+1eef0-1eef1}
4
+ @font-face{font-family:IBM Plex Sans Arabic;font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/e4efb0298547fad0-s.p.woff2) format("woff2");unicode-range:u+06??,u+0750-077f,u+0870-0891,u+0897-08e1,u+08e3-08ff,u+200c-200e,u+2010-2011,u+204f,u+2e41,u+fb50-fdff,u+fe70-fe74,u+fe76-fefc,u+102e0-102fb,u+10e60-10e7e,u+10ec2-10ec7,u+10ec9-10eee,u+10ef?,u+1ee00-1ee03,u+1ee05-1ee1f,u+1ee21-1ee22,u+1ee24,u+1ee27,u+1ee29-1ee32,u+1ee34-1ee37,u+1ee39,u+1ee3b,u+1ee42,u+1ee47,u+1ee49,u+1ee4b,u+1ee4d-1ee4f,u+1ee51-1ee52,u+1ee54,u+1ee57,u+1ee59,u+1ee5b,u+1ee5d,u+1ee5f,u+1ee61-1ee62,u+1ee64,u+1ee67-1ee6a,u+1ee6c-1ee72,u+1ee74-1ee77,u+1ee79-1ee7c,u+1ee7e,u+1ee80-1ee89,u+1ee8b-1ee9b,u+1eea1-1eea3,u+1eea5-1eea9,u+1eeab-1eebb,u+1eef0-1eef1}
5
+ @font-face{font-family:IBM Plex Sans Arabic;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/fb66eb17bf011c3b-s.p.woff2) format("woff2");unicode-range:u+06??,u+0750-077f,u+0870-0891,u+0897-08e1,u+08e3-08ff,u+200c-200e,u+2010-2011,u+204f,u+2e41,u+fb50-fdff,u+fe70-fe74,u+fe76-fefc,u+102e0-102fb,u+10e60-10e7e,u+10ec2-10ec7,u+10ec9-10eee,u+10ef?,u+1ee00-1ee03,u+1ee05-1ee1f,u+1ee21-1ee22,u+1ee24,u+1ee27,u+1ee29-1ee32,u+1ee34-1ee37,u+1ee39,u+1ee3b,u+1ee42,u+1ee47,u+1ee49,u+1ee4b,u+1ee4d-1ee4f,u+1ee51-1ee52,u+1ee54,u+1ee57,u+1ee59,u+1ee5b,u+1ee5d,u+1ee5f,u+1ee61-1ee62,u+1ee64,u+1ee67-1ee6a,u+1ee6c-1ee72,u+1ee74-1ee77,u+1ee79-1ee7c,u+1ee7e,u+1ee80-1ee89,u+1ee8b-1ee9b,u+1eea1-1eea3,u+1eea5-1eea9,u+1eeab-1eebb,u+1eef0-1eef1}
6
+ :root { --store-font: Inter, "IBM Plex Sans Arabic", sans-serif; }
7
+ html[lang="ar"] { --store-font: "IBM Plex Sans Arabic", Inter, sans-serif; }
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" role="img"><rect width="800" height="800" fill="#edf0f4"/><ellipse cx="400" cy="640" rx="220" ry="24" fill="#000" opacity=".08"/>
2
+ <rect x="190" y="300" width="420" height="310" rx="48" fill="#2f4a6d"/>
3
+ <rect x="190" y="300" width="420" height="44" rx="22" fill="#1f3350"/>
4
+ <circle cx="570" cy="322" r="16" fill="#f5f0e6"/><rect x="560" y="330" width="20" height="60" rx="8" fill="#f5f0e6"/></svg>
@@ -0,0 +1,2 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" role="img"><rect width="800" height="800" fill="#f6f2ea"/><ellipse cx="400" cy="690" rx="270" ry="24" fill="#000" opacity=".08"/>
2
+ <rect x="140" y="200" width="520" height="440" rx="18" fill="#e3d6bf"/><rect x="150" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="210" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="270" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="330" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="390" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="450" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="510" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="570" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><rect x="630" y="210" width="22" height="420" fill="#b8a07a" opacity=".55"/><line x1="160" y1="630" x2="160" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="184" y1="630" x2="184" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="208" y1="630" x2="208" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="232" y1="630" x2="232" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="256" y1="630" x2="256" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="280" y1="630" x2="280" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="304" y1="630" x2="304" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="328" y1="630" x2="328" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="352" y1="630" x2="352" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="376" y1="630" x2="376" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="400" y1="630" x2="400" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="424" y1="630" x2="424" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="448" y1="630" x2="448" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="472" y1="630" x2="472" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="496" y1="630" x2="496" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="520" y1="630" x2="520" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="544" y1="630" x2="544" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="568" y1="630" x2="568" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="592" y1="630" x2="592" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="616" y1="630" x2="616" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/><line x1="640" y1="630" x2="640" y2="660" stroke="#e3d6bf" stroke-width="6" stroke-linecap="round"/></svg>
@@ -0,0 +1,2 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" role="img"><rect width="800" height="800" fill="#eef1ea"/><ellipse cx="400" cy="690" rx="270" ry="24" fill="#000" opacity=".08"/>
2
+ <rect x="140" y="200" width="520" height="440" rx="18" fill="#a9b8a0"/><rect x="150" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="210" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="270" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="330" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="390" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="450" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="510" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="570" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><rect x="630" y="210" width="22" height="420" fill="#6f8467" opacity=".55"/><line x1="160" y1="630" x2="160" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="184" y1="630" x2="184" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="208" y1="630" x2="208" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="232" y1="630" x2="232" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="256" y1="630" x2="256" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="280" y1="630" x2="280" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="304" y1="630" x2="304" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="328" y1="630" x2="328" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="352" y1="630" x2="352" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="376" y1="630" x2="376" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="400" y1="630" x2="400" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="424" y1="630" x2="424" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="448" y1="630" x2="448" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="472" y1="630" x2="472" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="496" y1="630" x2="496" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="520" y1="630" x2="520" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="544" y1="630" x2="544" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="568" y1="630" x2="568" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="592" y1="630" x2="592" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="616" y1="630" x2="616" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/><line x1="640" y1="630" x2="640" y2="660" stroke="#a9b8a0" stroke-width="6" stroke-linecap="round"/></svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" role="img"><rect width="800" height="800" fill="#ecebe8"/><ellipse cx="400" cy="690" rx="230" ry="28" fill="#000" opacity=".08"/>
2
+ <path d="M300 300 C300 170 500 170 500 300" fill="none" stroke="#1f2023" stroke-width="26" stroke-linecap="round"/>
3
+ <path d="M210 300 H590 L560 680 H240 Z" fill="#3b3d42"/>
4
+ <path d="M210 300 H590 L586 340 H214 Z" fill="#c9c9c9" opacity=".35"/>
5
+ <rect x="350" y="430" width="100" height="70" rx="10" fill="#c9c9c9" opacity=".55"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" role="img"><rect width="800" height="800" fill="#efe7da"/><rect x="120" y="120" width="560" height="560" rx="40" fill="#d8c3a0"/><g stroke="#b59b74" stroke-width="5"><line x1="140" y1="140" x2="140" y2="660"/><line x1="168" y1="140" x2="168" y2="660"/><line x1="196" y1="140" x2="196" y2="660"/><line x1="224" y1="140" x2="224" y2="660"/><line x1="252" y1="140" x2="252" y2="660"/><line x1="280" y1="140" x2="280" y2="660"/><line x1="308" y1="140" x2="308" y2="660"/><line x1="336" y1="140" x2="336" y2="660"/><line x1="364" y1="140" x2="364" y2="660"/><line x1="392" y1="140" x2="392" y2="660"/><line x1="420" y1="140" x2="420" y2="660"/><line x1="448" y1="140" x2="448" y2="660"/><line x1="476" y1="140" x2="476" y2="660"/><line x1="504" y1="140" x2="504" y2="660"/><line x1="532" y1="140" x2="532" y2="660"/><line x1="560" y1="140" x2="560" y2="660"/><line x1="588" y1="140" x2="588" y2="660"/><line x1="616" y1="140" x2="616" y2="660"/><line x1="644" y1="140" x2="644" y2="660"/></g><rect x="300" y="330" width="200" height="140" rx="16" fill="#fff" opacity=".7"/></svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" role="img"><rect width="800" height="800" fill="#f4efe7"/><ellipse cx="400" cy="690" rx="230" ry="28" fill="#000" opacity=".08"/>
2
+ <path d="M300 300 C300 170 500 170 500 300" fill="none" stroke="#8a6f4c" stroke-width="26" stroke-linecap="round"/>
3
+ <path d="M210 300 H590 L560 680 H240 Z" fill="#d8c3a0"/>
4
+ <path d="M210 300 H590 L586 340 H214 Z" fill="#ffffff" opacity=".35"/>
5
+ <rect x="350" y="430" width="100" height="70" rx="10" fill="#ffffff" opacity=".55"/></svg>
@@ -0,0 +1 @@
1
+ export { withBinding, requestEnvironment } from "@orunelle/theme-runtime/bindings";
@@ -0,0 +1,2 @@
1
+ export { getStorefront, getPublicPage } from "@orunelle/theme-runtime/tanstack";
2
+ export type { PublicInput } from "@orunelle/theme-runtime/tanstack";
@@ -0,0 +1,5 @@
1
+ /// <reference types="vite/client" />
2
+ declare module "virtual:orunelle/theme" {
3
+ const theme: import("@orunelle/theme-sdk").ThemeDefinition;
4
+ export default theme;
5
+ }
@@ -0,0 +1 @@
1
+ export { pageQuery } from "@orunelle/theme-runtime/tanstack";
@@ -0,0 +1,155 @@
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // noinspection JSUnusedGlobalSymbols
6
+
7
+ // This file was automatically generated by TanStack Router.
8
+ // You should NOT make any changes in this file as it will be overwritten.
9
+ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10
+
11
+ import { Route as rootRouteImport } from './routes/__root'
12
+ import { Route as IndexRouteImport } from './routes/index'
13
+ import { Route as LocaleRouteImport } from './routes/$locale'
14
+ import { Route as LocaleIndexRouteImport } from './routes/$locale.index'
15
+ import { Route as LocaleSplatRouteImport } from './routes/$locale.$'
16
+ import { Route as LocaleProductsHandleRouteImport } from './routes/$locale.products.$handle'
17
+
18
+ const IndexRoute = IndexRouteImport.update({
19
+ id: '/',
20
+ path: '/',
21
+ getParentRoute: () => rootRouteImport,
22
+ } as any)
23
+ const LocaleRoute = LocaleRouteImport.update({
24
+ id: '/$locale',
25
+ path: '/$locale',
26
+ getParentRoute: () => rootRouteImport,
27
+ } as any)
28
+ const LocaleIndexRoute = LocaleIndexRouteImport.update({
29
+ id: '/',
30
+ path: '/',
31
+ getParentRoute: () => LocaleRoute,
32
+ } as any)
33
+ const LocaleSplatRoute = LocaleSplatRouteImport.update({
34
+ id: '/$',
35
+ path: '/$',
36
+ getParentRoute: () => LocaleRoute,
37
+ } as any)
38
+ const LocaleProductsHandleRoute = LocaleProductsHandleRouteImport.update({
39
+ id: '/products/$handle',
40
+ path: '/products/$handle',
41
+ getParentRoute: () => LocaleRoute,
42
+ } as any)
43
+
44
+ export interface FileRoutesByFullPath {
45
+ '/': typeof IndexRoute
46
+ '/$locale': typeof LocaleRouteWithChildren
47
+ '/$locale/$': typeof LocaleSplatRoute
48
+ '/$locale/': typeof LocaleIndexRoute
49
+ '/$locale/products/$handle': typeof LocaleProductsHandleRoute
50
+ }
51
+ export interface FileRoutesByTo {
52
+ '/': typeof IndexRoute
53
+ '/$locale/$': typeof LocaleSplatRoute
54
+ '/$locale': typeof LocaleIndexRoute
55
+ '/$locale/products/$handle': typeof LocaleProductsHandleRoute
56
+ }
57
+ export interface FileRoutesById {
58
+ __root__: typeof rootRouteImport
59
+ '/': typeof IndexRoute
60
+ '/$locale': typeof LocaleRouteWithChildren
61
+ '/$locale/$': typeof LocaleSplatRoute
62
+ '/$locale/': typeof LocaleIndexRoute
63
+ '/$locale/products/$handle': typeof LocaleProductsHandleRoute
64
+ }
65
+ export interface FileRouteTypes {
66
+ fileRoutesByFullPath: FileRoutesByFullPath
67
+ fullPaths:
68
+ '/' | '/$locale' | '/$locale/$' | '/$locale/' | '/$locale/products/$handle'
69
+ fileRoutesByTo: FileRoutesByTo
70
+ to: '/' | '/$locale/$' | '/$locale' | '/$locale/products/$handle'
71
+ id:
72
+ | '__root__'
73
+ | '/'
74
+ | '/$locale'
75
+ | '/$locale/$'
76
+ | '/$locale/'
77
+ | '/$locale/products/$handle'
78
+ fileRoutesById: FileRoutesById
79
+ }
80
+ export interface RootRouteChildren {
81
+ IndexRoute: typeof IndexRoute
82
+ LocaleRoute: typeof LocaleRouteWithChildren
83
+ }
84
+
85
+ declare module '@tanstack/react-router' {
86
+ interface FileRoutesByPath {
87
+ '/': {
88
+ id: '/'
89
+ path: '/'
90
+ fullPath: '/'
91
+ preLoaderRoute: typeof IndexRouteImport
92
+ parentRoute: typeof rootRouteImport
93
+ }
94
+ '/$locale': {
95
+ id: '/$locale'
96
+ path: '/$locale'
97
+ fullPath: '/$locale'
98
+ preLoaderRoute: typeof LocaleRouteImport
99
+ parentRoute: typeof rootRouteImport
100
+ }
101
+ '/$locale/': {
102
+ id: '/$locale/'
103
+ path: '/'
104
+ fullPath: '/$locale/'
105
+ preLoaderRoute: typeof LocaleIndexRouteImport
106
+ parentRoute: typeof LocaleRoute
107
+ }
108
+ '/$locale/$': {
109
+ id: '/$locale/$'
110
+ path: '/$'
111
+ fullPath: '/$locale/$'
112
+ preLoaderRoute: typeof LocaleSplatRouteImport
113
+ parentRoute: typeof LocaleRoute
114
+ }
115
+ '/$locale/products/$handle': {
116
+ id: '/$locale/products/$handle'
117
+ path: '/products/$handle'
118
+ fullPath: '/$locale/products/$handle'
119
+ preLoaderRoute: typeof LocaleProductsHandleRouteImport
120
+ parentRoute: typeof LocaleRoute
121
+ }
122
+ }
123
+ }
124
+
125
+ interface LocaleRouteChildren {
126
+ LocaleSplatRoute: typeof LocaleSplatRoute
127
+ LocaleIndexRoute: typeof LocaleIndexRoute
128
+ LocaleProductsHandleRoute: typeof LocaleProductsHandleRoute
129
+ }
130
+
131
+ const LocaleRouteChildren: LocaleRouteChildren = {
132
+ LocaleSplatRoute: LocaleSplatRoute,
133
+ LocaleIndexRoute: LocaleIndexRoute,
134
+ LocaleProductsHandleRoute: LocaleProductsHandleRoute,
135
+ }
136
+
137
+ const LocaleRouteWithChildren =
138
+ LocaleRoute._addFileChildren(LocaleRouteChildren)
139
+
140
+ const rootRouteChildren: RootRouteChildren = {
141
+ IndexRoute: IndexRoute,
142
+ LocaleRoute: LocaleRouteWithChildren,
143
+ }
144
+ export const routeTree = rootRouteImport
145
+ ._addFileChildren(rootRouteChildren)
146
+ ._addFileTypes<FileRouteTypes>()
147
+
148
+ import type { getRouter } from './router.tsx'
149
+ import type { createStart } from '@tanstack/react-start'
150
+ declare module '@tanstack/react-start' {
151
+ interface Register {
152
+ ssr: true
153
+ router: Awaited<ReturnType<typeof getRouter>>
154
+ }
155
+ }