@prismicio/types-internal 2.5.0-alpha.4 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -41
- package/lib/_internal/utils.d.ts +2 -2
- package/lib/content/Document.d.ts +1375 -331
- package/lib/content/fields/GroupContent.d.ts +1 -1
- package/lib/content/fields/GroupContent.js +1 -4
- package/lib/content/fields/WidgetContent.d.ts +1375 -331
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +727 -0
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +80 -0
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +4 -4
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -2
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2158 -5
- package/lib/content/fields/slices/Slice/RepeatableContent.js +148 -6
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +4 -4
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1049 -6
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +10 -7
- package/lib/content/fields/slices/Slice/index.d.ts +2279 -1552
- package/lib/content/fields/slices/Slice/index.js +1 -0
- package/lib/content/fields/slices/SliceItem.d.ts +949 -223
- package/lib/content/fields/slices/SlicesContent.d.ts +2088 -1044
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
- package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
- package/lib/validators/function.js +1 -8
- package/package.json +1 -1
- package/src/_internal/utils.ts +2 -1
- package/src/content/fields/GroupContent.ts +1 -4
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +8 -4
- package/src/content/fields/slices/Slice/RepeatableContent.ts +242 -11
- package/src/content/fields/slices/Slice/SharedSliceContent.ts +7 -7
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +21 -17
- package/src/content/fields/slices/Slice/index.ts +1 -0
- package/src/content/fields/slices/SlicesContent.ts +2 -2
- package/src/validators/function.ts +1 -11
package/README.md
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
TODO: Go through all "TODO" comments in the project
|
|
4
|
-
|
|
5
|
-
TODO: Replace all on all files (README.md, CONTRIBUTING.md, bug_report.md, package.json):
|
|
6
|
-
- package_name
|
|
7
|
-
- package_description
|
|
8
|
-
- github_org_slash_github_repo
|
|
9
|
-
- github_repo
|
|
10
|
-
|
|
11
|
-
-->
|
|
12
|
-
|
|
13
1
|
# @prismicio/types-internal
|
|
14
2
|
|
|
15
3
|
[![npm version][npm-version-src]][npm-version-href]
|
|
@@ -19,21 +7,7 @@ TODO: Replace all on all files (README.md, CONTRIBUTING.md, bug_report.md, packa
|
|
|
19
7
|
[![Conventional Commits][conventional-commits-src]][conventional-commits-href]
|
|
20
8
|
[![License][license-src]][license-href]
|
|
21
9
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Prismic types for Custom Types and Prismic Data.
|
|
25
|
-
|
|
26
|
-
<!--
|
|
27
|
-
|
|
28
|
-
TODO: Create a small list of package features:
|
|
29
|
-
|
|
30
|
-
- 🤔 A useful feature;
|
|
31
|
-
- 🥴 Another useful feature;
|
|
32
|
-
- 🙃 A final useful feature.
|
|
33
|
-
|
|
34
|
-
Non-breaking space: are here on purpose to fix emoji rendering on certain systems.
|
|
35
|
-
|
|
36
|
-
-->
|
|
10
|
+
A library that provides TypeScript types and runtime parsers for Prismic data. It handles models and content in the editor format. It is used in many Prismic TypeScript packages.
|
|
37
11
|
|
|
38
12
|
## Install
|
|
39
13
|
|
|
@@ -43,38 +17,36 @@ npm install @prismicio/types-internal
|
|
|
43
17
|
|
|
44
18
|
## Documentation
|
|
45
19
|
|
|
46
|
-
To discover what's new on this package check out [the changelog][changelog].
|
|
20
|
+
To discover what's new on this package check out [the changelog][changelog].
|
|
47
21
|
|
|
48
22
|
## Contributing
|
|
49
23
|
|
|
50
24
|
Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Prismic developer community!
|
|
51
25
|
|
|
52
|
-
**Asking a question**: [Open a new topic][forum-question] on our community forum explaining what you want to achieve / your question. Our support team will get back to you shortly.
|
|
53
|
-
|
|
54
26
|
**Reporting a bug**: [Open an issue][repo-bug-report] explaining your application's setup and the bug you're encountering.
|
|
55
27
|
|
|
56
28
|
**Suggesting an improvement**: [Open an issue][repo-feature-request] explaining your improvement or feature so we can discuss and learn more.
|
|
57
29
|
|
|
58
30
|
**Submitting code changes**: For small fixes, feel free to [open a pull request][repo-pull-requests] with a description of your changes. For large changes, please first [open an issue][repo-feature-request] so we can discuss if and how the changes should be implemented.
|
|
59
31
|
|
|
60
|
-
For more clarity on this project
|
|
32
|
+
For more clarity on this project, check out the detailed [CONTRIBUTING.md][contributing] document.
|
|
61
33
|
|
|
62
34
|
## License
|
|
63
35
|
|
|
64
36
|
```
|
|
65
|
-
|
|
37
|
+
Copyright 2013-2024 Prismic <contact@prismic.io> (https://prismic.io)
|
|
66
38
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
40
|
+
you may not use this file except in compliance with the License.
|
|
41
|
+
You may obtain a copy of the License at
|
|
70
42
|
|
|
71
|
-
|
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
72
44
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
48
|
+
See the License for the specific language governing permissions and
|
|
49
|
+
limitations under the License.
|
|
78
50
|
```
|
|
79
51
|
|
|
80
52
|
<!-- Links -->
|
package/lib/_internal/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SharedSliceItemContent, SliceItemContent, WidgetContent } from "../content";
|
|
2
|
-
import type { CompositeSlice, Group, NestableWidget, StaticSlices, UID, VariationFields } from "../customtypes";
|
|
2
|
+
import type { CompositeSlice, Group, NestableWidget, NestedGroup, StaticSlices, UID, VariationFields } from "../customtypes";
|
|
3
3
|
export declare type TraverseSliceContentFn = <S extends SliceItemContent | SharedSliceItemContent, D extends VariationFields | CompositeSlice | Group | NestableWidget>({ path, key, apiId, model, content, }: {
|
|
4
4
|
path: ContentPath;
|
|
5
5
|
key: string;
|
|
@@ -28,4 +28,4 @@ export declare const ContentPath: {
|
|
|
28
28
|
type: ContentPathEntry["type"];
|
|
29
29
|
}>): ContentPath;
|
|
30
30
|
};
|
|
31
|
-
export declare type SliceModel = VariationFields | NestableWidget | CompositeSlice |
|
|
31
|
+
export declare type SliceModel = VariationFields | NestableWidget | CompositeSlice | NestedGroup;
|