@scalebun/web 1.0.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap/SDKBootstrapper.d.ts +6 -6
- package/dist/bootstrap/SDKBootstrapper.js +8 -8
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +8 -6
- package/dist/browser.js.map +1 -1
- package/dist/config/endpoints.d.ts +12 -0
- package/dist/config/endpoints.d.ts.map +1 -0
- package/dist/config/endpoints.js +12 -0
- package/dist/config/endpoints.js.map +1 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +5 -3
- package/dist/config/schema.js.map +1 -1
- package/dist/core/breadcrumbs.js +1 -1
- package/dist/core/index.d.ts +13 -13
- package/dist/core/index.js +13 -13
- package/dist/core/observe.js +1 -1
- package/dist/core/pageContext.d.ts +1 -1
- package/dist/features/analytics/AnalyticsFeature.d.ts +2 -2
- package/dist/features/analytics/AnalyticsFeature.js +10 -10
- package/dist/features/analytics/autocapture.js +4 -4
- package/dist/features/analytics/sampler.js +1 -1
- package/dist/features/bugreport/BugReportFeature.d.ts +1 -1
- package/dist/features/bugreport/BugReportFeature.js +1 -1
- package/dist/features/bugreport/collect.js +1 -1
- package/dist/features/bugreport/widget.js +9 -9
- package/dist/features/coach/CoachmarkFeature.d.ts +1 -1
- package/dist/features/coach/CoachmarkFeature.js +5 -5
- package/dist/features/coach/anchor.d.ts +1 -1
- package/dist/features/coach/overlay.d.ts +1 -1
- package/dist/features/coach/overlay.js +21 -21
- package/dist/features/coach/position.d.ts +1 -1
- package/dist/features/coach/predicate.d.ts +1 -1
- package/dist/features/coach/tour.d.ts +4 -4
- package/dist/features/coach/tour.js +1 -1
- package/dist/features/coach/types.d.ts +1 -1
- package/dist/features/coach/wait.d.ts +2 -2
- package/dist/features/config/ConfigFeature.d.ts +1 -1
- package/dist/features/config/ConfigFeature.js +5 -5
- package/dist/features/config/configStore.d.ts +1 -1
- package/dist/features/config/targeting.d.ts +1 -1
- package/dist/features/console/ConsoleFeature.js +3 -3
- package/dist/features/console/normalize.js +2 -2
- package/dist/features/console/throttle.d.ts +1 -1
- package/dist/features/crash/CrashFeature.js +2 -2
- package/dist/features/engage/EngageFeature.d.ts +3 -3
- package/dist/features/engage/EngageFeature.js +5 -5
- package/dist/features/engage/attachments.d.ts +1 -1
- package/dist/features/engage/attachments.js +3 -3
- package/dist/features/engage/gameLogic.d.ts +1 -1
- package/dist/features/engage/gameResolver.d.ts +2 -2
- package/dist/features/engage/gameResolver.js +1 -1
- package/dist/features/engage/inappSlots.d.ts +1 -1
- package/dist/features/engage/inappSlots.js +1 -1
- package/dist/features/engage/normalize.d.ts +1 -1
- package/dist/features/engage/richInApp.d.ts +3 -3
- package/dist/features/engage/richInApp.js +6 -6
- package/dist/features/engage/runtime.d.ts +3 -3
- package/dist/features/engage/runtime.js +7 -7
- package/dist/features/engage/shakeDetector.js +1 -1
- package/dist/features/engage/throttle.d.ts +1 -1
- package/dist/features/engage/transport.d.ts +1 -1
- package/dist/features/engage/transport.js +1 -1
- package/dist/features/engage/triggerEngine.d.ts +1 -1
- package/dist/features/engage/widget/InAppWidget.d.ts +1 -1
- package/dist/features/engage/widget/InAppWidget.js +18 -18
- package/dist/features/engage/widget/SurveyWidget.d.ts +1 -1
- package/dist/features/engage/widget/SurveyWidget.js +66 -66
- package/dist/features/errors/ErrorsFeature.d.ts +1 -1
- package/dist/features/errors/ErrorsFeature.js +6 -6
- package/dist/features/errors/group/fingerprint.js +1 -1
- package/dist/features/errors/lazy.d.ts +3 -3
- package/dist/features/errors/lazy.js +3 -3
- package/dist/features/errors/normalize.d.ts +2 -2
- package/dist/features/errors/normalize.js +2 -2
- package/dist/features/errors/redact.js +1 -1
- package/dist/features/errors/sampling.js +1 -1
- package/dist/features/exit-intent/ExitIntentFeature.js +1 -1
- package/dist/features/exit-intent/engine.js +1 -1
- package/dist/features/forms/index.js +1 -1
- package/dist/features/inapp/InApp2Feature.js +1 -1
- package/dist/features/inapp/anchor/controller.d.ts +2 -2
- package/dist/features/inapp/anchor/controller.js +3 -3
- package/dist/features/inapp/api.d.ts +5 -5
- package/dist/features/inapp/api.js +3 -3
- package/dist/features/inapp/blocks/blocks.d.ts +1 -1
- package/dist/features/inapp/blocks/blocks.js +1 -1
- package/dist/features/inapp/blocks/feedback.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/carousel.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/chart.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/code.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/confetti.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/countdown.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/index.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/index.js +18 -18
- package/dist/features/inapp/blocks/heavy/markdown.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/productgrid.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/qr.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/scratch.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/scratch.js +1 -1
- package/dist/features/inapp/blocks/heavy/slot.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/slot.js +1 -1
- package/dist/features/inapp/blocks/heavy/spinwheel.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/spinwheel.js +1 -1
- package/dist/features/inapp/blocks/heavy/steps.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/streak.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/table.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/unavailable.d.ts +1 -1
- package/dist/features/inapp/blocks/heavy/video.d.ts +1 -1
- package/dist/features/inapp/blocks/styles.js +191 -191
- package/dist/features/inapp/center/bridge.d.ts +3 -3
- package/dist/features/inapp/center/bridge.js +1 -1
- package/dist/features/inapp/center/panel.d.ts +2 -2
- package/dist/features/inapp/center/panel.js +33 -33
- package/dist/features/inapp/center/store.d.ts +1 -1
- package/dist/features/inapp/center/sync.d.ts +1 -1
- package/dist/features/inapp/center/types.d.ts +1 -1
- package/dist/features/inapp/core/analytics.d.ts +3 -3
- package/dist/features/inapp/core/analytics.js +1 -1
- package/dist/features/inapp/core/compat.d.ts +2 -2
- package/dist/features/inapp/core/debugOverlay.d.ts +2 -2
- package/dist/features/inapp/core/debugOverlay.js +12 -12
- package/dist/features/inapp/core/engine.d.ts +3 -3
- package/dist/features/inapp/core/engine.js +10 -10
- package/dist/features/inapp/core/host.js +22 -22
- package/dist/features/inapp/core/metrics.d.ts +1 -1
- package/dist/features/inapp/core/migration.d.ts +2 -2
- package/dist/features/inapp/core/migration.js +2 -2
- package/dist/features/inapp/core/orchestrator.d.ts +1 -1
- package/dist/features/inapp/core/respect.d.ts +1 -1
- package/dist/features/inapp/core/targeting.d.ts +1 -1
- package/dist/features/inapp/core/targeting.js +1 -1
- package/dist/features/inapp/core/triggers.d.ts +1 -1
- package/dist/features/inapp/core/triggers.js +2 -2
- package/dist/features/inapp/inappContract.web.d.ts +1 -1
- package/dist/features/inapp/index.d.ts +15 -15
- package/dist/features/inapp/index.js +10 -10
- package/dist/features/inapp/registry.web.canonical.d.ts +1 -1
- package/dist/features/inapp/registry.web.catalog.d.ts +1 -1
- package/dist/features/inapp/surfaces/banner.d.ts +1 -1
- package/dist/features/inapp/surfaces/banner.js +1 -1
- package/dist/features/inapp/surfaces/checklist.d.ts +1 -1
- package/dist/features/inapp/surfaces/coachmark.d.ts +1 -1
- package/dist/features/inapp/surfaces/coachmark.js +2 -2
- package/dist/features/inapp/surfaces/hotspot.d.ts +1 -1
- package/dist/features/inapp/surfaces/hotspot.js +2 -2
- package/dist/features/inapp/surfaces/inline.d.ts +4 -4
- package/dist/features/inapp/surfaces/inline.js +11 -11
- package/dist/features/inapp/surfaces/launcher.d.ts +1 -1
- package/dist/features/inapp/surfaces/modal.d.ts +1 -1
- package/dist/features/inapp/surfaces/modal.js +2 -2
- package/dist/features/inapp/surfaces/mount.d.ts +4 -4
- package/dist/features/inapp/surfaces/mount.js +4 -4
- package/dist/features/inapp/surfaces/palette.d.ts +1 -1
- package/dist/features/inapp/surfaces/palette.js +1 -1
- package/dist/features/inapp/surfaces/panel.d.ts +1 -1
- package/dist/features/inapp/surfaces/popover.d.ts +1 -1
- package/dist/features/inapp/surfaces/popover.js +2 -2
- package/dist/features/inapp/surfaces/render.d.ts +4 -4
- package/dist/features/inapp/surfaces/render.d.ts.map +1 -1
- package/dist/features/inapp/surfaces/render.js +23 -19
- package/dist/features/inapp/surfaces/render.js.map +1 -1
- package/dist/features/inapp/surfaces/slideover.d.ts +1 -1
- package/dist/features/inapp/surfaces/slideover.js +1 -1
- package/dist/features/inapp/surfaces/styles.js +179 -179
- package/dist/features/inapp/surfaces/surface.d.ts +4 -4
- package/dist/features/inapp/surfaces/surface.js +2 -2
- package/dist/features/inapp/surfaces/takeover.d.ts +1 -1
- package/dist/features/inapp/surfaces/takeover.js +2 -2
- package/dist/features/inapp/surfaces/toast.d.ts +1 -1
- package/dist/features/inapp/surfaces/toast.js +1 -1
- package/dist/features/inapp/surfaces/toolbar.d.ts +1 -1
- package/dist/features/inapp/surfaces/toolbar.js +2 -2
- package/dist/features/inapp/surfaces/tour.d.ts +1 -1
- package/dist/features/inapp/surfaces/tour.js +5 -5
- package/dist/features/inbox/InboxFeature.d.ts +1 -1
- package/dist/features/inbox/InboxFeature.js +5 -5
- package/dist/features/inbox/runtime.d.ts +2 -2
- package/dist/features/inbox/runtime.js +3 -3
- package/dist/features/inbox/store.d.ts +1 -1
- package/dist/features/inbox/sync.d.ts +2 -2
- package/dist/features/inbox/sync.js +1 -1
- package/dist/features/inbox/widget/InboxWidget.d.ts +1 -1
- package/dist/features/inbox/widget/InboxWidget.js +85 -85
- package/dist/features/journey/InteractionTracker.js +1 -1
- package/dist/features/journey/JourneyFeature.js +3 -3
- package/dist/features/manifest.d.ts +1 -1
- package/dist/features/manifest.js +18 -18
- package/dist/features/network/NetworkFeature.d.ts +1 -1
- package/dist/features/network/NetworkFeature.js +10 -10
- package/dist/features/network/capture/body.d.ts +1 -1
- package/dist/features/network/capture/body.js +1 -1
- package/dist/features/network/classify.d.ts +1 -1
- package/dist/features/network/fetchInterceptor.d.ts +1 -1
- package/dist/features/network/fetchInterceptor.js +1 -1
- package/dist/features/network/intercept/beacon.d.ts +1 -1
- package/dist/features/network/intercept/sse.d.ts +1 -1
- package/dist/features/network/intercept/streams.d.ts +4 -4
- package/dist/features/network/intercept/streams.js +3 -3
- package/dist/features/network/intercept/websocket.d.ts +1 -1
- package/dist/features/network/lazy.d.ts +3 -3
- package/dist/features/network/lazy.js +2 -2
- package/dist/features/network/normalize.d.ts +1 -1
- package/dist/features/network/normalize.js +3 -3
- package/dist/features/network/parse/graphql.d.ts +1 -1
- package/dist/features/network/sampler.js +1 -1
- package/dist/features/network/timing.d.ts +1 -1
- package/dist/features/network/xhrInterceptor.d.ts +1 -1
- package/dist/features/network/xhrInterceptor.js +1 -1
- package/dist/features/performance/PerformanceFeature.d.ts +2 -2
- package/dist/features/performance/PerformanceFeature.js +11 -11
- package/dist/features/performance/longTasks.js +1 -1
- package/dist/features/performance/normalize.js +1 -1
- package/dist/features/performance/sampler.js +1 -1
- package/dist/features/performance/trace/index.d.ts +4 -4
- package/dist/features/performance/trace/index.js +3 -3
- package/dist/features/performance/trace/pageload.d.ts +1 -1
- package/dist/features/performance/trace/pageload.js +1 -1
- package/dist/features/performance/trace/transaction.d.ts +2 -2
- package/dist/features/performance/trace/transaction.js +2 -2
- package/dist/features/profiler/ProfilerFeature.js +1 -1
- package/dist/features/push/PushFeature.d.ts +4 -4
- package/dist/features/push/PushFeature.js +3 -3
- package/dist/features/push/softAsk.d.ts +1 -1
- package/dist/features/push/softAsk.js +26 -26
- package/dist/features/replay/ReplayFeature.d.ts +1 -1
- package/dist/features/replay/ReplayFeature.js +12 -12
- package/dist/features/replay/engine/canvas.d.ts +2 -2
- package/dist/features/replay/engine/crossOrigin.d.ts +1 -1
- package/dist/features/replay/engine/crossOrigin.js +3 -3
- package/dist/features/replay/engine/cssom.d.ts +2 -2
- package/dist/features/replay/engine/iframe.d.ts +2 -2
- package/dist/features/replay/engine/iframe.js +3 -3
- package/dist/features/replay/engine/interactions.d.ts +1 -1
- package/dist/features/replay/engine/interactions.js +1 -1
- package/dist/features/replay/engine/mutations.d.ts +3 -3
- package/dist/features/replay/engine/mutations.js +2 -2
- package/dist/features/replay/engine/player.d.ts +2 -2
- package/dist/features/replay/engine/player.js +1 -1
- package/dist/features/replay/engine/rebuild.d.ts +1 -1
- package/dist/features/replay/engine/replayWorker.js +16 -16
- package/dist/features/replay/engine/resources.d.ts +1 -1
- package/dist/features/replay/engine/resources.js +1 -1
- package/dist/features/replay/engine/snapshot.d.ts +2 -2
- package/dist/features/replay/engine/snapshot.js +1 -1
- package/dist/features/replay/engine/traverse.d.ts +1 -1
- package/dist/features/replay/lifecycle/recorder.d.ts +1 -1
- package/dist/features/replay/lifecycle/recorder.js +20 -20
- package/dist/features/replay/lifecycle/sampling.js +1 -1
- package/dist/features/replay/lifecycle/viewContext.js +1 -1
- package/dist/features/scroll/index.js +1 -1
- package/dist/features/session/sessionManager.d.ts +1 -1
- package/dist/features/session/sessionManager.js +2 -2
- package/dist/features/session/sessionStore.js +1 -1
- package/dist/features/watchdog/WatchdogFeature.d.ts +1 -1
- package/dist/features/watchdog/WatchdogFeature.js +1 -1
- package/dist/features/watchdog/collectors.d.ts +1 -1
- package/dist/features/watchdog/collectors.js +1 -1
- package/dist/features/watchdog/engine.js +8 -8
- package/dist/features/watchdog/incidents.d.ts +1 -1
- package/dist/features/watchdog/incidents.js +1 -1
- package/dist/features/watchdog/rollup.d.ts +1 -1
- package/dist/features/watchdog/rollup.js +1 -1
- package/dist/features/webVitals/WebVitalsFeature.js +4 -4
- package/dist/features/webVitals/observe.d.ts +1 -1
- package/dist/features/webVitals/observe.js +1 -1
- package/dist/features/webperf/WebPerfFeature.d.ts +1 -1
- package/dist/features/webperf/WebPerfFeature.js +3 -3
- package/dist/features/webperf/collectors.js +1 -1
- package/dist/inapp.d.ts +1 -1
- package/dist/inapp.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.js +1 -1
- package/dist/pipeline/pipeline.d.ts +3 -3
- package/dist/pipeline/pipeline.js +4 -4
- package/dist/public/ScaleBunFacade.d.ts +18 -18
- package/dist/public/ScaleBunFacade.js +11 -11
- package/dist/public/index.d.ts +4 -4
- package/dist/public/index.js +2 -2
- package/dist/scalebun-push-sw.js +236 -236
- package/dist/scalebun.min.js +17 -17
- package/dist/scalebun.min.js.map +4 -4
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/transport/httpClient.d.ts +1 -1
- package/dist/transport/httpClient.js +3 -3
- package/dist/transport/index.d.ts +1 -1
- package/dist/transport/index.js +1 -1
- package/package.json +7 -7
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { mountSurface } from './mount';
|
|
2
|
-
import { ensureHeavyBlocks } from '../blocks/heavy';
|
|
1
|
+
import { mountSurface } from './mount.js';
|
|
2
|
+
import { ensureHeavyBlocks } from '../blocks/heavy/index.js';
|
|
3
3
|
export const SURFACE_LOADERS = {
|
|
4
|
-
banner: () => import('./banner').then((m) => m.bannerSurface),
|
|
5
|
-
toast: () => import('./toast').then((m) => m.toastSurface),
|
|
6
|
-
modal: () => import('./modal').then((m) => m.modalSurface),
|
|
7
|
-
slideover: () => import('./slideover').then((m) => m.slideoverSurface),
|
|
8
|
-
popover: () => import('./popover').then((m) => m.popoverSurface),
|
|
9
|
-
coachmark: () => import('./coachmark').then((m) => m.coachmarkSurface),
|
|
10
|
-
tour: () => import('./tour').then((m) => m.tourSurface),
|
|
11
|
-
hotspot: () => import('./hotspot').then((m) => m.hotspotSurface),
|
|
12
|
-
toolbar: () => import('./toolbar').then((m) => m.toolbarSurface),
|
|
13
|
-
palette: () => import('./palette').then((m) => m.paletteSurface),
|
|
14
|
-
panel: () => import('./panel').then((m) => m.panelSurface),
|
|
15
|
-
checklist: () => import('./checklist').then((m) => m.checklistSurface),
|
|
16
|
-
takeover: () => import('./takeover').then((m) => m.takeoverSurface),
|
|
17
|
-
launcher: () => import('./launcher').then((m) => m.launcherSurface),
|
|
4
|
+
banner: () => import('./banner.js').then((m) => m.bannerSurface),
|
|
5
|
+
toast: () => import('./toast.js').then((m) => m.toastSurface),
|
|
6
|
+
modal: () => import('./modal.js').then((m) => m.modalSurface),
|
|
7
|
+
slideover: () => import('./slideover.js').then((m) => m.slideoverSurface),
|
|
8
|
+
popover: () => import('./popover.js').then((m) => m.popoverSurface),
|
|
9
|
+
coachmark: () => import('./coachmark.js').then((m) => m.coachmarkSurface),
|
|
10
|
+
tour: () => import('./tour.js').then((m) => m.tourSurface),
|
|
11
|
+
hotspot: () => import('./hotspot.js').then((m) => m.hotspotSurface),
|
|
12
|
+
toolbar: () => import('./toolbar.js').then((m) => m.toolbarSurface),
|
|
13
|
+
palette: () => import('./palette.js').then((m) => m.paletteSurface),
|
|
14
|
+
panel: () => import('./panel.js').then((m) => m.panelSurface),
|
|
15
|
+
checklist: () => import('./checklist.js').then((m) => m.checklistSurface),
|
|
16
|
+
takeover: () => import('./takeover.js').then((m) => m.takeoverSurface),
|
|
17
|
+
launcher: () => import('./launcher.js').then((m) => m.launcherSurface),
|
|
18
18
|
// 'center' (S11) mounts via center/panel.mountCenterPanel, not the surface renderer.
|
|
19
19
|
};
|
|
20
20
|
/** True if a surface has a renderer available (built + registered). */
|
|
@@ -33,15 +33,19 @@ export async function renderVariant(variant, hooks, deps) {
|
|
|
33
33
|
// + per-block resilient; runs in parallel with the surface chunk. Kinds are pulled from the variant.
|
|
34
34
|
const heavy = ensureHeavyBlocks((variant.blocks ?? []).map((b) => b.kind));
|
|
35
35
|
if (variant.surface === 'inline') {
|
|
36
|
-
if (!deps.slots)
|
|
36
|
+
if (!deps.slots) {
|
|
37
|
+
await heavy; // honor the heavy-load contract even when we can't mount (no slot registered)
|
|
37
38
|
return inert(variant.id);
|
|
38
|
-
|
|
39
|
+
}
|
|
40
|
+
const [{ mountInline }] = await Promise.all([import('./inline.js'), heavy]);
|
|
39
41
|
const inline = mountInline(deps.slots, variant, hooks);
|
|
40
42
|
return { variantId: variant.id, close: () => inline.close() };
|
|
41
43
|
}
|
|
42
44
|
const loader = SURFACE_LOADERS[variant.surface];
|
|
43
|
-
if (!loader)
|
|
45
|
+
if (!loader) {
|
|
46
|
+
await heavy; // surfaces mounted elsewhere (e.g. 'center') still get their heavy chunks loaded, not dropped
|
|
44
47
|
return inert(variant.id);
|
|
48
|
+
}
|
|
45
49
|
const [renderer] = await Promise.all([loader(), heavy]);
|
|
46
50
|
const mounted = mountSurface(deps.host, variant, renderer, hooks, deps.metrics);
|
|
47
51
|
return { variantId: variant.id, close: () => mounted.close('x') };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../src/features/inapp/surfaces/render.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAuB,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAA6D;IACvF,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;IAC7D,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;IAC1D,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,C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K,CAAC,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACvD,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;IAChE,CAAC;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,KAAK,CAAC,CAAC,8FAA8F;QAC3G,OAAO,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IACxD,MAAM,OAAO,GAAmB,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAChG,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,SAAS,KAAK,CAAC,SAAiB;IAC9B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* pinnable (a pinned panel opts out of outside-click dismissal). Overlay mode by construction — it
|
|
5
5
|
* lives in the fixed shadow layer, so it never reflows the host document.
|
|
6
6
|
*/
|
|
7
|
-
import type { SurfaceInstance, SurfaceMountCtx } from './surface';
|
|
7
|
+
import type { SurfaceInstance, SurfaceMountCtx } from './surface.js';
|
|
8
8
|
export declare function slideoverSurface(ctx: SurfaceMountCtx): SurfaceInstance;
|
|
9
9
|
//# sourceMappingURL=slideover.d.ts.map
|
|
@@ -3,184 +3,184 @@
|
|
|
3
3
|
* (CSP-safe); colors from the theme vars; animations opacity/transform-only and auto-disabled under
|
|
4
4
|
* prefers-reduced-motion by the host base sheet.
|
|
5
5
|
*/
|
|
6
|
-
export const SURFACES_CSS = `
|
|
7
|
-
/* shared close button */
|
|
8
|
-
.scalebun-x{ background:none; border:0; color:var(--scalebun-muted); cursor:pointer; font-size:16px; line-height:1;
|
|
9
|
-
padding:4px 6px; border-radius:6px; }
|
|
10
|
-
.scalebun-x:hover{ background:color-mix(in srgb, var(--scalebun-fg) 12%, transparent); color:var(--scalebun-fg); }
|
|
11
|
-
.scalebun-x:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:2px; }
|
|
12
|
-
|
|
13
|
-
/* --scalebun-anim-in carries the variant's AUTHORED entrance animation, mapped from a fixed
|
|
14
|
-
dictionary in richInApp (never interpolated). Each use falls back to that surface's own
|
|
15
|
-
long-standing default, so a variant that authored nothing renders byte-identically to before.
|
|
16
|
-
The reduced-motion rule in host.ts is marked important and still wins over anything set here. */
|
|
17
|
-
|
|
18
|
-
/* S9 — banner */
|
|
19
|
-
.scalebun-banner{ display:flex; align-items:center; gap:12px; padding:10px 16px;
|
|
20
|
-
background:var(--scalebun-bg); color:var(--scalebun-fg); border-bottom:1px solid var(--scalebun-border);
|
|
21
|
-
box-shadow:var(--scalebun-shadow); animation:var(--scalebun-anim-in, scalebun-slidedown .18s ease); }
|
|
22
|
-
.scalebun-banner-bottom{ border-bottom:0; border-top:1px solid var(--scalebun-border); animation:var(--scalebun-anim-in, scalebun-slideup .18s ease); }
|
|
23
|
-
.scalebun-banner .scalebun-body{ flex:1; display:flex; align-items:center; gap:12px; min-width:0; }
|
|
24
|
-
.scalebun-banner .scalebun-body>*{ margin:0; }
|
|
25
|
-
.scalebun-banner .scalebun-cta-row{ margin:0; }
|
|
26
|
-
@keyframes scalebun-slidedown{ from{ transform:translateY(-100%); } to{ transform:none; } }
|
|
27
|
-
|
|
28
|
-
/* S10 — toast */
|
|
29
|
-
.scalebun-toast{ background:var(--scalebun-bg); color:var(--scalebun-fg); border:1px solid var(--scalebun-border);
|
|
30
|
-
border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow); padding:12px 14px; max-width:340px;
|
|
31
|
-
display:flex; gap:10px; align-items:flex-start; animation:var(--scalebun-anim-in, scalebun-slideup .18s ease); }
|
|
32
|
-
.scalebun-toast .scalebun-body{ flex:1; min-width:0; }
|
|
33
|
-
.scalebun-toast .scalebun-body>*:last-child{ margin-bottom:0; }
|
|
34
|
-
@keyframes scalebun-slideup{ from{ transform:translateY(8px); opacity:0; } to{ transform:none; opacity:1; } }
|
|
35
|
-
|
|
36
|
-
/* S1 — modal */
|
|
37
|
-
/* pointer-events:auto is load-bearing — the zone is click-transparent (see host.ts BASE_CSS docblock) */
|
|
38
|
-
.scalebun-backdrop{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:auto;
|
|
39
|
-
background:rgba(15,18,26,.55); padding:24px; animation:scalebun-fade .15s ease; }
|
|
40
|
-
.scalebun-modal-card{ position:relative; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
41
|
-
border:1px solid var(--scalebun-border); border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow);
|
|
42
|
-
padding:22px; width:100%; max-height:calc(100vh - 48px); overflow:auto; animation:var(--scalebun-anim-in, scalebun-pop .16s ease); }
|
|
43
|
-
.scalebun-modal-card[data-size="sm"]{ max-width:360px; }
|
|
44
|
-
.scalebun-modal-card[data-size="md"]{ max-width:460px; }
|
|
45
|
-
.scalebun-modal-card[data-size="lg"]{ max-width:620px; }
|
|
46
|
-
.scalebun-modal-card[data-size="xl"]{ max-width:820px; }
|
|
47
|
-
.scalebun-modal-x{ position:absolute; top:10px; right:10px; }
|
|
48
|
-
@keyframes scalebun-fade{ from{ opacity:0; } to{ opacity:1; } }
|
|
49
|
-
@keyframes scalebun-pop{ from{ transform:scale(.96); opacity:0; } to{ transform:none; opacity:1; } }
|
|
50
|
-
|
|
51
|
-
/* S2 — slide-over */
|
|
52
|
-
.scalebun-slideover{ position:absolute; top:0; bottom:0; width:380px; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
53
|
-
box-shadow:var(--scalebun-shadow); display:flex; flex-direction:column; overflow:hidden; }
|
|
54
|
-
.scalebun-slideover-right{ right:0; border-left:1px solid var(--scalebun-border); animation:var(--scalebun-anim-in, scalebun-slide-in-r .2s ease); }
|
|
55
|
-
.scalebun-slideover-left{ left:0; border-right:1px solid var(--scalebun-border); animation:var(--scalebun-anim-in, scalebun-slide-in-l .2s ease); }
|
|
56
|
-
/* BOTTOM SHEET. bottom_sheet is one of the seven legacy layouts and richInApp has always mapped it
|
|
57
|
-
to slideover with placement 'bottom' — but only -right/-left existed, and the surface treated any
|
|
58
|
-
non-'left' placement as right. So every bottom-sheet campaign rendered as a full-height RIGHT panel.
|
|
59
|
-
Overrides the base's top/bottom/width, which describe a vertical edge panel. */
|
|
60
|
-
.scalebun-slideover-bottom{ top:auto; left:0; right:0; bottom:0; width:auto; max-height:82vh;
|
|
61
|
-
border-top:1px solid var(--scalebun-border); border-radius:16px 16px 0 0;
|
|
62
|
-
animation:var(--scalebun-anim-in, scalebun-slideup .22s ease); }
|
|
63
|
-
.scalebun-so-header{ display:flex; justify-content:flex-end; gap:4px; padding:8px 8px 0; }
|
|
64
|
-
/* A grab handle reads as "this came from the bottom edge" — the affordance a sheet has and a side
|
|
65
|
-
panel doesn't. Decorative only; the × button remains the accessible dismiss. */
|
|
66
|
-
.scalebun-slideover-bottom .scalebun-so-header::before{ content:''; position:absolute; top:8px;
|
|
67
|
-
left:50%; transform:translateX(-50%); width:36px; height:4px; border-radius:99px;
|
|
68
|
-
background:var(--scalebun-border); }
|
|
69
|
-
.scalebun-slideover-bottom .scalebun-so-header{ padding-top:16px; }
|
|
70
|
-
.scalebun-so-body{ padding:8px 18px 18px; overflow:auto; flex:1; }
|
|
71
|
-
.scalebun-so-resize{ position:absolute; top:0; bottom:0; width:6px; cursor:ew-resize; }
|
|
72
|
-
.scalebun-slideover-right .scalebun-so-resize{ left:0; }
|
|
73
|
-
.scalebun-slideover-left .scalebun-so-resize{ right:0; }
|
|
74
|
-
.scalebun-so-resize:hover{ background:color-mix(in srgb, var(--scalebun-accent) 40%, transparent); }
|
|
75
|
-
@keyframes scalebun-slide-in-r{ from{ transform:translateX(100%); } to{ transform:none; } }
|
|
76
|
-
@keyframes scalebun-slide-in-l{ from{ transform:translateX(-100%); } to{ transform:none; } }
|
|
77
|
-
|
|
78
|
-
/* S4 — anchored popover */
|
|
79
|
-
.scalebun-popover{ position:absolute; background:var(--scalebun-bg); color:var(--scalebun-fg); border:1px solid var(--scalebun-border);
|
|
80
|
-
border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow); padding:14px 16px; max-width:320px;
|
|
81
|
-
animation:scalebun-pop .14s ease; }
|
|
82
|
-
.scalebun-pop-body>*:last-child{ margin-bottom:0; }
|
|
83
|
-
.scalebun-pop-x{ position:absolute; top:6px; right:6px; }
|
|
84
|
-
|
|
85
|
-
/* S5 — coachmark + spotlight */
|
|
86
|
-
.scalebun-coach-spot{ position:fixed; border-radius:8px; box-shadow:0 0 0 9999px rgba(12,10,20,.55);
|
|
87
|
-
pointer-events:none; transition:top .18s ease,left .18s ease,width .18s ease,height .18s ease; }
|
|
88
|
-
.scalebun-coachmark{ position:absolute; pointer-events:auto; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
89
|
-
border:1px solid var(--scalebun-border); border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow);
|
|
90
|
-
padding:14px 16px; max-width:300px; animation:scalebun-pop .14s ease; }
|
|
91
|
-
|
|
92
|
-
/* S6 — product tour */
|
|
93
|
-
.scalebun-tour-card{ max-width:320px; }
|
|
94
|
-
.scalebun-tour-center{ top:50%; left:50%; transform:translate(-50%,-50%); }
|
|
95
|
-
.scalebun-tour-nav{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
|
|
96
|
-
.scalebun-tour-prog{ font-size:11.5px; color:var(--scalebun-muted); font-variant-numeric:tabular-nums; }
|
|
97
|
-
.scalebun-tour-btns{ display:flex; gap:6px; }
|
|
98
|
-
.scalebun-tour-btns .scalebun-btn{ padding:6px 12px; font-size:12.5px; }
|
|
99
|
-
|
|
100
|
-
/* S7 — hotspot / beacon */
|
|
101
|
-
.scalebun-beacon{ position:absolute; width:14px; height:14px; padding:0; border:0; border-radius:50%;
|
|
102
|
-
background:var(--scalebun-accent); cursor:pointer; pointer-events:auto; box-shadow:0 0 0 4px color-mix(in srgb, var(--scalebun-accent) 30%, transparent); }
|
|
103
|
-
.scalebun-beacon::after{ content:''; position:absolute; inset:0; border-radius:50%; background:var(--scalebun-accent);
|
|
104
|
-
animation:scalebun-pulse 1.8s ease-out infinite; }
|
|
105
|
-
.scalebun-beacon:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:3px; }
|
|
106
|
-
@keyframes scalebun-pulse{ 0%{ transform:scale(1); opacity:.6; } 100%{ transform:scale(2.6); opacity:0; } }
|
|
107
|
-
.scalebun-beacon-card{ position:absolute; pointer-events:auto; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
108
|
-
border:1px solid var(--scalebun-border); border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow);
|
|
109
|
-
padding:12px 14px; max-width:260px; font-size:13px; }
|
|
110
|
-
.scalebun-beacon-card[hidden]{ display:none; }
|
|
111
|
-
|
|
112
|
-
/* S16 — toolbar / menu callout */
|
|
113
|
-
.scalebun-toolbar-callout{ position:absolute; pointer-events:auto; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
114
|
-
border:1px solid var(--scalebun-border); border-radius:10px; box-shadow:var(--scalebun-shadow);
|
|
115
|
-
padding:10px 30px 10px 12px; max-width:240px; font-size:13px; animation:scalebun-pop .14s ease; }
|
|
116
|
-
|
|
117
|
-
/* S13 — command palette */
|
|
118
|
-
.scalebun-palette-backdrop{ position:absolute; inset:0; display:flex; align-items:flex-start; justify-content:center; pointer-events:auto;
|
|
119
|
-
padding-top:12vh; background:rgba(15,18,26,.45); }
|
|
120
|
-
.scalebun-palette{ width:min(560px, 92%); background:var(--scalebun-bg); color:var(--scalebun-fg); border:1px solid var(--scalebun-border);
|
|
121
|
-
border-radius:14px; box-shadow:var(--scalebun-shadow); overflow:hidden; animation:scalebun-pop .14s ease; }
|
|
122
|
-
.scalebun-palette-input{ width:100%; box-sizing:border-box; border:0; border-bottom:1px solid var(--scalebun-border);
|
|
123
|
-
padding:16px 18px; font:inherit; font-size:15px; background:transparent; color:var(--scalebun-fg); outline:none; }
|
|
124
|
-
.scalebun-palette-list{ list-style:none; margin:0; padding:6px; max-height:50vh; overflow-y:auto; }
|
|
125
|
-
.scalebun-palette-item{ display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; cursor:pointer; }
|
|
126
|
-
.scalebun-palette-item.active{ background:var(--scalebun-accent); color:var(--scalebun-accent-fg); }
|
|
127
|
-
.scalebun-palette-label{ flex:1; font-size:13.5px; }
|
|
128
|
-
.scalebun-palette-hint{ font-size:11.5px; opacity:.7; }
|
|
129
|
-
.scalebun-palette-empty{ padding:16px; text-align:center; color:var(--scalebun-muted); font-size:13px; }
|
|
130
|
-
|
|
131
|
-
/* S3 — docked panel + AI shell */
|
|
132
|
-
.scalebun-panel{ position:absolute; top:0; bottom:0; width:360px; display:flex; flex-direction:column;
|
|
133
|
-
background:var(--scalebun-bg); color:var(--scalebun-fg); box-shadow:var(--scalebun-shadow); }
|
|
134
|
-
.scalebun-panel-right{ right:0; border-left:1px solid var(--scalebun-border); }
|
|
135
|
-
.scalebun-panel-left{ left:0; border-right:1px solid var(--scalebun-border); }
|
|
136
|
-
.scalebun-panel-head{ display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid var(--scalebun-border); }
|
|
137
|
-
.scalebun-panel-title{ flex:1; font-weight:700; font-size:14px; }
|
|
138
|
-
.scalebun-panel-thread{ flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
|
|
139
|
-
.scalebun-bubble{ max-width:85%; padding:9px 12px; border-radius:12px; font-size:13.5px; line-height:1.45; white-space:pre-wrap; }
|
|
140
|
-
.scalebun-bubble-user{ align-self:flex-end; background:var(--scalebun-accent); color:var(--scalebun-accent-fg); border-bottom-right-radius:4px; }
|
|
141
|
-
.scalebun-bubble-assistant{ align-self:flex-start; background:color-mix(in srgb, var(--scalebun-fg) 7%, transparent); border-bottom-left-radius:4px; }
|
|
142
|
-
.scalebun-bubble.streaming::after{ content:'▍'; animation:scalebun-blink 1s step-end infinite; }
|
|
143
|
-
@keyframes scalebun-blink{ 50%{ opacity:0; } }
|
|
144
|
-
.scalebun-panel-composer{ display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--scalebun-border); align-items:flex-end; }
|
|
145
|
-
.scalebun-panel-input{ flex:1; resize:none; border:1px solid var(--scalebun-border); border-radius:10px; padding:9px 11px;
|
|
146
|
-
font:inherit; font-size:13.5px; background:transparent; color:var(--scalebun-fg); max-height:120px; }
|
|
147
|
-
.scalebun-panel-send{ padding:9px 14px; }
|
|
148
|
-
|
|
149
|
-
/* S14 — checklist / onboarding widget */
|
|
150
|
-
.scalebun-checklist{ position:absolute; bottom:16px; right:16px; width:320px; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
151
|
-
border:1px solid var(--scalebun-border); border-radius:14px; box-shadow:var(--scalebun-shadow); padding:14px 16px; }
|
|
152
|
-
.scalebun-checklist.complete{ border-color:var(--scalebun-accent); }
|
|
153
|
-
.scalebun-cl-head{ display:flex; align-items:center; gap:6px; margin-bottom:10px; }
|
|
154
|
-
.scalebun-cl-title{ flex:1; font-weight:700; font-size:14px; }
|
|
155
|
-
.scalebun-cl-dock{ font-size:14px; }
|
|
156
|
-
.scalebun-cl-bar{ height:6px; border-radius:3px; background:color-mix(in srgb, var(--scalebun-fg) 10%, transparent); overflow:hidden; }
|
|
157
|
-
.scalebun-cl-fill{ height:100%; background:var(--scalebun-accent); transition:width .25s ease; }
|
|
158
|
-
.scalebun-cl-count{ font-size:11.5px; color:var(--scalebun-muted); margin:6px 0 10px; }
|
|
159
|
-
.scalebun-checklist.collapsed .scalebun-cl-bar, .scalebun-checklist.collapsed .scalebun-cl-count, .scalebun-checklist.collapsed .scalebun-cl-list{ display:none; }
|
|
160
|
-
.scalebun-cl-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
|
|
161
|
-
.scalebun-cl-item{ display:flex; align-items:center; gap:10px; padding:6px 4px; font-size:13.5px; }
|
|
162
|
-
.scalebun-cl-item.done .scalebun-cl-label{ color:var(--scalebun-muted); text-decoration:line-through; }
|
|
163
|
-
.scalebun-cl-check{ width:20px; height:20px; flex:0 0 auto; border-radius:6px; border:1.5px solid var(--scalebun-border);
|
|
164
|
-
background:transparent; color:var(--scalebun-accent-fg); cursor:pointer; font-size:12px; line-height:1; }
|
|
165
|
-
.scalebun-cl-item.done .scalebun-cl-check{ background:var(--scalebun-accent); border-color:var(--scalebun-accent); }
|
|
166
|
-
.scalebun-cl-label{ flex:1; }
|
|
167
|
-
|
|
168
|
-
/* S15 — full-page takeover */
|
|
169
|
-
.scalebun-takeover{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:auto;
|
|
170
|
-
background:var(--scalebun-bg); color:var(--scalebun-fg); padding:32px; overflow:auto; animation:var(--scalebun-anim-in, scalebun-fade .2s ease); }
|
|
171
|
-
.scalebun-takeover-inner{ position:relative; max-width:640px; width:100%; text-align:center; }
|
|
172
|
-
.scalebun-takeover-x{ position:absolute; top:-8px; right:-8px; }
|
|
173
|
-
|
|
174
|
-
/* S12 — floating launcher */
|
|
175
|
-
.scalebun-launcher{ position:absolute; bottom:0; right:0; display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
|
|
176
|
-
.scalebun-launcher-fab{ width:52px; height:52px; border-radius:50%; border:0; background:var(--scalebun-accent); color:var(--scalebun-accent-fg);
|
|
177
|
-
font-size:22px; cursor:pointer; box-shadow:var(--scalebun-shadow); }
|
|
178
|
-
.scalebun-launcher-menu{ display:flex; flex-direction:column; gap:2px; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
179
|
-
border:1px solid var(--scalebun-border); border-radius:12px; box-shadow:var(--scalebun-shadow); padding:6px; min-width:180px;
|
|
180
|
-
animation:scalebun-pop .14s ease; }
|
|
181
|
-
.scalebun-launcher-menu[hidden]{ display:none; }
|
|
182
|
-
.scalebun-launcher-item{ text-align:left; background:none; border:0; color:var(--scalebun-fg); cursor:pointer; font:inherit;
|
|
183
|
-
font-size:13.5px; padding:9px 12px; border-radius:8px; }
|
|
184
|
-
.scalebun-launcher-item:hover{ background:color-mix(in srgb, var(--scalebun-fg) 7%, transparent); }
|
|
6
|
+
export const SURFACES_CSS = `
|
|
7
|
+
/* shared close button */
|
|
8
|
+
.scalebun-x{ background:none; border:0; color:var(--scalebun-muted); cursor:pointer; font-size:16px; line-height:1;
|
|
9
|
+
padding:4px 6px; border-radius:6px; }
|
|
10
|
+
.scalebun-x:hover{ background:color-mix(in srgb, var(--scalebun-fg) 12%, transparent); color:var(--scalebun-fg); }
|
|
11
|
+
.scalebun-x:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:2px; }
|
|
12
|
+
|
|
13
|
+
/* --scalebun-anim-in carries the variant's AUTHORED entrance animation, mapped from a fixed
|
|
14
|
+
dictionary in richInApp (never interpolated). Each use falls back to that surface's own
|
|
15
|
+
long-standing default, so a variant that authored nothing renders byte-identically to before.
|
|
16
|
+
The reduced-motion rule in host.ts is marked important and still wins over anything set here. */
|
|
17
|
+
|
|
18
|
+
/* S9 — banner */
|
|
19
|
+
.scalebun-banner{ display:flex; align-items:center; gap:12px; padding:10px 16px;
|
|
20
|
+
background:var(--scalebun-bg); color:var(--scalebun-fg); border-bottom:1px solid var(--scalebun-border);
|
|
21
|
+
box-shadow:var(--scalebun-shadow); animation:var(--scalebun-anim-in, scalebun-slidedown .18s ease); }
|
|
22
|
+
.scalebun-banner-bottom{ border-bottom:0; border-top:1px solid var(--scalebun-border); animation:var(--scalebun-anim-in, scalebun-slideup .18s ease); }
|
|
23
|
+
.scalebun-banner .scalebun-body{ flex:1; display:flex; align-items:center; gap:12px; min-width:0; }
|
|
24
|
+
.scalebun-banner .scalebun-body>*{ margin:0; }
|
|
25
|
+
.scalebun-banner .scalebun-cta-row{ margin:0; }
|
|
26
|
+
@keyframes scalebun-slidedown{ from{ transform:translateY(-100%); } to{ transform:none; } }
|
|
27
|
+
|
|
28
|
+
/* S10 — toast */
|
|
29
|
+
.scalebun-toast{ background:var(--scalebun-bg); color:var(--scalebun-fg); border:1px solid var(--scalebun-border);
|
|
30
|
+
border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow); padding:12px 14px; max-width:340px;
|
|
31
|
+
display:flex; gap:10px; align-items:flex-start; animation:var(--scalebun-anim-in, scalebun-slideup .18s ease); }
|
|
32
|
+
.scalebun-toast .scalebun-body{ flex:1; min-width:0; }
|
|
33
|
+
.scalebun-toast .scalebun-body>*:last-child{ margin-bottom:0; }
|
|
34
|
+
@keyframes scalebun-slideup{ from{ transform:translateY(8px); opacity:0; } to{ transform:none; opacity:1; } }
|
|
35
|
+
|
|
36
|
+
/* S1 — modal */
|
|
37
|
+
/* pointer-events:auto is load-bearing — the zone is click-transparent (see host.ts BASE_CSS docblock) */
|
|
38
|
+
.scalebun-backdrop{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:auto;
|
|
39
|
+
background:rgba(15,18,26,.55); padding:24px; animation:scalebun-fade .15s ease; }
|
|
40
|
+
.scalebun-modal-card{ position:relative; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
41
|
+
border:1px solid var(--scalebun-border); border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow);
|
|
42
|
+
padding:22px; width:100%; max-height:calc(100vh - 48px); overflow:auto; animation:var(--scalebun-anim-in, scalebun-pop .16s ease); }
|
|
43
|
+
.scalebun-modal-card[data-size="sm"]{ max-width:360px; }
|
|
44
|
+
.scalebun-modal-card[data-size="md"]{ max-width:460px; }
|
|
45
|
+
.scalebun-modal-card[data-size="lg"]{ max-width:620px; }
|
|
46
|
+
.scalebun-modal-card[data-size="xl"]{ max-width:820px; }
|
|
47
|
+
.scalebun-modal-x{ position:absolute; top:10px; right:10px; }
|
|
48
|
+
@keyframes scalebun-fade{ from{ opacity:0; } to{ opacity:1; } }
|
|
49
|
+
@keyframes scalebun-pop{ from{ transform:scale(.96); opacity:0; } to{ transform:none; opacity:1; } }
|
|
50
|
+
|
|
51
|
+
/* S2 — slide-over */
|
|
52
|
+
.scalebun-slideover{ position:absolute; top:0; bottom:0; width:380px; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
53
|
+
box-shadow:var(--scalebun-shadow); display:flex; flex-direction:column; overflow:hidden; }
|
|
54
|
+
.scalebun-slideover-right{ right:0; border-left:1px solid var(--scalebun-border); animation:var(--scalebun-anim-in, scalebun-slide-in-r .2s ease); }
|
|
55
|
+
.scalebun-slideover-left{ left:0; border-right:1px solid var(--scalebun-border); animation:var(--scalebun-anim-in, scalebun-slide-in-l .2s ease); }
|
|
56
|
+
/* BOTTOM SHEET. bottom_sheet is one of the seven legacy layouts and richInApp has always mapped it
|
|
57
|
+
to slideover with placement 'bottom' — but only -right/-left existed, and the surface treated any
|
|
58
|
+
non-'left' placement as right. So every bottom-sheet campaign rendered as a full-height RIGHT panel.
|
|
59
|
+
Overrides the base's top/bottom/width, which describe a vertical edge panel. */
|
|
60
|
+
.scalebun-slideover-bottom{ top:auto; left:0; right:0; bottom:0; width:auto; max-height:82vh;
|
|
61
|
+
border-top:1px solid var(--scalebun-border); border-radius:16px 16px 0 0;
|
|
62
|
+
animation:var(--scalebun-anim-in, scalebun-slideup .22s ease); }
|
|
63
|
+
.scalebun-so-header{ display:flex; justify-content:flex-end; gap:4px; padding:8px 8px 0; }
|
|
64
|
+
/* A grab handle reads as "this came from the bottom edge" — the affordance a sheet has and a side
|
|
65
|
+
panel doesn't. Decorative only; the × button remains the accessible dismiss. */
|
|
66
|
+
.scalebun-slideover-bottom .scalebun-so-header::before{ content:''; position:absolute; top:8px;
|
|
67
|
+
left:50%; transform:translateX(-50%); width:36px; height:4px; border-radius:99px;
|
|
68
|
+
background:var(--scalebun-border); }
|
|
69
|
+
.scalebun-slideover-bottom .scalebun-so-header{ padding-top:16px; }
|
|
70
|
+
.scalebun-so-body{ padding:8px 18px 18px; overflow:auto; flex:1; }
|
|
71
|
+
.scalebun-so-resize{ position:absolute; top:0; bottom:0; width:6px; cursor:ew-resize; }
|
|
72
|
+
.scalebun-slideover-right .scalebun-so-resize{ left:0; }
|
|
73
|
+
.scalebun-slideover-left .scalebun-so-resize{ right:0; }
|
|
74
|
+
.scalebun-so-resize:hover{ background:color-mix(in srgb, var(--scalebun-accent) 40%, transparent); }
|
|
75
|
+
@keyframes scalebun-slide-in-r{ from{ transform:translateX(100%); } to{ transform:none; } }
|
|
76
|
+
@keyframes scalebun-slide-in-l{ from{ transform:translateX(-100%); } to{ transform:none; } }
|
|
77
|
+
|
|
78
|
+
/* S4 — anchored popover */
|
|
79
|
+
.scalebun-popover{ position:absolute; background:var(--scalebun-bg); color:var(--scalebun-fg); border:1px solid var(--scalebun-border);
|
|
80
|
+
border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow); padding:14px 16px; max-width:320px;
|
|
81
|
+
animation:scalebun-pop .14s ease; }
|
|
82
|
+
.scalebun-pop-body>*:last-child{ margin-bottom:0; }
|
|
83
|
+
.scalebun-pop-x{ position:absolute; top:6px; right:6px; }
|
|
84
|
+
|
|
85
|
+
/* S5 — coachmark + spotlight */
|
|
86
|
+
.scalebun-coach-spot{ position:fixed; border-radius:8px; box-shadow:0 0 0 9999px rgba(12,10,20,.55);
|
|
87
|
+
pointer-events:none; transition:top .18s ease,left .18s ease,width .18s ease,height .18s ease; }
|
|
88
|
+
.scalebun-coachmark{ position:absolute; pointer-events:auto; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
89
|
+
border:1px solid var(--scalebun-border); border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow);
|
|
90
|
+
padding:14px 16px; max-width:300px; animation:scalebun-pop .14s ease; }
|
|
91
|
+
|
|
92
|
+
/* S6 — product tour */
|
|
93
|
+
.scalebun-tour-card{ max-width:320px; }
|
|
94
|
+
.scalebun-tour-center{ top:50%; left:50%; transform:translate(-50%,-50%); }
|
|
95
|
+
.scalebun-tour-nav{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
|
|
96
|
+
.scalebun-tour-prog{ font-size:11.5px; color:var(--scalebun-muted); font-variant-numeric:tabular-nums; }
|
|
97
|
+
.scalebun-tour-btns{ display:flex; gap:6px; }
|
|
98
|
+
.scalebun-tour-btns .scalebun-btn{ padding:6px 12px; font-size:12.5px; }
|
|
99
|
+
|
|
100
|
+
/* S7 — hotspot / beacon */
|
|
101
|
+
.scalebun-beacon{ position:absolute; width:14px; height:14px; padding:0; border:0; border-radius:50%;
|
|
102
|
+
background:var(--scalebun-accent); cursor:pointer; pointer-events:auto; box-shadow:0 0 0 4px color-mix(in srgb, var(--scalebun-accent) 30%, transparent); }
|
|
103
|
+
.scalebun-beacon::after{ content:''; position:absolute; inset:0; border-radius:50%; background:var(--scalebun-accent);
|
|
104
|
+
animation:scalebun-pulse 1.8s ease-out infinite; }
|
|
105
|
+
.scalebun-beacon:focus-visible{ outline:2px solid var(--scalebun-accent); outline-offset:3px; }
|
|
106
|
+
@keyframes scalebun-pulse{ 0%{ transform:scale(1); opacity:.6; } 100%{ transform:scale(2.6); opacity:0; } }
|
|
107
|
+
.scalebun-beacon-card{ position:absolute; pointer-events:auto; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
108
|
+
border:1px solid var(--scalebun-border); border-radius:var(--scalebun-radius); box-shadow:var(--scalebun-shadow);
|
|
109
|
+
padding:12px 14px; max-width:260px; font-size:13px; }
|
|
110
|
+
.scalebun-beacon-card[hidden]{ display:none; }
|
|
111
|
+
|
|
112
|
+
/* S16 — toolbar / menu callout */
|
|
113
|
+
.scalebun-toolbar-callout{ position:absolute; pointer-events:auto; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
114
|
+
border:1px solid var(--scalebun-border); border-radius:10px; box-shadow:var(--scalebun-shadow);
|
|
115
|
+
padding:10px 30px 10px 12px; max-width:240px; font-size:13px; animation:scalebun-pop .14s ease; }
|
|
116
|
+
|
|
117
|
+
/* S13 — command palette */
|
|
118
|
+
.scalebun-palette-backdrop{ position:absolute; inset:0; display:flex; align-items:flex-start; justify-content:center; pointer-events:auto;
|
|
119
|
+
padding-top:12vh; background:rgba(15,18,26,.45); }
|
|
120
|
+
.scalebun-palette{ width:min(560px, 92%); background:var(--scalebun-bg); color:var(--scalebun-fg); border:1px solid var(--scalebun-border);
|
|
121
|
+
border-radius:14px; box-shadow:var(--scalebun-shadow); overflow:hidden; animation:scalebun-pop .14s ease; }
|
|
122
|
+
.scalebun-palette-input{ width:100%; box-sizing:border-box; border:0; border-bottom:1px solid var(--scalebun-border);
|
|
123
|
+
padding:16px 18px; font:inherit; font-size:15px; background:transparent; color:var(--scalebun-fg); outline:none; }
|
|
124
|
+
.scalebun-palette-list{ list-style:none; margin:0; padding:6px; max-height:50vh; overflow-y:auto; }
|
|
125
|
+
.scalebun-palette-item{ display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; cursor:pointer; }
|
|
126
|
+
.scalebun-palette-item.active{ background:var(--scalebun-accent); color:var(--scalebun-accent-fg); }
|
|
127
|
+
.scalebun-palette-label{ flex:1; font-size:13.5px; }
|
|
128
|
+
.scalebun-palette-hint{ font-size:11.5px; opacity:.7; }
|
|
129
|
+
.scalebun-palette-empty{ padding:16px; text-align:center; color:var(--scalebun-muted); font-size:13px; }
|
|
130
|
+
|
|
131
|
+
/* S3 — docked panel + AI shell */
|
|
132
|
+
.scalebun-panel{ position:absolute; top:0; bottom:0; width:360px; display:flex; flex-direction:column;
|
|
133
|
+
background:var(--scalebun-bg); color:var(--scalebun-fg); box-shadow:var(--scalebun-shadow); }
|
|
134
|
+
.scalebun-panel-right{ right:0; border-left:1px solid var(--scalebun-border); }
|
|
135
|
+
.scalebun-panel-left{ left:0; border-right:1px solid var(--scalebun-border); }
|
|
136
|
+
.scalebun-panel-head{ display:flex; align-items:center; gap:8px; padding:12px 14px; border-bottom:1px solid var(--scalebun-border); }
|
|
137
|
+
.scalebun-panel-title{ flex:1; font-weight:700; font-size:14px; }
|
|
138
|
+
.scalebun-panel-thread{ flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
|
|
139
|
+
.scalebun-bubble{ max-width:85%; padding:9px 12px; border-radius:12px; font-size:13.5px; line-height:1.45; white-space:pre-wrap; }
|
|
140
|
+
.scalebun-bubble-user{ align-self:flex-end; background:var(--scalebun-accent); color:var(--scalebun-accent-fg); border-bottom-right-radius:4px; }
|
|
141
|
+
.scalebun-bubble-assistant{ align-self:flex-start; background:color-mix(in srgb, var(--scalebun-fg) 7%, transparent); border-bottom-left-radius:4px; }
|
|
142
|
+
.scalebun-bubble.streaming::after{ content:'▍'; animation:scalebun-blink 1s step-end infinite; }
|
|
143
|
+
@keyframes scalebun-blink{ 50%{ opacity:0; } }
|
|
144
|
+
.scalebun-panel-composer{ display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--scalebun-border); align-items:flex-end; }
|
|
145
|
+
.scalebun-panel-input{ flex:1; resize:none; border:1px solid var(--scalebun-border); border-radius:10px; padding:9px 11px;
|
|
146
|
+
font:inherit; font-size:13.5px; background:transparent; color:var(--scalebun-fg); max-height:120px; }
|
|
147
|
+
.scalebun-panel-send{ padding:9px 14px; }
|
|
148
|
+
|
|
149
|
+
/* S14 — checklist / onboarding widget */
|
|
150
|
+
.scalebun-checklist{ position:absolute; bottom:16px; right:16px; width:320px; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
151
|
+
border:1px solid var(--scalebun-border); border-radius:14px; box-shadow:var(--scalebun-shadow); padding:14px 16px; }
|
|
152
|
+
.scalebun-checklist.complete{ border-color:var(--scalebun-accent); }
|
|
153
|
+
.scalebun-cl-head{ display:flex; align-items:center; gap:6px; margin-bottom:10px; }
|
|
154
|
+
.scalebun-cl-title{ flex:1; font-weight:700; font-size:14px; }
|
|
155
|
+
.scalebun-cl-dock{ font-size:14px; }
|
|
156
|
+
.scalebun-cl-bar{ height:6px; border-radius:3px; background:color-mix(in srgb, var(--scalebun-fg) 10%, transparent); overflow:hidden; }
|
|
157
|
+
.scalebun-cl-fill{ height:100%; background:var(--scalebun-accent); transition:width .25s ease; }
|
|
158
|
+
.scalebun-cl-count{ font-size:11.5px; color:var(--scalebun-muted); margin:6px 0 10px; }
|
|
159
|
+
.scalebun-checklist.collapsed .scalebun-cl-bar, .scalebun-checklist.collapsed .scalebun-cl-count, .scalebun-checklist.collapsed .scalebun-cl-list{ display:none; }
|
|
160
|
+
.scalebun-cl-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
|
|
161
|
+
.scalebun-cl-item{ display:flex; align-items:center; gap:10px; padding:6px 4px; font-size:13.5px; }
|
|
162
|
+
.scalebun-cl-item.done .scalebun-cl-label{ color:var(--scalebun-muted); text-decoration:line-through; }
|
|
163
|
+
.scalebun-cl-check{ width:20px; height:20px; flex:0 0 auto; border-radius:6px; border:1.5px solid var(--scalebun-border);
|
|
164
|
+
background:transparent; color:var(--scalebun-accent-fg); cursor:pointer; font-size:12px; line-height:1; }
|
|
165
|
+
.scalebun-cl-item.done .scalebun-cl-check{ background:var(--scalebun-accent); border-color:var(--scalebun-accent); }
|
|
166
|
+
.scalebun-cl-label{ flex:1; }
|
|
167
|
+
|
|
168
|
+
/* S15 — full-page takeover */
|
|
169
|
+
.scalebun-takeover{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:auto;
|
|
170
|
+
background:var(--scalebun-bg); color:var(--scalebun-fg); padding:32px; overflow:auto; animation:var(--scalebun-anim-in, scalebun-fade .2s ease); }
|
|
171
|
+
.scalebun-takeover-inner{ position:relative; max-width:640px; width:100%; text-align:center; }
|
|
172
|
+
.scalebun-takeover-x{ position:absolute; top:-8px; right:-8px; }
|
|
173
|
+
|
|
174
|
+
/* S12 — floating launcher */
|
|
175
|
+
.scalebun-launcher{ position:absolute; bottom:0; right:0; display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
|
|
176
|
+
.scalebun-launcher-fab{ width:52px; height:52px; border-radius:50%; border:0; background:var(--scalebun-accent); color:var(--scalebun-accent-fg);
|
|
177
|
+
font-size:22px; cursor:pointer; box-shadow:var(--scalebun-shadow); }
|
|
178
|
+
.scalebun-launcher-menu{ display:flex; flex-direction:column; gap:2px; background:var(--scalebun-bg); color:var(--scalebun-fg);
|
|
179
|
+
border:1px solid var(--scalebun-border); border-radius:12px; box-shadow:var(--scalebun-shadow); padding:6px; min-width:180px;
|
|
180
|
+
animation:scalebun-pop .14s ease; }
|
|
181
|
+
.scalebun-launcher-menu[hidden]{ display:none; }
|
|
182
|
+
.scalebun-launcher-item{ text-align:left; background:none; border:0; color:var(--scalebun-fg); cursor:pointer; font:inherit;
|
|
183
|
+
font-size:13.5px; padding:9px 12px; border-radius:8px; }
|
|
184
|
+
.scalebun-launcher-item:hover{ background:color-mix(in srgb, var(--scalebun-fg) 7%, transparent); }
|
|
185
185
|
`;
|
|
186
186
|
//# sourceMappingURL=styles.js.map
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This module holds the shared plumbing every surface reuses: the block context (CTA/dismiss wiring)
|
|
10
10
|
* and the "real view" observer (≥50% visible for ≥1s = a genuine impression, not just a mount).
|
|
11
11
|
*/
|
|
12
|
-
import type { Variant } from '../types';
|
|
13
|
-
import type { ShadowHost } from '../core/host';
|
|
14
|
-
import type { DismissMethod } from '../core/analytics';
|
|
15
|
-
import { type BlockContext, type BlockOutcome } from '../blocks/blocks';
|
|
12
|
+
import type { Variant } from '../types.js';
|
|
13
|
+
import type { ShadowHost } from '../core/host.js';
|
|
14
|
+
import type { DismissMethod } from '../core/analytics.js';
|
|
15
|
+
import { type BlockContext, type BlockOutcome } from '../blocks/blocks.js';
|
|
16
16
|
export interface SurfaceHooks {
|
|
17
17
|
onImpression(): void;
|
|
18
18
|
onView(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { renderBlocks } from '../blocks/blocks';
|
|
2
|
-
import { copyToClipboard } from '../core/environment';
|
|
1
|
+
import { renderBlocks } from '../blocks/blocks.js';
|
|
2
|
+
import { copyToClipboard } from '../core/environment.js';
|
|
3
3
|
export function buildBlockContext(ctx) {
|
|
4
4
|
return {
|
|
5
5
|
doc: ctx.doc,
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* mutual-exclusion guarantees at most one focus-stealer on screen, ever. Reuses the a11y core
|
|
5
5
|
* (focus-trap + background inert + restore). A hard paywall sets no dismiss options → not closable.
|
|
6
6
|
*/
|
|
7
|
-
import type { SurfaceInstance, SurfaceMountCtx } from './surface';
|
|
7
|
+
import type { SurfaceInstance, SurfaceMountCtx } from './surface.js';
|
|
8
8
|
export declare function takeoverSurface(ctx: SurfaceMountCtx): SurfaceInstance;
|
|
9
9
|
//# sourceMappingURL=takeover.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { renderVariantBlocks } from './surface';
|
|
2
|
-
import { trapFocus, focusInitial, inertBackground, captureFocus } from '../a11y/focus';
|
|
1
|
+
import { renderVariantBlocks } from './surface.js';
|
|
2
|
+
import { trapFocus, focusInitial, inertBackground, captureFocus } from '../a11y/focus.js';
|
|
3
3
|
let uid = 0;
|
|
4
4
|
export function takeoverSurface(ctx) {
|
|
5
5
|
const { doc, variant } = ctx;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* S10 — Toast surface (P1.2). Transient corner card; stacks in the toast zone (cap enforced by the
|
|
3
3
|
* Orchestrator). Optional auto-dismiss. role=status + aria-live=polite for non-intrusive SR announce.
|
|
4
4
|
*/
|
|
5
|
-
import type { SurfaceInstance, SurfaceMountCtx } from './surface';
|
|
5
|
+
import type { SurfaceInstance, SurfaceMountCtx } from './surface.js';
|
|
6
6
|
export declare function toastSurface(ctx: SurfaceMountCtx): SurfaceInstance;
|
|
7
7
|
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* ("New in menu", nav guidance). Non-blocking, anchored via the unified LiveAnchor. Structurally a
|
|
4
4
|
* lightweight popover with callout styling + a small pointer toward the item.
|
|
5
5
|
*/
|
|
6
|
-
import type { SurfaceInstance, SurfaceMountCtx } from './surface';
|
|
6
|
+
import type { SurfaceInstance, SurfaceMountCtx } from './surface.js';
|
|
7
7
|
export declare function toolbarSurface(ctx: SurfaceMountCtx): SurfaceInstance;
|
|
8
8
|
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { renderVariantBlocks } from './surface';
|
|
2
|
-
import { LiveAnchor, specFromSelector } from '../anchor/controller';
|
|
1
|
+
import { renderVariantBlocks } from './surface.js';
|
|
2
|
+
import { LiveAnchor, specFromSelector } from '../anchor/controller.js';
|
|
3
3
|
function anchorSelector(ctx) {
|
|
4
4
|
return ctx.variant.targeting?.element ?? ctx.variant.triggers.find((t) => (t.type === 'element' || t.type === 'hover') && t.match)?.match;
|
|
5
5
|
}
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
* Resume: the engine persists the current step index (localStorage, keyed by variant id), so a tour
|
|
10
10
|
* survives navigation/refresh and continues where the user left off.
|
|
11
11
|
*/
|
|
12
|
-
import type { SurfaceInstance, SurfaceMountCtx } from './surface';
|
|
12
|
+
import type { SurfaceInstance, SurfaceMountCtx } from './surface.js';
|
|
13
13
|
export declare function tourSurface(ctx: SurfaceMountCtx): SurfaceInstance;
|
|
14
14
|
//# sourceMappingURL=tour.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TourEngine } from '../../coach/tour';
|
|
2
|
-
import { resolveAnchor } from '../../coach/anchor';
|
|
3
|
-
import { waitFor } from '../../coach/wait';
|
|
4
|
-
import { ObserverHub } from '../../coach/observers';
|
|
5
|
-
import { LiveAnchor, specFromSelector, selectorFromSpec } from '../anchor/controller';
|
|
1
|
+
import { TourEngine } from '../../coach/tour.js';
|
|
2
|
+
import { resolveAnchor } from '../../coach/anchor.js';
|
|
3
|
+
import { waitFor } from '../../coach/wait.js';
|
|
4
|
+
import { ObserverHub } from '../../coach/observers.js';
|
|
5
|
+
import { LiveAnchor, specFromSelector, selectorFromSpec } from '../anchor/controller.js';
|
|
6
6
|
const key = (id) => `scalebun_inapp_tour_${id}`;
|
|
7
7
|
function toCoachStep(s) {
|
|
8
8
|
const side = s.placement === 'top' || s.placement === 'left' || s.placement === 'right' ? s.placement : 'bottom';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* A1.3 the delta sync, A1.4 the sync triggers + consent gate — none change this shell's surface.
|
|
8
8
|
*/
|
|
9
9
|
import type { IFeature, FeatureContext } from '@scalebun/sdk-contracts';
|
|
10
|
-
import type { InboxController } from './types';
|
|
10
|
+
import type { InboxController } from './types.js';
|
|
11
11
|
export declare class InboxFeature implements IFeature {
|
|
12
12
|
readonly name = "inbox";
|
|
13
13
|
private ctx;
|