@puckeditor/plugin-pages 0.10.1-canary.e0009c6c → 0.10.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/index.css +626 -1609
- package/dist/index.d.mts +104 -4
- package/dist/index.d.ts +104 -4
- package/dist/index.js +8255 -8370
- package/dist/index.mjs +8238 -8354
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _puckeditor_core_dist_actions_0EHeGita from '@puckeditor/core/dist/actions-0EHeGita';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -15,6 +15,8 @@ type RequestOptions = {
|
|
|
15
15
|
* @experimental
|
|
16
16
|
*/
|
|
17
17
|
type PagePluginOptions = {
|
|
18
|
+
/** The plugin's label in the plugin rail. Defaults to "Pages". */
|
|
19
|
+
label?: string;
|
|
18
20
|
/** Where `puckHandler` serves the pages API. Defaults to `/api/puck/pages`. */
|
|
19
21
|
host?: string;
|
|
20
22
|
/** Where the site renders pages, without a trailing slash, for "View page" links. Defaults to this origin. */
|
|
@@ -31,7 +33,7 @@ type PagePluginOptions = {
|
|
|
31
33
|
/**
|
|
32
34
|
* Create the pages plugin, for creating, editing and publishing Puck Cloud pages.
|
|
33
35
|
*
|
|
34
|
-
* @param opts The pages API host, site URL, first page and
|
|
36
|
+
* @param opts The pages API host, site URL, first page, request options and rail label.
|
|
35
37
|
* @returns The plugin.
|
|
36
38
|
*
|
|
37
39
|
* @experimental
|
|
@@ -51,7 +53,7 @@ declare function createPagesPlugin(opts?: PagePluginOptions): {
|
|
|
51
53
|
fields: ({ children }: {
|
|
52
54
|
children: react.ReactNode;
|
|
53
55
|
isLoading: boolean;
|
|
54
|
-
itemSelector?:
|
|
56
|
+
itemSelector?: _puckeditor_core_dist_actions_0EHeGita.X | null;
|
|
55
57
|
fields: Partial<Record<string, react.ReactNode>>;
|
|
56
58
|
}) => react_jsx_runtime.JSX.Element;
|
|
57
59
|
outline: ({ children }: {
|
|
@@ -60,4 +62,102 @@ declare function createPagesPlugin(opts?: PagePluginOptions): {
|
|
|
60
62
|
};
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
declare const defaultDictionary: {
|
|
66
|
+
readonly "loader-loading": "loading";
|
|
67
|
+
readonly "plugin-pages-panel-title": "Pages";
|
|
68
|
+
readonly "plugin-pages-panel-search": "Search pages";
|
|
69
|
+
readonly "plugin-pages-panel-search-placeholder-singular": "Search {count} page";
|
|
70
|
+
readonly "plugin-pages-panel-search-placeholder-plural": "Search {count} pages";
|
|
71
|
+
readonly "plugin-pages-panel-search-close": "Close search";
|
|
72
|
+
readonly "plugin-pages-panel-search-empty-title": "No matches";
|
|
73
|
+
readonly "plugin-pages-panel-search-empty-description": "No pages match “{query}”";
|
|
74
|
+
readonly "plugin-pages-panel-new": "New page";
|
|
75
|
+
readonly "plugin-pages-panel-new-path": "New page path";
|
|
76
|
+
readonly "plugin-pages-panel-loading": "Loading pages…";
|
|
77
|
+
readonly "plugin-pages-panel-error-title": "Couldn't load pages";
|
|
78
|
+
readonly "plugin-pages-panel-error-description": "Check your connection and try again.";
|
|
79
|
+
readonly "plugin-pages-panel-error-retry": "Retry";
|
|
80
|
+
readonly "plugin-pages-row-path": "Path for {path}";
|
|
81
|
+
readonly "plugin-pages-row-current": "You're editing this page";
|
|
82
|
+
readonly "plugin-pages-row-edit": "Edit {path}";
|
|
83
|
+
readonly "plugin-pages-row-actions": "Actions for {path}";
|
|
84
|
+
readonly "plugin-pages-path-error-empty": "Enter a path";
|
|
85
|
+
readonly "plugin-pages-path-error-exists": "A page with this path already exists";
|
|
86
|
+
readonly "plugin-pages-status-draft": "Draft";
|
|
87
|
+
readonly "plugin-pages-status-draft-description": "Not published yet";
|
|
88
|
+
readonly "plugin-pages-status-published": "Published";
|
|
89
|
+
readonly "plugin-pages-status-published-description": "Published";
|
|
90
|
+
readonly "plugin-pages-status-unsaved": "Unsaved";
|
|
91
|
+
readonly "plugin-pages-status-unsaved-description": "Unsaved changes";
|
|
92
|
+
readonly "plugin-pages-header-save": "Save";
|
|
93
|
+
readonly "plugin-pages-header-publish": "Publish";
|
|
94
|
+
readonly "plugin-pages-header-save-publish": "Save & publish";
|
|
95
|
+
readonly "plugin-pages-header-actions": "More page actions";
|
|
96
|
+
readonly "plugin-pages-actions-publish": "Publish";
|
|
97
|
+
readonly "plugin-pages-actions-unpublish": "Unpublish";
|
|
98
|
+
readonly "plugin-pages-actions-view": "View page";
|
|
99
|
+
readonly "plugin-pages-actions-delete": "Delete page";
|
|
100
|
+
readonly "plugin-pages-versions-title": "Version history";
|
|
101
|
+
readonly "plugin-pages-versions-label": "v{number}";
|
|
102
|
+
readonly "plugin-pages-versions-count-singular": "{count} version";
|
|
103
|
+
readonly "plugin-pages-versions-count-plural": "{count} versions";
|
|
104
|
+
readonly "plugin-pages-versions-list": "Versions";
|
|
105
|
+
readonly "plugin-pages-versions-loading": "Loading versions";
|
|
106
|
+
readonly "plugin-pages-versions-loading-version": "Loading version";
|
|
107
|
+
readonly "plugin-pages-versions-empty": "No saved versions yet";
|
|
108
|
+
readonly "plugin-pages-versions-error": "Failed to load versions";
|
|
109
|
+
readonly "plugin-pages-versions-error-more": "Failed to load more. Retry";
|
|
110
|
+
readonly "plugin-pages-versions-today": "Today";
|
|
111
|
+
readonly "plugin-pages-versions-yesterday": "Yesterday";
|
|
112
|
+
readonly "plugin-pages-confirm-cancel": "Cancel";
|
|
113
|
+
readonly "plugin-pages-confirm-unsaved-title": "Unsaved changes";
|
|
114
|
+
readonly "plugin-pages-confirm-unsaved-message": "You have unsaved changes. Are you sure you want to proceed?";
|
|
115
|
+
readonly "plugin-pages-confirm-unsaved-confirm": "Proceed";
|
|
116
|
+
readonly "plugin-pages-confirm-delete-title": "Delete page";
|
|
117
|
+
readonly "plugin-pages-confirm-delete-title-path": "Delete {path}";
|
|
118
|
+
readonly "plugin-pages-confirm-delete-message": "This will permanently delete the page and all of its versions.";
|
|
119
|
+
readonly "plugin-pages-confirm-delete-confirm": "Delete page";
|
|
120
|
+
readonly "plugin-pages-confirm-unpublish-title": "Unpublish page";
|
|
121
|
+
readonly "plugin-pages-confirm-unpublish-title-path": "Unpublish {path}";
|
|
122
|
+
readonly "plugin-pages-confirm-unpublish-message": "Are you sure you want to unpublish this page?";
|
|
123
|
+
readonly "plugin-pages-confirm-unpublish-confirm": "Unpublish";
|
|
124
|
+
readonly "plugin-pages-confirm-rename-title": "Rename {from} to {to}";
|
|
125
|
+
readonly "plugin-pages-confirm-rename-message": "This page is already published.";
|
|
126
|
+
readonly "plugin-pages-confirm-rename-confirm": "Rename";
|
|
127
|
+
readonly "plugin-pages-confirm-conflict-title": "A newer version was saved";
|
|
128
|
+
readonly "plugin-pages-confirm-conflict-message": "Someone saved a new version of the page while you were editing. Do you want to save yours or load the latest version?";
|
|
129
|
+
readonly "plugin-pages-confirm-conflict-discard": "Discard & reload";
|
|
130
|
+
readonly "plugin-pages-confirm-conflict-publish": "Publish anyway";
|
|
131
|
+
readonly "plugin-pages-confirm-conflict-save": "Save anyway";
|
|
132
|
+
readonly "plugin-pages-toast-region": "Notifications";
|
|
133
|
+
readonly "plugin-pages-toast-close": "Close";
|
|
134
|
+
readonly "plugin-pages-toast-published-title": "Published";
|
|
135
|
+
readonly "plugin-pages-toast-published-description": "The page was published successfully.";
|
|
136
|
+
readonly "plugin-pages-toast-published-view": "View";
|
|
137
|
+
readonly "plugin-pages-toast-draft-title": "Draft saved";
|
|
138
|
+
readonly "plugin-pages-toast-draft-description": "The draft was saved successfully.";
|
|
139
|
+
readonly "plugin-pages-toast-unpublished-title": "Unpublished";
|
|
140
|
+
readonly "plugin-pages-toast-unpublished-description": "The page was unpublished successfully.";
|
|
141
|
+
readonly "plugin-pages-toast-deleted-title": "Deleted";
|
|
142
|
+
readonly "plugin-pages-toast-deleted-description": "The page was deleted successfully.";
|
|
143
|
+
readonly "plugin-pages-toast-error-title": "Error";
|
|
144
|
+
readonly "plugin-pages-toast-error-description": "An unexpected error occurred.";
|
|
145
|
+
readonly "plugin-pages-toast-error-rename": "The page couldn't be renamed.";
|
|
146
|
+
readonly "plugin-pages-toast-error-save": "The draft couldn't be saved.";
|
|
147
|
+
readonly "plugin-pages-toast-error-save-publish": "The page couldn't be saved and published.";
|
|
148
|
+
readonly "plugin-pages-toast-error-create": "The page couldn't be created.";
|
|
149
|
+
readonly "plugin-pages-toast-error-publish": "The page couldn't be published.";
|
|
150
|
+
readonly "plugin-pages-toast-error-unpublish": "The page couldn't be unpublished.";
|
|
151
|
+
readonly "plugin-pages-toast-error-delete": "The page couldn't be deleted.";
|
|
152
|
+
readonly "plugin-pages-toast-error-undo": "Undo";
|
|
153
|
+
readonly "plugin-pages-toast-newer-title": "Newer version available";
|
|
154
|
+
readonly "plugin-pages-toast-newer-description": "v{number} of this page was saved since you opened it.";
|
|
155
|
+
readonly "plugin-pages-toast-newer-reload": "Reload";
|
|
156
|
+
};
|
|
157
|
+
type PagesDictionaryKey = keyof typeof defaultDictionary;
|
|
158
|
+
declare module "@puckeditor/core" {
|
|
159
|
+
interface Dictionary extends Partial<Record<PagesDictionaryKey, string>> {
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export { type PagesDictionaryKey, createPagesPlugin, defaultDictionary };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _puckeditor_core_dist_actions_0EHeGita from '@puckeditor/core/dist/actions-0EHeGita';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -15,6 +15,8 @@ type RequestOptions = {
|
|
|
15
15
|
* @experimental
|
|
16
16
|
*/
|
|
17
17
|
type PagePluginOptions = {
|
|
18
|
+
/** The plugin's label in the plugin rail. Defaults to "Pages". */
|
|
19
|
+
label?: string;
|
|
18
20
|
/** Where `puckHandler` serves the pages API. Defaults to `/api/puck/pages`. */
|
|
19
21
|
host?: string;
|
|
20
22
|
/** Where the site renders pages, without a trailing slash, for "View page" links. Defaults to this origin. */
|
|
@@ -31,7 +33,7 @@ type PagePluginOptions = {
|
|
|
31
33
|
/**
|
|
32
34
|
* Create the pages plugin, for creating, editing and publishing Puck Cloud pages.
|
|
33
35
|
*
|
|
34
|
-
* @param opts The pages API host, site URL, first page and
|
|
36
|
+
* @param opts The pages API host, site URL, first page, request options and rail label.
|
|
35
37
|
* @returns The plugin.
|
|
36
38
|
*
|
|
37
39
|
* @experimental
|
|
@@ -51,7 +53,7 @@ declare function createPagesPlugin(opts?: PagePluginOptions): {
|
|
|
51
53
|
fields: ({ children }: {
|
|
52
54
|
children: react.ReactNode;
|
|
53
55
|
isLoading: boolean;
|
|
54
|
-
itemSelector?:
|
|
56
|
+
itemSelector?: _puckeditor_core_dist_actions_0EHeGita.X | null;
|
|
55
57
|
fields: Partial<Record<string, react.ReactNode>>;
|
|
56
58
|
}) => react_jsx_runtime.JSX.Element;
|
|
57
59
|
outline: ({ children }: {
|
|
@@ -60,4 +62,102 @@ declare function createPagesPlugin(opts?: PagePluginOptions): {
|
|
|
60
62
|
};
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
declare const defaultDictionary: {
|
|
66
|
+
readonly "loader-loading": "loading";
|
|
67
|
+
readonly "plugin-pages-panel-title": "Pages";
|
|
68
|
+
readonly "plugin-pages-panel-search": "Search pages";
|
|
69
|
+
readonly "plugin-pages-panel-search-placeholder-singular": "Search {count} page";
|
|
70
|
+
readonly "plugin-pages-panel-search-placeholder-plural": "Search {count} pages";
|
|
71
|
+
readonly "plugin-pages-panel-search-close": "Close search";
|
|
72
|
+
readonly "plugin-pages-panel-search-empty-title": "No matches";
|
|
73
|
+
readonly "plugin-pages-panel-search-empty-description": "No pages match “{query}”";
|
|
74
|
+
readonly "plugin-pages-panel-new": "New page";
|
|
75
|
+
readonly "plugin-pages-panel-new-path": "New page path";
|
|
76
|
+
readonly "plugin-pages-panel-loading": "Loading pages…";
|
|
77
|
+
readonly "plugin-pages-panel-error-title": "Couldn't load pages";
|
|
78
|
+
readonly "plugin-pages-panel-error-description": "Check your connection and try again.";
|
|
79
|
+
readonly "plugin-pages-panel-error-retry": "Retry";
|
|
80
|
+
readonly "plugin-pages-row-path": "Path for {path}";
|
|
81
|
+
readonly "plugin-pages-row-current": "You're editing this page";
|
|
82
|
+
readonly "plugin-pages-row-edit": "Edit {path}";
|
|
83
|
+
readonly "plugin-pages-row-actions": "Actions for {path}";
|
|
84
|
+
readonly "plugin-pages-path-error-empty": "Enter a path";
|
|
85
|
+
readonly "plugin-pages-path-error-exists": "A page with this path already exists";
|
|
86
|
+
readonly "plugin-pages-status-draft": "Draft";
|
|
87
|
+
readonly "plugin-pages-status-draft-description": "Not published yet";
|
|
88
|
+
readonly "plugin-pages-status-published": "Published";
|
|
89
|
+
readonly "plugin-pages-status-published-description": "Published";
|
|
90
|
+
readonly "plugin-pages-status-unsaved": "Unsaved";
|
|
91
|
+
readonly "plugin-pages-status-unsaved-description": "Unsaved changes";
|
|
92
|
+
readonly "plugin-pages-header-save": "Save";
|
|
93
|
+
readonly "plugin-pages-header-publish": "Publish";
|
|
94
|
+
readonly "plugin-pages-header-save-publish": "Save & publish";
|
|
95
|
+
readonly "plugin-pages-header-actions": "More page actions";
|
|
96
|
+
readonly "plugin-pages-actions-publish": "Publish";
|
|
97
|
+
readonly "plugin-pages-actions-unpublish": "Unpublish";
|
|
98
|
+
readonly "plugin-pages-actions-view": "View page";
|
|
99
|
+
readonly "plugin-pages-actions-delete": "Delete page";
|
|
100
|
+
readonly "plugin-pages-versions-title": "Version history";
|
|
101
|
+
readonly "plugin-pages-versions-label": "v{number}";
|
|
102
|
+
readonly "plugin-pages-versions-count-singular": "{count} version";
|
|
103
|
+
readonly "plugin-pages-versions-count-plural": "{count} versions";
|
|
104
|
+
readonly "plugin-pages-versions-list": "Versions";
|
|
105
|
+
readonly "plugin-pages-versions-loading": "Loading versions";
|
|
106
|
+
readonly "plugin-pages-versions-loading-version": "Loading version";
|
|
107
|
+
readonly "plugin-pages-versions-empty": "No saved versions yet";
|
|
108
|
+
readonly "plugin-pages-versions-error": "Failed to load versions";
|
|
109
|
+
readonly "plugin-pages-versions-error-more": "Failed to load more. Retry";
|
|
110
|
+
readonly "plugin-pages-versions-today": "Today";
|
|
111
|
+
readonly "plugin-pages-versions-yesterday": "Yesterday";
|
|
112
|
+
readonly "plugin-pages-confirm-cancel": "Cancel";
|
|
113
|
+
readonly "plugin-pages-confirm-unsaved-title": "Unsaved changes";
|
|
114
|
+
readonly "plugin-pages-confirm-unsaved-message": "You have unsaved changes. Are you sure you want to proceed?";
|
|
115
|
+
readonly "plugin-pages-confirm-unsaved-confirm": "Proceed";
|
|
116
|
+
readonly "plugin-pages-confirm-delete-title": "Delete page";
|
|
117
|
+
readonly "plugin-pages-confirm-delete-title-path": "Delete {path}";
|
|
118
|
+
readonly "plugin-pages-confirm-delete-message": "This will permanently delete the page and all of its versions.";
|
|
119
|
+
readonly "plugin-pages-confirm-delete-confirm": "Delete page";
|
|
120
|
+
readonly "plugin-pages-confirm-unpublish-title": "Unpublish page";
|
|
121
|
+
readonly "plugin-pages-confirm-unpublish-title-path": "Unpublish {path}";
|
|
122
|
+
readonly "plugin-pages-confirm-unpublish-message": "Are you sure you want to unpublish this page?";
|
|
123
|
+
readonly "plugin-pages-confirm-unpublish-confirm": "Unpublish";
|
|
124
|
+
readonly "plugin-pages-confirm-rename-title": "Rename {from} to {to}";
|
|
125
|
+
readonly "plugin-pages-confirm-rename-message": "This page is already published.";
|
|
126
|
+
readonly "plugin-pages-confirm-rename-confirm": "Rename";
|
|
127
|
+
readonly "plugin-pages-confirm-conflict-title": "A newer version was saved";
|
|
128
|
+
readonly "plugin-pages-confirm-conflict-message": "Someone saved a new version of the page while you were editing. Do you want to save yours or load the latest version?";
|
|
129
|
+
readonly "plugin-pages-confirm-conflict-discard": "Discard & reload";
|
|
130
|
+
readonly "plugin-pages-confirm-conflict-publish": "Publish anyway";
|
|
131
|
+
readonly "plugin-pages-confirm-conflict-save": "Save anyway";
|
|
132
|
+
readonly "plugin-pages-toast-region": "Notifications";
|
|
133
|
+
readonly "plugin-pages-toast-close": "Close";
|
|
134
|
+
readonly "plugin-pages-toast-published-title": "Published";
|
|
135
|
+
readonly "plugin-pages-toast-published-description": "The page was published successfully.";
|
|
136
|
+
readonly "plugin-pages-toast-published-view": "View";
|
|
137
|
+
readonly "plugin-pages-toast-draft-title": "Draft saved";
|
|
138
|
+
readonly "plugin-pages-toast-draft-description": "The draft was saved successfully.";
|
|
139
|
+
readonly "plugin-pages-toast-unpublished-title": "Unpublished";
|
|
140
|
+
readonly "plugin-pages-toast-unpublished-description": "The page was unpublished successfully.";
|
|
141
|
+
readonly "plugin-pages-toast-deleted-title": "Deleted";
|
|
142
|
+
readonly "plugin-pages-toast-deleted-description": "The page was deleted successfully.";
|
|
143
|
+
readonly "plugin-pages-toast-error-title": "Error";
|
|
144
|
+
readonly "plugin-pages-toast-error-description": "An unexpected error occurred.";
|
|
145
|
+
readonly "plugin-pages-toast-error-rename": "The page couldn't be renamed.";
|
|
146
|
+
readonly "plugin-pages-toast-error-save": "The draft couldn't be saved.";
|
|
147
|
+
readonly "plugin-pages-toast-error-save-publish": "The page couldn't be saved and published.";
|
|
148
|
+
readonly "plugin-pages-toast-error-create": "The page couldn't be created.";
|
|
149
|
+
readonly "plugin-pages-toast-error-publish": "The page couldn't be published.";
|
|
150
|
+
readonly "plugin-pages-toast-error-unpublish": "The page couldn't be unpublished.";
|
|
151
|
+
readonly "plugin-pages-toast-error-delete": "The page couldn't be deleted.";
|
|
152
|
+
readonly "plugin-pages-toast-error-undo": "Undo";
|
|
153
|
+
readonly "plugin-pages-toast-newer-title": "Newer version available";
|
|
154
|
+
readonly "plugin-pages-toast-newer-description": "v{number} of this page was saved since you opened it.";
|
|
155
|
+
readonly "plugin-pages-toast-newer-reload": "Reload";
|
|
156
|
+
};
|
|
157
|
+
type PagesDictionaryKey = keyof typeof defaultDictionary;
|
|
158
|
+
declare module "@puckeditor/core" {
|
|
159
|
+
interface Dictionary extends Partial<Record<PagesDictionaryKey, string>> {
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export { type PagesDictionaryKey, createPagesPlugin, defaultDictionary };
|