@prismicio/editor-fields 0.4.49 → 0.4.50-shared-onboarding-in-page-builder.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/constants/framework.d.ts +6 -0
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +27 -27
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +3 -3
- package/dist/core/OnboardingGuide/OnboardingGuide.d.ts +8 -19
- package/dist/core/OnboardingGuide/components/OnboardingCard.d.ts +5 -2
- package/dist/core/OnboardingGuide/components/OnboardingProgressStepper.d.ts +5 -2
- package/dist/core/OnboardingGuide/components/OnboardingStepDialog.d.ts +2 -2
- package/dist/core/OnboardingGuide/components/OnboardingTutorial.d.ts +0 -2
- package/dist/core/OnboardingGuide/content.d.ts +6 -3
- package/dist/core/service/customType.d.ts +6 -6
- package/dist/core/service/document.d.ts +23 -23
- package/dist/core/service/index.d.ts +1 -0
- package/dist/core/service/onboarding.d.ts +79 -0
- package/dist/core/service/repository.d.ts +7 -2
- package/dist/fields/LinkField/Documents/documentsData.d.ts +2 -2
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +2 -2
- package/dist/index.cjs.js +36 -33
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +9449 -9539
- package/package.json +4 -5
- package/dist/core/OnboardingGuide/components/OnboardingProvider.d.ts +0 -20
- package/dist/core/OnboardingGuide/types.d.ts +0 -39
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type AuthStrategy } from "../../EditorConfig";
|
|
4
|
+
export interface OnboardingStep {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
content?: JSX.Element;
|
|
9
|
+
videoUrl?: string;
|
|
10
|
+
defaultCompleted?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const onboardingStateSchema: z.ZodObject<{
|
|
13
|
+
completedSteps: z.ZodArray<z.ZodString, "many">;
|
|
14
|
+
isDismissed: z.ZodBoolean;
|
|
15
|
+
context: z.ZodObject<{
|
|
16
|
+
framework: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodEnum<["next", "nuxt", "sveltekit", "other"]>, "next" | "nuxt" | "sveltekit" | "other", unknown>>>;
|
|
17
|
+
starterId: z.ZodNullable<z.ZodString>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
20
|
+
starterId: string | null;
|
|
21
|
+
}, {
|
|
22
|
+
starterId: string | null;
|
|
23
|
+
framework?: unknown;
|
|
24
|
+
}>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
completedSteps: string[];
|
|
27
|
+
isDismissed: boolean;
|
|
28
|
+
context: {
|
|
29
|
+
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
30
|
+
starterId: string | null;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
completedSteps: string[];
|
|
34
|
+
isDismissed: boolean;
|
|
35
|
+
context: {
|
|
36
|
+
starterId: string | null;
|
|
37
|
+
framework?: unknown;
|
|
38
|
+
};
|
|
39
|
+
}>;
|
|
40
|
+
export type OnboardingState = z.infer<typeof onboardingStateSchema>;
|
|
41
|
+
export type OnboardingFramework = OnboardingState["context"]["framework"];
|
|
42
|
+
export declare const onboardingToggleStepResultSchema: z.ZodObject<{
|
|
43
|
+
completedSteps: z.ZodArray<z.ZodString, "many">;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
completedSteps: string[];
|
|
46
|
+
}, {
|
|
47
|
+
completedSteps: string[];
|
|
48
|
+
}>;
|
|
49
|
+
export type OnboardingToggleStepResult = z.infer<typeof onboardingToggleStepResultSchema>;
|
|
50
|
+
export declare const onboardingToggleResultSchema: z.ZodObject<{
|
|
51
|
+
isDismissed: z.ZodBoolean;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
isDismissed: boolean;
|
|
54
|
+
}, {
|
|
55
|
+
isDismissed: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
export type OnboardingToggleResult = z.infer<typeof onboardingToggleResultSchema>;
|
|
58
|
+
export declare function getOnboarding(baseUrl: URL, repository: string, authStrategy: AuthStrategy): Promise<OnboardingState>;
|
|
59
|
+
export declare function toggleOnboardingStep(stepId: string, baseUrl: URL, repository: string, authStrategy: AuthStrategy): Promise<OnboardingToggleStepResult>;
|
|
60
|
+
export declare function toggleOnboarding(baseUrl: URL, repository: string, authStrategy: AuthStrategy): Promise<OnboardingToggleResult>;
|
|
61
|
+
export type OnboardingTrackSource = "PageBuilder" | "SliceMachine";
|
|
62
|
+
export type OnboardingTrackEvent = {
|
|
63
|
+
event: "shared-onboarding:step-completed";
|
|
64
|
+
stepId: string;
|
|
65
|
+
stepTitle: string;
|
|
66
|
+
source: OnboardingTrackSource;
|
|
67
|
+
} | {
|
|
68
|
+
event: "shared-onboarding:step-opened";
|
|
69
|
+
stepId: string;
|
|
70
|
+
stepTitle: string;
|
|
71
|
+
source: OnboardingTrackSource;
|
|
72
|
+
} | {
|
|
73
|
+
event: "shared-onboarding:completed";
|
|
74
|
+
source: OnboardingTrackSource;
|
|
75
|
+
};
|
|
76
|
+
export interface OnboardingTracking {
|
|
77
|
+
track: (args: OnboardingTrackEvent) => void | Promise<void>;
|
|
78
|
+
source: OnboardingTrackSource;
|
|
79
|
+
}
|
|
@@ -28,7 +28,7 @@ declare const repositoryQuotas: z.ZodObject<{
|
|
|
28
28
|
slicemachineEnabled: boolean;
|
|
29
29
|
}>;
|
|
30
30
|
export type RepositoryQuotas = z.TypeOf<typeof repositoryQuotas>;
|
|
31
|
-
declare const repositoryFramework: z.ZodEffects<z.ZodEnum<["next", "nuxt", "sveltekit", "other"]>, "next" | "nuxt" | "sveltekit" | "other", unknown>;
|
|
31
|
+
export declare const repositoryFramework: z.ZodEffects<z.ZodEnum<["next", "nuxt", "sveltekit", "other"]>, "next" | "nuxt" | "sveltekit" | "other", unknown>;
|
|
32
32
|
export type RepositoryFramework = z.TypeOf<typeof repositoryFramework>;
|
|
33
33
|
declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
34
34
|
simulator_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -91,7 +91,9 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
91
91
|
major: number;
|
|
92
92
|
minor: number;
|
|
93
93
|
}>;
|
|
94
|
+
uploadedAvatar: z.ZodOptional<z.ZodString>;
|
|
94
95
|
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
95
97
|
authors: {
|
|
96
98
|
id: string;
|
|
97
99
|
email: string;
|
|
@@ -107,13 +109,13 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
107
109
|
quotas: {
|
|
108
110
|
slicemachineEnabled: boolean;
|
|
109
111
|
};
|
|
110
|
-
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
111
112
|
storageVersion: {
|
|
112
113
|
major: number;
|
|
113
114
|
minor: number;
|
|
114
115
|
};
|
|
115
116
|
simulator_url?: string | null | undefined;
|
|
116
117
|
starterId?: string | undefined;
|
|
118
|
+
uploadedAvatar?: string | undefined;
|
|
117
119
|
}, {
|
|
118
120
|
languages: {
|
|
119
121
|
id: string;
|
|
@@ -137,6 +139,7 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
137
139
|
} | undefined;
|
|
138
140
|
framework?: unknown;
|
|
139
141
|
starterId?: string | undefined;
|
|
142
|
+
uploadedAvatar?: string | undefined;
|
|
140
143
|
}>, {
|
|
141
144
|
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
142
145
|
simulatorUrl: string | undefined;
|
|
@@ -161,6 +164,7 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
161
164
|
minor: number;
|
|
162
165
|
};
|
|
163
166
|
starterId?: string | undefined;
|
|
167
|
+
uploadedAvatar?: string | undefined;
|
|
164
168
|
}, {
|
|
165
169
|
languages: {
|
|
166
170
|
id: string;
|
|
@@ -184,6 +188,7 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
184
188
|
} | undefined;
|
|
185
189
|
framework?: unknown;
|
|
186
190
|
starterId?: string | undefined;
|
|
191
|
+
uploadedAvatar?: string | undefined;
|
|
187
192
|
}>;
|
|
188
193
|
export type Repository = z.TypeOf<typeof repositorySchema>;
|
|
189
194
|
export declare function getRepository(baseUrl: URL, authStrategy: AuthStrategy): Promise<Repository>;
|
|
@@ -25,7 +25,6 @@ export declare function useDocuments(params: {
|
|
|
25
25
|
} | {
|
|
26
26
|
status: "archived";
|
|
27
27
|
}) & {
|
|
28
|
-
tags: string[];
|
|
29
28
|
author: {
|
|
30
29
|
first_name?: string | undefined;
|
|
31
30
|
last_name?: string | undefined;
|
|
@@ -33,6 +32,7 @@ export declare function useDocuments(params: {
|
|
|
33
32
|
uploadedAvatar?: string | undefined;
|
|
34
33
|
};
|
|
35
34
|
version_id: string;
|
|
35
|
+
tags: string[];
|
|
36
36
|
custom_type_label: string;
|
|
37
37
|
last_modified_date: Date;
|
|
38
38
|
preview_summary?: string | undefined;
|
|
@@ -52,7 +52,6 @@ export declare function useDocuments(params: {
|
|
|
52
52
|
} | {
|
|
53
53
|
status: "archived";
|
|
54
54
|
}) & {
|
|
55
|
-
tags: string[];
|
|
56
55
|
author: {
|
|
57
56
|
first_name?: string | undefined;
|
|
58
57
|
last_name?: string | undefined;
|
|
@@ -60,6 +59,7 @@ export declare function useDocuments(params: {
|
|
|
60
59
|
uploadedAvatar?: string | undefined;
|
|
61
60
|
};
|
|
62
61
|
version_id: string;
|
|
62
|
+
tags: string[];
|
|
63
63
|
custom_type_label: string;
|
|
64
64
|
last_modified_date: Date;
|
|
65
65
|
preview_summary?: string | undefined;
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
|
|
4
4
|
converter: {
|
|
5
5
|
fromPrismic(schema: Schema<any, any>): (list: {
|
|
6
|
-
type: "
|
|
6
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
7
7
|
content: {
|
|
8
8
|
text: string;
|
|
9
9
|
} & {
|
|
@@ -64,7 +64,7 @@ declare const _default: {
|
|
|
64
64
|
direction?: string | undefined;
|
|
65
65
|
}) => ProsemirrorNode | undefined;
|
|
66
66
|
toPrismic(node: ProsemirrorNode, nodeType: "list-item" | "o-list-item"): readonly ({
|
|
67
|
-
type: "
|
|
67
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
68
68
|
content: {
|
|
69
69
|
text: string;
|
|
70
70
|
} & {
|