@storystick/preview 0.2.0-rc.3 → 0.2.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PUBLIC-API.md +2 -2
- package/dist/.source-hash +1 -1
- package/dist/framework/preview-copy.d.ts +42 -30
- package/dist/framework/preview-copy.js +19 -16
- package/dist/framework/preview-feedback.js +3 -1
- package/dist/page-presentation.d.ts +11 -21
- package/dist/page-presentation.js +86 -8
- package/dist/runtime/live-query-overlay.js +175 -4
- package/package.json +4 -4
package/PUBLIC-API.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @storystick/preview API contract
|
|
2
2
|
|
|
3
|
-
Install this candidate explicitly with `@storystick/preview@0.2.0-rc.
|
|
3
|
+
Install this candidate explicitly with `@storystick/preview@0.2.0-rc.5` after registry bootstrap and publication. This repository alone does not make the candidate or beta channel available on npm.
|
|
4
4
|
|
|
5
|
-
Version 0.2.0-rc.
|
|
5
|
+
Version 0.2.0-rc.5, cohort `sdk-0.2.0-rc.7`. ESM distribution; no CommonJS or universal Edge compatibility is promised.
|
|
6
6
|
|
|
7
7
|
This package supports the integration facades; installing it directly is an advanced use. Reserved contracts are required between SDK packages and must be upgraded with the same cohort. Their public export paths do not promise independent stability.
|
|
8
8
|
|
package/dist/.source-hash
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
17534ccc46db503b27f8e1d4ba0bf2964a3a824414d28e059e2c50c4a1433ea5
|
|
@@ -52,25 +52,33 @@ export declare const PREVIEW_COPY: {
|
|
|
52
52
|
readonly title: "Connecting preview";
|
|
53
53
|
readonly body: "Connecting this site to Studio.";
|
|
54
54
|
};
|
|
55
|
+
readonly "connection-delayed": {
|
|
56
|
+
readonly title: "Preview is taking longer";
|
|
57
|
+
readonly body: "The site hasn’t confirmed its connection to Studio yet.";
|
|
58
|
+
};
|
|
59
|
+
readonly "connection-unconfirmed": {
|
|
60
|
+
readonly title: "Preview couldn’t connect";
|
|
61
|
+
readonly body: "The site didn’t confirm its connection to Studio. Check that it is running and accessible, then retry.";
|
|
62
|
+
};
|
|
55
63
|
readonly "workspace-creating": {
|
|
56
|
-
readonly title: "Starting
|
|
57
|
-
readonly body: "Preparing the
|
|
64
|
+
readonly title: "Starting computer";
|
|
65
|
+
readonly body: "Preparing the computer for this working version.";
|
|
58
66
|
};
|
|
59
67
|
readonly "workspace-restoring": {
|
|
60
|
-
readonly title: "
|
|
61
|
-
readonly body: "Restoring
|
|
68
|
+
readonly title: "Waking computer";
|
|
69
|
+
readonly body: "Restoring its saved work.";
|
|
62
70
|
};
|
|
63
71
|
readonly "workspace-installing": {
|
|
64
|
-
readonly title: "Preparing
|
|
65
|
-
readonly body: "Installing the project’s dependencies. The first
|
|
72
|
+
readonly title: "Preparing computer";
|
|
73
|
+
readonly body: "Installing the project’s dependencies. The first wake can take longer.";
|
|
66
74
|
};
|
|
67
75
|
readonly "workspace-checking": {
|
|
68
76
|
readonly title: "Checking the project";
|
|
69
77
|
readonly body: "Checking this version before starting the site.";
|
|
70
78
|
};
|
|
71
79
|
readonly "workspace-launching": {
|
|
72
|
-
readonly title: "Starting
|
|
73
|
-
readonly body: "
|
|
80
|
+
readonly title: "Starting preview";
|
|
81
|
+
readonly body: "Launching the site on this computer.";
|
|
74
82
|
};
|
|
75
83
|
readonly "retained-loading": {
|
|
76
84
|
readonly title: "Loading {page}";
|
|
@@ -201,56 +209,60 @@ export declare const PREVIEW_COPY: {
|
|
|
201
209
|
readonly body: "";
|
|
202
210
|
};
|
|
203
211
|
readonly "workspace-unavailable": {
|
|
204
|
-
readonly title: "
|
|
205
|
-
readonly body: "This
|
|
212
|
+
readonly title: "Computer unavailable";
|
|
213
|
+
readonly body: "This computer isn’t available right now. Try opening it again.";
|
|
206
214
|
};
|
|
207
215
|
readonly "workspace-configuration": {
|
|
208
|
-
readonly title: "
|
|
209
|
-
readonly body: "A project administrator needs to complete
|
|
216
|
+
readonly title: "Computer needs setup";
|
|
217
|
+
readonly body: "A project administrator needs to complete setup before this computer can wake.";
|
|
218
|
+
};
|
|
219
|
+
readonly "workspace-network-configuration": {
|
|
220
|
+
readonly title: "Computer needs a private connection";
|
|
221
|
+
readonly body: "An administrator needs to configure its private preview connection. Code editing remains available.";
|
|
210
222
|
};
|
|
211
223
|
readonly "workspace-unconfirmed": {
|
|
212
|
-
readonly title: "
|
|
213
|
-
readonly body: "The
|
|
224
|
+
readonly title: "Computer status is unconfirmed";
|
|
225
|
+
readonly body: "The computer hasn’t confirmed the last operation. A project administrator can check its status before another attempt.";
|
|
214
226
|
};
|
|
215
227
|
readonly "workspace-stopped": {
|
|
216
|
-
readonly title: "
|
|
217
|
-
readonly body: "
|
|
228
|
+
readonly title: "Computer is asleep";
|
|
229
|
+
readonly body: "Wake it to preview this working version.";
|
|
218
230
|
};
|
|
219
231
|
readonly "workspace-start-failed": {
|
|
220
|
-
readonly title: "
|
|
221
|
-
readonly body: "
|
|
232
|
+
readonly title: "Computer couldn’t wake";
|
|
233
|
+
readonly body: "Try waking it again.";
|
|
222
234
|
};
|
|
223
235
|
readonly "workspace-not-prepared": {
|
|
224
|
-
readonly title: "
|
|
225
|
-
readonly body: "A project administrator needs to prepare this working version before
|
|
236
|
+
readonly title: "Computer isn’t set up";
|
|
237
|
+
readonly body: "A project administrator needs to prepare this working version before its computer can wake.";
|
|
226
238
|
};
|
|
227
239
|
readonly "workspace-forbidden": {
|
|
228
|
-
readonly title: "
|
|
229
|
-
readonly body: "A project administrator needs to
|
|
240
|
+
readonly title: "Computer needs project access";
|
|
241
|
+
readonly body: "A project administrator needs to wake this working version’s computer.";
|
|
230
242
|
};
|
|
231
243
|
readonly "workspace-limit": {
|
|
232
|
-
readonly title: "
|
|
233
|
-
readonly body: "This
|
|
244
|
+
readonly title: "Computer limit reached";
|
|
245
|
+
readonly body: "This computer has reached its usage limit. A project administrator can review it.";
|
|
234
246
|
};
|
|
235
247
|
readonly "workspace-near-limit": {
|
|
236
|
-
readonly title: "
|
|
248
|
+
readonly title: "Computer is nearing its limit";
|
|
237
249
|
readonly body: "";
|
|
238
250
|
};
|
|
239
251
|
readonly "workspace-recovery": {
|
|
240
252
|
readonly title: "Working files need recovery";
|
|
241
|
-
readonly body: "Some file changes need to be recovered before this
|
|
253
|
+
readonly body: "Some file changes need to be recovered before this computer can wake.";
|
|
242
254
|
};
|
|
243
255
|
readonly "workspace-switch-failed": {
|
|
244
256
|
readonly title: "Environment couldn’t change";
|
|
245
257
|
readonly body: "The requested environment couldn’t be selected.";
|
|
246
258
|
};
|
|
247
259
|
readonly "workspace-stop-failed": {
|
|
248
|
-
readonly title: "
|
|
249
|
-
readonly body: "The
|
|
260
|
+
readonly title: "Computer couldn’t sleep";
|
|
261
|
+
readonly body: "The computer didn’t confirm that it went to sleep.";
|
|
250
262
|
};
|
|
251
263
|
readonly "workspace-stopped-recovery": {
|
|
252
|
-
readonly title: "
|
|
253
|
-
readonly body: "Some file changes still need to be recovered before this
|
|
264
|
+
readonly title: "Computer asleep, files need recovery";
|
|
265
|
+
readonly body: "Some file changes still need to be recovered before this computer is used again.";
|
|
254
266
|
};
|
|
255
267
|
readonly "workspace-release": {
|
|
256
268
|
readonly title: "Select this working version’s content";
|
|
@@ -11,11 +11,13 @@ export const PREVIEW_COPY = {
|
|
|
11
11
|
"preparing": { "title": "Preparing preview", "body": "Your site will appear here when it’s ready." },
|
|
12
12
|
"page-loading": { "title": "Loading your site", "body": "Waiting for the page to respond." },
|
|
13
13
|
"connecting": { "title": "Connecting preview", "body": "Connecting this site to Studio." },
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"workspace-
|
|
14
|
+
"connection-delayed": { "title": "Preview is taking longer", "body": "The site hasn’t confirmed its connection to Studio yet." },
|
|
15
|
+
"connection-unconfirmed": { "title": "Preview couldn’t connect", "body": "The site didn’t confirm its connection to Studio. Check that it is running and accessible, then retry." },
|
|
16
|
+
"workspace-creating": { "title": "Starting computer", "body": "Preparing the computer for this working version." },
|
|
17
|
+
"workspace-restoring": { "title": "Waking computer", "body": "Restoring its saved work." },
|
|
18
|
+
"workspace-installing": { "title": "Preparing computer", "body": "Installing the project’s dependencies. The first wake can take longer." },
|
|
17
19
|
"workspace-checking": { "title": "Checking the project", "body": "Checking this version before starting the site." },
|
|
18
|
-
"workspace-launching": { "title": "Starting
|
|
20
|
+
"workspace-launching": { "title": "Starting preview", "body": "Launching the site on this computer." },
|
|
19
21
|
"retained-loading": { "title": "Loading {page}", "body": "The previous page is still shown." },
|
|
20
22
|
"updating": { "title": "Updating preview", "body": "Waiting for the updated page." },
|
|
21
23
|
"taking-longer": { "title": "Preview is taking longer", "body": "We’re still waiting for the requested page." },
|
|
@@ -48,19 +50,20 @@ export const PREVIEW_COPY = {
|
|
|
48
50
|
"visual-unavailable": { "title": "Page selection unavailable", "body": "The page’s editing controls couldn’t be confirmed. You can continue editing in Studio." },
|
|
49
51
|
"minimap-unavailable": { "title": "Minimap unavailable for this page", "body": "Open Preview to view this page without the minimap." },
|
|
50
52
|
"marker-diagnostic": { "title": "Editing markers need attention", "body": "" },
|
|
51
|
-
"workspace-unavailable": { "title": "
|
|
52
|
-
"workspace-configuration": { "title": "
|
|
53
|
-
"workspace-
|
|
54
|
-
"workspace-
|
|
55
|
-
"workspace-
|
|
56
|
-
"workspace-
|
|
57
|
-
"workspace-
|
|
58
|
-
"workspace-
|
|
59
|
-
"workspace-
|
|
60
|
-
"workspace-
|
|
53
|
+
"workspace-unavailable": { "title": "Computer unavailable", "body": "This computer isn’t available right now. Try opening it again." },
|
|
54
|
+
"workspace-configuration": { "title": "Computer needs setup", "body": "A project administrator needs to complete setup before this computer can wake." },
|
|
55
|
+
"workspace-network-configuration": { "title": "Computer needs a private connection", "body": "An administrator needs to configure its private preview connection. Code editing remains available." },
|
|
56
|
+
"workspace-unconfirmed": { "title": "Computer status is unconfirmed", "body": "The computer hasn’t confirmed the last operation. A project administrator can check its status before another attempt." },
|
|
57
|
+
"workspace-stopped": { "title": "Computer is asleep", "body": "Wake it to preview this working version." },
|
|
58
|
+
"workspace-start-failed": { "title": "Computer couldn’t wake", "body": "Try waking it again." },
|
|
59
|
+
"workspace-not-prepared": { "title": "Computer isn’t set up", "body": "A project administrator needs to prepare this working version before its computer can wake." },
|
|
60
|
+
"workspace-forbidden": { "title": "Computer needs project access", "body": "A project administrator needs to wake this working version’s computer." },
|
|
61
|
+
"workspace-limit": { "title": "Computer limit reached", "body": "This computer has reached its usage limit. A project administrator can review it." },
|
|
62
|
+
"workspace-near-limit": { "title": "Computer is nearing its limit", "body": "" },
|
|
63
|
+
"workspace-recovery": { "title": "Working files need recovery", "body": "Some file changes need to be recovered before this computer can wake." },
|
|
61
64
|
"workspace-switch-failed": { "title": "Environment couldn’t change", "body": "The requested environment couldn’t be selected." },
|
|
62
|
-
"workspace-stop-failed": { "title": "
|
|
63
|
-
"workspace-stopped-recovery": { "title": "
|
|
65
|
+
"workspace-stop-failed": { "title": "Computer couldn’t sleep", "body": "The computer didn’t confirm that it went to sleep." },
|
|
66
|
+
"workspace-stopped-recovery": { "title": "Computer asleep, files need recovery", "body": "Some file changes still need to be recovered before this computer is used again." },
|
|
64
67
|
"workspace-release": { "title": "Select this working version’s content", "body": "This environment belongs to {release}. Select it to preview its content." },
|
|
65
68
|
"workspace-selection-failed": { "title": "Working version couldn’t be selected", "body": "The requested content version couldn’t be applied." },
|
|
66
69
|
"field-hidden": { "title": "This field isn’t visible here", "body": "It’s on this page, but isn’t currently visible." },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PREVIEW_COPY } from './preview-copy.js';
|
|
2
2
|
const ACTION_LABELS = {
|
|
3
3
|
configure: 'Configure preview', reconnect: 'Reconnect preview', retry: 'Try again',
|
|
4
|
-
'retry-page': 'Retry this page', 'retry-start': 'Retry
|
|
4
|
+
'retry-page': 'Retry this page', 'retry-start': 'Retry wake', resume: 'Wake computer',
|
|
5
5
|
'current-site': 'Use current site', studio: 'Return to Studio', 'open-preview': 'Open Preview',
|
|
6
6
|
exit: 'Retry exit', editor: 'Open editor', 'choose-version': 'Choose a version',
|
|
7
7
|
};
|
|
@@ -62,6 +62,7 @@ export const PREVIEW_FEEDBACK = {
|
|
|
62
62
|
'runtime.preview_read_unavailable': feedback('content-unavailable', 'page', 'retry-page'),
|
|
63
63
|
'runtime.customer_render_failed': feedback('render-failed', 'page', 'retry-page'),
|
|
64
64
|
PREVIEW_CONVERGENCE_STOPPED: feedback('update-failed', 'page', 'retry-page'),
|
|
65
|
+
PREVIEW_CONNECTION_UNCONFIRMED: feedback('connection-unconfirmed', 'connection', 'retry-page'),
|
|
65
66
|
'runtime.PREVIEW_SCOPE_MISMATCH': feedback('scope-mismatch', 'page', 'retry-page', 'attention', { invalidatesPresentation: true }),
|
|
66
67
|
'runtime.PREVIEW_RELEASE_SCOPE_MISMATCH': feedback('scope-mismatch', 'page', 'retry-page', 'attention', { invalidatesPresentation: true }),
|
|
67
68
|
'runtime.preview_context_superseded': feedback('selection-superseded', 'page', 'choose-version', 'attention', { invalidatesPresentation: true }),
|
|
@@ -77,6 +78,7 @@ export const PREVIEW_FEEDBACK = {
|
|
|
77
78
|
PROJECT_WORKSPACE_NOT_ENABLED: workspaceSetup,
|
|
78
79
|
PROJECT_WORKSPACE_EXECUTION_DISABLED: workspaceSetup,
|
|
79
80
|
PROJECT_WORKSPACE_PROVIDER_NOT_CONFIGURED: workspaceSetup,
|
|
81
|
+
PROJECT_WORKSPACE_NETWORK_NOT_CONFIGURED: feedback('workspace-network-configuration', 'environment', 'current-site', 'attention', { diagnostic: false }),
|
|
80
82
|
PROJECT_WORKSPACE_PROVIDER_NAMESPACE_UNKNOWN: workspaceSetup,
|
|
81
83
|
PROJECT_WORKSPACE_PROVIDER_NAMESPACE_CHANGED: workspaceSetup,
|
|
82
84
|
PROJECT_WORKSPACE_RECIPE_CHANGED: workspaceSetup,
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
/** Framework-independent presentation for Preview's opening and failure pages.
|
|
2
2
|
* The activation route can render the same surface before any React runtime. */
|
|
3
|
-
export declare const STORYSTICK_MARK_VIEW_BOX = "0 0
|
|
4
|
-
export declare const
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
readonly width: 3;
|
|
14
|
-
readonly height: 11;
|
|
15
|
-
readonly rx: 1;
|
|
16
|
-
}, {
|
|
17
|
-
readonly x: 9;
|
|
18
|
-
readonly y: 6;
|
|
19
|
-
readonly width: 3;
|
|
20
|
-
readonly height: 5;
|
|
21
|
-
readonly rx: 1;
|
|
22
|
-
}];
|
|
3
|
+
export declare const STORYSTICK_MARK_VIEW_BOX = "0 0 18 18.001";
|
|
4
|
+
export declare const STORYSTICK_MARK_RECT: {
|
|
5
|
+
readonly y: 6.18701;
|
|
6
|
+
readonly width: 18;
|
|
7
|
+
readonly height: 5.62516;
|
|
8
|
+
readonly rx: 2.81258;
|
|
9
|
+
};
|
|
10
|
+
export declare const STORYSTICK_MARK_PATHS: readonly ["M0 2.81258C0 1.25923 1.25923 0 2.81258 0H14.1818V0C14.1818 3.10669 11.6634 5.62516 8.55666 5.62516H2.81258C1.25923 5.62516 0 4.36592 0 2.81258V2.81258Z", "M0 18.0002C0 14.8935 2.51847 12.375 5.62516 12.375H8.18182C9.68805 12.375 10.9091 13.596 10.9091 15.1023V15.1876C10.9091 16.7409 9.64986 18.0002 8.09651 18.0002H0V18.0002Z"];
|
|
11
|
+
export declare const STORYSTICK_WORDMARK_VIEW_BOX = "0 0 105 19";
|
|
12
|
+
export declare const STORYSTICK_WORDMARK_LETTERING = "M32.9265 6.55327C32.8701 6.03007 32.6347 5.62358 32.2202 5.33381C31.8097 5.04001 31.2744 4.89311 30.6143\n4.89311C30.1515 4.89311 29.7551 4.96153 29.4251 5.09837C29.0951 5.2352 28.8415 5.42436 28.6644 5.66584C28.4914\n5.90329 28.4048 6.17495 28.4048 6.48082C28.4008 6.73437 28.4571 6.95573 28.5739 7.14489C28.6946 7.33002 28.8556\n7.48698 29.0568 7.61577C29.258 7.74455 29.4814 7.85322 29.7269 7.94176C29.9764 8.0303 30.23 8.10476 30.4876\n8.16513L31.6406 8.4549C32.1155 8.56357 32.5703 8.71248 33.005 8.90163C33.4396 9.08677 33.828 9.32019 34.1701\n9.60192C34.5122 9.88364 34.7818 10.2237 34.979 10.6222C35.1803 11.0206 35.2809 11.4875 35.2809 12.0227C35.2809\n12.7512 35.0938 13.3911 34.7195 13.9425C34.3492 14.4898 33.8139 14.9184 33.1136 15.2283C32.4174 15.5342 31.5742\n15.6871 30.5842 15.6871C29.6183 15.6871 28.7791 15.5382 28.0668 15.2404C27.3584 14.9386 26.805 14.5019 26.4066\n13.9304C26.0082 13.3549 25.7929 12.6526 25.7607 11.8235H28.0004C28.0326 12.2541 28.1634 12.6123 28.3928\n12.8981C28.6222 13.1798 28.924 13.3931 29.2983 13.538C29.6766 13.6789 30.0972 13.7493 30.56 13.7493C31.043\n13.7493 31.4656 13.6768 31.8278 13.532C32.194 13.383 32.4798 13.1778 32.685 12.9162C32.8943 12.6546 32.9989\n12.3527 32.9989 12.0107C32.9989 11.6927 32.9064 11.4291 32.7212 11.2198C32.5401 11.0105 32.2846 10.8355 31.9545\n10.6946C31.6245 10.5497 31.2362 10.4209 30.7894 10.3082L29.3949 9.94602C28.3726 9.68442 27.5657 9.288 26.9741\n8.75675C26.3825 8.22147 26.0887 7.51113 26.0927 6.62571C26.0887 5.89323 26.2839 5.25331 26.6783 4.70597C27.0767\n4.15862 27.62 3.73201 28.3082 3.42614C28.9964 3.12026 29.7732 2.96733 30.6385 2.96733C31.5199 2.96733 32.2926\n3.12026 32.9567 3.42614C33.6248 3.72798 34.148 4.14856 34.5263 4.68785C34.9046 5.22715 35.0998 5.84896 35.1119\n6.55327H32.9265ZM41.2163 6.22727V7.94176H35.8676V6.22727H41.2163ZM37.1716 4.00568H39.3992V12.7049C39.3992\n12.9947 39.4435 13.216 39.532 13.369C39.6206 13.5179 39.7373 13.6205 39.8822 13.6768C40.0311 13.7332 40.1961\n13.7614 40.3772 13.7614C40.51 13.7614 40.6328 13.7513 40.7455 13.7312C40.8622 13.7111 40.9527 13.695 41.0171\n13.6829L41.3854 15.4034C41.2687 15.4437 41.1016 15.4879 40.8843 15.5362C40.667 15.5885 40.4034 15.6187 40.0935\n15.6268C39.5381 15.6429 39.039 15.5604 38.5963 15.3793C38.1576 15.1941 37.8095 14.9084 37.5519 14.522C37.2984\n14.1357 37.1716 13.6487 37.1716 13.0611V4.00568ZM46.3987 15.6811C45.4891 15.6811 44.7003 15.4819 44.0322\n15.0835C43.3681 14.685 42.853 14.1276 42.4868 13.4112C42.1245 12.6908 41.9434 11.8537 41.9434 10.8999C41.9434\n9.942 42.1245 9.10286 42.4868 8.38246C42.853 7.66205 43.3681 7.10263 44.0322 6.70419C44.7003 6.30575 45.4891\n6.10653 46.3987 6.10653C47.3042 6.10653 48.089 6.30575 48.7531 6.70419C49.4212 7.10263 49.9383 7.66205 50.3046\n8.38246C50.6708 9.10286 50.8539 9.942 50.8539 10.8999C50.8539 11.8537 50.6708 12.6908 50.3046 13.4112C49.9383\n14.1276 49.4212 14.685 48.7531 15.0835C48.089 15.4819 47.3042 15.6811 46.3987 15.6811ZM46.4047 13.9062C46.8957\n13.9062 47.3022 13.7734 47.6242 13.5078C47.9502 13.2382 48.1937 12.8759 48.3547 12.4212C48.5156 11.9624 48.5961\n11.4532 48.5961 10.8938C48.5961 10.3263 48.5156 9.81522 48.3547 9.36044C48.1937 8.90566 47.9502 8.54344 47.6242\n8.27379C47.3022 8.00012 46.8957 7.86328 46.4047 7.86328C45.9137 7.86328 45.5032 8.00012 45.1732 8.27379C44.8472\n8.54344 44.6037 8.90566 44.4427 9.36044C44.2817 9.81522 44.2012 10.3263 44.2012 10.8938C44.2012 11.4532 44.2817\n11.9624 44.4427 12.4212C44.6037 12.8759 44.8472 13.2382 45.1732 13.5078C45.5032 13.7734 45.9137 13.9062 46.4047\n13.9062ZM52.0836 15.5V6.22727H54.2388V7.77876H54.3354C54.5044 7.23947 54.7942 6.82493 55.2047 6.53516C55.6192\n6.24136 56.0921 6.09446 56.6234 6.09446C56.7441 6.09446 56.8789 6.1005 57.0279 6.11257C57.1808 6.12062 57.3076\n6.13672 57.4082 6.16087V8.19531C57.3116 8.16312 57.1627 8.13494 56.9614 8.1108C56.7602 8.08262 56.569 8.06854\n56.3879 8.06854C55.9895 8.06854 55.6333 8.15305 55.3194 8.32209C55.0055 8.49112 54.758 8.72656 54.5769\n9.02841C54.3998 9.33026 54.3112 9.67637 54.3112 10.0668V15.5H52.0836ZM59.9101 18.9773C59.6123 18.9773 59.3346\n18.9531 59.077 18.9048C58.8235 18.8606 58.6202 18.8062 58.4673 18.7418L58.9804 17.0213C59.2984 17.1139 59.5821\n17.1581 59.8316 17.1541C60.0812 17.1541 60.3005 17.0797 60.4897 16.9308C60.6788 16.7818 60.8378 16.5363 60.9666\n16.1942L61.1537 15.6992L57.7912 6.22727H60.1516L62.2645 13.212H62.3611L64.4861 6.22727H66.8526L63.1459\n16.6108C62.9729 17.1018 62.7435 17.5244 62.4577 17.8786C62.172 18.2327 61.8198 18.5044 61.4012 18.6935C60.9827\n18.8827 60.4856 18.9773 59.9101 18.9773ZM75.1153 8.70241L73.0808 8.90767C73.0285 8.70644 72.9319 8.51929 72.7911\n8.34624C72.6542 8.16915 72.4691 8.02628 72.2357 7.91761C72.0063 7.80895 71.7266 7.75462 71.3965 7.75462C70.9458\n7.75462 70.5675 7.85322 70.2616 8.05043C69.9598 8.24361 69.8088 8.49515 69.8088 8.80504C69.8088 9.06664 69.9094\n9.28196 70.1107 9.45099C70.3119 9.62003 70.6439 9.75687 71.1068 9.86151L72.7005 10.1996C73.5779 10.3887 74.2319\n10.6906 74.6625 11.1051C75.0932 11.5156 75.3105 12.0509 75.3145 12.7109C75.3105 13.2985 75.1394 13.8157 74.8014\n14.2624C74.4633 14.7092 73.9944 15.0573 73.3948 15.3068C72.7991 15.5563 72.1129 15.6811 71.3362 15.6811C70.1932\n15.6811 69.2736 15.4416 68.5773 14.9627C67.8851 14.4798 67.4705 13.8097 67.3337 12.9524L69.507 12.7592C69.5995\n13.1697 69.8028 13.4817 70.1167 13.695C70.4306 13.9042 70.8351 14.0089 71.3301 14.0089C71.8453 14.0089 72.2578\n13.9062 72.5677 13.701C72.8816 13.4917 73.0386 13.2301 73.0386 12.9162C73.0386 12.6546 72.936 12.4393 72.7307\n12.2702C72.5295 12.0972 72.2176 11.9664 71.795 11.8778L70.2073 11.5458C69.3178 11.3607 68.6598 11.0488 68.2332\n10.6101C67.8066 10.1674 67.5933 9.60795 67.5933 8.93182C67.5933 8.3563 67.7502 7.85724 68.0642 7.43466C68.3821\n7.01207 68.8248 6.68608 69.3923 6.45668C69.9598 6.22325 70.6178 6.10653 71.3664 6.10653C72.4611 6.10653 73.3223\n6.33996 73.9502 6.80682C74.582 7.27367 74.9704 7.90554 75.1153 8.70241ZM81.1564\n6.22727V7.94176H75.8077V6.22727H81.1564ZM77.1116 4.00568H79.3393V12.7049C79.3393 12.9947 79.3835 13.216 79.4721\n13.369C79.5606 13.5179 79.6773 13.6205 79.8222 13.6768C79.9711 13.7332 80.1361 13.7614 80.3173 13.7614C80.4501\n13.7614 80.5728 13.7513 80.6855 13.7312C80.8022 13.7111 80.8928 13.695 80.9572 13.6829L81.3254 15.4034C81.2087\n15.4437 81.0417 15.4879 80.8244 15.5362C80.607 15.5885 80.3434 15.6187 80.0335 15.6268C79.4781 15.6429 78.9791\n15.5604 78.5364 15.3793C78.0977 15.1941 77.7495 14.9084 77.492 14.522C77.2384 14.1357 77.1116 13.6487 77.1116\n13.0611V4.00568ZM82.3755 15.5V6.22727H84.6031V15.5H82.3755ZM83.4984 4.9233C83.1482 4.9233 82.8464 4.80658\n82.5928 4.57315C82.3433 4.33973 82.2185 4.058 82.2185 3.72798C82.2185 3.39796 82.3433 3.11624 82.5928\n2.88281C82.8464 2.64536 83.1482 2.52663 83.4984 2.52663C83.8485 2.52663 84.1483 2.64536 84.3979 2.88281C84.6474\n3.11624 84.7721 3.39796 84.7721 3.72798C84.7721 4.058 84.6474 4.33973 84.3979 4.57315C84.1483 4.80658 83.8485\n4.9233 83.4984 4.9233ZM90.2926 15.6811C89.3669 15.6811 88.57 15.4779 87.9019 15.0714C87.2379 14.6649 86.7267\n14.1035 86.3685 13.3871C86.0144 12.6667 85.8373 11.8376 85.8373 10.8999C85.8373 9.95407 86.0184 9.12098 86.3806\n8.40057C86.7428 7.68016 87.256 7.11873 87.92 6.71626C88.5841 6.30978 89.3689 6.10653 90.2744 6.10653C91.0351\n6.10653 91.7072 6.24538 92.2908 6.52308C92.8744 6.80078 93.3392 7.19117 93.6853 7.69425C94.0355 8.19732 94.2347\n8.78693 94.283 9.46307H92.158C92.0775 9.01231 91.8783 8.63802 91.5603 8.3402C91.2464 8.04238 90.8298 7.89347\n90.3107 7.89347C89.868 7.89347 89.4796 8.01219 89.1455 8.24964C88.8115 8.4871 88.5519 8.82718 88.3668\n9.26989C88.1857 9.71259 88.0951 10.2438 88.0951 10.8636C88.0951 11.4915 88.1857 12.0308 88.3668 12.4815C88.5479\n12.9283 88.8055 13.2724 89.1395 13.5138C89.4735 13.7553 89.8639 13.8761 90.3107 13.8761C90.6286 13.8761 90.9144\n13.8157 91.1679 13.695C91.4255 13.5702 91.6388 13.3911 91.8078 13.1577C91.9809 12.9242 92.0976 12.6405 92.158\n12.3065H94.283C94.2306 12.9705 94.0355 13.5561 93.6974 14.0632C93.3633 14.5703 92.9065 14.9667 92.327\n15.2525C91.7515 15.5382 91.0733 15.6811 90.2926 15.6811ZM97.4912 12.6143L97.4852 9.92791H97.8353L101.132\n6.22727H103.727L99.6404 10.8033H99.1755L97.4912 12.6143ZM95.4628 15.5V3.13636H97.6905V15.5H95.4628ZM101.282\n15.5L98.2881 11.2983L99.7913 9.72869L103.939 15.5H101.282Z";
|
|
23
13
|
export declare const PREVIEW_PAGE_BRAND_HTML: string;
|
|
24
|
-
export declare const PREVIEW_PAGE_STYLES = "\n [data-ss-preview-page] { box-sizing: border-box; display: flex; min-height: 100svh; width: 100%; padding: 32px 24px; background: var(--ss-surface-page, #fff); color: var(--ss-text-primary, oklch(.2 .007 258.364)); font: 400 14px/20px \"Storystick Inter\", \"Inter Variable\", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; color-scheme: light; }\n [data-ss-preview-page-content] { width: 100%; max-width: 360px; margin: auto; text-align: center; overflow-wrap: anywhere; }\n [data-ss-preview-page-brand] { display: flex; align-items: center; justify-content: center;
|
|
14
|
+
export declare const PREVIEW_PAGE_STYLES = "\n [data-ss-preview-page] { box-sizing: border-box; display: flex; min-height: 100svh; width: 100%; padding: 32px 24px; background: var(--ss-surface-page, #fff); color: var(--ss-text-primary, oklch(.2 .007 258.364)); font: 400 14px/20px \"Storystick Inter\", \"Inter Variable\", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; color-scheme: light; }\n [data-ss-preview-page-content] { width: 100%; max-width: 360px; margin: auto; text-align: center; overflow-wrap: anywhere; }\n [data-ss-preview-page-brand] { display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }\n [data-ss-preview-page-brand] svg { flex: none; width: auto; height: 16px; }\n [data-ss-preview-page-heading] { display: flex; align-items: center; justify-content: center; gap: 10px; }\n [data-ss-preview-page-title] { margin: 0; color: inherit; font: inherit; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }\n [data-ss-preview-page-description] { margin: 12px 0 0; color: var(--ss-text-secondary, oklch(.471 .006 258.364)); font: inherit; text-wrap: pretty; }\n [data-ss-preview-page-actions] { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }\n [data-ss-preview-page-action] { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--ss-surface-card, #fff); color: inherit; box-shadow: var(--ss-shadow-control, 0 0 1px rgb(0 0 0 / .22), 0 2px 4px rgb(0 0 0 / .04)); font: inherit; line-height: 20px; text-decoration: none; cursor: pointer; transition: background-color 140ms ease; }\n [data-ss-preview-page-action]:hover { background: var(--ss-surface-field, oklch(.958 .001 255)); }\n [data-ss-preview-page-action='primary'] { background: var(--ss-text-primary, oklch(.2 .007 258.364)); color: #fff; box-shadow: none; }\n [data-ss-preview-page-action='primary']:hover { background: #303034; }\n [data-ss-preview-page-action]:focus-visible, [data-ss-preview-page] summary:focus-visible { outline: 2px solid var(--ss-focus-color, oklch(.614 .194 257)); outline-offset: 3px; }\n [data-ss-preview-page] details { margin-top: 24px; color: var(--ss-text-secondary, oklch(.471 .006 258.364)); font-size: 12px; line-height: 18px; }\n [data-ss-preview-page] summary { width: fit-content; margin-inline: auto; border-radius: 4px; cursor: pointer; }\n [data-ss-preview-page] pre { box-sizing: border-box; max-height: 240px; margin: 12px 0 0; overflow: auto; padding: 12px; border-radius: 12px; background: var(--ss-surface-field, oklch(.958 .001 255)); font: 12px/18px ui-monospace, monospace; white-space: pre-wrap; text-align: left; }\n [data-ss-preview-page-progress] { position: relative; display: inline-block; flex: none; width: 15px; height: 15px; color: var(--ss-text-tertiary, oklch(.515 .006 258.364)); animation: ss-preview-page-orbit 720ms linear infinite; }\n [data-ss-preview-page-progress]::before { content: ''; position: absolute; inset: 0; box-sizing: border-box; border: 2px solid currentColor; border-radius: 50%; opacity: .2; }\n [data-ss-preview-page-progress]::after { content: ''; position: absolute; top: 1px; left: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }\n @keyframes ss-preview-page-orbit { to { transform: rotate(360deg); } }\n @media (prefers-reduced-motion: reduce) { [data-ss-preview-page-progress] { animation: none; } [data-ss-preview-page-action] { transition: none; } }\n";
|
|
@@ -1,17 +1,95 @@
|
|
|
1
1
|
/** Framework-independent presentation for Preview's opening and failure pages.
|
|
2
2
|
* The activation route can render the same surface before any React runtime. */
|
|
3
|
-
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
// Storystick Design System, Figma 2127:20 and 2127:27 (same geometry).
|
|
4
|
+
export const STORYSTICK_MARK_VIEW_BOX = '0 0 18 18.001';
|
|
5
|
+
export const STORYSTICK_MARK_RECT = { y: 6.18701, width: 18, height: 5.62516, rx: 2.81258 };
|
|
6
|
+
export const STORYSTICK_MARK_PATHS = [
|
|
7
|
+
'M0 2.81258C0 1.25923 1.25923 0 2.81258 0H14.1818V0C14.1818 3.10669 11.6634 5.62516 8.55666 5.62516H2.81258C1.25923 5.62516 0 4.36592 0 2.81258V2.81258Z',
|
|
8
|
+
'M0 18.0002C0 14.8935 2.51847 12.375 5.62516 12.375H8.18182C9.68805 12.375 10.9091 13.596 10.9091 15.1023V15.1876C10.9091 16.7409 9.64986 18.0002 8.09651 18.0002H0V18.0002Z',
|
|
8
9
|
];
|
|
9
|
-
export const
|
|
10
|
+
export const STORYSTICK_WORDMARK_VIEW_BOX = '0 0 105 19';
|
|
11
|
+
export const STORYSTICK_WORDMARK_LETTERING = `M32.9265 6.55327C32.8701 6.03007 32.6347 5.62358 32.2202 5.33381C31.8097 5.04001 31.2744 4.89311 30.6143
|
|
12
|
+
4.89311C30.1515 4.89311 29.7551 4.96153 29.4251 5.09837C29.0951 5.2352 28.8415 5.42436 28.6644 5.66584C28.4914
|
|
13
|
+
5.90329 28.4048 6.17495 28.4048 6.48082C28.4008 6.73437 28.4571 6.95573 28.5739 7.14489C28.6946 7.33002 28.8556
|
|
14
|
+
7.48698 29.0568 7.61577C29.258 7.74455 29.4814 7.85322 29.7269 7.94176C29.9764 8.0303 30.23 8.10476 30.4876
|
|
15
|
+
8.16513L31.6406 8.4549C32.1155 8.56357 32.5703 8.71248 33.005 8.90163C33.4396 9.08677 33.828 9.32019 34.1701
|
|
16
|
+
9.60192C34.5122 9.88364 34.7818 10.2237 34.979 10.6222C35.1803 11.0206 35.2809 11.4875 35.2809 12.0227C35.2809
|
|
17
|
+
12.7512 35.0938 13.3911 34.7195 13.9425C34.3492 14.4898 33.8139 14.9184 33.1136 15.2283C32.4174 15.5342 31.5742
|
|
18
|
+
15.6871 30.5842 15.6871C29.6183 15.6871 28.7791 15.5382 28.0668 15.2404C27.3584 14.9386 26.805 14.5019 26.4066
|
|
19
|
+
13.9304C26.0082 13.3549 25.7929 12.6526 25.7607 11.8235H28.0004C28.0326 12.2541 28.1634 12.6123 28.3928
|
|
20
|
+
12.8981C28.6222 13.1798 28.924 13.3931 29.2983 13.538C29.6766 13.6789 30.0972 13.7493 30.56 13.7493C31.043
|
|
21
|
+
13.7493 31.4656 13.6768 31.8278 13.532C32.194 13.383 32.4798 13.1778 32.685 12.9162C32.8943 12.6546 32.9989
|
|
22
|
+
12.3527 32.9989 12.0107C32.9989 11.6927 32.9064 11.4291 32.7212 11.2198C32.5401 11.0105 32.2846 10.8355 31.9545
|
|
23
|
+
10.6946C31.6245 10.5497 31.2362 10.4209 30.7894 10.3082L29.3949 9.94602C28.3726 9.68442 27.5657 9.288 26.9741
|
|
24
|
+
8.75675C26.3825 8.22147 26.0887 7.51113 26.0927 6.62571C26.0887 5.89323 26.2839 5.25331 26.6783 4.70597C27.0767
|
|
25
|
+
4.15862 27.62 3.73201 28.3082 3.42614C28.9964 3.12026 29.7732 2.96733 30.6385 2.96733C31.5199 2.96733 32.2926
|
|
26
|
+
3.12026 32.9567 3.42614C33.6248 3.72798 34.148 4.14856 34.5263 4.68785C34.9046 5.22715 35.0998 5.84896 35.1119
|
|
27
|
+
6.55327H32.9265ZM41.2163 6.22727V7.94176H35.8676V6.22727H41.2163ZM37.1716 4.00568H39.3992V12.7049C39.3992
|
|
28
|
+
12.9947 39.4435 13.216 39.532 13.369C39.6206 13.5179 39.7373 13.6205 39.8822 13.6768C40.0311 13.7332 40.1961
|
|
29
|
+
13.7614 40.3772 13.7614C40.51 13.7614 40.6328 13.7513 40.7455 13.7312C40.8622 13.7111 40.9527 13.695 41.0171
|
|
30
|
+
13.6829L41.3854 15.4034C41.2687 15.4437 41.1016 15.4879 40.8843 15.5362C40.667 15.5885 40.4034 15.6187 40.0935
|
|
31
|
+
15.6268C39.5381 15.6429 39.039 15.5604 38.5963 15.3793C38.1576 15.1941 37.8095 14.9084 37.5519 14.522C37.2984
|
|
32
|
+
14.1357 37.1716 13.6487 37.1716 13.0611V4.00568ZM46.3987 15.6811C45.4891 15.6811 44.7003 15.4819 44.0322
|
|
33
|
+
15.0835C43.3681 14.685 42.853 14.1276 42.4868 13.4112C42.1245 12.6908 41.9434 11.8537 41.9434 10.8999C41.9434
|
|
34
|
+
9.942 42.1245 9.10286 42.4868 8.38246C42.853 7.66205 43.3681 7.10263 44.0322 6.70419C44.7003 6.30575 45.4891
|
|
35
|
+
6.10653 46.3987 6.10653C47.3042 6.10653 48.089 6.30575 48.7531 6.70419C49.4212 7.10263 49.9383 7.66205 50.3046
|
|
36
|
+
8.38246C50.6708 9.10286 50.8539 9.942 50.8539 10.8999C50.8539 11.8537 50.6708 12.6908 50.3046 13.4112C49.9383
|
|
37
|
+
14.1276 49.4212 14.685 48.7531 15.0835C48.089 15.4819 47.3042 15.6811 46.3987 15.6811ZM46.4047 13.9062C46.8957
|
|
38
|
+
13.9062 47.3022 13.7734 47.6242 13.5078C47.9502 13.2382 48.1937 12.8759 48.3547 12.4212C48.5156 11.9624 48.5961
|
|
39
|
+
11.4532 48.5961 10.8938C48.5961 10.3263 48.5156 9.81522 48.3547 9.36044C48.1937 8.90566 47.9502 8.54344 47.6242
|
|
40
|
+
8.27379C47.3022 8.00012 46.8957 7.86328 46.4047 7.86328C45.9137 7.86328 45.5032 8.00012 45.1732 8.27379C44.8472
|
|
41
|
+
8.54344 44.6037 8.90566 44.4427 9.36044C44.2817 9.81522 44.2012 10.3263 44.2012 10.8938C44.2012 11.4532 44.2817
|
|
42
|
+
11.9624 44.4427 12.4212C44.6037 12.8759 44.8472 13.2382 45.1732 13.5078C45.5032 13.7734 45.9137 13.9062 46.4047
|
|
43
|
+
13.9062ZM52.0836 15.5V6.22727H54.2388V7.77876H54.3354C54.5044 7.23947 54.7942 6.82493 55.2047 6.53516C55.6192
|
|
44
|
+
6.24136 56.0921 6.09446 56.6234 6.09446C56.7441 6.09446 56.8789 6.1005 57.0279 6.11257C57.1808 6.12062 57.3076
|
|
45
|
+
6.13672 57.4082 6.16087V8.19531C57.3116 8.16312 57.1627 8.13494 56.9614 8.1108C56.7602 8.08262 56.569 8.06854
|
|
46
|
+
56.3879 8.06854C55.9895 8.06854 55.6333 8.15305 55.3194 8.32209C55.0055 8.49112 54.758 8.72656 54.5769
|
|
47
|
+
9.02841C54.3998 9.33026 54.3112 9.67637 54.3112 10.0668V15.5H52.0836ZM59.9101 18.9773C59.6123 18.9773 59.3346
|
|
48
|
+
18.9531 59.077 18.9048C58.8235 18.8606 58.6202 18.8062 58.4673 18.7418L58.9804 17.0213C59.2984 17.1139 59.5821
|
|
49
|
+
17.1581 59.8316 17.1541C60.0812 17.1541 60.3005 17.0797 60.4897 16.9308C60.6788 16.7818 60.8378 16.5363 60.9666
|
|
50
|
+
16.1942L61.1537 15.6992L57.7912 6.22727H60.1516L62.2645 13.212H62.3611L64.4861 6.22727H66.8526L63.1459
|
|
51
|
+
16.6108C62.9729 17.1018 62.7435 17.5244 62.4577 17.8786C62.172 18.2327 61.8198 18.5044 61.4012 18.6935C60.9827
|
|
52
|
+
18.8827 60.4856 18.9773 59.9101 18.9773ZM75.1153 8.70241L73.0808 8.90767C73.0285 8.70644 72.9319 8.51929 72.7911
|
|
53
|
+
8.34624C72.6542 8.16915 72.4691 8.02628 72.2357 7.91761C72.0063 7.80895 71.7266 7.75462 71.3965 7.75462C70.9458
|
|
54
|
+
7.75462 70.5675 7.85322 70.2616 8.05043C69.9598 8.24361 69.8088 8.49515 69.8088 8.80504C69.8088 9.06664 69.9094
|
|
55
|
+
9.28196 70.1107 9.45099C70.3119 9.62003 70.6439 9.75687 71.1068 9.86151L72.7005 10.1996C73.5779 10.3887 74.2319
|
|
56
|
+
10.6906 74.6625 11.1051C75.0932 11.5156 75.3105 12.0509 75.3145 12.7109C75.3105 13.2985 75.1394 13.8157 74.8014
|
|
57
|
+
14.2624C74.4633 14.7092 73.9944 15.0573 73.3948 15.3068C72.7991 15.5563 72.1129 15.6811 71.3362 15.6811C70.1932
|
|
58
|
+
15.6811 69.2736 15.4416 68.5773 14.9627C67.8851 14.4798 67.4705 13.8097 67.3337 12.9524L69.507 12.7592C69.5995
|
|
59
|
+
13.1697 69.8028 13.4817 70.1167 13.695C70.4306 13.9042 70.8351 14.0089 71.3301 14.0089C71.8453 14.0089 72.2578
|
|
60
|
+
13.9062 72.5677 13.701C72.8816 13.4917 73.0386 13.2301 73.0386 12.9162C73.0386 12.6546 72.936 12.4393 72.7307
|
|
61
|
+
12.2702C72.5295 12.0972 72.2176 11.9664 71.795 11.8778L70.2073 11.5458C69.3178 11.3607 68.6598 11.0488 68.2332
|
|
62
|
+
10.6101C67.8066 10.1674 67.5933 9.60795 67.5933 8.93182C67.5933 8.3563 67.7502 7.85724 68.0642 7.43466C68.3821
|
|
63
|
+
7.01207 68.8248 6.68608 69.3923 6.45668C69.9598 6.22325 70.6178 6.10653 71.3664 6.10653C72.4611 6.10653 73.3223
|
|
64
|
+
6.33996 73.9502 6.80682C74.582 7.27367 74.9704 7.90554 75.1153 8.70241ZM81.1564
|
|
65
|
+
6.22727V7.94176H75.8077V6.22727H81.1564ZM77.1116 4.00568H79.3393V12.7049C79.3393 12.9947 79.3835 13.216 79.4721
|
|
66
|
+
13.369C79.5606 13.5179 79.6773 13.6205 79.8222 13.6768C79.9711 13.7332 80.1361 13.7614 80.3173 13.7614C80.4501
|
|
67
|
+
13.7614 80.5728 13.7513 80.6855 13.7312C80.8022 13.7111 80.8928 13.695 80.9572 13.6829L81.3254 15.4034C81.2087
|
|
68
|
+
15.4437 81.0417 15.4879 80.8244 15.5362C80.607 15.5885 80.3434 15.6187 80.0335 15.6268C79.4781 15.6429 78.9791
|
|
69
|
+
15.5604 78.5364 15.3793C78.0977 15.1941 77.7495 14.9084 77.492 14.522C77.2384 14.1357 77.1116 13.6487 77.1116
|
|
70
|
+
13.0611V4.00568ZM82.3755 15.5V6.22727H84.6031V15.5H82.3755ZM83.4984 4.9233C83.1482 4.9233 82.8464 4.80658
|
|
71
|
+
82.5928 4.57315C82.3433 4.33973 82.2185 4.058 82.2185 3.72798C82.2185 3.39796 82.3433 3.11624 82.5928
|
|
72
|
+
2.88281C82.8464 2.64536 83.1482 2.52663 83.4984 2.52663C83.8485 2.52663 84.1483 2.64536 84.3979 2.88281C84.6474
|
|
73
|
+
3.11624 84.7721 3.39796 84.7721 3.72798C84.7721 4.058 84.6474 4.33973 84.3979 4.57315C84.1483 4.80658 83.8485
|
|
74
|
+
4.9233 83.4984 4.9233ZM90.2926 15.6811C89.3669 15.6811 88.57 15.4779 87.9019 15.0714C87.2379 14.6649 86.7267
|
|
75
|
+
14.1035 86.3685 13.3871C86.0144 12.6667 85.8373 11.8376 85.8373 10.8999C85.8373 9.95407 86.0184 9.12098 86.3806
|
|
76
|
+
8.40057C86.7428 7.68016 87.256 7.11873 87.92 6.71626C88.5841 6.30978 89.3689 6.10653 90.2744 6.10653C91.0351
|
|
77
|
+
6.10653 91.7072 6.24538 92.2908 6.52308C92.8744 6.80078 93.3392 7.19117 93.6853 7.69425C94.0355 8.19732 94.2347
|
|
78
|
+
8.78693 94.283 9.46307H92.158C92.0775 9.01231 91.8783 8.63802 91.5603 8.3402C91.2464 8.04238 90.8298 7.89347
|
|
79
|
+
90.3107 7.89347C89.868 7.89347 89.4796 8.01219 89.1455 8.24964C88.8115 8.4871 88.5519 8.82718 88.3668
|
|
80
|
+
9.26989C88.1857 9.71259 88.0951 10.2438 88.0951 10.8636C88.0951 11.4915 88.1857 12.0308 88.3668 12.4815C88.5479
|
|
81
|
+
12.9283 88.8055 13.2724 89.1395 13.5138C89.4735 13.7553 89.8639 13.8761 90.3107 13.8761C90.6286 13.8761 90.9144
|
|
82
|
+
13.8157 91.1679 13.695C91.4255 13.5702 91.6388 13.3911 91.8078 13.1577C91.9809 12.9242 92.0976 12.6405 92.158
|
|
83
|
+
12.3065H94.283C94.2306 12.9705 94.0355 13.5561 93.6974 14.0632C93.3633 14.5703 92.9065 14.9667 92.327
|
|
84
|
+
15.2525C91.7515 15.5382 91.0733 15.6811 90.2926 15.6811ZM97.4912 12.6143L97.4852 9.92791H97.8353L101.132
|
|
85
|
+
6.22727H103.727L99.6404 10.8033H99.1755L97.4912 12.6143ZM95.4628 15.5V3.13636H97.6905V15.5H95.4628ZM101.282
|
|
86
|
+
15.5L98.2881 11.2983L99.7913 9.72869L103.939 15.5H101.282Z`;
|
|
87
|
+
export const PREVIEW_PAGE_BRAND_HTML = `<div data-ss-preview-page-brand><svg viewBox="${STORYSTICK_WORDMARK_VIEW_BOX}" fill="currentColor" role="img" aria-label="Storystick"><rect y="${STORYSTICK_MARK_RECT.y}" width="${STORYSTICK_MARK_RECT.width}" height="${STORYSTICK_MARK_RECT.height}" rx="${STORYSTICK_MARK_RECT.rx}" /><path d="${STORYSTICK_MARK_PATHS[0]}" /><path d="${STORYSTICK_MARK_PATHS[1]}" /><path d="${STORYSTICK_WORDMARK_LETTERING}" /></svg></div>`;
|
|
10
88
|
export const PREVIEW_PAGE_STYLES = `
|
|
11
89
|
[data-ss-preview-page] { box-sizing: border-box; display: flex; min-height: 100svh; width: 100%; padding: 32px 24px; background: var(--ss-surface-page, #fff); color: var(--ss-text-primary, oklch(.2 .007 258.364)); font: 400 14px/20px "Storystick Inter", "Inter Variable", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; color-scheme: light; }
|
|
12
90
|
[data-ss-preview-page-content] { width: 100%; max-width: 360px; margin: auto; text-align: center; overflow-wrap: anywhere; }
|
|
13
|
-
[data-ss-preview-page-brand] { display: flex; align-items: center; justify-content: center;
|
|
14
|
-
[data-ss-preview-page-brand] svg { flex: none; width:
|
|
91
|
+
[data-ss-preview-page-brand] { display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }
|
|
92
|
+
[data-ss-preview-page-brand] svg { flex: none; width: auto; height: 16px; }
|
|
15
93
|
[data-ss-preview-page-heading] { display: flex; align-items: center; justify-content: center; gap: 10px; }
|
|
16
94
|
[data-ss-preview-page-title] { margin: 0; color: inherit; font: inherit; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
|
|
17
95
|
[data-ss-preview-page-description] { margin: 12px 0 0; color: var(--ss-text-secondary, oklch(.471 .006 258.364)); font: inherit; text-wrap: pretty; }
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { decodePreviewProvenanceText, encodePreviewProvenanceText } from '@storystick/types/internal/preview-provenance';
|
|
1
2
|
import { PREVIEW_LIVE_QUERY_MAX_QUERIES, PREVIEW_NAMESPACE, PREVIEW_PROTOCOL_VERSION, validatePreviewEnvelope, } from '@storystick/transport-allowlist';
|
|
2
3
|
import { estimatePreviewPayloadBytes, recordPreviewPerfMetric, } from './perf-metrics.js';
|
|
3
4
|
import { createPreviewRequestId } from './request-id.js';
|
|
5
|
+
import { decodePreviewReadCarrier, encodePreviewReadCarrier } from '../provenance/read-carrier.js';
|
|
6
|
+
import { fingerprintRenderedText } from '../provenance/normalize.js';
|
|
4
7
|
const NOOP_HANDLE = Object.freeze({
|
|
5
8
|
queryInstanceId: null,
|
|
6
9
|
getSnapshot: () => null,
|
|
@@ -94,9 +97,15 @@ export function createPreviewLiveQueryOverlayRuntime(options = {}) {
|
|
|
94
97
|
return;
|
|
95
98
|
const hadProjection = slot.projection !== null;
|
|
96
99
|
slot.receiptId = receiptId;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
// A receipt refresh does not change this query/context identity. Keep
|
|
101
|
+
// the already received rendering while Studio reauthorizes new sends;
|
|
102
|
+
// otherwise an older confirmed read briefly replaces a newer edit.
|
|
103
|
+
// Losing the receipt, capability, context or final retain still clears it.
|
|
104
|
+
if (receiptId === null) {
|
|
105
|
+
slot.projection = null;
|
|
106
|
+
if (hadProjection)
|
|
107
|
+
notify(slot);
|
|
108
|
+
}
|
|
100
109
|
if (receiptId !== null)
|
|
101
110
|
sendRegister(slot);
|
|
102
111
|
},
|
|
@@ -323,6 +332,10 @@ function updateProjectedPath(root, segments, entry) {
|
|
|
323
332
|
return root;
|
|
324
333
|
if (tail.length === 0) {
|
|
325
334
|
const hasCurrent = Object.prototype.hasOwnProperty.call(root, head);
|
|
335
|
+
// Model sidecars are keyed by authored path. Moving/replacing modeled
|
|
336
|
+
// slices needs a confirmed read with matching sidecars, not a field overlay.
|
|
337
|
+
if (modelReferences(root[head]) !== modelReferences(entry.present ? entry.value : undefined))
|
|
338
|
+
return root;
|
|
326
339
|
if (!entry.present) {
|
|
327
340
|
if (!hasCurrent)
|
|
328
341
|
return root;
|
|
@@ -332,7 +345,7 @@ function updateProjectedPath(root, segments, entry) {
|
|
|
332
345
|
}
|
|
333
346
|
if (hasCurrent && Object.is(root[head], entry.value))
|
|
334
347
|
return root;
|
|
335
|
-
return { ...root, [head]: entry.value };
|
|
348
|
+
return { ...root, [head]: carryTextAddresses(root[head], entry.value) };
|
|
336
349
|
}
|
|
337
350
|
const current = root[head];
|
|
338
351
|
if (!isRecord(current) && !entry.present)
|
|
@@ -343,3 +356,161 @@ function updateProjectedPath(root, segments, entry) {
|
|
|
343
356
|
function isRecord(value) {
|
|
344
357
|
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
345
358
|
}
|
|
359
|
+
function modelReferences(value) {
|
|
360
|
+
const references = [];
|
|
361
|
+
const visit = (item, path) => {
|
|
362
|
+
if (Array.isArray(item))
|
|
363
|
+
item.forEach((child, index) => visit(child, `${path}[${index}]`));
|
|
364
|
+
else if (isRecord(item)) {
|
|
365
|
+
if (typeof item._model === 'string')
|
|
366
|
+
references.push([path, item._key, item._type, item._model, item._variation]);
|
|
367
|
+
for (const key of Object.keys(item).sort())
|
|
368
|
+
visit(item[key], `${path}.${key}`);
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
visit(value, '');
|
|
372
|
+
return JSON.stringify(references);
|
|
373
|
+
}
|
|
374
|
+
/** Retain an existing complete-field edit address, never infer one for new data.
|
|
375
|
+
* Array items must keep their authored key and type; indexes are not identities. */
|
|
376
|
+
function carryTextAddresses(previous, next) {
|
|
377
|
+
if (typeof previous === 'string' && typeof next === 'string') {
|
|
378
|
+
const { segments } = decodePreviewProvenanceText(previous);
|
|
379
|
+
const segment = segments.length === 1 ? segments[0] : undefined;
|
|
380
|
+
if (segment?.markerStart !== 0 || segment.markerEnd !== previous.length) {
|
|
381
|
+
// Rich text is transported as JSON, with an address on each text leaf,
|
|
382
|
+
// not on the serialized document as a whole.
|
|
383
|
+
try {
|
|
384
|
+
const before = JSON.parse(previous), after = JSON.parse(next);
|
|
385
|
+
if (isRecord(before) && before.type === 'doc' && isRecord(after) && after.type === 'doc') {
|
|
386
|
+
return JSON.stringify(carryRichTextAddresses(before, after));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
catch { /* An ordinary string has no nested addresses. */ }
|
|
390
|
+
return next;
|
|
391
|
+
}
|
|
392
|
+
const text = decodePreviewProvenanceText(next).text;
|
|
393
|
+
const carrier = decodePreviewReadCarrier(segment.markerId);
|
|
394
|
+
const marker = carrier?.sidecar.markers[0];
|
|
395
|
+
const markerId = carrier && marker
|
|
396
|
+
? encodePreviewReadCarrier(carrier.frameId, carrier.sidecar, {
|
|
397
|
+
...marker, renderedTextFingerprint: fingerprintRenderedText(text),
|
|
398
|
+
}, carrier.primaryPage)
|
|
399
|
+
: segment.markerId;
|
|
400
|
+
return encodePreviewProvenanceText(markerId, text);
|
|
401
|
+
}
|
|
402
|
+
if (Array.isArray(previous) && Array.isArray(next)) {
|
|
403
|
+
const keyOf = (value) => isRecord(value) && typeof value._key === 'string'
|
|
404
|
+
? JSON.stringify([value._key, value._type ?? null]) : null;
|
|
405
|
+
const items = new Map();
|
|
406
|
+
const ambiguous = new Set();
|
|
407
|
+
for (const item of previous) {
|
|
408
|
+
const key = keyOf(item);
|
|
409
|
+
if (key === null)
|
|
410
|
+
continue;
|
|
411
|
+
if (items.has(key))
|
|
412
|
+
ambiguous.add(key);
|
|
413
|
+
items.set(key, item);
|
|
414
|
+
}
|
|
415
|
+
return next.map(item => {
|
|
416
|
+
const key = keyOf(item);
|
|
417
|
+
return key !== null && !ambiguous.has(key) ? carryTextAddresses(items.get(key), item) : item;
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
if (isRecord(previous) && isRecord(next)) {
|
|
421
|
+
if (previous.type === 'doc' && next.type === 'doc')
|
|
422
|
+
return carryRichTextAddresses(previous, next);
|
|
423
|
+
// A replacement model/variation has different field ownership.
|
|
424
|
+
if (previous._type !== next._type || previous._model !== next._model || previous._variation !== next._variation)
|
|
425
|
+
return next;
|
|
426
|
+
const result = Object.fromEntries(Object.entries(next).map(([key, value]) => [key, carryTextAddresses(previous[key], value)]));
|
|
427
|
+
// Object addresses (images, links) are public read metadata, not authored
|
|
428
|
+
// fields. The live value omits them, but does not change this field's owner.
|
|
429
|
+
const marker = previous._ssMarker;
|
|
430
|
+
if (isRecord(marker) && marker.v === 'ss-marker-1' && typeof marker.m === 'string') {
|
|
431
|
+
result._ssMarker = marker;
|
|
432
|
+
}
|
|
433
|
+
return result;
|
|
434
|
+
}
|
|
435
|
+
return next;
|
|
436
|
+
}
|
|
437
|
+
/** Text ordinals describe a rendering, not an identity. Rebuild them from the
|
|
438
|
+
* live document using its attested field owner, so splitting one text leaf
|
|
439
|
+
* cannot invalidate every following paragraph. Never combine distinct owners. */
|
|
440
|
+
function carryRichTextAddresses(previous, next) {
|
|
441
|
+
const before = new Map();
|
|
442
|
+
const nodes = new Map();
|
|
443
|
+
let owner;
|
|
444
|
+
let ownerKey;
|
|
445
|
+
let mixedOwners = false;
|
|
446
|
+
const carriers = new Map();
|
|
447
|
+
function walk(node, path, state, collect) {
|
|
448
|
+
if (!isRecord(node))
|
|
449
|
+
return node;
|
|
450
|
+
const embed = node.type === 'sliceEmbed' ? state.embed++ : -1;
|
|
451
|
+
if (collect)
|
|
452
|
+
nodes.set(path, { node, embed });
|
|
453
|
+
if (node.type === 'text') {
|
|
454
|
+
const ordinal = state.ordinal++;
|
|
455
|
+
if (typeof node.text !== 'string')
|
|
456
|
+
return node;
|
|
457
|
+
if (collect) {
|
|
458
|
+
before.set(path, { text: node.text, ordinal });
|
|
459
|
+
const decoded = decodePreviewProvenanceText(node.text);
|
|
460
|
+
const segment = decoded.segments[0];
|
|
461
|
+
const carrier = decoded.segments.length === 1 && segment?.markerStart === 0 && segment.markerEnd === node.text.length
|
|
462
|
+
? decodePreviewReadCarrier(segment.markerId) : null;
|
|
463
|
+
const locator = carrier?.sidecar.markers[0]?.editLocator;
|
|
464
|
+
if (carrier && locator?.sourceKind === 'richtext') {
|
|
465
|
+
const { textNodeIndex: _index, sourceSetId: _sourceSet, ...fieldOwner } = locator;
|
|
466
|
+
const key = JSON.stringify([carrier.frameId, carrier.sidecar.dependencySet, fieldOwner]);
|
|
467
|
+
if (ownerKey !== undefined && ownerKey !== key)
|
|
468
|
+
mixedOwners = true;
|
|
469
|
+
ownerKey = key;
|
|
470
|
+
owner ??= carrier;
|
|
471
|
+
carriers.set(ordinal, carrier);
|
|
472
|
+
}
|
|
473
|
+
return node;
|
|
474
|
+
}
|
|
475
|
+
if (owner && !mixedOwners) {
|
|
476
|
+
const carrier = carriers.get(ordinal) ?? owner;
|
|
477
|
+
const marker = carrier.sidecar.markers[0];
|
|
478
|
+
const text = decodePreviewProvenanceText(node.text).text;
|
|
479
|
+
const markerId = carriers.has(ordinal) ? marker.markerId : `live_richtext_${fingerprintRenderedText(JSON.stringify([ownerKey, ordinal]))}`;
|
|
480
|
+
return { ...node, text: encodePreviewProvenanceText(encodePreviewReadCarrier(carrier.frameId, carrier.sidecar, {
|
|
481
|
+
...marker, markerId,
|
|
482
|
+
editLocator: { ...marker.editLocator, textNodeIndex: ordinal },
|
|
483
|
+
renderedTextFingerprint: fingerprintRenderedText(text),
|
|
484
|
+
}, carrier.primaryPage), text) };
|
|
485
|
+
}
|
|
486
|
+
const old = before.get(path);
|
|
487
|
+
return old?.ordinal === ordinal
|
|
488
|
+
? { ...node, text: carryTextAddresses(old.text, node.text) }
|
|
489
|
+
: node;
|
|
490
|
+
}
|
|
491
|
+
let result = node;
|
|
492
|
+
const old = nodes.get(path);
|
|
493
|
+
if (!collect && embed >= 0 && old?.embed === embed && isRecord(old.node.attrs) && isRecord(node.attrs)) {
|
|
494
|
+
// Embed locators include their ordinal. Carry nested image/link addresses
|
|
495
|
+
// only for the same keyed embed at the same ordinal and variation.
|
|
496
|
+
result = { ...node, attrs: carryTextAddresses(old.node.attrs, node.attrs) };
|
|
497
|
+
}
|
|
498
|
+
if (!Array.isArray(node.content))
|
|
499
|
+
return result;
|
|
500
|
+
const keys = node.content.map((child, index) => {
|
|
501
|
+
const attrs = isRecord(child) && isRecord(child.attrs) ? child.attrs : null;
|
|
502
|
+
return typeof attrs?._key === 'string' ? `key:${attrs._key}` : `index:${index}`;
|
|
503
|
+
});
|
|
504
|
+
const counts = new Map();
|
|
505
|
+
keys.forEach(key => counts.set(key, (counts.get(key) ?? 0) + 1));
|
|
506
|
+
const content = node.content.map((child, index) => {
|
|
507
|
+
const type = isRecord(child) ? child.type : null;
|
|
508
|
+
// Duplicated authored keys cannot establish an unambiguous owner.
|
|
509
|
+
const key = counts.get(keys[index]) === 1 ? keys[index] : `${collect ? 'old' : 'new'}:${index}`;
|
|
510
|
+
return walk(child, `${path}/${JSON.stringify([key, type])}`, state, collect);
|
|
511
|
+
});
|
|
512
|
+
return collect ? node : { ...result, content };
|
|
513
|
+
}
|
|
514
|
+
walk(previous, '', { ordinal: 0, embed: 0 }, true);
|
|
515
|
+
return walk(next, '', { ordinal: 0, embed: 0 }, false);
|
|
516
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storystick/preview",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.5",
|
|
4
4
|
"license": "FSL-1.1-MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -181,9 +181,9 @@
|
|
|
181
181
|
},
|
|
182
182
|
"dependencies": {
|
|
183
183
|
"convex": "1.42.3",
|
|
184
|
-
"@storystick/
|
|
185
|
-
"@storystick/
|
|
186
|
-
"@storystick/types": "0.1.0-rc.
|
|
184
|
+
"@storystick/client": "0.2.0-rc.5",
|
|
185
|
+
"@storystick/transport-allowlist": "0.1.0-rc.4",
|
|
186
|
+
"@storystick/types": "0.1.0-rc.4"
|
|
187
187
|
},
|
|
188
188
|
"devDependencies": {
|
|
189
189
|
"fake-indexeddb": "^6.2.5",
|