@tokenoftrust/storefront-runner 1.4.1 → 2.0.0
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.config.mjs +17 -1
- package/apps/storefront/env.d.ts +54 -5
- package/apps/storefront/integrations/materialize-guard.mjs +54 -0
- package/apps/storefront/migrations-apps/0002_good_switch.sql +26 -0
- package/apps/storefront/migrations-apps/0003_mute_marauders.sql +12 -0
- package/apps/storefront/migrations-apps/0004_deep_morph.sql +36 -0
- package/apps/storefront/migrations-apps/0005_common_mystique.sql +23 -0
- package/apps/storefront/migrations-apps/0006_broad_microchip.sql +16 -0
- package/apps/storefront/migrations-apps/0007_brave_outlaw_kid.sql +15 -0
- package/apps/storefront/migrations-apps/0008_blue_dazzler.sql +11 -0
- package/apps/storefront/migrations-apps/0009_bored_shinobi_shaw.sql +15 -0
- package/apps/storefront/migrations-apps/0010_ws4_verified_provider_measurement.sql +35 -0
- package/apps/storefront/migrations-apps/meta/0002_snapshot.json +1160 -0
- package/apps/storefront/migrations-apps/meta/0003_snapshot.json +1235 -0
- package/apps/storefront/migrations-apps/meta/0004_snapshot.json +1474 -0
- package/apps/storefront/migrations-apps/meta/0005_snapshot.json +1617 -0
- package/apps/storefront/migrations-apps/meta/0006_snapshot.json +1716 -0
- package/apps/storefront/migrations-apps/meta/0007_snapshot.json +1812 -0
- package/apps/storefront/migrations-apps/meta/0008_snapshot.json +1881 -0
- package/apps/storefront/migrations-apps/meta/0009_snapshot.json +1979 -0
- package/apps/storefront/migrations-apps/meta/_journal.json +56 -0
- package/apps/storefront/public/apps/tot.demo.analytics/0.1.0/entry.js +42 -0
- package/apps/storefront/public/js/dashboard-team.js +38 -2
- package/apps/storefront/public/platform/amplitude-http/v1/entry.mjs +19 -0
- package/apps/storefront/public/platform/google-measurement/v1/entry.mjs +19 -0
- package/apps/storefront/public/shared/commerce-chrome.css +20 -2
- package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +68 -0
- package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +111 -0
- package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +2 -0
- package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +247 -0
- package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +73 -0
- package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +79 -0
- package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +10982 -0
- package/apps/storefront/scripts/import-v84-through-ws2.ts +38 -0
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +2 -0
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +4 -0
- package/apps/storefront/scripts/install-v84-native-through-ws1.ts +185 -0
- package/apps/storefront/scripts/prove-clone-isolation.ts +506 -0
- package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +148 -0
- package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +35 -0
- package/apps/storefront/scripts/replay-v84-clean-clone.ts +214 -0
- package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +18 -0
- package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +18 -0
- package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +18 -0
- package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +17 -0
- package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +15 -0
- package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +21 -0
- package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +42 -0
- package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +145 -0
- package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +18 -0
- package/apps/storefront/src/components/Img.astro +1 -1
- package/apps/storefront/src/components/Seo.astro +65 -1
- package/apps/storefront/src/components/admin/AdminBlogDetailRail.astro +878 -0
- package/apps/storefront/src/components/admin/AdminBlogTab.astro +1435 -0
- package/apps/storefront/src/components/admin/AdminCustomersTab.astro +3 -7
- package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +105 -0
- package/apps/storefront/src/components/admin/AdminPublishTab.astro +1980 -2564
- package/apps/storefront/src/components/admin/AdminSettingsTab.astro +2 -2
- package/apps/storefront/src/components/admin/AdminSubscriptionsTab.astro +1 -3
- package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +5 -5
- package/apps/storefront/src/components/blog/BlogPaywall.astro +87 -0
- package/apps/storefront/src/components/blog/PostAccessBadge.astro +43 -0
- package/apps/storefront/src/components/blog/PostGrid.astro +57 -0
- package/apps/storefront/src/components/blog/ReactionBar.astro +214 -0
- package/apps/storefront/src/components/chrome/NavDropdown.astro +12 -0
- package/apps/storefront/src/components/chrome/SiteFooter.astro +7 -2
- package/apps/storefront/src/components/chrome/SiteHeader.astro +46 -10
- package/apps/storefront/src/components/compliance/AdultSignatureNotice.astro +1 -1
- package/apps/storefront/src/components/compliance/ComplianceNotice.astro +1 -2
- package/apps/storefront/src/components/compliance/ExciseTaxNotice.astro +1 -2
- package/apps/storefront/src/components/compliance/PactActNotice.astro +1 -1
- package/apps/storefront/src/components/compliance/Prop65Warning.astro +1 -2
- package/apps/storefront/src/components/compliance/PurchaseLimitNotice.astro +2 -3
- package/apps/storefront/src/components/compliance/ShippingRestrictionNotice.astro +2 -2
- package/apps/storefront/src/components/compliance/StateEligibilityNotice.astro +2 -3
- package/apps/storefront/src/components/content/TrustStrip.astro +4 -4
- package/apps/storefront/src/components/islands/MobileNav.tsx +26 -1
- package/apps/storefront/src/components/islands/VariantSelector.tsx +27 -2
- package/apps/storefront/src/components/islands/useCheckoutHandoffCorrelation.ts +75 -0
- package/apps/storefront/src/components/membership/IllustrativeLabel.astro +1 -2
- package/apps/storefront/src/components/membership/TierCards.astro +2 -2
- package/apps/storefront/src/components/membership/TierComparisonTable.astro +2 -2
- package/apps/storefront/src/components/subscription/SavingsExplainer.astro +2 -2
- package/apps/storefront/src/config/adminTenantLookup.ts +35 -0
- package/apps/storefront/src/config/devTenantSeed.ts +9 -9
- package/apps/storefront/src/config/resolver.ts +4 -4
- package/apps/storefront/src/layouts/Layout.astro +146 -21
- package/apps/storefront/src/lib/activity/alerts.ts +17 -19
- package/apps/storefront/src/lib/activity/candidateSubmitLease.ts +87 -0
- package/apps/storefront/src/lib/activity/changeActorAttribution.ts +89 -9
- package/apps/storefront/src/lib/activity/deployVersion.ts +20 -27
- package/apps/storefront/src/lib/activity/ingest.ts +8 -8
- package/apps/storefront/src/lib/activity/ingestAuth.ts +1 -1
- package/apps/storefront/src/lib/activity/killSwitch.ts +6 -6
- package/apps/storefront/src/lib/activity/query.ts +9 -9
- package/apps/storefront/src/lib/activity/recordActivity.ts +11 -15
- package/apps/storefront/src/lib/activity/store.ts +4 -6
- package/apps/storefront/src/lib/activity/uiActor.ts +12 -12
- package/apps/storefront/src/lib/activity/workerCommit.ts +6 -6
- package/apps/storefront/src/lib/admin/adminShell.ts +292 -0
- package/apps/storefront/src/lib/admin/ai/approvalMode.ts +2 -3
- package/apps/storefront/src/lib/admin/ai/audit.ts +3 -5
- package/apps/storefront/src/lib/admin/checkoutStyleInput.ts +7 -7
- package/apps/storefront/src/lib/admin/checkoutStyleTarget.ts +3 -3
- package/apps/storefront/src/lib/admin/envelope.ts +1 -2
- package/apps/storefront/src/lib/admin/orderClient.ts +3 -5
- package/apps/storefront/src/lib/admin/services/orders.ts +17 -19
- package/apps/storefront/src/lib/admin/viewmodels/aiWorkflows.ts +4 -6
- package/apps/storefront/src/lib/admin/viewmodels/settings.ts +1 -1
- package/apps/storefront/src/lib/apps/adminService.ts +14 -4
- package/apps/storefront/src/lib/apps/adminSession.ts +54 -45
- package/apps/storefront/src/lib/apps/apiAuth.ts +2 -2
- package/apps/storefront/src/lib/apps/apiRoute.ts +2 -2
- package/apps/storefront/src/lib/apps/appVersionStore.ts +281 -0
- package/apps/storefront/src/lib/apps/catalogMapper.ts +1 -1
- package/apps/storefront/src/lib/apps/consentConfigStore.ts +228 -0
- package/apps/storefront/src/lib/apps/credentials.ts +2 -2
- package/apps/storefront/src/lib/apps/gatewayKeys.ts +4 -4
- package/apps/storefront/src/lib/apps/gtmMigrationInstall.ts +447 -0
- package/apps/storefront/src/lib/apps/gtmMigrationReport.ts +367 -0
- package/apps/storefront/src/lib/apps/gtmMigrationTab.ts +315 -0
- package/apps/storefront/src/lib/apps/healthAggregate.ts +5 -5
- package/apps/storefront/src/lib/apps/integrationLifecycle.ts +614 -0
- package/apps/storefront/src/lib/apps/integrationLifecycleController.ts +125 -0
- package/apps/storefront/src/lib/apps/integrationReadModel.ts +563 -0
- package/apps/storefront/src/lib/apps/integrationsTab.ts +547 -0
- package/apps/storefront/src/lib/apps/integrationsView.ts +106 -0
- package/apps/storefront/src/lib/apps/managedAnalyticsService.ts +599 -0
- package/apps/storefront/src/lib/apps/orders/attributionService.ts +2 -2
- package/apps/storefront/src/lib/apps/orders/customerHash.ts +1 -1
- package/apps/storefront/src/lib/apps/orders/foxyOrderClient.ts +12 -12
- package/apps/storefront/src/lib/apps/orders/idempotency.ts +7 -7
- package/apps/storefront/src/lib/apps/orders/orderConversionD1.ts +150 -0
- package/apps/storefront/src/lib/apps/orders/orderForwardReceiver.ts +9 -1
- package/apps/storefront/src/lib/apps/orders/orderMapper.ts +2 -2
- package/apps/storefront/src/lib/apps/orders/ordersStore.ts +7 -7
- package/apps/storefront/src/lib/apps/orders/verifiedProviderMeasurement.ts +117 -0
- package/apps/storefront/src/lib/apps/registryService.ts +270 -16
- package/apps/storefront/src/lib/apps/scopes.ts +2 -2
- package/apps/storefront/src/lib/apps/tenantIntegrationMaterialization.ts +170 -0
- package/apps/storefront/src/lib/apps/tokenIssuer.ts +4 -4
- package/apps/storefront/src/lib/apps/tokenVerifier.ts +6 -6
- package/apps/storefront/src/lib/apps/v84CleanCloneReplayContext.ts +16 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleCacheEvidence.ts +105 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleEvidence.ts +177 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleMaterialization.ts +251 -0
- package/apps/storefront/src/lib/apps/v84CloneLifecycleSemantics.ts +241 -0
- package/apps/storefront/src/lib/apps/v84CloneMigrationEvidence.ts +211 -0
- package/apps/storefront/src/lib/apps/v84CloneNativeInstallEvidence.ts +409 -0
- package/apps/storefront/src/lib/apps/v84NonportableCodeCoaching.ts +368 -0
- package/apps/storefront/src/lib/apps/v84NonportableRouteContract.ts +188 -0
- package/apps/storefront/src/lib/apps/v84NonportableRouteDogfood.ts +291 -0
- package/apps/storefront/src/lib/apps/widgets/eligibility.ts +2 -2
- package/apps/storefront/src/lib/apps/widgets/frameProps.ts +3 -3
- package/apps/storefront/src/lib/apps/widgets/launchToken.ts +4 -4
- package/apps/storefront/src/lib/apps/widgets/placements.ts +2 -2
- package/apps/storefront/src/lib/apps/widgets/renderSlot.ts +1 -1
- package/apps/storefront/src/lib/apps/ws1ManagedAnalyticsClient.ts +95 -0
- package/apps/storefront/src/lib/auth/adminApiGuard.ts +66 -0
- package/apps/storefront/src/lib/auth/adminEntry.ts +11 -11
- package/apps/storefront/src/lib/auth/adminLanding.ts +88 -0
- package/apps/storefront/src/lib/auth/identityToken.ts +6 -14
- package/apps/storefront/src/lib/auth/loginGate.ts +75 -13
- package/apps/storefront/src/lib/auth/mcpClientAssertion.ts +2 -4
- package/apps/storefront/src/lib/auth/operatorSession.ts +113 -0
- package/apps/storefront/src/lib/auth/session.ts +7 -8
- package/apps/storefront/src/lib/auth/totAccessClient.ts +8 -18
- package/apps/storefront/src/lib/basePath.ts +9 -2
- package/apps/storefront/src/lib/blog/access.ts +29 -0
- package/apps/storefront/src/lib/blog/collection.ts +400 -0
- package/apps/storefront/src/lib/blog/markdown.ts +174 -0
- package/apps/storefront/src/lib/blog/provider.ts +62 -3
- package/apps/storefront/src/lib/blog/reactions.ts +87 -0
- package/apps/storefront/src/lib/blog/rss.ts +92 -0
- package/apps/storefront/src/lib/blog/teaser.ts +83 -0
- package/apps/storefront/src/lib/blog/types.ts +34 -0
- package/apps/storefront/src/lib/blog/viewCounts.ts +243 -0
- package/apps/storefront/src/lib/chrome/examples/tokenoftrust.chrome-assignments.example.json +6 -0
- package/apps/storefront/src/lib/chrome/examples/tokenoftrust.chrome.example.json +79 -0
- package/apps/storefront/src/lib/chrome/model.ts +48 -253
- package/apps/storefront/src/lib/chrome/navCurrent.ts +29 -0
- package/apps/storefront/src/lib/chrome/parseConfig.ts +18 -32
- package/apps/storefront/src/lib/chrome/variant.ts +39 -0
- package/apps/storefront/src/lib/commerce/checkoutHandoffCorrelation.ts +105 -0
- package/apps/storefront/src/lib/compliance/tamper-sentinel-boot.ts +152 -0
- package/apps/storefront/src/lib/compliance/tamper-sentinel.ts +327 -0
- package/apps/storefront/src/lib/content/index.ts +5 -5
- package/apps/storefront/src/lib/content-edit/applyDiff.ts +1 -1
- package/apps/storefront/src/lib/content-edit/route.ts +1 -1
- package/apps/storefront/src/lib/d1/catalog.ts +14 -2
- package/apps/storefront/src/lib/d1/schema-apps.ts +372 -17
- package/apps/storefront/src/lib/dev/activityIngestToken.ts +2 -4
- package/apps/storefront/src/lib/dev/activityStore.ts +3 -5
- package/apps/storefront/src/lib/dev/apiBase.ts +1 -4
- package/apps/storefront/src/lib/dev/cockpit/ask.ts +49 -0
- package/apps/storefront/src/lib/dev/cockpit/clickToSource.ts +71 -0
- package/apps/storefront/src/lib/dev/cockpit/copyCommand.ts +227 -0
- package/apps/storefront/src/lib/dev/cockpit/files.ts +249 -0
- package/apps/storefront/src/lib/dev/cockpit/hostedActivity.ts +500 -0
- package/apps/storefront/src/lib/dev/cockpit/infoPopover.ts +12 -0
- package/apps/storefront/src/lib/dev/cockpit/mcpCopy.ts +34 -0
- package/apps/storefront/src/lib/dev/cockpit/monitor.ts +107 -0
- package/apps/storefront/src/lib/dev/cockpit/stepper.ts +116 -0
- package/apps/storefront/src/lib/dev/cockpit/themeToggle.ts +23 -0
- package/apps/storefront/src/lib/dev/cockpitStore.ts +1 -9
- package/apps/storefront/src/lib/dev/devDraft.ts +1 -1
- package/apps/storefront/src/lib/dev/previewStatus.ts +9 -21
- package/apps/storefront/src/lib/dev/rendezvousBroker.ts +9 -24
- package/apps/storefront/src/lib/dev/runtimeStore.ts +1 -1
- package/apps/storefront/src/lib/edgeCache.ts +34 -5
- package/apps/storefront/src/lib/email/candidateConflictEmail.ts +80 -0
- package/apps/storefront/src/lib/http/fetchTransport.ts +63 -0
- package/apps/storefront/src/lib/i18n.ts +25 -0
- package/apps/storefront/src/lib/integration/browserEnvironment.ts +137 -0
- package/apps/storefront/src/lib/integration/managedInstallDeclarations.ts +72 -0
- package/apps/storefront/src/lib/integration/nonceStamp.ts +49 -0
- package/apps/storefront/src/lib/integration/tenantDeclarations.ts +116 -0
- package/apps/storefront/src/lib/jsonld.ts +118 -0
- package/apps/storefront/src/lib/membership/eligibility.ts +1 -1
- package/apps/storefront/src/lib/membership/model.ts +1 -2
- package/apps/storefront/src/lib/monitoring/manifest.ts +11 -11
- package/apps/storefront/src/lib/newsletter/confirmationEmail.ts +30 -0
- package/apps/storefront/src/lib/newsletter/consent.ts +23 -0
- package/apps/storefront/src/lib/newsletter/digest.ts +117 -0
- package/apps/storefront/src/lib/newsletter/resendClient.ts +79 -0
- package/apps/storefront/src/lib/newsletter/send.ts +265 -0
- package/apps/storefront/src/lib/newsletter/subscribers.ts +156 -0
- package/apps/storefront/src/lib/previewReload.ts +57 -1
- package/apps/storefront/src/lib/publish/adminPublishTab.ts +4625 -0
- package/apps/storefront/src/lib/publish/apex-readiness.ts +41 -18
- package/apps/storefront/src/lib/publish/buildStream.ts +269 -0
- package/apps/storefront/src/lib/publish/collapsePersistence.ts +72 -0
- package/apps/storefront/src/lib/publish/dispatchHealth.ts +5 -7
- package/apps/storefront/src/lib/publish/domainState.ts +22 -13
- package/apps/storefront/src/lib/publish/lifecycleState.ts +369 -0
- package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +29 -0
- package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +78 -0
- package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +62 -0
- package/apps/storefront/src/lib/publish/mergeRowFindings.ts +124 -0
- package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +75 -0
- package/apps/storefront/src/lib/publish/panelPolling.ts +78 -0
- package/apps/storefront/src/lib/publish/publish-guard.ts +88 -0
- package/apps/storefront/src/lib/publish/publishFormat.ts +165 -0
- package/apps/storefront/src/lib/publish/publishHero.ts +177 -0
- package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +66 -0
- package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +141 -0
- package/apps/storefront/src/lib/publish/reviewRelease/index.ts +41 -0
- package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +47 -0
- package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +42 -0
- package/apps/storefront/src/lib/publish/reviewRelease/types.ts +59 -0
- package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +440 -0
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +161 -0
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +325 -0
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +241 -0
- package/apps/storefront/src/lib/publish/shipWorkspace.ts +121 -51
- package/apps/storefront/src/lib/publish/sseRoute.ts +119 -0
- package/apps/storefront/src/lib/publish/stageBundleUpload.ts +215 -0
- package/apps/storefront/src/lib/publish/streamLogConsole.ts +142 -0
- package/apps/storefront/src/lib/publish/versionNumber.ts +52 -0
- package/apps/storefront/src/lib/rate/kvWindow.ts +53 -0
- package/apps/storefront/src/lib/rawChrome.ts +125 -47
- package/apps/storefront/src/lib/rawMarketingHtml.ts +74 -3
- package/apps/storefront/src/lib/search/index.ts +2 -2
- package/apps/storefront/src/lib/seo/alternates.ts +42 -0
- package/apps/storefront/src/lib/seo/meta.ts +65 -0
- package/apps/storefront/src/lib/social/golive.ts +212 -0
- package/apps/storefront/src/lib/social/notify.ts +32 -0
- package/apps/storefront/src/lib/social/tokenStore.ts +171 -0
- package/apps/storefront/src/lib/storyblok/content-model.ts +7 -33
- package/apps/storefront/src/lib/storyblok/provider.ts +168 -60
- package/apps/storefront/src/lib/subscription/model.ts +4 -4
- package/apps/storefront/src/lib/the-build/provider.ts +32 -0
- package/apps/storefront/src/lib/the-build/readingTime.ts +35 -0
- package/apps/storefront/src/lib/the-build/toc.ts +95 -0
- package/apps/storefront/src/lib/tot/ToTClient.ts +1 -1
- package/apps/storefront/src/lib/tot/d1Client.ts +2 -2
- package/apps/storefront/src/lib/tot/totClientInterface.ts +3 -4
- package/apps/storefront/src/lib/webhooks/deliveryStore.ts +16 -17
- package/apps/storefront/src/middleware/index.ts +385 -52
- package/apps/storefront/src/pages/[...slug].astro +9 -4
- package/apps/storefront/src/pages/admin/review-release.astro +265 -0
- package/apps/storefront/src/pages/admin/select.astro +96 -0
- package/apps/storefront/src/pages/admin.astro +25 -1313
- package/apps/storefront/src/pages/api/activity.ts +8 -8
- package/apps/storefront/src/pages/api/admin/activity-alerts.ts +5 -20
- package/apps/storefront/src/pages/api/admin/orders/[id].ts +7 -2
- package/apps/storefront/src/pages/api/admin/orders.ts +8 -2
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +174 -0
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +96 -0
- package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +118 -0
- package/apps/storefront/src/pages/api/apps/admin/integrations.ts +89 -0
- package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +85 -0
- package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +74 -2
- package/apps/storefront/src/pages/api/blog/[collection]/[slug]/react.ts +104 -0
- package/apps/storefront/src/pages/api/commerce/checkout-handoff.ts +77 -0
- package/apps/storefront/src/pages/api/compliance/tamper.ts +88 -0
- package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +108 -0
- package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +146 -0
- package/apps/storefront/src/pages/api/newsletter/confirm.ts +75 -0
- package/apps/storefront/src/pages/api/newsletter/unsubscribe.ts +90 -0
- package/apps/storefront/src/pages/api/publish/stage-bundle.ts +70 -0
- package/apps/storefront/src/pages/api/rum/vitals.ts +20 -2
- package/apps/storefront/src/pages/blog/[slug].astro +99 -19
- package/apps/storefront/src/pages/blog/author/[author].astro +140 -0
- package/apps/storefront/src/pages/blog/category/[category].astro +67 -0
- package/apps/storefront/src/pages/blog/index.astro +4 -2
- package/apps/storefront/src/pages/blog/tag/[tag].astro +65 -0
- package/apps/storefront/src/pages/cockpit.astro +77 -1353
- package/apps/storefront/src/pages/dashboard/[appDomain]/team.astro +15 -11
- package/apps/storefront/src/pages/index.astro +10 -5
- package/apps/storefront/src/pages/llms.txt.ts +1 -1
- package/apps/storefront/src/pages/products/[handle].astro +7 -6
- package/apps/storefront/src/pages/search.astro +1 -1
- package/apps/storefront/src/pages/sitemap.xml.ts +21 -1
- package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +31 -27
- package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +1 -1
- package/apps/storefront/src/pages/tenants/[id]/[...path].ts +38 -2
- package/apps/storefront/src/pages/the-build/[slug].astro +129 -0
- package/apps/storefront/src/pages/the-build/index.astro +146 -0
- package/apps/storefront/src/pages/the-build/rss.xml.ts +33 -0
- package/apps/storefront/src/styles/admin.css +1106 -0
- package/apps/storefront/tsconfig.json +6 -1
- package/package.json +1 -1
- package/packages/public-runtime/package.json +3 -1
- package/packages/public-runtime/schemas/managed-analytics/v1/adapter-definition.schema.json +427 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/create-integration-install-request.schema.json +161 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/create-migration-draft-request.schema.json +157 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/delete-integration-install-request.schema.json +84 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/delete-migration-draft-request.schema.json +84 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/error-envelope.schema.json +180 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-adapter-definition-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-integration-install-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-integration-revision-request.schema.json +79 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/get-migration-draft-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/integration-install.schema.json +167 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/integration-revision.schema.json +208 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/list-adapter-definitions-request.schema.json +53 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/list-integration-installs-request.schema.json +53 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/list-integration-revisions-request.schema.json +82 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/migration-draft.schema.json +218 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/mutation-request.schema.json +52 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/mutation-success-envelope.schema.json +49 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/read-request.schema.json +20 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/read-success-envelope.schema.json +45 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/revise-integration-install-request.schema.json +156 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/set-integration-install-status-request.schema.json +92 -0
- package/packages/public-runtime/schemas/managed-analytics/v1/update-migration-draft-request.schema.json +184 -0
- package/packages/public-runtime/scripts/generate-managed-analytics-api-v1-schemas.mjs +13 -0
- package/packages/public-runtime/src/activity/catalog.ts +89 -33
- package/packages/public-runtime/src/activity/event.ts +6 -6
- package/packages/public-runtime/src/activity/index.ts +2 -2
- package/packages/public-runtime/src/activity/redaction.ts +4 -4
- package/packages/public-runtime/src/candidate-index.ts +42 -8
- package/packages/public-runtime/src/catalog-d1.ts +1 -1
- package/packages/public-runtime/src/checkout-orders.ts +2 -2
- package/packages/public-runtime/src/checkout-style-publish.ts +2 -2
- package/packages/public-runtime/src/checkout-style.ts +7 -7
- package/packages/public-runtime/src/checkout.ts +3 -3
- package/packages/public-runtime/src/chrome.ts +777 -0
- package/packages/public-runtime/src/compliance-obligations.ts +310 -0
- package/packages/public-runtime/src/csp.ts +99 -0
- package/packages/public-runtime/src/customization-preview.ts +25 -2
- package/packages/public-runtime/src/customization-runtime.ts +156 -3
- package/packages/public-runtime/src/customization-versioning.ts +10 -0
- package/packages/public-runtime/src/destination-webhook/contract.ts +353 -0
- package/packages/public-runtime/src/embed-catalog.d.mts +9 -0
- package/packages/public-runtime/src/embed-catalog.mjs +40 -0
- package/packages/public-runtime/src/evidence.ts +288 -0
- package/packages/public-runtime/src/gtm-migration/bounds.ts +138 -0
- package/packages/public-runtime/src/gtm-migration/disposition-rules.ts +361 -0
- package/packages/public-runtime/src/gtm-migration/dispositions.ts +181 -0
- package/packages/public-runtime/src/gtm-migration/draft-generator.ts +400 -0
- package/packages/public-runtime/src/gtm-migration/graph.ts +468 -0
- package/packages/public-runtime/src/gtm-migration/index.ts +95 -0
- package/packages/public-runtime/src/gtm-migration/parse.ts +410 -0
- package/packages/public-runtime/src/gtm-migration/references.ts +266 -0
- package/packages/public-runtime/src/gtm-migration/types.ts +86 -0
- package/packages/public-runtime/src/index.ts +17 -1
- package/packages/public-runtime/src/integration/assurance-decision.ts +259 -0
- package/packages/public-runtime/src/integration/assurance.ts +228 -0
- package/packages/public-runtime/src/integration/candidate-evidence.ts +377 -0
- package/packages/public-runtime/src/integration/commerce-broker.ts +497 -0
- package/packages/public-runtime/src/integration/consent-broker.ts +337 -0
- package/packages/public-runtime/src/integration/consent-cmp-demand.ts +115 -0
- package/packages/public-runtime/src/integration/consent-config.ts +260 -0
- package/packages/public-runtime/src/integration/consent-preview.ts +125 -0
- package/packages/public-runtime/src/integration/correlation-token.ts +444 -0
- package/packages/public-runtime/src/integration/csp-compiler.ts +267 -0
- package/packages/public-runtime/src/integration/csp.ts +105 -0
- package/packages/public-runtime/src/integration/digest.ts +43 -0
- package/packages/public-runtime/src/integration/environment.ts +228 -0
- package/packages/public-runtime/src/integration/events-catalog.ts +186 -0
- package/packages/public-runtime/src/integration/events.ts +701 -0
- package/packages/public-runtime/src/integration/g2-action-boundary.ts +106 -0
- package/packages/public-runtime/src/integration/index.ts +90 -0
- package/packages/public-runtime/src/integration/interim-bridge.ts +138 -0
- package/packages/public-runtime/src/integration/lifecycle-boot.ts +317 -0
- package/packages/public-runtime/src/integration/lifecycle-runtime.ts +393 -0
- package/packages/public-runtime/src/integration/lifecycle.ts +94 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1-safety.d.mts +2 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1-safety.mjs +10 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.schemas.ts +382 -0
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.ts +684 -0
- package/packages/public-runtime/src/integration/managed-analytics-bridge.ts +383 -0
- package/packages/public-runtime/src/integration/managed-analytics-value-safety.ts +14 -0
- package/packages/public-runtime/src/integration/managed-analytics.ts +277 -0
- package/packages/public-runtime/src/integration/manifest.ts +470 -0
- package/packages/public-runtime/src/integration/native-amplitude.ts +362 -0
- package/packages/public-runtime/src/integration/native-ga4.ts +352 -0
- package/packages/public-runtime/src/integration/observability.ts +451 -0
- package/packages/public-runtime/src/integration/order-conversion.ts +0 -0
- package/packages/public-runtime/src/integration/phases.ts +182 -0
- package/packages/public-runtime/src/integration/plan.ts +112 -0
- package/packages/public-runtime/src/integration/platform-adapter-runtime.ts +146 -0
- package/packages/public-runtime/src/integration/platform-adapters.ts +671 -0
- package/packages/public-runtime/src/integration/promotion-gate.ts +451 -0
- package/packages/public-runtime/src/integration/provider-checkout-extension.ts +425 -0
- package/packages/public-runtime/src/integration/receipt-measurement.ts +370 -0
- package/packages/public-runtime/src/integration/regulated-parent-cert.ts +311 -0
- package/packages/public-runtime/src/integration/render-phases.ts +267 -0
- package/packages/public-runtime/src/integration/resolve.ts +465 -0
- package/packages/public-runtime/src/integration/result.ts +239 -0
- package/packages/public-runtime/src/integration/secrets.ts +92 -0
- package/packages/public-runtime/src/integration/tamper-evidence.ts +205 -0
- package/packages/public-runtime/src/integration/tamper-recovery.ts +127 -0
- package/packages/public-runtime/src/integration/version.ts +92 -0
- package/packages/public-runtime/src/integration-capabilities.ts +520 -0
- package/packages/public-runtime/src/membership.ts +2 -2
- package/packages/public-runtime/src/raw-html-policy.ts +2 -4
- package/packages/public-runtime/src/regulated-commerce/broker/consent-dedupe.ts +144 -0
- package/packages/public-runtime/src/regulated-commerce/correlation/contract.ts +177 -0
- package/packages/public-runtime/src/regulated-commerce/diagnostics/local-dispatch.ts +24 -0
- package/packages/public-runtime/src/regulated-commerce/diagnostics/read-model.ts +69 -0
- package/packages/public-runtime/src/regulated-commerce/dispatch/core.ts +134 -0
- package/packages/public-runtime/src/regulated-commerce/events/contract.ts +113 -0
- package/packages/public-runtime/src/regulated-commerce/ledger/core.ts +81 -0
- package/packages/public-runtime/src/regulated-commerce/mappings/ga4-ads.ts +87 -0
- package/packages/public-runtime/src/regulated-commerce/provider-order/bridge.ts +52 -0
- package/packages/public-runtime/src/regulated-commerce/purchase-truth/contract.ts +252 -0
- package/packages/public-runtime/src/regulated-commerce/sources/accepted-browser-operation.ts +67 -0
- package/packages/public-runtime/src/regulated-commerce/testing/fake-destination.ts +93 -0
- package/packages/public-runtime/src/static-bundle.ts +357 -0
- package/packages/public-runtime/src/tenant-assets.ts +143 -4
- package/packages/public-runtime/src/tenant.ts +81 -17
- package/packages/public-runtime/tests/fixtures/integration/browser-environment.example.json +8 -0
- package/packages/public-runtime/tests/fixtures/integration/commerce-event.example.json +44 -0
- package/packages/public-runtime/tests/fixtures/integration/commerce-order-event.example.json +44 -0
- package/packages/public-runtime/tests/fixtures/integration/compliance-assurance-record.example.json +50 -0
- package/packages/public-runtime/tests/fixtures/integration/integration-manifest-v2.example.json +120 -0
- package/packages/public-runtime/tests/fixtures/integration/managed-analytics-v1/fake-adapter-catalog.json +35 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-action-registry.example.json +11 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/README.md +22 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/entry.js +30 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/manifest.json +75 -0
- package/packages/public-runtime/tests/fixtures/integration/tenant-local-example/public-config.json +3 -0
- package/packages/public-runtime/tests/fixtures/regulated-commerce/fake-destinations.ts +38 -0
- package/packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.provenance.json +29 -0
- package/packages/public-runtime/tests/gtm-migration/fixtures/gtm-sample-container-v84.redacted.json +3397 -0
- package/scripts/build/copy-tenant-assets.mjs +14 -4
- package/scripts/dev/ai-edit.mjs +1 -1
- package/scripts/dev/checkout-watch.mjs +2 -2
- package/scripts/dev/file-browser.mjs +4 -6
- package/scripts/dev/file-writer.mjs +3 -3
- package/scripts/dev/git-status.mjs +2 -2
- package/scripts/dev/integration-guardrails.mjs +498 -0
- package/scripts/dev/locate-handler.mjs +3 -3
- package/scripts/dev/port-check.mjs +3 -3
- package/scripts/dev/publish.mjs +5 -9
- package/scripts/dev/safe-path.mjs +2 -2
- package/scripts/dev/shot.mjs +1 -1
- package/scripts/dev/tenant-source-root.mjs +1 -1
- package/scripts/dev/unified-diff.mjs +8 -3
- package/scripts/tot-dev.mjs +8 -11
- package/apps/storefront/src/lib/dev/vcBinding.ts +0 -80
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* SHELL CONTRACT — every AdminXTab.astro component mounted below must preserve:
|
|
14
14
|
* - A `<section id="{tab}" data-admin-panel data-agent-scope="{tab}">` root,
|
|
15
15
|
* where {tab} is one of: orders, products, subscriptions, customers, fulfillment,
|
|
16
|
-
* reporting, ai-workflows, publish, settings. The shell's hash router shows/hides
|
|
16
|
+
* reporting, ai-workflows, publish, integrations, settings. The shell's hash router shows/hides
|
|
17
17
|
* panels by matching `html[data-admin-tab]` to this id, and the AI Ask
|
|
18
18
|
* envelope reads `data-agent-scope` to label its active context.
|
|
19
19
|
* - No tab-switching chrome of its own — `#{tab}` deep links and the shell's
|
|
@@ -37,11 +37,14 @@ import OrdersWorkspace from "../components/admin/orders/OrdersWorkspace.astro";
|
|
|
37
37
|
import AdminProductsTab from "../components/admin/AdminProductsTab.astro";
|
|
38
38
|
import AdminSubscriptionsTab from "../components/admin/AdminSubscriptionsTab.astro";
|
|
39
39
|
import AdminReportingTab from "../components/admin/AdminReportingTab.astro";
|
|
40
|
+
import AdminBlogTab from "../components/admin/AdminBlogTab.astro";
|
|
40
41
|
import AdminPublishTab from "../components/admin/AdminPublishTab.astro";
|
|
42
|
+
import AdminIntegrationsTab from "../components/admin/AdminIntegrationsTab.astro";
|
|
41
43
|
import AdminSettingsTab from "../components/admin/AdminSettingsTab.astro";
|
|
42
44
|
import { readViewerSession } from "@/lib/auth/route";
|
|
43
45
|
import { resolveAdminTenantMode } from "@/lib/adminTenantEnvelope";
|
|
44
46
|
import { resolveAdminEntry } from "@/lib/auth/adminEntry";
|
|
47
|
+
import "@/styles/admin.css";
|
|
45
48
|
|
|
46
49
|
const { tenant, basePath, cspNonce } = Astro.locals;
|
|
47
50
|
const adminPath = `${basePath || ""}/admin`;
|
|
@@ -100,7 +103,7 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
100
103
|
<title>{tenantLabel} Admin</title>
|
|
101
104
|
<script is:inline nonce={cspNonce}>
|
|
102
105
|
(() => {
|
|
103
|
-
const adminTabs = ["orders", "products", "subscriptions", "customers", "fulfillment", "reporting", "ai-workflows", "publish", "settings"];
|
|
106
|
+
const adminTabs = ["orders", "products", "subscriptions", "customers", "fulfillment", "reporting", "ai-workflows", "blog", "publish", "integrations", "settings"];
|
|
104
107
|
const canViewInternalGuide = document.documentElement.dataset.internalAdminGuide === "true";
|
|
105
108
|
const defaultTab = canViewInternalGuide ? "orders" : "settings";
|
|
106
109
|
// A deep link may carry a query suffix in the hash (e.g. #publish?pr=42);
|
|
@@ -114,1078 +117,6 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
114
117
|
document.documentElement.dataset.adminMode = mode;
|
|
115
118
|
})();
|
|
116
119
|
</script>
|
|
117
|
-
<style is:global nonce={cspNonce}>
|
|
118
|
-
:root {
|
|
119
|
-
color-scheme: light;
|
|
120
|
-
--admin-bg: #f5f7f6;
|
|
121
|
-
--admin-surface: #ffffff;
|
|
122
|
-
--admin-surface-soft: #f9fbfa;
|
|
123
|
-
--admin-surface-tint: #eef6f4;
|
|
124
|
-
--admin-ink: #16211f;
|
|
125
|
-
--admin-muted: #64716d;
|
|
126
|
-
--admin-muted-2: #8c9894;
|
|
127
|
-
--admin-line: #dce5e2;
|
|
128
|
-
--admin-line-strong: #bdcbc7;
|
|
129
|
-
--admin-teal: #007f79;
|
|
130
|
-
--admin-teal-dark: #005d58;
|
|
131
|
-
--admin-teal-soft: #dff4f1;
|
|
132
|
-
--admin-green: #137a55;
|
|
133
|
-
--admin-green-soft: #e3f5eb;
|
|
134
|
-
--admin-blue: #2458c7;
|
|
135
|
-
--admin-blue-soft: #e7efff;
|
|
136
|
-
--admin-amber: #a45d00;
|
|
137
|
-
--admin-amber-soft: #fff0d5;
|
|
138
|
-
--admin-red: #b42318;
|
|
139
|
-
--admin-red-soft: #fde7e4;
|
|
140
|
-
--admin-violet: #6941c6;
|
|
141
|
-
--admin-violet-soft: #efe9ff;
|
|
142
|
-
--admin-shadow: 0 18px 50px rgba(23, 33, 31, 0.08);
|
|
143
|
-
--admin-radius: 8px;
|
|
144
|
-
--admin-radius-sm: 6px;
|
|
145
|
-
--admin-scroll-offset: 104px;
|
|
146
|
-
--admin-font:
|
|
147
|
-
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
|
148
|
-
"Segoe UI", sans-serif;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
* {
|
|
152
|
-
box-sizing: border-box;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
html {
|
|
156
|
-
max-width: 100%;
|
|
157
|
-
height: 100%;
|
|
158
|
-
overflow: hidden;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
body {
|
|
162
|
-
margin: 0;
|
|
163
|
-
height: 100%;
|
|
164
|
-
min-height: 100vh;
|
|
165
|
-
background: var(--admin-bg);
|
|
166
|
-
color: var(--admin-ink);
|
|
167
|
-
font: 14px/1.5 var(--admin-font);
|
|
168
|
-
overflow: hidden;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
button,
|
|
172
|
-
input,
|
|
173
|
-
select {
|
|
174
|
-
font: inherit;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
button {
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
svg {
|
|
182
|
-
width: 18px;
|
|
183
|
-
height: 18px;
|
|
184
|
-
stroke: currentColor;
|
|
185
|
-
stroke-width: 1.9;
|
|
186
|
-
stroke-linecap: round;
|
|
187
|
-
stroke-linejoin: round;
|
|
188
|
-
fill: none;
|
|
189
|
-
flex: 0 0 auto;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.shell {
|
|
193
|
-
display: grid;
|
|
194
|
-
grid-template-columns: 248px minmax(0, 1fr);
|
|
195
|
-
height: 100vh;
|
|
196
|
-
min-height: 0;
|
|
197
|
-
overflow: hidden;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.sidebar {
|
|
201
|
-
position: sticky;
|
|
202
|
-
top: 0;
|
|
203
|
-
height: 100vh;
|
|
204
|
-
min-height: 0;
|
|
205
|
-
display: flex;
|
|
206
|
-
flex-direction: column;
|
|
207
|
-
gap: 22px;
|
|
208
|
-
padding: 20px 16px;
|
|
209
|
-
overflow-y: auto;
|
|
210
|
-
overscroll-behavior: contain;
|
|
211
|
-
background: #101b18;
|
|
212
|
-
color: #eef7f5;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.brand {
|
|
216
|
-
display: flex;
|
|
217
|
-
align-items: center;
|
|
218
|
-
gap: 12px;
|
|
219
|
-
min-height: 42px;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.brand-mark {
|
|
223
|
-
width: 36px;
|
|
224
|
-
height: 36px;
|
|
225
|
-
display: grid;
|
|
226
|
-
place-items: center;
|
|
227
|
-
border-radius: var(--admin-radius);
|
|
228
|
-
background: #00a991;
|
|
229
|
-
color: #06231e;
|
|
230
|
-
font-weight: 800;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.brand b,
|
|
234
|
-
.store strong {
|
|
235
|
-
display: block;
|
|
236
|
-
font-size: 14px;
|
|
237
|
-
line-height: 1.1;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.brand span,
|
|
241
|
-
.store span {
|
|
242
|
-
display: block;
|
|
243
|
-
margin-top: 3px;
|
|
244
|
-
color: rgba(238, 247, 245, 0.7);
|
|
245
|
-
font-size: 12px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.store {
|
|
249
|
-
display: grid;
|
|
250
|
-
gap: 4px;
|
|
251
|
-
padding: 12px;
|
|
252
|
-
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
253
|
-
border-radius: var(--admin-radius);
|
|
254
|
-
background: rgba(255, 255, 255, 0.06);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/* Cross-surface hop to the developer cockpit — same card language as the
|
|
258
|
-
sidebar's other blocks, kept visually quieter than the nav tabs. */
|
|
259
|
-
.cockpit-link {
|
|
260
|
-
display: flex;
|
|
261
|
-
align-items: center;
|
|
262
|
-
gap: 8px;
|
|
263
|
-
padding: 10px 12px;
|
|
264
|
-
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
265
|
-
border-radius: var(--admin-radius);
|
|
266
|
-
background: rgba(255, 255, 255, 0.04);
|
|
267
|
-
color: rgba(238, 247, 245, 0.85);
|
|
268
|
-
font-size: 13px;
|
|
269
|
-
text-decoration: none;
|
|
270
|
-
}
|
|
271
|
-
.cockpit-link:hover {
|
|
272
|
-
background: rgba(255, 255, 255, 0.1);
|
|
273
|
-
color: #fff;
|
|
274
|
-
}
|
|
275
|
-
.cockpit-link svg {
|
|
276
|
-
width: 15px;
|
|
277
|
-
height: 15px;
|
|
278
|
-
stroke: currentColor;
|
|
279
|
-
fill: none;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/* Signed-in-as chip (identity visibility — Trello 13075 postscript: an
|
|
283
|
-
owner staring at a read-only Publish tab could not tell WHO the shell
|
|
284
|
-
thought they were). Mirrors .store's card language; the standing line
|
|
285
|
-
states the resolved principal FOR THIS STORE, not a global role. */
|
|
286
|
-
.account {
|
|
287
|
-
display: grid;
|
|
288
|
-
grid-template-columns: auto 1fr;
|
|
289
|
-
gap: 10px;
|
|
290
|
-
align-items: center;
|
|
291
|
-
padding: 12px;
|
|
292
|
-
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
293
|
-
border-radius: var(--admin-radius);
|
|
294
|
-
background: rgba(255, 255, 255, 0.06);
|
|
295
|
-
/* Pinned to the sidebar's lower-left (the conventional account slot) —
|
|
296
|
-
the sidebar is a flex column, so this soaks the remaining space. */
|
|
297
|
-
margin-top: auto;
|
|
298
|
-
}
|
|
299
|
-
.account .account-avatar {
|
|
300
|
-
display: grid;
|
|
301
|
-
place-items: center;
|
|
302
|
-
width: 32px;
|
|
303
|
-
height: 32px;
|
|
304
|
-
border-radius: 50%;
|
|
305
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
306
|
-
background: rgba(255, 255, 255, 0.08);
|
|
307
|
-
}
|
|
308
|
-
.account .account-avatar svg {
|
|
309
|
-
width: 16px;
|
|
310
|
-
height: 16px;
|
|
311
|
-
stroke: currentColor;
|
|
312
|
-
fill: none;
|
|
313
|
-
stroke-width: 1.8;
|
|
314
|
-
}
|
|
315
|
-
.account .account-meta {
|
|
316
|
-
display: grid;
|
|
317
|
-
gap: 2px;
|
|
318
|
-
min-width: 0;
|
|
319
|
-
}
|
|
320
|
-
.account .account-email {
|
|
321
|
-
font-weight: 640;
|
|
322
|
-
font-size: 13px;
|
|
323
|
-
overflow: hidden;
|
|
324
|
-
text-overflow: ellipsis;
|
|
325
|
-
white-space: nowrap;
|
|
326
|
-
}
|
|
327
|
-
.account .account-standing {
|
|
328
|
-
color: rgba(238, 247, 245, 0.7);
|
|
329
|
-
font-size: 11px;
|
|
330
|
-
}
|
|
331
|
-
.account .account-standing[data-standing="none"] {
|
|
332
|
-
color: rgba(255, 196, 120, 0.9);
|
|
333
|
-
}
|
|
334
|
-
.account a {
|
|
335
|
-
color: inherit;
|
|
336
|
-
}
|
|
337
|
-
.account .account-signout button {
|
|
338
|
-
margin-top: 2px;
|
|
339
|
-
padding: 0;
|
|
340
|
-
border: 0;
|
|
341
|
-
background: none;
|
|
342
|
-
color: rgba(238, 247, 245, 0.6);
|
|
343
|
-
font-size: 11px;
|
|
344
|
-
text-decoration: underline;
|
|
345
|
-
cursor: pointer;
|
|
346
|
-
}
|
|
347
|
-
.account .account-signout button:hover {
|
|
348
|
-
color: rgba(238, 247, 245, 0.9);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.tenant-picker {
|
|
352
|
-
display: grid;
|
|
353
|
-
gap: 4px;
|
|
354
|
-
padding: 10px 12px;
|
|
355
|
-
border: 1px solid rgba(0, 169, 145, 0.4);
|
|
356
|
-
border-radius: var(--admin-radius);
|
|
357
|
-
background: rgba(0, 169, 145, 0.1);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.tenant-picker label {
|
|
361
|
-
color: rgba(238, 247, 245, 0.7);
|
|
362
|
-
font-size: 11px;
|
|
363
|
-
font-weight: 760;
|
|
364
|
-
text-transform: uppercase;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.tenant-picker select {
|
|
368
|
-
min-height: 34px;
|
|
369
|
-
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
370
|
-
border-radius: var(--admin-radius-sm);
|
|
371
|
-
background: #101b18;
|
|
372
|
-
color: #eef7f5;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.tenant-picker-denied {
|
|
376
|
-
padding: 10px 12px;
|
|
377
|
-
border: 1px solid var(--admin-amber);
|
|
378
|
-
border-radius: var(--admin-radius);
|
|
379
|
-
background: rgba(164, 93, 0, 0.16);
|
|
380
|
-
color: #eef7f5;
|
|
381
|
-
font-size: 12px;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.tenant-picker-denied code {
|
|
385
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.nav {
|
|
389
|
-
display: grid;
|
|
390
|
-
gap: 4px;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.nav a {
|
|
394
|
-
display: flex;
|
|
395
|
-
align-items: center;
|
|
396
|
-
gap: 10px;
|
|
397
|
-
min-height: 40px;
|
|
398
|
-
padding: 0 10px;
|
|
399
|
-
border-radius: var(--admin-radius-sm);
|
|
400
|
-
color: rgba(238, 247, 245, 0.74);
|
|
401
|
-
text-decoration: none;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.nav a.active {
|
|
405
|
-
background: rgba(0, 169, 145, 0.18);
|
|
406
|
-
color: #ffffff;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.nav-group {
|
|
410
|
-
display: grid;
|
|
411
|
-
gap: 3px;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
.nav-subnav {
|
|
415
|
-
display: grid;
|
|
416
|
-
gap: 2px;
|
|
417
|
-
margin: 0 0 3px 28px;
|
|
418
|
-
padding-left: 10px;
|
|
419
|
-
border-left: 1px solid rgba(255, 255, 255, 0.14);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.nav-subnav a {
|
|
423
|
-
min-height: 32px;
|
|
424
|
-
padding: 0 8px;
|
|
425
|
-
gap: 8px;
|
|
426
|
-
font-size: 12px;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.nav-subnav svg {
|
|
430
|
-
width: 16px;
|
|
431
|
-
height: 16px;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.health {
|
|
435
|
-
margin-top: auto;
|
|
436
|
-
display: grid;
|
|
437
|
-
gap: 9px;
|
|
438
|
-
padding: 12px;
|
|
439
|
-
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
440
|
-
border-radius: var(--admin-radius);
|
|
441
|
-
background: rgba(255, 255, 255, 0.05);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.health-row {
|
|
445
|
-
display: flex;
|
|
446
|
-
align-items: center;
|
|
447
|
-
justify-content: space-between;
|
|
448
|
-
gap: 10px;
|
|
449
|
-
font-size: 12px;
|
|
450
|
-
color: rgba(238, 247, 245, 0.72);
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.health-row strong {
|
|
454
|
-
color: #ffffff;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.main {
|
|
458
|
-
min-width: 0;
|
|
459
|
-
min-height: 0;
|
|
460
|
-
height: 100vh;
|
|
461
|
-
overflow-x: hidden;
|
|
462
|
-
overflow-y: auto;
|
|
463
|
-
overscroll-behavior: contain;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.content,
|
|
467
|
-
.band,
|
|
468
|
-
.panel,
|
|
469
|
-
.panel-body,
|
|
470
|
-
.table-wrap {
|
|
471
|
-
min-width: 0;
|
|
472
|
-
max-width: 100%;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.topbar {
|
|
476
|
-
position: sticky;
|
|
477
|
-
top: 0;
|
|
478
|
-
z-index: 30;
|
|
479
|
-
display: flex;
|
|
480
|
-
align-items: center;
|
|
481
|
-
justify-content: space-between;
|
|
482
|
-
gap: 18px;
|
|
483
|
-
min-height: 68px;
|
|
484
|
-
padding: 14px 24px;
|
|
485
|
-
border-bottom: 1px solid var(--admin-line);
|
|
486
|
-
background: rgba(245, 247, 246, 0.94);
|
|
487
|
-
backdrop-filter: blur(16px);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.page-title h1 {
|
|
491
|
-
margin: 0;
|
|
492
|
-
font-size: 22px;
|
|
493
|
-
font-weight: 760;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.page-title p {
|
|
497
|
-
margin: 2px 0 0;
|
|
498
|
-
color: var(--admin-muted);
|
|
499
|
-
font-size: 13px;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.page-title,
|
|
503
|
-
.page-title p,
|
|
504
|
-
.note,
|
|
505
|
-
code {
|
|
506
|
-
min-width: 0;
|
|
507
|
-
overflow-wrap: anywhere;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.actions {
|
|
511
|
-
display: flex;
|
|
512
|
-
flex-wrap: wrap;
|
|
513
|
-
gap: 8px;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.btn,
|
|
517
|
-
.icon-btn {
|
|
518
|
-
min-height: 38px;
|
|
519
|
-
display: inline-flex;
|
|
520
|
-
align-items: center;
|
|
521
|
-
justify-content: center;
|
|
522
|
-
gap: 8px;
|
|
523
|
-
border: 1px solid var(--admin-line-strong);
|
|
524
|
-
border-radius: var(--admin-radius-sm);
|
|
525
|
-
background: var(--admin-surface);
|
|
526
|
-
color: var(--admin-ink);
|
|
527
|
-
text-decoration: none;
|
|
528
|
-
white-space: nowrap;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.btn {
|
|
532
|
-
padding: 0 13px;
|
|
533
|
-
font-weight: 680;
|
|
534
|
-
max-width: 100%;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.icon-btn {
|
|
538
|
-
width: 38px;
|
|
539
|
-
padding: 0;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.btn.primary {
|
|
543
|
-
border-color: var(--admin-teal-dark);
|
|
544
|
-
background: var(--admin-teal);
|
|
545
|
-
color: #ffffff;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.floating-ask {
|
|
549
|
-
position: fixed;
|
|
550
|
-
right: 24px;
|
|
551
|
-
bottom: 24px;
|
|
552
|
-
z-index: 80;
|
|
553
|
-
min-height: 58px;
|
|
554
|
-
max-width: min(280px, calc(100vw - 32px));
|
|
555
|
-
display: inline-flex;
|
|
556
|
-
align-items: center;
|
|
557
|
-
gap: 10px;
|
|
558
|
-
padding: 9px 15px 9px 10px;
|
|
559
|
-
border: 1px solid rgba(0, 93, 88, 0.24);
|
|
560
|
-
border-radius: 999px;
|
|
561
|
-
background: var(--admin-teal);
|
|
562
|
-
color: #ffffff;
|
|
563
|
-
box-shadow: 0 16px 38px rgba(22, 33, 31, 0.22);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
.floating-ask-icon {
|
|
567
|
-
width: 40px;
|
|
568
|
-
height: 40px;
|
|
569
|
-
display: grid;
|
|
570
|
-
place-items: center;
|
|
571
|
-
border-radius: 50%;
|
|
572
|
-
background: rgba(255, 255, 255, 0.16);
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.floating-ask-label {
|
|
576
|
-
display: grid;
|
|
577
|
-
gap: 1px;
|
|
578
|
-
min-width: 0;
|
|
579
|
-
text-align: left;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.floating-ask-label strong {
|
|
583
|
-
font-size: 14px;
|
|
584
|
-
line-height: 1.1;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.floating-ask-label small {
|
|
588
|
-
max-width: 160px;
|
|
589
|
-
overflow: hidden;
|
|
590
|
-
color: rgba(255, 255, 255, 0.78);
|
|
591
|
-
font-size: 11px;
|
|
592
|
-
font-weight: 680;
|
|
593
|
-
line-height: 1.2;
|
|
594
|
-
text-overflow: ellipsis;
|
|
595
|
-
white-space: nowrap;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
.content {
|
|
599
|
-
display: grid;
|
|
600
|
-
grid-template-columns: minmax(0, 1fr);
|
|
601
|
-
gap: 18px;
|
|
602
|
-
padding: 20px 24px 40px;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
.band {
|
|
606
|
-
display: grid;
|
|
607
|
-
grid-template-columns: minmax(0, 1fr);
|
|
608
|
-
gap: 14px;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
[data-admin-panel],
|
|
612
|
-
[data-admin-guide-section] {
|
|
613
|
-
scroll-margin-top: var(--admin-scroll-offset);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
html.admin-tabs-ready [data-admin-panel] {
|
|
617
|
-
display: none;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="orders"] #orders,
|
|
621
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="products"] #products,
|
|
622
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="subscriptions"] #subscriptions,
|
|
623
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="customers"] #customers,
|
|
624
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="fulfillment"] #fulfillment,
|
|
625
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="reporting"] #reporting,
|
|
626
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="ai-workflows"] #ai-workflows,
|
|
627
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="publish"] #publish,
|
|
628
|
-
html.admin-tabs-ready[data-admin-mode="work-area"][data-admin-tab="settings"] #settings {
|
|
629
|
-
display: grid;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
html.admin-tabs-ready[data-admin-mode="work-area"] [data-admin-guide-section],
|
|
633
|
-
html.admin-tabs-ready[data-admin-mode="work-area"] [data-admin-tab-help] {
|
|
634
|
-
display: none;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
html[data-internal-admin-guide="false"] [data-admin-internal-only] {
|
|
638
|
-
display: none !important;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
.section-title {
|
|
642
|
-
display: flex;
|
|
643
|
-
align-items: center;
|
|
644
|
-
justify-content: space-between;
|
|
645
|
-
gap: 12px;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
.section-title h2 {
|
|
649
|
-
margin: 0;
|
|
650
|
-
font-size: 16px;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
.section-title p {
|
|
654
|
-
margin: 4px 0 0;
|
|
655
|
-
color: var(--admin-muted);
|
|
656
|
-
font-size: 13px;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
.grid {
|
|
660
|
-
display: grid;
|
|
661
|
-
grid-template-columns: minmax(0, 1fr);
|
|
662
|
-
gap: 12px;
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
.grid.cols-2 {
|
|
666
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
.grid.cols-3 {
|
|
670
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
.grid.cols-4 {
|
|
674
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
.panel {
|
|
678
|
-
border: 1px solid var(--admin-line);
|
|
679
|
-
border-radius: var(--admin-radius);
|
|
680
|
-
background: var(--admin-surface);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
.panel-head {
|
|
684
|
-
display: flex;
|
|
685
|
-
align-items: center;
|
|
686
|
-
justify-content: space-between;
|
|
687
|
-
gap: 12px;
|
|
688
|
-
min-height: 50px;
|
|
689
|
-
padding: 13px 14px;
|
|
690
|
-
border-bottom: 1px solid var(--admin-line);
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
.panel-head h3 {
|
|
694
|
-
margin: 0;
|
|
695
|
-
display: flex;
|
|
696
|
-
align-items: center;
|
|
697
|
-
gap: 8px;
|
|
698
|
-
font-size: 15px;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
.panel-body {
|
|
702
|
-
display: grid;
|
|
703
|
-
grid-template-columns: minmax(0, 1fr);
|
|
704
|
-
gap: 12px;
|
|
705
|
-
padding: 14px;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
.metric {
|
|
709
|
-
min-height: 84px;
|
|
710
|
-
padding: 14px;
|
|
711
|
-
border: 1px solid var(--admin-line);
|
|
712
|
-
border-radius: var(--admin-radius);
|
|
713
|
-
background: var(--admin-surface);
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
.metric span,
|
|
717
|
-
.field label {
|
|
718
|
-
display: block;
|
|
719
|
-
color: var(--admin-muted);
|
|
720
|
-
font-size: 11px;
|
|
721
|
-
font-weight: 760;
|
|
722
|
-
text-transform: uppercase;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
.metric strong {
|
|
726
|
-
display: block;
|
|
727
|
-
margin-top: 9px;
|
|
728
|
-
font-size: 24px;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
.metric small {
|
|
732
|
-
display: block;
|
|
733
|
-
margin-top: 3px;
|
|
734
|
-
color: var(--admin-muted);
|
|
735
|
-
font-size: 12px;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
.chip {
|
|
739
|
-
display: inline-flex;
|
|
740
|
-
align-items: center;
|
|
741
|
-
gap: 5px;
|
|
742
|
-
min-height: 23px;
|
|
743
|
-
padding: 0 8px;
|
|
744
|
-
border-radius: 999px;
|
|
745
|
-
background: var(--admin-surface-tint);
|
|
746
|
-
color: #3f4d49;
|
|
747
|
-
font-size: 12px;
|
|
748
|
-
font-weight: 740;
|
|
749
|
-
white-space: nowrap;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
.chip.green {
|
|
753
|
-
background: var(--admin-green-soft);
|
|
754
|
-
color: var(--admin-green);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
.chip.teal {
|
|
758
|
-
background: var(--admin-teal-soft);
|
|
759
|
-
/* Slightly darker than --admin-teal (#007f79): the shared token only
|
|
760
|
-
reaches ~4.26:1 against --admin-teal-soft, just under WCAG AA's
|
|
761
|
-
4.5:1 for this chip's 12px text (hardening-qa a11y pass). Scoped to
|
|
762
|
-
this rule only — --admin-teal itself stays unchanged since it is
|
|
763
|
-
also used as a background (e.g. .btn.primary) where the pairing
|
|
764
|
-
and contrast requirement are different. */
|
|
765
|
-
color: #007973;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
.chip.blue {
|
|
769
|
-
background: var(--admin-blue-soft);
|
|
770
|
-
color: var(--admin-blue);
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
.chip.amber {
|
|
774
|
-
background: var(--admin-amber-soft);
|
|
775
|
-
color: var(--admin-amber);
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.chip.red {
|
|
779
|
-
background: var(--admin-red-soft);
|
|
780
|
-
color: var(--admin-red);
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
.chip.violet {
|
|
784
|
-
background: var(--admin-violet-soft);
|
|
785
|
-
color: var(--admin-violet);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
.swatches {
|
|
789
|
-
display: grid;
|
|
790
|
-
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
|
791
|
-
gap: 10px;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.swatch {
|
|
795
|
-
overflow: hidden;
|
|
796
|
-
border: 1px solid var(--admin-line);
|
|
797
|
-
border-radius: var(--admin-radius-sm);
|
|
798
|
-
background: var(--admin-surface);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
.swatch-color {
|
|
802
|
-
min-height: 58px;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
.swatch-meta {
|
|
806
|
-
padding: 10px;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
.swatch-meta b {
|
|
810
|
-
display: block;
|
|
811
|
-
font-size: 13px;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
.swatch-meta code,
|
|
815
|
-
.note code {
|
|
816
|
-
color: var(--admin-muted);
|
|
817
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
818
|
-
font-size: 12px;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
.field {
|
|
822
|
-
min-width: 0;
|
|
823
|
-
padding: 11px;
|
|
824
|
-
border: 1px solid var(--admin-line);
|
|
825
|
-
border-radius: var(--admin-radius-sm);
|
|
826
|
-
background: #fcfdfc;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
.field strong {
|
|
830
|
-
display: block;
|
|
831
|
-
margin-top: 6px;
|
|
832
|
-
font-size: 13px;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
.field p {
|
|
836
|
-
margin: 5px 0 0;
|
|
837
|
-
color: var(--admin-muted);
|
|
838
|
-
font-size: 12px;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
.ship-gate {
|
|
842
|
-
display: flex;
|
|
843
|
-
align-items: center;
|
|
844
|
-
justify-content: space-between;
|
|
845
|
-
gap: 14px;
|
|
846
|
-
padding: 14px;
|
|
847
|
-
border: 1px solid #a6d8c0;
|
|
848
|
-
border-radius: var(--admin-radius);
|
|
849
|
-
background: #eefaf3;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
.ship-gate.amber {
|
|
853
|
-
border-color: #f1c883;
|
|
854
|
-
background: #fff6e7;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
.ship-gate-main,
|
|
858
|
-
.risk-alert-main {
|
|
859
|
-
display: flex;
|
|
860
|
-
align-items: center;
|
|
861
|
-
gap: 12px;
|
|
862
|
-
min-width: 0;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
.seal {
|
|
866
|
-
width: 42px;
|
|
867
|
-
height: 42px;
|
|
868
|
-
display: grid;
|
|
869
|
-
place-items: center;
|
|
870
|
-
border-radius: 50%;
|
|
871
|
-
background: var(--admin-green);
|
|
872
|
-
color: #ffffff;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
.ship-gate.amber .seal {
|
|
876
|
-
background: var(--admin-amber);
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
.ship-gate b,
|
|
880
|
-
.risk-alert b {
|
|
881
|
-
display: block;
|
|
882
|
-
font-size: 15px;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
.ship-gate span,
|
|
886
|
-
.risk-alert span {
|
|
887
|
-
display: block;
|
|
888
|
-
margin-top: 3px;
|
|
889
|
-
color: var(--admin-muted);
|
|
890
|
-
font-size: 12px;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
.risk-alert {
|
|
894
|
-
display: flex;
|
|
895
|
-
align-items: center;
|
|
896
|
-
justify-content: space-between;
|
|
897
|
-
gap: 14px;
|
|
898
|
-
padding: 12px 14px;
|
|
899
|
-
border: 1px solid #f1c883;
|
|
900
|
-
border-radius: var(--admin-radius);
|
|
901
|
-
background: #fff6e7;
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
/* A JS-toggled `.risk-alert` (e.g. the degraded-forge strip) must stay hidden
|
|
905
|
-
when `hidden` is set — the base display:flex above would otherwise win over
|
|
906
|
-
the UA [hidden] rule and keep it visible. */
|
|
907
|
-
.risk-alert[hidden] {
|
|
908
|
-
display: none;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
.risk-alert svg {
|
|
912
|
-
color: var(--admin-amber);
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
.order-assist-grid {
|
|
916
|
-
display: grid;
|
|
917
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
918
|
-
gap: 10px;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
.order-assist-card {
|
|
922
|
-
display: grid;
|
|
923
|
-
gap: 7px;
|
|
924
|
-
min-width: 0;
|
|
925
|
-
padding: 12px;
|
|
926
|
-
border: 1px solid var(--admin-line);
|
|
927
|
-
border-radius: var(--admin-radius-sm);
|
|
928
|
-
background: var(--admin-surface);
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
.order-assist-card strong {
|
|
932
|
-
font-size: 14px;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
.order-assist-card p {
|
|
936
|
-
margin: 0;
|
|
937
|
-
color: var(--admin-muted);
|
|
938
|
-
font-size: 12px;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
.tabs {
|
|
942
|
-
display: flex;
|
|
943
|
-
gap: 6px;
|
|
944
|
-
max-width: 100%;
|
|
945
|
-
overflow-x: auto;
|
|
946
|
-
border-bottom: 1px solid var(--admin-line);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
.mobile-tabbar {
|
|
950
|
-
display: none;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
.tab {
|
|
954
|
-
flex: 0 0 auto;
|
|
955
|
-
min-height: 38px;
|
|
956
|
-
display: inline-flex;
|
|
957
|
-
align-items: center;
|
|
958
|
-
padding: 0 12px;
|
|
959
|
-
border: 0;
|
|
960
|
-
border-bottom: 2px solid transparent;
|
|
961
|
-
background: transparent;
|
|
962
|
-
color: var(--admin-muted);
|
|
963
|
-
font-weight: 760;
|
|
964
|
-
text-decoration: none;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
.tab.active {
|
|
968
|
-
border-color: var(--admin-teal);
|
|
969
|
-
color: var(--admin-ink);
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
.table-wrap {
|
|
973
|
-
overflow-x: auto;
|
|
974
|
-
border: 1px solid var(--admin-line);
|
|
975
|
-
border-radius: var(--admin-radius);
|
|
976
|
-
background: var(--admin-surface);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
table {
|
|
980
|
-
width: 100%;
|
|
981
|
-
min-width: 860px;
|
|
982
|
-
border-collapse: collapse;
|
|
983
|
-
font-size: 13px;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
th {
|
|
987
|
-
height: 38px;
|
|
988
|
-
padding: 0 12px;
|
|
989
|
-
border-bottom: 1px solid var(--admin-line);
|
|
990
|
-
background: var(--admin-surface-soft);
|
|
991
|
-
color: var(--admin-muted);
|
|
992
|
-
font-size: 11px;
|
|
993
|
-
font-weight: 760;
|
|
994
|
-
text-align: left;
|
|
995
|
-
text-transform: uppercase;
|
|
996
|
-
white-space: nowrap;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
td {
|
|
1000
|
-
height: 46px;
|
|
1001
|
-
padding: 7px 12px;
|
|
1002
|
-
border-bottom: 1px solid var(--admin-line);
|
|
1003
|
-
vertical-align: middle;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
tr:last-child td {
|
|
1007
|
-
border-bottom: 0;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
.subtle {
|
|
1011
|
-
display: block;
|
|
1012
|
-
margin-top: 2px;
|
|
1013
|
-
color: var(--admin-muted);
|
|
1014
|
-
font-size: 12px;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
.money,
|
|
1018
|
-
.action {
|
|
1019
|
-
text-align: right;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.check-row {
|
|
1023
|
-
display: grid;
|
|
1024
|
-
grid-template-columns: minmax(120px, 0.36fr) minmax(0, 1fr) auto;
|
|
1025
|
-
gap: 10px;
|
|
1026
|
-
align-items: center;
|
|
1027
|
-
padding: 10px 0;
|
|
1028
|
-
border-bottom: 1px solid var(--admin-line);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
.check-row:last-child {
|
|
1032
|
-
border-bottom: 0;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
.check-row.blocking {
|
|
1036
|
-
margin: 0 -8px;
|
|
1037
|
-
padding: 10px 8px;
|
|
1038
|
-
border: 1px solid #f1c883;
|
|
1039
|
-
border-radius: var(--admin-radius-sm);
|
|
1040
|
-
background: #fff8ec;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
.check-row b {
|
|
1044
|
-
font-size: 13px;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
.check-row p {
|
|
1048
|
-
margin: 2px 0 0;
|
|
1049
|
-
color: var(--admin-muted);
|
|
1050
|
-
font-size: 12px;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.type-sample h3 {
|
|
1054
|
-
margin: 0 0 8px;
|
|
1055
|
-
font-size: 25px;
|
|
1056
|
-
line-height: 1.12;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.type-sample p {
|
|
1060
|
-
margin: 0;
|
|
1061
|
-
color: var(--admin-muted);
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
.note {
|
|
1065
|
-
margin: 0;
|
|
1066
|
-
color: var(--admin-muted);
|
|
1067
|
-
font-size: 13px;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
@media (max-width: 1120px) {
|
|
1071
|
-
.shell {
|
|
1072
|
-
grid-template-columns: 76px minmax(0, 1fr);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
.brand b,
|
|
1076
|
-
.brand span,
|
|
1077
|
-
.store,
|
|
1078
|
-
.nav span,
|
|
1079
|
-
.nav-subnav,
|
|
1080
|
-
.health {
|
|
1081
|
-
display: none;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
.sidebar {
|
|
1085
|
-
align-items: center;
|
|
1086
|
-
padding-inline: 12px;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
.nav a {
|
|
1090
|
-
justify-content: center;
|
|
1091
|
-
padding: 0;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
.grid.cols-4,
|
|
1095
|
-
.grid.cols-3,
|
|
1096
|
-
.order-assist-grid {
|
|
1097
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
@media (max-width: 760px) {
|
|
1102
|
-
html,
|
|
1103
|
-
body {
|
|
1104
|
-
height: auto;
|
|
1105
|
-
min-height: 100%;
|
|
1106
|
-
overflow-x: hidden;
|
|
1107
|
-
overflow-y: auto;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
.shell {
|
|
1111
|
-
grid-template-columns: 1fr;
|
|
1112
|
-
height: auto;
|
|
1113
|
-
min-height: 100vh;
|
|
1114
|
-
overflow: visible;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
.main {
|
|
1118
|
-
height: auto;
|
|
1119
|
-
min-height: 0;
|
|
1120
|
-
overflow: visible;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
.sidebar {
|
|
1124
|
-
position: static;
|
|
1125
|
-
height: auto;
|
|
1126
|
-
overflow: visible;
|
|
1127
|
-
flex-direction: row;
|
|
1128
|
-
align-items: center;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
.nav {
|
|
1132
|
-
display: none;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
.mobile-tabbar {
|
|
1136
|
-
position: sticky;
|
|
1137
|
-
top: 0;
|
|
1138
|
-
z-index: 29;
|
|
1139
|
-
display: flex;
|
|
1140
|
-
padding-inline: 16px;
|
|
1141
|
-
background: rgba(245, 247, 246, 0.94);
|
|
1142
|
-
backdrop-filter: blur(16px);
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
.topbar,
|
|
1146
|
-
.ship-gate,
|
|
1147
|
-
.risk-alert,
|
|
1148
|
-
.section-title,
|
|
1149
|
-
.panel-head {
|
|
1150
|
-
align-items: flex-start;
|
|
1151
|
-
flex-direction: column;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
.content,
|
|
1155
|
-
.topbar {
|
|
1156
|
-
padding-inline: 16px;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
.floating-ask {
|
|
1160
|
-
right: 16px;
|
|
1161
|
-
bottom: 16px;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
[data-admin-panel],
|
|
1165
|
-
[data-admin-guide-section] {
|
|
1166
|
-
scroll-margin-top: 16px;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
.actions {
|
|
1170
|
-
width: 100%;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
.actions .btn {
|
|
1174
|
-
flex: 1 1 150px;
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
.grid.cols-4,
|
|
1178
|
-
.grid.cols-3,
|
|
1179
|
-
.grid.cols-2,
|
|
1180
|
-
.order-assist-grid {
|
|
1181
|
-
grid-template-columns: 1fr;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
.check-row {
|
|
1185
|
-
grid-template-columns: 1fr;
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
</style>
|
|
1189
120
|
</head>
|
|
1190
121
|
<body>
|
|
1191
122
|
<svg aria-hidden="true" style="position:absolute;width:0;height:0;overflow:hidden">
|
|
@@ -1205,6 +136,8 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1205
136
|
<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>
|
|
1206
137
|
<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>
|
|
1207
138
|
<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>
|
|
139
|
+
<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>
|
|
140
|
+
<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>
|
|
1208
141
|
</svg>
|
|
1209
142
|
|
|
1210
143
|
<div class="shell">
|
|
@@ -1258,7 +191,9 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1258
191
|
<a href="#fulfillment" data-admin-tab-link><svg><use href="#i-truck"></use></svg><span>Fulfillment</span></a>
|
|
1259
192
|
<a href="#reporting" data-admin-tab-link><svg><use href="#i-chart"></use></svg><span>Reporting</span></a>
|
|
1260
193
|
<a href="#ai-workflows" data-admin-tab-link><svg><use href="#i-workflows"></use></svg><span>AI Workflows</span></a>
|
|
194
|
+
<a href="#blog" data-admin-tab-link><svg><use href="#i-file"></use></svg><span>Blog</span></a>
|
|
1261
195
|
<a href="#publish" data-admin-tab-link><svg><use href="#i-export"></use></svg><span>Publish</span></a>
|
|
196
|
+
<a href="#integrations" data-admin-tab-link><svg><use href="#i-workflows"></use></svg><span>Integrations</span></a>
|
|
1262
197
|
<a href="#settings" data-admin-tab-link><svg><use href="#i-gear"></use></svg><span>Settings</span></a>
|
|
1263
198
|
</nav>
|
|
1264
199
|
|
|
@@ -1275,6 +210,13 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1275
210
|
<svg><use href="#i-gear"></use></svg><span>Developer cockpit</span>
|
|
1276
211
|
</a>
|
|
1277
212
|
|
|
213
|
+
<!-- Cross-surface hop: the merchant Review-and-Release workspace — the
|
|
214
|
+
two-decision (add to next release / publish now) surface, a SIBLING
|
|
215
|
+
page (not a tab), additive to the operator Publish tab above. -->
|
|
216
|
+
<a class="cockpit-link" href={`${basePath || ""}/admin/review-release`}>
|
|
217
|
+
<svg><use href="#i-export"></use></svg><span>Review & release</span>
|
|
218
|
+
</a>
|
|
219
|
+
|
|
1278
220
|
<div class="account" data-admin-account>
|
|
1279
221
|
<span class="account-avatar" aria-hidden="true"><svg><use href="#i-user"></use></svg></span>
|
|
1280
222
|
<span class="account-meta">
|
|
@@ -1323,7 +265,9 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1323
265
|
<a class="tab" href="#fulfillment" role="tab" aria-controls="fulfillment" aria-selected="false" data-admin-tab-link>Fulfillment</a>
|
|
1324
266
|
<a class="tab" href="#reporting" role="tab" aria-controls="reporting" aria-selected="false" data-admin-tab-link>Reporting</a>
|
|
1325
267
|
<a class="tab" href="#ai-workflows" role="tab" aria-controls="ai-workflows" aria-selected="false" data-admin-tab-link>AI Workflows</a>
|
|
268
|
+
<a class="tab" href="#blog" role="tab" aria-controls="blog" aria-selected="false" data-admin-tab-link>Blog</a>
|
|
1326
269
|
<a class="tab" href="#publish" role="tab" aria-controls="publish" aria-selected="false" data-admin-tab-link>Publish</a>
|
|
270
|
+
<a class="tab" href="#integrations" role="tab" aria-controls="integrations" aria-selected="false" data-admin-tab-link>Integrations</a>
|
|
1327
271
|
<a class="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false" data-admin-tab-link>Settings</a>
|
|
1328
272
|
</div>
|
|
1329
273
|
|
|
@@ -1371,7 +315,9 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1371
315
|
<a id="admin-tab-fulfillment" class="tab" href="#fulfillment" role="tab" aria-controls="fulfillment" aria-selected="false" data-admin-tab-link>Fulfillment</a>
|
|
1372
316
|
<a id="admin-tab-reporting" class="tab" href="#reporting" role="tab" aria-controls="reporting" aria-selected="false" data-admin-tab-link>Reporting</a>
|
|
1373
317
|
<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>
|
|
318
|
+
<a id="admin-tab-blog" class="tab" href="#blog" role="tab" aria-controls="blog" aria-selected="false" data-admin-tab-link>Blog</a>
|
|
1374
319
|
<a id="admin-tab-publish" class="tab" href="#publish" role="tab" aria-controls="publish" aria-selected="false" data-admin-tab-link>Publish</a>
|
|
320
|
+
<a id="admin-tab-integrations" class="tab" href="#integrations" role="tab" aria-controls="integrations" aria-selected="false" data-admin-tab-link>Integrations</a>
|
|
1375
321
|
<a id="admin-tab-settings" class="tab" href="#settings" role="tab" aria-controls="settings" aria-selected="false" data-admin-tab-link>Settings</a>
|
|
1376
322
|
</div>
|
|
1377
323
|
|
|
@@ -1497,7 +443,9 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1497
443
|
<AdminFulfillmentTab envelope={tenantEnvelope} />
|
|
1498
444
|
<AdminReportingTab envelope={tenantEnvelope} />
|
|
1499
445
|
<AdminAIWorkflowsTab envelope={tenantEnvelope} />
|
|
446
|
+
<AdminBlogTab envelope={tenantEnvelope} />
|
|
1500
447
|
<AdminPublishTab envelope={tenantEnvelope} />
|
|
448
|
+
<AdminIntegrationsTab envelope={tenantEnvelope} />
|
|
1501
449
|
<AdminSettingsTab envelope={tenantEnvelope} />
|
|
1502
450
|
|
|
1503
451
|
{canViewInternalGuide && (
|
|
@@ -1612,245 +560,9 @@ const { envelope: tenantEnvelope, isStaff, pickerTenants, deniedTarget } = admin
|
|
|
1612
560
|
</span>
|
|
1613
561
|
</button>
|
|
1614
562
|
|
|
1615
|
-
<script
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
const tabSet = new Set(tabIds);
|
|
1619
|
-
const tabHashPattern = new RegExp(`^#(${tabIds.join("|")})$`);
|
|
1620
|
-
const canViewInternalGuide = document.documentElement.dataset.internalAdminGuide === "true";
|
|
1621
|
-
const defaultTab = canViewInternalGuide ? "orders" : "settings";
|
|
1622
|
-
const askContexts = {
|
|
1623
|
-
orders: "Orders",
|
|
1624
|
-
products: "Products",
|
|
1625
|
-
subscriptions: "Subscriptions",
|
|
1626
|
-
customers: "Customers",
|
|
1627
|
-
fulfillment: "Fulfillment",
|
|
1628
|
-
reporting: "Reporting",
|
|
1629
|
-
"ai-workflows": "AI Workflows",
|
|
1630
|
-
publish: "Publish",
|
|
1631
|
-
settings: "Settings",
|
|
1632
|
-
};
|
|
1633
|
-
|
|
1634
|
-
const panelIdFromHash = () => {
|
|
1635
|
-
const rawHash = window.location.hash.slice(1);
|
|
1636
|
-
// The tab id is the part before any "?" query suffix (#publish?pr=42);
|
|
1637
|
-
// the raw hash is still used for internal-guide anchor resolution.
|
|
1638
|
-
const hash = rawHash.split("?")[0];
|
|
1639
|
-
if (!rawHash) return defaultTab;
|
|
1640
|
-
if (tabSet.has(hash)) return hash;
|
|
1641
|
-
if (!canViewInternalGuide) return defaultTab;
|
|
1642
|
-
|
|
1643
|
-
const target = rawHash ? document.getElementById(rawHash) : null;
|
|
1644
|
-
const panel = target?.closest?.("[data-admin-panel]");
|
|
1645
|
-
if (panel?.id && tabSet.has(panel.id)) return panel.id;
|
|
1646
|
-
|
|
1647
|
-
return null;
|
|
1648
|
-
};
|
|
1649
|
-
|
|
1650
|
-
const setActiveTab = (id) => {
|
|
1651
|
-
if (!tabSet.has(id)) return;
|
|
1652
|
-
|
|
1653
|
-
document.documentElement.dataset.adminMode = "work-area";
|
|
1654
|
-
document.documentElement.dataset.adminTab = id;
|
|
1655
|
-
setAskContext(id);
|
|
1656
|
-
|
|
1657
|
-
document.querySelectorAll("[data-admin-panel]").forEach((panel) => {
|
|
1658
|
-
const active = panel.id === id;
|
|
1659
|
-
panel.hidden = !active;
|
|
1660
|
-
panel.setAttribute("aria-hidden", active ? "false" : "true");
|
|
1661
|
-
});
|
|
1662
|
-
|
|
1663
|
-
document.querySelectorAll("[data-admin-tab-link]").forEach((link) => {
|
|
1664
|
-
const active = link.hash === `#${id}`;
|
|
1665
|
-
link.classList.toggle("active", active);
|
|
1666
|
-
|
|
1667
|
-
if (link.getAttribute("role") === "tab") {
|
|
1668
|
-
link.setAttribute("aria-selected", active ? "true" : "false");
|
|
1669
|
-
link.tabIndex = active ? 0 : -1;
|
|
1670
|
-
}
|
|
1671
|
-
});
|
|
1672
|
-
};
|
|
1673
|
-
|
|
1674
|
-
const setGuideMode = () => {
|
|
1675
|
-
if (!canViewInternalGuide) {
|
|
1676
|
-
setActiveTab(defaultTab);
|
|
1677
|
-
return;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
document.documentElement.dataset.adminMode = "guide";
|
|
1681
|
-
setAskContext(defaultTab);
|
|
1682
|
-
|
|
1683
|
-
document.querySelectorAll("[data-admin-panel]").forEach((panel) => {
|
|
1684
|
-
panel.hidden = true;
|
|
1685
|
-
panel.setAttribute("aria-hidden", "true");
|
|
1686
|
-
});
|
|
1687
|
-
|
|
1688
|
-
document.querySelectorAll("[data-admin-tab-link]").forEach((link) => {
|
|
1689
|
-
link.classList.remove("active");
|
|
1690
|
-
|
|
1691
|
-
if (link.getAttribute("role") === "tab") {
|
|
1692
|
-
link.setAttribute("aria-selected", "false");
|
|
1693
|
-
link.tabIndex = 0;
|
|
1694
|
-
}
|
|
1695
|
-
});
|
|
1696
|
-
};
|
|
1697
|
-
|
|
1698
|
-
// Ask context envelope (baseline §Horizontal AI Concepts / Ask,
|
|
1699
|
-
// ai-evidence-substrate item a — mirrors lib/admin/ai/askEnvelope.ts's
|
|
1700
|
-
// buildAskEnvelope; duplicated here in plain JS because is:inline
|
|
1701
|
-
// scripts cannot import modules). No chat backend yet: this is
|
|
1702
|
-
// dev-inspectable only (window.__toTAdminAsk + a CustomEvent), never
|
|
1703
|
-
// sent over the network.
|
|
1704
|
-
const buildAskEnvelopePlain = (id) => {
|
|
1705
|
-
const root = document.documentElement.dataset;
|
|
1706
|
-
const isStaff = root.adminIsStaff === "true";
|
|
1707
|
-
const panel = document.getElementById(id);
|
|
1708
|
-
const selectedRecordId = panel?.querySelector("[data-admin-selected-id]")?.dataset.adminSelectedId || null;
|
|
1709
|
-
|
|
1710
|
-
return {
|
|
1711
|
-
tenant: {
|
|
1712
|
-
adminAppTenant: root.adminAppTenant ?? "",
|
|
1713
|
-
targetTenant: root.adminTargetTenant ?? "",
|
|
1714
|
-
operator: root.adminOperator || null,
|
|
1715
|
-
},
|
|
1716
|
-
activeTab: id,
|
|
1717
|
-
selectedRecordId,
|
|
1718
|
-
role: isStaff ? "internal_staff" : "merchant_operator",
|
|
1719
|
-
permissions: isStaff ? ["internal_admin", "cross_tenant_read"] : ["merchant_admin"],
|
|
1720
|
-
filters: {},
|
|
1721
|
-
evidenceContext: [],
|
|
1722
|
-
};
|
|
1723
|
-
};
|
|
1724
|
-
|
|
1725
|
-
const setAskContext = (id) => {
|
|
1726
|
-
const label = askContexts[id] ?? "Storefront";
|
|
1727
|
-
const askButton = document.querySelector("[data-admin-ask]");
|
|
1728
|
-
const askContext = document.querySelector("[data-admin-ask-context]");
|
|
1729
|
-
|
|
1730
|
-
if (askContext) askContext.textContent = label;
|
|
1731
|
-
if (askButton) {
|
|
1732
|
-
askButton.setAttribute("aria-label", `Ask about ${label}`);
|
|
1733
|
-
askButton.setAttribute("title", `Ask about ${label}`);
|
|
1734
|
-
askButton.dataset.askScope = id;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
window.__toTAdminAsk = buildAskEnvelopePlain(id);
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
const scrollWorkspaceToTop = () => {
|
|
1741
|
-
const scroller = document.querySelector(".main");
|
|
1742
|
-
const reset = () => {
|
|
1743
|
-
if (scroller) {
|
|
1744
|
-
scroller.scrollTo({ top: 0, left: 0 });
|
|
1745
|
-
return;
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
window.scrollTo({ top: 0, left: 0 });
|
|
1749
|
-
};
|
|
1750
|
-
|
|
1751
|
-
reset();
|
|
1752
|
-
requestAnimationFrame(reset);
|
|
1753
|
-
setTimeout(reset, 0);
|
|
1754
|
-
};
|
|
1755
|
-
|
|
1756
|
-
const scrollToHashTarget = (panelId) => {
|
|
1757
|
-
const hash = window.location.hash.slice(1);
|
|
1758
|
-
const target = hash ? document.getElementById(hash) : null;
|
|
1759
|
-
|
|
1760
|
-
if (!target || tabSet.has(hash) || target.id === panelId) {
|
|
1761
|
-
scrollWorkspaceToTop();
|
|
1762
|
-
return;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
target?.scrollIntoView({ block: "start" });
|
|
1766
|
-
};
|
|
1767
|
-
|
|
1768
|
-
const activateFromHash = ({ scroll = false } = {}) => {
|
|
1769
|
-
const panelId = panelIdFromHash();
|
|
1770
|
-
|
|
1771
|
-
if (panelId) {
|
|
1772
|
-
setActiveTab(panelId);
|
|
1773
|
-
// Strip any query suffix before deciding whether the hash names a
|
|
1774
|
-
// real tab — a valid deep link like #publish?pr=42 must not be
|
|
1775
|
-
// normalized away to #settings for merchant viewers.
|
|
1776
|
-
const hashTab = window.location.hash.slice(1).split("?")[0];
|
|
1777
|
-
if (!canViewInternalGuide && !tabSet.has(hashTab)) {
|
|
1778
|
-
history.replaceState(null, "", "#settings");
|
|
1779
|
-
}
|
|
1780
|
-
if (scroll) requestAnimationFrame(() => scrollToHashTarget(panelId));
|
|
1781
|
-
return;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
setGuideMode();
|
|
1785
|
-
if (scroll) {
|
|
1786
|
-
const hash = window.location.hash.slice(1);
|
|
1787
|
-
requestAnimationFrame(() => document.getElementById(hash)?.scrollIntoView({ block: "start" }));
|
|
1788
|
-
}
|
|
1789
|
-
};
|
|
1790
|
-
|
|
1791
|
-
document.querySelector("[data-admin-tenant-picker-select]")?.addEventListener("change", (event) => {
|
|
1792
|
-
const params = new URLSearchParams(window.location.search);
|
|
1793
|
-
params.set("asTenant", event.target.value);
|
|
1794
|
-
window.location.assign(`${window.location.pathname}?${params}${window.location.hash}`);
|
|
1795
|
-
});
|
|
1796
|
-
|
|
1797
|
-
// Emit the Ask envelope on open. No chat backend yet — dev-inspectable
|
|
1798
|
-
// only via window.__toTAdminAsk (already kept current by setAskContext)
|
|
1799
|
-
// and this "tot:admin-ask" CustomEvent.
|
|
1800
|
-
document.querySelector("[data-admin-ask]")?.addEventListener("click", () => {
|
|
1801
|
-
const activeTab = document.documentElement.dataset.adminTab ?? defaultTab;
|
|
1802
|
-
const envelope = buildAskEnvelopePlain(activeTab);
|
|
1803
|
-
window.__toTAdminAsk = envelope;
|
|
1804
|
-
document.dispatchEvent(new CustomEvent("tot:admin-ask", { detail: envelope }));
|
|
1805
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
1806
|
-
console.debug("[admin:ask]", envelope);
|
|
1807
|
-
}
|
|
1808
|
-
});
|
|
1809
|
-
|
|
1810
|
-
document.addEventListener("click", (event) => {
|
|
1811
|
-
const target = event.target instanceof Element ? event.target : event.target?.parentElement;
|
|
1812
|
-
const link = target?.closest("a[href^='#']");
|
|
1813
|
-
if (!link || !tabHashPattern.test(link.hash)) return;
|
|
1814
|
-
|
|
1815
|
-
event.preventDefault();
|
|
1816
|
-
const id = link.hash.slice(1);
|
|
1817
|
-
setActiveTab(id);
|
|
1818
|
-
history.pushState(null, "", link.hash);
|
|
1819
|
-
scrollWorkspaceToTop();
|
|
1820
|
-
});
|
|
1821
|
-
|
|
1822
|
-
document.addEventListener("keydown", (event) => {
|
|
1823
|
-
const target = event.target instanceof Element ? event.target : null;
|
|
1824
|
-
const currentTab = target?.closest("[role='tab'][data-admin-tab-link]");
|
|
1825
|
-
if (!currentTab) return;
|
|
1826
|
-
|
|
1827
|
-
// Filter to visible tabs only: the mobile tab bar and the internal
|
|
1828
|
-
// Admin Tab Map can both be present in the DOM at once (one hidden
|
|
1829
|
-
// via CSS depending on viewport/viewer), and this selector matches
|
|
1830
|
-
// role="tab" elements in either — without this filter, arrow/home/
|
|
1831
|
-
// end navigation could walk into a display:none tablist whose
|
|
1832
|
-
// .focus() is a silent no-op.
|
|
1833
|
-
const tabs = Array.from(document.querySelectorAll("[role='tab'][data-admin-tab-link]")).filter(
|
|
1834
|
-
(el) => el.offsetParent !== null,
|
|
1835
|
-
);
|
|
1836
|
-
const currentIndex = tabs.indexOf(currentTab);
|
|
1837
|
-
let nextIndex = currentIndex;
|
|
1838
|
-
|
|
1839
|
-
if (event.key === "ArrowRight") nextIndex = (currentIndex + 1) % tabs.length;
|
|
1840
|
-
if (event.key === "ArrowLeft") nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;
|
|
1841
|
-
if (event.key === "Home") nextIndex = 0;
|
|
1842
|
-
if (event.key === "End") nextIndex = tabs.length - 1;
|
|
1843
|
-
|
|
1844
|
-
if (nextIndex === currentIndex) return;
|
|
1845
|
-
|
|
1846
|
-
event.preventDefault();
|
|
1847
|
-
tabs[nextIndex].focus();
|
|
1848
|
-
tabs[nextIndex].click();
|
|
1849
|
-
});
|
|
1850
|
-
|
|
1851
|
-
window.addEventListener("hashchange", () => activateFromHash({ scroll: true }));
|
|
1852
|
-
activateFromHash({ scroll: Boolean(window.location.hash) });
|
|
1853
|
-
})();
|
|
563
|
+
<script>
|
|
564
|
+
import { initAdminShell } from "@/lib/admin/adminShell";
|
|
565
|
+
initAdminShell();
|
|
1854
566
|
</script>
|
|
1855
567
|
</body>
|
|
1856
568
|
</html>
|