@prismicio/types-internal 0.2.8 → 0.2.9
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/lib/customtypes/CustomType.d.ts +2350 -2650
- package/lib/customtypes/CustomType.js +4 -5
- package/lib/customtypes/Section.d.ts +2348 -3976
- package/lib/customtypes/Section.js +4 -5
- package/lib/customtypes/index.d.ts +0 -1
- package/lib/customtypes/index.js +1 -3
- package/lib/customtypes/widgets/Widget.d.ts +1852 -3152
- package/lib/customtypes/widgets/Widget.js +5 -5
- package/lib/customtypes/widgets/nestable/RichText.d.ts +14 -0
- package/lib/customtypes/widgets/nestable/RichText.js +3 -3
- package/lib/customtypes/widgets/slices/Slices.d.ts +2703 -4658
- package/lib/customtypes/widgets/slices/Slices.js +8 -22
- package/package.json +1 -1
- package/src/customtypes/CustomType.ts +7 -11
- package/src/customtypes/Section.ts +7 -11
- package/src/customtypes/index.ts +0 -1
- package/src/customtypes/widgets/Widget.ts +9 -6
- package/src/customtypes/widgets/nestable/RichText.ts +2 -2
- package/src/customtypes/widgets/slices/Slices.ts +12 -24
- package/src/customtypes/Format.ts +0 -4
|
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Sections = exports.DynamicSection = exports.StaticSection = exports.sectionReader = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
-
const Format_1 = require("./Format");
|
|
7
6
|
const Widget_1 = require("./widgets/Widget");
|
|
8
|
-
function sectionReader(
|
|
9
|
-
return t.record(t.string,
|
|
7
|
+
function sectionReader(codec) {
|
|
8
|
+
return t.record(t.string, codec);
|
|
10
9
|
}
|
|
11
10
|
exports.sectionReader = sectionReader;
|
|
12
|
-
exports.StaticSection = sectionReader(
|
|
13
|
-
exports.DynamicSection = sectionReader(
|
|
11
|
+
exports.StaticSection = sectionReader(Widget_1.StaticWidget);
|
|
12
|
+
exports.DynamicSection = sectionReader(Widget_1.DynamicWidget);
|
|
14
13
|
exports.Sections = {
|
|
15
14
|
toStatic(dynamic, sharedSlices) {
|
|
16
15
|
const section = Object.entries(dynamic).reduce((acc, [widgetKey, widget]) => {
|
package/lib/customtypes/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Widgets = exports.Section =
|
|
3
|
+
exports.Widgets = exports.Section = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
(0, tslib_1.__exportStar)(require("./CustomType"), exports);
|
|
6
|
-
var Format_1 = require("./Format");
|
|
7
|
-
Object.defineProperty(exports, "Format", { enumerable: true, get: function () { return Format_1.Format; } });
|
|
8
6
|
exports.Section = (0, tslib_1.__importStar)(require("./Section"));
|
|
9
7
|
exports.Widgets = (0, tslib_1.__importStar)(require("./widgets"));
|