@tokenoftrust/storefront-runner 2.0.2 → 2.0.4
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/apps/storefront/.astro/content.d.ts +159 -0
- package/apps/storefront/.astro/integrations/_astrojs_cloudflare/cloudflare.d.ts +1 -0
- package/apps/storefront/.astro/types.d.ts +3 -0
- package/apps/storefront/node_modules/.bin/acorn +43 -0
- package/apps/storefront/node_modules/.bin/astro +43 -0
- package/apps/storefront/node_modules/.bin/astro-check +43 -0
- package/apps/storefront/node_modules/.bin/browserslist +43 -0
- package/apps/storefront/node_modules/.bin/cf-wrangler +43 -0
- package/apps/storefront/node_modules/.bin/depcruise +43 -0
- package/apps/storefront/node_modules/.bin/depcruise-baseline +43 -0
- package/apps/storefront/node_modules/.bin/depcruise-fmt +43 -0
- package/apps/storefront/node_modules/.bin/depcruise-wrap-stream-in-html +43 -0
- package/apps/storefront/node_modules/.bin/dependency-cruise +43 -0
- package/apps/storefront/node_modules/.bin/dependency-cruiser +43 -0
- package/apps/storefront/node_modules/.bin/drizzle-kit +43 -0
- package/apps/storefront/node_modules/.bin/esbuild +43 -0
- package/apps/storefront/node_modules/.bin/jiti +43 -0
- package/apps/storefront/node_modules/.bin/playwright +43 -0
- package/apps/storefront/node_modules/.bin/playwright-core +43 -0
- package/apps/storefront/node_modules/.bin/prettier +43 -0
- package/apps/storefront/node_modules/.bin/rollup +43 -0
- package/apps/storefront/node_modules/.bin/tsc +43 -0
- package/apps/storefront/node_modules/.bin/tsserver +43 -0
- package/apps/storefront/node_modules/.bin/tsx +43 -0
- package/apps/storefront/node_modules/.bin/vite +43 -0
- package/apps/storefront/node_modules/.bin/vitest +43 -0
- package/apps/storefront/node_modules/.bin/workerd +43 -0
- package/apps/storefront/node_modules/.bin/wrangler +43 -0
- package/apps/storefront/node_modules/.bin/wrangler2 +43 -0
- package/apps/storefront/node_modules/.bin/yaml +43 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_client__js.js +58 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_client__js.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_n_@preact_signals.js +741 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_n_@preact_signals.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_server__js.js +2549 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_server__js.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/_metadata.json +150 -0
- package/apps/storefront/node_modules/.vite/deps/astro-BIHuWFxm.js +434 -0
- package/apps/storefront/node_modules/.vite/deps/astro-BIHuWFxm.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_aria-query.js +6390 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_aria-query.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_axobject-query.js +2705 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_axobject-query.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_html-escaper.js +65 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_html-escaper.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +455 -0
- package/apps/storefront/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/audit-DKDpcdEI.js +1535 -0
- package/apps/storefront/node_modules/.vite/deps/audit-DKDpcdEI.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/highlight-B9UoX1wa.js +48 -0
- package/apps/storefront/node_modules/.vite/deps/highlight-B9UoX1wa.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/icons-BWi2wI9n.js +42 -0
- package/apps/storefront/node_modules/.vite/deps/icons-BWi2wI9n.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/package.json +3 -0
- package/apps/storefront/node_modules/.vite/deps/preact.js +310 -0
- package/apps/storefront/node_modules/.vite/deps/preact.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_compat.js +420 -0
- package/apps/storefront/node_modules/.vite/deps/preact_compat.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_compat_jsx-runtime.js +4 -0
- package/apps/storefront/node_modules/.vite/deps/preact_debug.js +236 -0
- package/apps/storefront/node_modules/.vite/deps/preact_debug.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_devtools.js +12 -0
- package/apps/storefront/node_modules/.vite/deps/preact_devtools.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_hooks.js +192 -0
- package/apps/storefront/node_modules/.vite/deps/preact_hooks.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_jsx-dev-runtime.js +3 -0
- package/apps/storefront/node_modules/.vite/deps/preact_jsx-runtime.js +92 -0
- package/apps/storefront/node_modules/.vite/deps/preact_jsx-runtime.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_test-utils.js +59 -0
- package/apps/storefront/node_modules/.vite/deps/preact_test-utils.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/rolldown-runtime-BPOCksWG.js +24 -0
- package/apps/storefront/node_modules/.vite/deps/settings-BVDV0Roj.js +189 -0
- package/apps/storefront/node_modules/.vite/deps/settings-BVDV0Roj.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/static-html-DveYqwMo.js +13 -0
- package/apps/storefront/node_modules/.vite/deps/static-html-DveYqwMo.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/toolbar-B3VIHCXg.js +458 -0
- package/apps/storefront/node_modules/.vite/deps/toolbar-B3VIHCXg.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/ui-library-BK6ricUd.js +1016 -0
- package/apps/storefront/node_modules/.vite/deps/ui-library-BK6ricUd.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/window-BvxDenKN.js +32 -0
- package/apps/storefront/node_modules/.vite/deps/window-BvxDenKN.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/xray-YFiRUU0Z.js +113 -0
- package/apps/storefront/node_modules/.vite/deps/xray-YFiRUU0Z.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps_ssr/_metadata.json +8 -0
- package/apps/storefront/node_modules/.vite/deps_ssr/package.json +3 -0
- package/apps/storefront/src/layouts/Layout.astro +1 -1
- package/apps/storefront/src/lib/apps/registryAccess.ts +45 -0
- package/apps/storefront/src/lib/auth/adminEntry.ts +4 -4
- package/apps/storefront/src/lib/shared/capability.ts +68 -0
- package/apps/storefront/src/lib/shared/developerInvites.ts +1250 -0
- package/apps/storefront/src/lib/shared/invitePreflight.ts +123 -0
- package/apps/storefront/src/lib/webhooks/deliveryEngine.ts +38 -4
- package/apps/storefront/src/lib/webhooks/emit.ts +1 -1
- package/apps/storefront/src/lib/webhooks/getDispatcher.ts +1 -1
- package/apps/storefront/src/pages/api/auth/magic-exchange.ts +1 -1
- package/apps/storefront/src/pages/index.astro +1 -1
- package/apps/storefront/src/pages/products/[handle].astro +1 -1
- package/package.json +1 -1
- package/packages/public-runtime/node_modules/.bin/tsc +43 -0
- package/packages/public-runtime/node_modules/.bin/tsserver +43 -0
- package/packages/public-runtime/node_modules/.bin/vitest +43 -0
- package/pnpm-workspace.yaml +3 -0
- package/scripts/lib/tenant-dirs.mjs +80 -0
- package/scripts/tenant/lint-embeds.mjs +180 -0
- package/scripts/tenant/materialize-tenant-content.mjs +533 -0
- package/scripts/tenant/validate.mjs +837 -0
- package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +0 -68
- package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +0 -111
- package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +0 -2
- package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +0 -247
- package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +0 -73
- package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +0 -79
- package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +0 -10982
- package/apps/storefront/scripts/import-v84-through-ws2.ts +0 -38
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +0 -2
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +0 -4
- package/apps/storefront/scripts/install-v84-native-through-ws1.ts +0 -185
- package/apps/storefront/scripts/prove-clone-isolation.ts +0 -506
- package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +0 -148
- package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +0 -35
- package/apps/storefront/scripts/replay-v84-clean-clone.ts +0 -214
- package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +0 -17
- package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +0 -15
- package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +0 -21
- package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +0 -42
- package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +0 -145
- package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +0 -18
- package/apps/storefront/src/components/admin/AdminAIWorkflowsTab.astro +0 -531
- package/apps/storefront/src/components/admin/AdminBlogDetailRail.astro +0 -878
- package/apps/storefront/src/components/admin/AdminBlogTab.astro +0 -1435
- package/apps/storefront/src/components/admin/AdminCheckoutSettingsPanel.astro +0 -226
- package/apps/storefront/src/components/admin/AdminCustomersTab.astro +0 -593
- package/apps/storefront/src/components/admin/AdminFulfillmentTab.astro +0 -465
- package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +0 -105
- package/apps/storefront/src/components/admin/AdminProductsTab.astro +0 -901
- package/apps/storefront/src/components/admin/AdminPublishTab.astro +0 -2983
- package/apps/storefront/src/components/admin/AdminReportingTab.astro +0 -435
- package/apps/storefront/src/components/admin/AdminSettingsTab.astro +0 -782
- package/apps/storefront/src/components/admin/AdminSubscriptionsTab.astro +0 -611
- package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +0 -1223
- package/apps/storefront/src/lib/apps/adminService.ts +0 -116
- package/apps/storefront/src/lib/apps/adminSession.ts +0 -214
- package/apps/storefront/src/lib/apps/apiAuth.ts +0 -91
- package/apps/storefront/src/lib/apps/apiRoute.ts +0 -35
- package/apps/storefront/src/lib/apps/catalogMapper.ts +0 -39
- package/apps/storefront/src/lib/apps/consentConfigStore.ts +0 -228
- package/apps/storefront/src/lib/apps/gtmMigrationInstall.ts +0 -447
- package/apps/storefront/src/lib/apps/gtmMigrationReport.ts +0 -367
- package/apps/storefront/src/lib/apps/gtmMigrationTab.ts +0 -315
- package/apps/storefront/src/lib/apps/healthAggregate.ts +0 -66
- package/apps/storefront/src/lib/apps/integrationLifecycle.ts +0 -614
- package/apps/storefront/src/lib/apps/integrationLifecycleController.ts +0 -125
- package/apps/storefront/src/lib/apps/integrationReadModel.ts +0 -563
- package/apps/storefront/src/lib/apps/integrationsTab.ts +0 -547
- package/apps/storefront/src/lib/apps/integrationsView.ts +0 -106
- package/apps/storefront/src/lib/apps/managedAnalyticsService.ts +0 -599
- package/apps/storefront/src/lib/apps/tenantIntegrationMaterialization.ts +0 -170
- package/apps/storefront/src/lib/apps/tokenIssuer.ts +0 -121
- package/apps/storefront/src/lib/apps/tokenVerifier.ts +0 -148
- package/apps/storefront/src/lib/apps/v84CleanCloneReplayContext.ts +0 -16
- package/apps/storefront/src/lib/apps/v84CloneLifecycleCacheEvidence.ts +0 -105
- package/apps/storefront/src/lib/apps/v84CloneLifecycleEvidence.ts +0 -177
- package/apps/storefront/src/lib/apps/v84CloneLifecycleMaterialization.ts +0 -251
- package/apps/storefront/src/lib/apps/v84CloneLifecycleSemantics.ts +0 -241
- package/apps/storefront/src/lib/apps/v84CloneMigrationEvidence.ts +0 -211
- package/apps/storefront/src/lib/apps/v84CloneNativeInstallEvidence.ts +0 -409
- package/apps/storefront/src/lib/apps/v84NonportableCodeCoaching.ts +0 -368
- package/apps/storefront/src/lib/apps/v84NonportableRouteContract.ts +0 -188
- package/apps/storefront/src/lib/apps/v84NonportableRouteDogfood.ts +0 -291
- package/apps/storefront/src/lib/apps/ws1ManagedAnalyticsClient.ts +0 -95
- package/apps/storefront/src/lib/content-edit/applyDiff.ts +0 -91
- package/apps/storefront/src/lib/content-edit/client.ts +0 -286
- package/apps/storefront/src/lib/content-edit/index.ts +0 -14
- package/apps/storefront/src/lib/content-edit/route.ts +0 -25
- package/apps/storefront/src/lib/content-edit/types.ts +0 -19
- package/apps/storefront/src/lib/dev/cockpitStore.ts +0 -57
- package/apps/storefront/src/lib/publish/adminPublishTab.ts +0 -4625
- package/apps/storefront/src/lib/publish/apex-readiness.ts +0 -360
- package/apps/storefront/src/lib/publish/buildStream.ts +0 -269
- package/apps/storefront/src/lib/publish/collapsePersistence.ts +0 -72
- package/apps/storefront/src/lib/publish/dispatchHealth.ts +0 -267
- package/apps/storefront/src/lib/publish/domainState.ts +0 -360
- package/apps/storefront/src/lib/publish/lifecycleState.ts +0 -369
- package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +0 -29
- package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +0 -78
- package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +0 -62
- package/apps/storefront/src/lib/publish/mergeRowFindings.ts +0 -124
- package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +0 -75
- package/apps/storefront/src/lib/publish/panelPolling.ts +0 -78
- package/apps/storefront/src/lib/publish/publish-guard.ts +0 -88
- package/apps/storefront/src/lib/publish/publishFormat.ts +0 -165
- package/apps/storefront/src/lib/publish/publishHero.ts +0 -177
- package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +0 -66
- package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +0 -141
- package/apps/storefront/src/lib/publish/reviewRelease/index.ts +0 -41
- package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +0 -47
- package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +0 -42
- package/apps/storefront/src/lib/publish/reviewRelease/types.ts +0 -59
- package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +0 -440
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +0 -161
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +0 -325
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +0 -241
- package/apps/storefront/src/lib/publish/shipWorkspace.ts +0 -439
- package/apps/storefront/src/lib/publish/sseRoute.ts +0 -119
- package/apps/storefront/src/lib/publish/stageBundleUpload.ts +0 -215
- package/apps/storefront/src/lib/publish/streamLogConsole.ts +0 -142
- package/apps/storefront/src/lib/publish/versionNumber.ts +0 -52
- package/apps/storefront/src/pages/admin/ops-timeline.astro +0 -420
- package/apps/storefront/src/pages/admin/review-release.astro +0 -265
- package/apps/storefront/src/pages/admin/select.astro +0 -96
- package/apps/storefront/src/pages/admin.astro +0 -570
- package/apps/storefront/src/pages/api/apps/admin/credentials/rotate.ts +0 -86
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +0 -174
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +0 -96
- package/apps/storefront/src/pages/api/apps/admin/health.ts +0 -44
- package/apps/storefront/src/pages/api/apps/admin/install.ts +0 -125
- package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +0 -118
- package/apps/storefront/src/pages/api/apps/admin/integrations.ts +0 -89
- package/apps/storefront/src/pages/api/apps/admin/list.ts +0 -26
- package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +0 -85
- package/apps/storefront/src/pages/api/apps/admin/resume.ts +0 -79
- package/apps/storefront/src/pages/api/apps/admin/suspend.ts +0 -80
- package/apps/storefront/src/pages/api/apps/admin/uninstall.ts +0 -98
- package/apps/storefront/src/pages/api/apps/admin/update.ts +0 -126
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries/[deliveryId]/replay.ts +0 -70
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries.ts +0 -51
- package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +0 -255
- package/apps/storefront/src/pages/api/apps/oauth/token.ts +0 -87
- package/apps/storefront/src/pages/api/apps/v1/attribution.ts +0 -162
- package/apps/storefront/src/pages/api/apps/v1/catalog/products/[handle].ts +0 -39
- package/apps/storefront/src/pages/api/apps/v1/catalog/products.ts +0 -49
- package/apps/storefront/src/pages/api/apps/v1/health.ts +0 -32
- package/apps/storefront/src/pages/api/apps/v1/inventory.ts +0 -59
- package/apps/storefront/src/pages/api/apps/v1/orders/[id].ts +0 -48
- package/apps/storefront/src/pages/api/apps/v1/orders.ts +0 -73
- package/apps/storefront/src/pages/api/apps/v1/reports.ts +0 -21
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries/[deliveryId]/replay.ts +0 -74
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries.ts +0 -47
- package/apps/storefront/src/pages/api/cache-purge.ts +0 -55
- package/apps/storefront/src/pages/api/compliance/tamper.ts +0 -88
- package/apps/storefront/src/pages/api/content-edit/ai-edit.ts +0 -164
- package/apps/storefront/src/pages/api/dashboard/enter-vendor.ts +0 -154
- package/apps/storefront/src/pages/api/dashboard/vendor-search.ts +0 -120
- package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +0 -108
- package/apps/storefront/src/pages/api/publish/stage-bundle.ts +0 -70
- package/apps/storefront/src/pages/api/test/dev-session.ts +0 -133
- package/apps/storefront/src/pages/cockpit.astro +0 -1548
- package/apps/storefront/src/pages/dashboard/[appDomain]/apps/index.astro +0 -119
- package/apps/storefront/src/pages/dashboard/[appDomain]/index.astro +0 -105
- package/apps/storefront/src/pages/dashboard/[appDomain]/team.astro +0 -177
- package/apps/storefront/src/pages/dashboard/index.astro +0 -160
|
@@ -1,570 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* Tenant admin interface launch surface.
|
|
4
|
-
*
|
|
5
|
-
* This route intentionally does not use the public storefront Layout: it is a
|
|
6
|
-
* white-labeled operations surface, not marketing chrome. Middleware still
|
|
7
|
-
* resolves the tenant, injects CSP/security headers, and supports shared preview
|
|
8
|
-
* path routing, so this works as:
|
|
9
|
-
*
|
|
10
|
-
* /admin
|
|
11
|
-
* /<tenant-domain>/admin
|
|
12
|
-
*
|
|
13
|
-
* SHELL CONTRACT — every AdminXTab.astro component mounted below must preserve:
|
|
14
|
-
* - A `<section id="{tab}" data-admin-panel data-agent-scope="{tab}">` root,
|
|
15
|
-
* where {tab} is one of: orders, products, subscriptions, customers, fulfillment,
|
|
16
|
-
* reporting, ai-workflows, publish, integrations, settings. The shell's hash router shows/hides
|
|
17
|
-
* panels by matching `html[data-admin-tab]` to this id, and the AI Ask
|
|
18
|
-
* envelope reads `data-agent-scope` to label its active context.
|
|
19
|
-
* - No tab-switching chrome of its own — `#{tab}` deep links and the shell's
|
|
20
|
-
* nav (desktop sidebar + `.mobile-tabbar` under 760px) are the only ways
|
|
21
|
-
* to activate a tab. Both are wired through the shared
|
|
22
|
-
* `[data-admin-tab-link]` click handler at the bottom of this file; adding
|
|
23
|
-
* a new entry point for tab switching means adding that attribute, not new
|
|
24
|
-
* JS.
|
|
25
|
-
* - Tables/wide content wrapped in `.table-wrap` (`overflow-x: auto`) so a
|
|
26
|
-
* tab can never force page-level horizontal scroll, checked down to 360px.
|
|
27
|
-
* - White-labeled, dense, merchant-first copy — see
|
|
28
|
-
* docs/handoffs/admin-app-implementation-baseline.md for the full product
|
|
29
|
-
* frame this shell exists to serve.
|
|
30
|
-
*/
|
|
31
|
-
export const prerender = false;
|
|
32
|
-
|
|
33
|
-
import AdminCustomersTab from "../components/admin/AdminCustomersTab.astro";
|
|
34
|
-
import AdminFulfillmentTab from "../components/admin/AdminFulfillmentTab.astro";
|
|
35
|
-
import AdminAIWorkflowsTab from "../components/admin/AdminAIWorkflowsTab.astro";
|
|
36
|
-
import OrdersWorkspace from "../components/admin/orders/OrdersWorkspace.astro";
|
|
37
|
-
import AdminProductsTab from "../components/admin/AdminProductsTab.astro";
|
|
38
|
-
import AdminSubscriptionsTab from "../components/admin/AdminSubscriptionsTab.astro";
|
|
39
|
-
import AdminReportingTab from "../components/admin/AdminReportingTab.astro";
|
|
40
|
-
import AdminBlogTab from "../components/admin/AdminBlogTab.astro";
|
|
41
|
-
import AdminPublishTab from "../components/admin/AdminPublishTab.astro";
|
|
42
|
-
import AdminIntegrationsTab from "../components/admin/AdminIntegrationsTab.astro";
|
|
43
|
-
import AdminSettingsTab from "../components/admin/AdminSettingsTab.astro";
|
|
44
|
-
import { readViewerSession } from "@/lib/auth/route";
|
|
45
|
-
import { resolveAdminTenantMode } from "@/lib/adminTenantEnvelope";
|
|
46
|
-
import { resolveAdminEntry } from "@/lib/auth/adminEntry";
|
|
47
|
-
import "@/styles/admin.css";
|
|
48
|
-
|
|
49
|
-
const { tenant, basePath, cspNonce } = Astro.locals;
|
|
50
|
-
const adminPath = `${basePath || ""}/admin`;
|
|
51
|
-
const tenantLabel = tenant.displayName || tenant.appDomain || tenant.tenant_id;
|
|
52
|
-
const viewerSession = await readViewerSession(Astro);
|
|
53
|
-
const viewerEmail = (Astro.locals.viewer?.email ?? viewerSession?.email ?? "").toLowerCase();
|
|
54
|
-
const viewerDomain = viewerEmail.split("@").at(-1) ?? "";
|
|
55
|
-
const canViewInternalGuide = viewerDomain === "tokenoftrust.com";
|
|
56
|
-
|
|
57
|
-
// Internal admin-app tenant mode (baseline doc §Admin App As Tenant,
|
|
58
|
-
// tenant-envelope-contract): every mounted tab receives an explicit
|
|
59
|
-
// { adminAppTenant, targetTenant } envelope. Only a real ToT-staff session
|
|
60
|
-
// may move targetTenant away from the routed tenant, and only to a tenant
|
|
61
|
-
// they already have real access to — see lib/adminTenantEnvelope.ts for the
|
|
62
|
-
// authorization rule (deny-by-default, refused not hidden-only). Resolved
|
|
63
|
-
// BEFORE adminEntry below: a staff viewer's capability must be checked
|
|
64
|
-
// against the tenant they selected, not the app's routed host.
|
|
65
|
-
const adminTenantMode = resolveAdminTenantMode({
|
|
66
|
-
session: viewerSession,
|
|
67
|
-
adminAppTenant: tenant.appDomain,
|
|
68
|
-
requestedTarget: Astro.url.searchParams.get("asTenant"),
|
|
69
|
-
nowSeconds: Math.floor(Date.now() / 1000),
|
|
70
|
-
});
|
|
71
|
-
const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = adminTenantMode;
|
|
72
|
-
|
|
73
|
-
// dg6 — admin session ENTRY resolved SERVER-SIDE against the SELECTED tenant's
|
|
74
|
-
// appDomain (never client input, never a bearer secret): an authenticated
|
|
75
|
-
// owner/team member for THIS tenant reaches the admin context; a non-member /
|
|
76
|
-
// anonymous visitor was already held at the sign-in gate (middleware). Consumes
|
|
77
|
-
// u10's owner + ship-capability model; the go-live tabs (AdminPublishTab) read
|
|
78
|
-
// the same tenant-bound `Astro.locals.viewer.capability`, so the shell just stamps
|
|
79
|
-
// the authoritative principal for chrome + tests — it does not re-gate.
|
|
80
|
-
const adminEntry = resolveAdminEntry({
|
|
81
|
-
record: viewerSession,
|
|
82
|
-
hostResource: tenantEnvelope.targetTenant,
|
|
83
|
-
nowSeconds: Math.floor(Date.now() / 1000),
|
|
84
|
-
});
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
<!doctype html>
|
|
88
|
-
<html
|
|
89
|
-
lang="en"
|
|
90
|
-
data-internal-admin-guide={canViewInternalGuide ? "true" : "false"}
|
|
91
|
-
data-admin-app-tenant={tenantEnvelope.adminAppTenant}
|
|
92
|
-
data-admin-target-tenant={tenantEnvelope.targetTenant}
|
|
93
|
-
data-admin-operator={tenantEnvelope.operator ?? ""}
|
|
94
|
-
data-admin-is-staff={isStaff ? "true" : "false"}
|
|
95
|
-
data-admin-viewer-authenticated={viewerSession ? "true" : "false"}
|
|
96
|
-
data-admin-entry-principal={adminEntry.principal}
|
|
97
|
-
data-admin-is-owner={adminEntry.isOwnerViewer ? "true" : "false"}
|
|
98
|
-
data-admin-can-ship={adminEntry.shipCapabilities.shipOnBehalf ? "true" : "false"}
|
|
99
|
-
data-admin-can-apex-cutover={adminEntry.shipCapabilities.apexCutover ? "true" : "false"}
|
|
100
|
-
>
|
|
101
|
-
<head>
|
|
102
|
-
<meta charset="utf-8" />
|
|
103
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
104
|
-
<meta name="robots" content="noindex, nofollow" />
|
|
105
|
-
<title>{tenantLabel} Admin</title>
|
|
106
|
-
<script is:inline nonce={cspNonce}>
|
|
107
|
-
(() => {
|
|
108
|
-
const adminTabs = ["orders", "products", "subscriptions", "customers", "fulfillment", "reporting", "ai-workflows", "blog", "publish", "integrations", "settings"];
|
|
109
|
-
const canViewInternalGuide = document.documentElement.dataset.internalAdminGuide === "true";
|
|
110
|
-
const defaultTab = canViewInternalGuide ? "orders" : "settings";
|
|
111
|
-
// A deep link may carry a query suffix in the hash (e.g. #publish?pr=42);
|
|
112
|
-
// the tab id is only the part before "?".
|
|
113
|
-
const hash = window.location.hash.slice(1).split("?")[0];
|
|
114
|
-
const activeTab = adminTabs.includes(hash) ? hash : defaultTab;
|
|
115
|
-
const mode = canViewInternalGuide && hash && !adminTabs.includes(hash) ? "guide" : "work-area";
|
|
116
|
-
|
|
117
|
-
document.documentElement.classList.add("admin-tabs-ready");
|
|
118
|
-
document.documentElement.dataset.adminTab = activeTab;
|
|
119
|
-
document.documentElement.dataset.adminMode = mode;
|
|
120
|
-
})();
|
|
121
|
-
</script>
|
|
122
|
-
</head>
|
|
123
|
-
<body>
|
|
124
|
-
<svg aria-hidden="true" style="position:absolute;width:0;height:0;overflow:hidden">
|
|
125
|
-
<symbol id="i-orders" viewBox="0 0 24 24"><path d="M7 4h10a2 2 0 0 1 2 2v14l-3-2-2 2-2-2-2 2-3 2V6a2 2 0 0 1 2-2Z"></path><path d="M9 9h6M9 13h6"></path></symbol>
|
|
126
|
-
<symbol id="i-box" viewBox="0 0 24 24"><path d="m3 7 9-4 9 4-9 4-9-4Z"></path><path d="M3 7v10l9 4 9-4V7"></path><path d="M12 11v10"></path></symbol>
|
|
127
|
-
<symbol id="i-users" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2"></path><circle cx="9.5" cy="7" r="4"></circle><path d="M22 21v-2a4 4 0 0 0-3-3.9"></path><path d="M16 3.1a4 4 0 0 1 0 7.8"></path></symbol>
|
|
128
|
-
<symbol id="i-user" viewBox="0 0 24 24"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></symbol>
|
|
129
|
-
<symbol id="i-shield" viewBox="0 0 24 24"><path d="M12 3 20 6v6c0 5-3.4 8.4-8 9-4.6-.6-8-4-8-9V6l8-3Z"></path><path d="m8.8 12 2.2 2.2L15.8 9"></path></symbol>
|
|
130
|
-
<symbol id="i-chart" viewBox="0 0 24 24"><path d="M4 19V5"></path><path d="M4 19h16"></path><path d="M8 16v-5"></path><path d="M12 16V8"></path><path d="M16 16v-3"></path></symbol>
|
|
131
|
-
<symbol id="i-workflows" viewBox="0 0 24 24"><path d="M6 5h6a4 4 0 0 1 4 4v1"></path><path d="m19 7-3 3-3-3"></path><path d="M18 19h-6a4 4 0 0 1-4-4v-1"></path><path d="m5 17 3-3 3 3"></path><circle cx="6" cy="5" r="2"></circle><circle cx="18" cy="19" r="2"></circle></symbol>
|
|
132
|
-
<symbol id="i-ask" viewBox="0 0 24 24"><path d="M21 12a8 8 0 0 1-8 8H7l-4 3 1.4-5A8 8 0 1 1 21 12Z"></path><path d="M9.5 9.2A2.7 2.7 0 0 1 12 7.6c1.6 0 2.8 1 2.8 2.4 0 1.7-1.6 2.2-2.4 3-.4.4-.5.7-.5 1.4"></path><path d="M12 17h.01"></path></symbol>
|
|
133
|
-
<symbol id="i-gear" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2 3-.2-.1a1.8 1.8 0 0 0-2-.2 1.8 1.8 0 0 0-1 1.6v.2h-5v-.2a1.8 1.8 0 0 0-1-1.6 1.8 1.8 0 0 0-2 .2l-.2.1-2-3 .1-.1A1.7 1.7 0 0 0 4.8 15a1.8 1.8 0 0 0-1.5-1H3v-4h.3a1.8 1.8 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.9l-.1-.1 2-3 .2.1a1.8 1.8 0 0 0 2 .2 1.8 1.8 0 0 0 1-1.6V2.5h5v.2a1.8 1.8 0 0 0 1 1.6 1.8 1.8 0 0 0 2-.2l.2-.1 2 3-.1.1a1.7 1.7 0 0 0-.3 1.9 1.8 1.8 0 0 0 1.5 1h.3v4h-.3a1.8 1.8 0 0 0-1.5 1Z"></path></symbol>
|
|
134
|
-
<symbol id="i-check" viewBox="0 0 24 24"><path d="m5 12 4.2 4.2L19 6.8"></path></symbol>
|
|
135
|
-
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 3 22 20H2L12 3Z"></path><path d="M12 9v5"></path><path d="M12 17h.01"></path></symbol>
|
|
136
|
-
<symbol id="i-card" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="14" rx="2"></rect><path d="M3 10h18"></path><path d="M7 15h4"></path></symbol>
|
|
137
|
-
<symbol id="i-truck" viewBox="0 0 24 24"><path d="M3 7h11v9H3z"></path><path d="M14 10h4l3 3v3h-7z"></path><circle cx="7" cy="18" r="2"></circle><circle cx="17" cy="18" r="2"></circle></symbol>
|
|
138
|
-
<symbol id="i-file" viewBox="0 0 24 24"><path d="M7 3h7l5 5v13H7z"></path><path d="M14 3v5h5"></path><path d="M10 13h6M10 17h4"></path></symbol>
|
|
139
|
-
<symbol id="i-refresh" viewBox="0 0 24 24"><path d="M20 12a8 8 0 0 1-13.6 5.7L4 15"></path><path d="M4 20v-5h5"></path><path d="M4 12A8 8 0 0 1 17.6 6.3L20 9"></path><path d="M20 4v5h-5"></path></symbol>
|
|
140
|
-
<symbol id="i-export" viewBox="0 0 24 24"><path d="M12 3v12"></path><path d="m7 8 5-5 5 5"></path><path d="M5 15v4h14v-4"></path></symbol>
|
|
141
|
-
<symbol id="i-copy" viewBox="0 0 24 24"><rect x="9" y="9" width="11" height="11" rx="2"></rect><path d="M5 15V6a2 2 0 0 1 2-2h9"></path></symbol>
|
|
142
|
-
<symbol id="i-undo" viewBox="0 0 24 24"><path d="M9 14 4 9l5-5"></path><path d="M4 9h11a5 5 0 0 1 0 10h-4"></path></symbol>
|
|
143
|
-
</svg>
|
|
144
|
-
|
|
145
|
-
<div class="shell">
|
|
146
|
-
<aside class="sidebar" aria-label="Admin navigation">
|
|
147
|
-
<div class="brand">
|
|
148
|
-
<div class="brand-mark">T</div>
|
|
149
|
-
<div>
|
|
150
|
-
<b>Token of Trust</b>
|
|
151
|
-
<span>Storefront Admin</span>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
<div class="store">
|
|
156
|
-
<strong>{tenantLabel}</strong>
|
|
157
|
-
<span>{tenant.appDomain}</span>
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
|
-
{isStaff && pickerTenants.length > 0 && (
|
|
161
|
-
<form class="tenant-picker" method="get" data-admin-tenant-picker>
|
|
162
|
-
<label for="admin-tenant-picker-select">Operating as (internal)</label>
|
|
163
|
-
<select
|
|
164
|
-
id="admin-tenant-picker-select"
|
|
165
|
-
name="asTenant"
|
|
166
|
-
data-admin-tenant-picker-select
|
|
167
|
-
>
|
|
168
|
-
<option value={tenant.appDomain} selected={tenantEnvelope.targetTenant === tenant.appDomain}>
|
|
169
|
-
{tenant.appDomain} (this app)
|
|
170
|
-
</option>
|
|
171
|
-
{pickerTenants
|
|
172
|
-
.filter((t) => t.resource !== tenant.appDomain)
|
|
173
|
-
.map((t) => (
|
|
174
|
-
<option value={t.resource} selected={tenantEnvelope.targetTenant === t.resource}>
|
|
175
|
-
{t.resource}
|
|
176
|
-
</option>
|
|
177
|
-
))}
|
|
178
|
-
</select>
|
|
179
|
-
</form>
|
|
180
|
-
)}
|
|
181
|
-
|
|
182
|
-
{deniedTarget && (
|
|
183
|
-
<div class="tenant-picker-denied" role="alert">
|
|
184
|
-
Access to <code>{deniedTarget}</code> is not authorized for your account.
|
|
185
|
-
</div>
|
|
186
|
-
)}
|
|
187
|
-
|
|
188
|
-
<nav class="nav">
|
|
189
|
-
<a href="#orders" data-admin-tab-link><svg><use href="#i-file"></use></svg><span>Orders</span></a>
|
|
190
|
-
<a href="#products" data-admin-tab-link><svg><use href="#i-box"></use></svg><span>Products</span></a>
|
|
191
|
-
<a href="#subscriptions" data-admin-tab-link><svg><use href="#i-refresh"></use></svg><span>Subscriptions</span></a>
|
|
192
|
-
<a href="#customers" data-admin-tab-link><svg><use href="#i-users"></use></svg><span>Customers</span></a>
|
|
193
|
-
<a href="#fulfillment" data-admin-tab-link><svg><use href="#i-truck"></use></svg><span>Fulfillment</span></a>
|
|
194
|
-
<a href="#reporting" data-admin-tab-link><svg><use href="#i-chart"></use></svg><span>Reporting</span></a>
|
|
195
|
-
<a href="#ai-workflows" data-admin-tab-link><svg><use href="#i-workflows"></use></svg><span>AI Workflows</span></a>
|
|
196
|
-
<a href="#blog" data-admin-tab-link><svg><use href="#i-file"></use></svg><span>Blog</span></a>
|
|
197
|
-
<a href="#publish" data-admin-tab-link><svg><use href="#i-export"></use></svg><span>Publish</span></a>
|
|
198
|
-
<a href="#integrations" data-admin-tab-link><svg><use href="#i-workflows"></use></svg><span>Integrations</span></a>
|
|
199
|
-
<a href="#settings" data-admin-tab-link><svg><use href="#i-gear"></use></svg><span>Settings</span></a>
|
|
200
|
-
</nav>
|
|
201
|
-
|
|
202
|
-
<div class="health" aria-label="System status">
|
|
203
|
-
<div class="health-row"><span>Order sync</span><strong>Live</strong></div>
|
|
204
|
-
<div class="health-row"><span>Payments</span><strong>OK</strong></div>
|
|
205
|
-
<div class="health-row"><span>Risk checks</span><strong>OK</strong></div>
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
<!-- Cross-surface hop: the developer cockpit is a SIBLING surface (dev
|
|
209
|
-
setup + connection status), not an admin tab — link, don't embed.
|
|
210
|
-
basePath-aware so it stays inside the tenant prefix. -->
|
|
211
|
-
<a class="cockpit-link" href={`${basePath || ""}/cockpit`}>
|
|
212
|
-
<svg><use href="#i-gear"></use></svg><span>Developer cockpit</span>
|
|
213
|
-
</a>
|
|
214
|
-
|
|
215
|
-
<!-- Cross-surface hop: the merchant Review-and-Release workspace — the
|
|
216
|
-
two-decision (add to next release / publish now) surface, a SIBLING
|
|
217
|
-
page (not a tab), additive to the operator Publish tab above. -->
|
|
218
|
-
<a class="cockpit-link" href={`${basePath || ""}/admin/review-release`}>
|
|
219
|
-
<svg><use href="#i-export"></use></svg><span>Review & release</span>
|
|
220
|
-
</a>
|
|
221
|
-
|
|
222
|
-
<div class="account" data-admin-account>
|
|
223
|
-
<span class="account-avatar" aria-hidden="true"><svg><use href="#i-user"></use></svg></span>
|
|
224
|
-
<span class="account-meta">
|
|
225
|
-
{viewerEmail ? (
|
|
226
|
-
<>
|
|
227
|
-
<span class="account-email" title={viewerEmail}>{viewerEmail}</span>
|
|
228
|
-
<span
|
|
229
|
-
class="account-standing"
|
|
230
|
-
data-standing={adminEntry.isOwnerViewer ? "owner" : isStaff ? "staff" : "none"}
|
|
231
|
-
>
|
|
232
|
-
{adminEntry.isOwnerViewer
|
|
233
|
-
? `owner/admin of ${tenantEnvelope.targetTenant}`
|
|
234
|
-
: isStaff
|
|
235
|
-
? `ToT staff · not an owner of ${tenantEnvelope.targetTenant}`
|
|
236
|
-
: `signed in · no owner/admin standing for ${tenantEnvelope.targetTenant}`}
|
|
237
|
-
</span>
|
|
238
|
-
<form class="account-signout" method="post" action="/api/auth/logout">
|
|
239
|
-
<button type="submit">Sign out</button>
|
|
240
|
-
</form>
|
|
241
|
-
</>
|
|
242
|
-
) : (
|
|
243
|
-
<>
|
|
244
|
-
<span class="account-email">Not signed in</span>
|
|
245
|
-
<span class="account-standing" data-standing="none">
|
|
246
|
-
<a href="/auth/login">sign in</a> as an owner/admin of {tenantEnvelope.targetTenant} to publish
|
|
247
|
-
</span>
|
|
248
|
-
</>
|
|
249
|
-
)}
|
|
250
|
-
</span>
|
|
251
|
-
</div>
|
|
252
|
-
</aside>
|
|
253
|
-
|
|
254
|
-
<main class="main">
|
|
255
|
-
<header class="topbar">
|
|
256
|
-
<div class="page-title">
|
|
257
|
-
<h1>Storefront Admin</h1>
|
|
258
|
-
<p>{tenantLabel} · operations workspace · <code>{adminPath}</code></p>
|
|
259
|
-
</div>
|
|
260
|
-
</header>
|
|
261
|
-
|
|
262
|
-
<div class="tabs mobile-tabbar" role="tablist" aria-label="Admin work areas">
|
|
263
|
-
<a class="tab" href="#orders" role="tab" aria-controls="orders" aria-selected="false" data-admin-tab-link>Orders</a>
|
|
264
|
-
<a class="tab" href="#products" role="tab" aria-controls="products" aria-selected="false" data-admin-tab-link>Products</a>
|
|
265
|
-
<a class="tab" href="#subscriptions" role="tab" aria-controls="subscriptions" aria-selected="false" data-admin-tab-link>Subscriptions</a>
|
|
266
|
-
<a class="tab" href="#customers" role="tab" aria-controls="customers" aria-selected="false" data-admin-tab-link>Customers</a>
|
|
267
|
-
<a class="tab" href="#fulfillment" role="tab" aria-controls="fulfillment" aria-selected="false" data-admin-tab-link>Fulfillment</a>
|
|
268
|
-
<a class="tab" href="#reporting" role="tab" aria-controls="reporting" aria-selected="false" data-admin-tab-link>Reporting</a>
|
|
269
|
-
<a class="tab" href="#ai-workflows" role="tab" aria-controls="ai-workflows" aria-selected="false" data-admin-tab-link>AI Workflows</a>
|
|
270
|
-
<a class="tab" href="#blog" role="tab" aria-controls="blog" aria-selected="false" data-admin-tab-link>Blog</a>
|
|
271
|
-
<a class="tab" href="#publish" role="tab" aria-controls="publish" aria-selected="false" data-admin-tab-link>Publish</a>
|
|
272
|
-
<a class="tab" href="#integrations" role="tab" aria-controls="integrations" aria-selected="false" data-admin-tab-link>Integrations</a>
|
|
273
|
-
<a class="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false" data-admin-tab-link>Settings</a>
|
|
274
|
-
</div>
|
|
275
|
-
|
|
276
|
-
<div class="content">
|
|
277
|
-
{canViewInternalGuide && (
|
|
278
|
-
<section class="band" aria-labelledby="foundation-title" data-admin-guide-section>
|
|
279
|
-
<div class="section-title">
|
|
280
|
-
<div>
|
|
281
|
-
<h2 id="foundation-title">Foundation</h2>
|
|
282
|
-
<p>Quiet, dense, merchant-first operations. Compliance and risk are visible, but only loud when they block shipping or sale completion.</p>
|
|
283
|
-
</div>
|
|
284
|
-
<span class="chip violet">Preview · noindex</span>
|
|
285
|
-
</div>
|
|
286
|
-
|
|
287
|
-
<div class="grid cols-4">
|
|
288
|
-
<div class="metric"><span>Primary task</span><strong>Ship</strong><small>Orders lead with readiness and fulfillment</small></div>
|
|
289
|
-
<div class="metric"><span>Density</span><strong>Table</strong><small>Collapsed viewer supports rapid scanning</small></div>
|
|
290
|
-
<div class="metric"><span>Risk posture</span><strong>Quiet</strong><small>Warn only when merchant action is needed</small></div>
|
|
291
|
-
<div class="metric"><span>Branding</span><strong>White label</strong><small>No vendor checkout/provider naming</small></div>
|
|
292
|
-
</div>
|
|
293
|
-
</section>
|
|
294
|
-
)}
|
|
295
|
-
|
|
296
|
-
{canViewInternalGuide && (
|
|
297
|
-
<section id="work-areas" class="band" aria-labelledby="work-areas-title" data-admin-internal-only>
|
|
298
|
-
<div class="section-title">
|
|
299
|
-
<div>
|
|
300
|
-
<h2 id="work-areas-title">Same-Tree Work Area Hooks</h2>
|
|
301
|
-
<p>Each admin tab has a stable anchor, component file, and layout boundary so agents can work in one tree without stepping on the shared shell.</p>
|
|
302
|
-
</div>
|
|
303
|
-
<span class="chip teal">Worktree-free scaffold</span>
|
|
304
|
-
</div>
|
|
305
|
-
|
|
306
|
-
<div class="panel">
|
|
307
|
-
<div class="panel-head">
|
|
308
|
-
<h3><svg><use href="#i-box"></use></svg>Admin Tab Map</h3>
|
|
309
|
-
<span class="chip">Shared route: apps/storefront/src/pages/admin.astro</span>
|
|
310
|
-
</div>
|
|
311
|
-
<div class="panel-body grid">
|
|
312
|
-
<div class="tabs admin-tabs" role="tablist" aria-label="Admin work areas">
|
|
313
|
-
<a id="admin-tab-orders" class="tab active" href="#orders" role="tab" aria-controls="orders" aria-selected="true" data-admin-tab-link>Orders</a>
|
|
314
|
-
<a id="admin-tab-products" class="tab" href="#products" role="tab" aria-controls="products" aria-selected="false" data-admin-tab-link>Products</a>
|
|
315
|
-
<a id="admin-tab-subscriptions" class="tab" href="#subscriptions" role="tab" aria-controls="subscriptions" aria-selected="false" data-admin-tab-link>Subscriptions</a>
|
|
316
|
-
<a id="admin-tab-customers" class="tab" href="#customers" role="tab" aria-controls="customers" aria-selected="false" data-admin-tab-link>Customers</a>
|
|
317
|
-
<a id="admin-tab-fulfillment" class="tab" href="#fulfillment" role="tab" aria-controls="fulfillment" aria-selected="false" data-admin-tab-link>Fulfillment</a>
|
|
318
|
-
<a id="admin-tab-reporting" class="tab" href="#reporting" role="tab" aria-controls="reporting" aria-selected="false" data-admin-tab-link>Reporting</a>
|
|
319
|
-
<a id="admin-tab-ai-workflows" class="tab" href="#ai-workflows" role="tab" aria-controls="ai-workflows" aria-selected="false" data-admin-tab-link>AI Workflows</a>
|
|
320
|
-
<a id="admin-tab-blog" class="tab" href="#blog" role="tab" aria-controls="blog" aria-selected="false" data-admin-tab-link>Blog</a>
|
|
321
|
-
<a id="admin-tab-publish" class="tab" href="#publish" role="tab" aria-controls="publish" aria-selected="false" data-admin-tab-link>Publish</a>
|
|
322
|
-
<a id="admin-tab-integrations" class="tab" href="#integrations" role="tab" aria-controls="integrations" aria-selected="false" data-admin-tab-link>Integrations</a>
|
|
323
|
-
<a id="admin-tab-settings" class="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false" data-admin-tab-link>Settings</a>
|
|
324
|
-
</div>
|
|
325
|
-
|
|
326
|
-
<div class="grid cols-3" data-admin-tab-help>
|
|
327
|
-
<div class="field">
|
|
328
|
-
<label>Shared shell</label>
|
|
329
|
-
<strong>Admin chrome, tokens, icons, component primitives</strong>
|
|
330
|
-
<p>Touch the route only for shared patterns or new top-level hooks.</p>
|
|
331
|
-
</div>
|
|
332
|
-
<div class="field">
|
|
333
|
-
<label>Tab ownership</label>
|
|
334
|
-
<strong>One component per work area</strong>
|
|
335
|
-
<p>Products, Customers, Fulfillment, Reporting, AI Workflows, and Settings each have their own file under components/admin.</p>
|
|
336
|
-
</div>
|
|
337
|
-
<div class="field">
|
|
338
|
-
<label>Escalation</label>
|
|
339
|
-
<strong>Use worktrees for shared contracts or same-tab collisions</strong>
|
|
340
|
-
<p>This scaffold is reasonable for UX tab work. Route, data model, and auth changes still deserve coordination.</p>
|
|
341
|
-
</div>
|
|
342
|
-
</div>
|
|
343
|
-
</div>
|
|
344
|
-
</div>
|
|
345
|
-
</section>
|
|
346
|
-
)}
|
|
347
|
-
|
|
348
|
-
{canViewInternalGuide && (
|
|
349
|
-
<section id="settings-theme" class="band" aria-labelledby="tokens-title" data-admin-guide-section>
|
|
350
|
-
<div class="section-title">
|
|
351
|
-
<div>
|
|
352
|
-
<h2 id="tokens-title">Theme Tokens</h2>
|
|
353
|
-
<p>These variables define the administrative interface theme independently of the public storefront theme.</p>
|
|
354
|
-
</div>
|
|
355
|
-
</div>
|
|
356
|
-
|
|
357
|
-
<div class="panel">
|
|
358
|
-
<div class="panel-head">
|
|
359
|
-
<h3><svg><use href="#i-card"></use></svg>Color</h3>
|
|
360
|
-
<span class="chip teal">Admin palette</span>
|
|
361
|
-
</div>
|
|
362
|
-
<div class="panel-body">
|
|
363
|
-
<div class="swatches">
|
|
364
|
-
<div class="swatch"><div class="swatch-color" style="background:#f5f7f6"></div><div class="swatch-meta"><b>Background</b><code>--admin-bg</code></div></div>
|
|
365
|
-
<div class="swatch"><div class="swatch-color" style="background:#ffffff"></div><div class="swatch-meta"><b>Surface</b><code>--admin-surface</code></div></div>
|
|
366
|
-
<div class="swatch"><div class="swatch-color" style="background:#16211f"></div><div class="swatch-meta"><b>Ink</b><code>--admin-ink</code></div></div>
|
|
367
|
-
<div class="swatch"><div class="swatch-color" style="background:#007f79"></div><div class="swatch-meta"><b>Action</b><code>--admin-teal</code></div></div>
|
|
368
|
-
<div class="swatch"><div class="swatch-color" style="background:#137a55"></div><div class="swatch-meta"><b>Ready</b><code>--admin-green</code></div></div>
|
|
369
|
-
<div class="swatch"><div class="swatch-color" style="background:#a45d00"></div><div class="swatch-meta"><b>Review</b><code>--admin-amber</code></div></div>
|
|
370
|
-
<div class="swatch"><div class="swatch-color" style="background:#b42318"></div><div class="swatch-meta"><b>Blocked</b><code>--admin-red</code></div></div>
|
|
371
|
-
<div class="swatch"><div class="swatch-color" style="background:#2458c7"></div><div class="swatch-meta"><b>Info</b><code>--admin-blue</code></div></div>
|
|
372
|
-
</div>
|
|
373
|
-
</div>
|
|
374
|
-
</div>
|
|
375
|
-
|
|
376
|
-
<div class="grid cols-2">
|
|
377
|
-
<div class="panel type-sample">
|
|
378
|
-
<div class="panel-head"><h3>Typography</h3><span class="chip">0 letter spacing</span></div>
|
|
379
|
-
<div class="panel-body">
|
|
380
|
-
<h3>Order #2248206305</h3>
|
|
381
|
-
<p>Use system UI for fast operational scanning. Reserve 22-27px headings for page/detail titles, 15-16px for section heads, and 12-13px for dense metadata.</p>
|
|
382
|
-
</div>
|
|
383
|
-
</div>
|
|
384
|
-
<div class="panel">
|
|
385
|
-
<div class="panel-head"><h3>Shape and Space</h3><span class="chip">8px max cards</span></div>
|
|
386
|
-
<div class="panel-body grid cols-2">
|
|
387
|
-
<div class="field"><label>Radius</label><strong>8px / 6px</strong><p>Cards, panels, form controls</p></div>
|
|
388
|
-
<div class="field"><label>Grid gap</label><strong>12-14px</strong><p>Dense, predictable rhythm</p></div>
|
|
389
|
-
<div class="field"><label>Hit target</label><strong>38-44px</strong><p>Buttons and controls</p></div>
|
|
390
|
-
<div class="field"><label>Shadow</label><strong>Subtle</strong><p>Only for active detail surfaces</p></div>
|
|
391
|
-
</div>
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
</section>
|
|
395
|
-
|
|
396
|
-
<section id="settings-components" class="band" aria-labelledby="components-title" data-admin-guide-section>
|
|
397
|
-
<div class="section-title">
|
|
398
|
-
<div>
|
|
399
|
-
<h2 id="components-title">Core Components</h2>
|
|
400
|
-
<p>Reusable elements for orders, fulfillment, customers, compliance, and risk workflows.</p>
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
|
|
404
|
-
<div class="grid cols-2">
|
|
405
|
-
<div class="panel">
|
|
406
|
-
<div class="panel-head"><h3><svg><use href="#i-check"></use></svg>Buttons and Chips</h3></div>
|
|
407
|
-
<div class="panel-body grid">
|
|
408
|
-
<div class="actions">
|
|
409
|
-
<button class="btn primary" type="button"><svg><use href="#i-truck"></use></svg>Fulfill</button>
|
|
410
|
-
<button class="btn" type="button"><svg><use href="#i-export"></use></svg>Export</button>
|
|
411
|
-
<button class="icon-btn" type="button" aria-label="Refresh"><svg><use href="#i-refresh"></use></svg></button>
|
|
412
|
-
</div>
|
|
413
|
-
<div class="actions">
|
|
414
|
-
<span class="chip green">Paid</span>
|
|
415
|
-
<span class="chip teal">Ready</span>
|
|
416
|
-
<span class="chip blue">Excise</span>
|
|
417
|
-
<span class="chip amber">Review</span>
|
|
418
|
-
<span class="chip red">Blocked</span>
|
|
419
|
-
<span class="chip violet">Test store</span>
|
|
420
|
-
</div>
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
|
|
424
|
-
<div class="panel">
|
|
425
|
-
<div class="panel-head"><h3><svg><use href="#i-file"></use></svg>Tabs</h3></div>
|
|
426
|
-
<div class="panel-body">
|
|
427
|
-
<div class="tabs" role="tablist" aria-label="Static tab sample">
|
|
428
|
-
<button class="tab active" type="button">Order</button>
|
|
429
|
-
<button class="tab" type="button">Customer</button>
|
|
430
|
-
<button class="tab" type="button">Compliance</button>
|
|
431
|
-
<button class="tab" type="button">Order Risk</button>
|
|
432
|
-
<button class="tab" type="button">Activity</button>
|
|
433
|
-
</div>
|
|
434
|
-
<p class="note" style="margin-top:12px">Compliance and Order Risk are secondary tabs. Top alerts jump directly to them only when action is required.</p>
|
|
435
|
-
</div>
|
|
436
|
-
</div>
|
|
437
|
-
</div>
|
|
438
|
-
</section>
|
|
439
|
-
)}
|
|
440
|
-
|
|
441
|
-
<OrdersWorkspace envelope={tenantEnvelope} />
|
|
442
|
-
<AdminProductsTab envelope={tenantEnvelope} />
|
|
443
|
-
<AdminSubscriptionsTab envelope={tenantEnvelope} />
|
|
444
|
-
<AdminCustomersTab envelope={tenantEnvelope} />
|
|
445
|
-
<AdminFulfillmentTab envelope={tenantEnvelope} />
|
|
446
|
-
<AdminReportingTab envelope={tenantEnvelope} />
|
|
447
|
-
<AdminAIWorkflowsTab envelope={tenantEnvelope} />
|
|
448
|
-
<AdminBlogTab envelope={tenantEnvelope} />
|
|
449
|
-
<AdminPublishTab envelope={tenantEnvelope} />
|
|
450
|
-
<AdminIntegrationsTab envelope={tenantEnvelope} />
|
|
451
|
-
<AdminSettingsTab envelope={tenantEnvelope} />
|
|
452
|
-
|
|
453
|
-
{canViewInternalGuide && (
|
|
454
|
-
<section id="risk" class="band" aria-labelledby="risk-title" data-admin-guide-section>
|
|
455
|
-
<div class="section-title">
|
|
456
|
-
<div>
|
|
457
|
-
<h2 id="risk-title">Order Risk</h2>
|
|
458
|
-
<p>Risk is quiet at low levels and becomes top-level only when it blocks fulfillment.</p>
|
|
459
|
-
</div>
|
|
460
|
-
</div>
|
|
461
|
-
|
|
462
|
-
<div class="risk-alert">
|
|
463
|
-
<div class="risk-alert-main">
|
|
464
|
-
<svg><use href="#i-alert"></use></svg>
|
|
465
|
-
<div>
|
|
466
|
-
<b>Order Risk: Review required</b>
|
|
467
|
-
<span>Risk checks need review before this order can ship.</span>
|
|
468
|
-
</div>
|
|
469
|
-
</div>
|
|
470
|
-
<button class="btn" type="button">View risk</button>
|
|
471
|
-
</div>
|
|
472
|
-
|
|
473
|
-
<div class="panel">
|
|
474
|
-
<div class="panel-head"><h3><svg><use href="#i-alert"></use></svg>Order Risk Tab</h3><span class="chip amber">Review required</span></div>
|
|
475
|
-
<div class="panel-body grid">
|
|
476
|
-
<div class="grid cols-2">
|
|
477
|
-
<div class="field"><label>Risk status</label><strong>Review required</strong><p>Risk checks need review before this order can ship.</p></div>
|
|
478
|
-
<div class="field"><label>Risk score</label><strong>Needs review</strong><p>Review risk</p></div>
|
|
479
|
-
</div>
|
|
480
|
-
<div class="check-row blocking">
|
|
481
|
-
<div><b>Gateway fraud risk</b><p>Payment is authorized but not fully captured.</p></div>
|
|
482
|
-
<strong>Pending capture</strong>
|
|
483
|
-
<span class="chip amber">Action</span>
|
|
484
|
-
</div>
|
|
485
|
-
<div class="check-row blocking">
|
|
486
|
-
<div><b>Manual review</b><p>Resolve the hold before creating a shipping label.</p></div>
|
|
487
|
-
<strong>Required</strong>
|
|
488
|
-
<span class="chip amber">Action</span>
|
|
489
|
-
</div>
|
|
490
|
-
<div class="check-row">
|
|
491
|
-
<div><b>Customer history</b><p>Returning customers show order count, member-since date, and lifetime spend.</p></div>
|
|
492
|
-
<strong>3 orders</strong>
|
|
493
|
-
<span class="chip teal">OK</span>
|
|
494
|
-
</div>
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
</section>
|
|
498
|
-
)}
|
|
499
|
-
|
|
500
|
-
{canViewInternalGuide && (
|
|
501
|
-
<section id="compliance" class="band" aria-labelledby="compliance-title" data-admin-guide-section>
|
|
502
|
-
<div class="section-title">
|
|
503
|
-
<div>
|
|
504
|
-
<h2 id="compliance-title">Compliance</h2>
|
|
505
|
-
<p>Relevant regulated-sale details stay available without becoming the hero of the order page.</p>
|
|
506
|
-
</div>
|
|
507
|
-
</div>
|
|
508
|
-
|
|
509
|
-
<div class="panel">
|
|
510
|
-
<div class="panel-head"><h3><svg><use href="#i-shield"></use></svg>Compliance Tab</h3><span class="chip green">Ready to Ship</span></div>
|
|
511
|
-
<div class="panel-body grid">
|
|
512
|
-
<div class="check-row">
|
|
513
|
-
<div><b>Identity and age</b><p>21+ assurance completed before checkout.</p></div>
|
|
514
|
-
<strong>Passed</strong>
|
|
515
|
-
<span class="chip green">OK</span>
|
|
516
|
-
</div>
|
|
517
|
-
<div class="check-row">
|
|
518
|
-
<div><b>Excise tax</b><p>Minnesota jurisdiction via tot_excise_tax.</p></div>
|
|
519
|
-
<strong>$142.50 collected</strong>
|
|
520
|
-
<span class="chip blue">OK</span>
|
|
521
|
-
</div>
|
|
522
|
-
<div class="check-row">
|
|
523
|
-
<div><b>PACT workflow</b><p>Shipping and reporting placeholders are ready for fulfillment.</p></div>
|
|
524
|
-
<strong>Ready</strong>
|
|
525
|
-
<span class="chip teal">OK</span>
|
|
526
|
-
</div>
|
|
527
|
-
<div class="check-row">
|
|
528
|
-
<div><b>Evidence</b><p>Audit evidence available if needed.</p></div>
|
|
529
|
-
<strong>Logged</strong>
|
|
530
|
-
<span class="chip teal">OK</span>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
</div>
|
|
534
|
-
</section>
|
|
535
|
-
)}
|
|
536
|
-
|
|
537
|
-
{canViewInternalGuide && (
|
|
538
|
-
<section class="band" aria-labelledby="copy-title" data-admin-guide-section>
|
|
539
|
-
<div class="section-title">
|
|
540
|
-
<div>
|
|
541
|
-
<h2 id="copy-title">Language Rules</h2>
|
|
542
|
-
<p>Terminology for the white-labeled admin experience.</p>
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
<div class="grid cols-3">
|
|
546
|
-
<div class="field"><label>Green state</label><strong>Ready to Ship</strong><p>Use for paid, checked, shippable orders.</p></div>
|
|
547
|
-
<div class="field"><label>Blocking state</label><strong>Hold: Review Required</strong><p>Use when the merchant must act before shipment.</p></div>
|
|
548
|
-
<div class="field"><label>Provider labels</label><strong>Do not show</strong><p>Use Storefront, checkout, order sync, and customer record.</p></div>
|
|
549
|
-
</div>
|
|
550
|
-
<p class="note">Implementation note: provider-specific identifiers can remain in server logs and engineering docs, but customer- and merchant-facing admin screens stay white-labeled.</p>
|
|
551
|
-
</section>
|
|
552
|
-
)}
|
|
553
|
-
</div>
|
|
554
|
-
</main>
|
|
555
|
-
</div>
|
|
556
|
-
|
|
557
|
-
<button class="floating-ask" type="button" data-admin-ask aria-label="Ask about Orders" title="Ask about Orders">
|
|
558
|
-
<span class="floating-ask-icon" aria-hidden="true"><svg><use href="#i-ask"></use></svg></span>
|
|
559
|
-
<span class="floating-ask-label">
|
|
560
|
-
<strong>Ask</strong>
|
|
561
|
-
<small data-admin-ask-context>Orders</small>
|
|
562
|
-
</span>
|
|
563
|
-
</button>
|
|
564
|
-
|
|
565
|
-
<script>
|
|
566
|
-
import { initAdminShell } from "@/lib/admin/adminShell";
|
|
567
|
-
initAdminShell();
|
|
568
|
-
</script>
|
|
569
|
-
</body>
|
|
570
|
-
</html>
|