@prismicio/types-internal 0.2.7 → 0.2.8

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.
@@ -3,6 +3,12 @@ import { Format } from "../../Format";
3
3
  import WidgetTypes from "../WidgetTypes";
4
4
  import { SharedSlice } from "./SharedSlice";
5
5
  import SlicesTypes from "./SlicesTypes";
6
+ export declare const SlicesLabels: t.UnionC<[t.RecordC<t.StringC, t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
7
+ name: t.StringC;
8
+ }>, t.PartialC<{
9
+ display: t.StringC;
10
+ }>]>>>>, t.NullC]>;
11
+ export declare type SlicesLabels = t.TypeOf<typeof SlicesLabels>;
6
12
  export declare function slicesConfigReader<F extends Format>(format: F): t.ExactC<t.PartialC<{
7
13
  label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
8
14
  labels: t.UnionC<[t.RecordC<t.StringC, t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Slices = exports.DynamicSlices = exports.StaticSlices = exports.slicesReader = exports.DynamicSlicesConfig = exports.StaticSlicesConfig = exports.slicesConfigReader = void 0;
3
+ exports.Slices = exports.DynamicSlices = exports.StaticSlices = exports.slicesReader = exports.DynamicSlicesConfig = exports.StaticSlicesConfig = exports.slicesConfigReader = exports.SlicesLabels = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const t = (0, tslib_1.__importStar)(require("io-ts"));
6
6
  const validators_1 = require("../../../validators");
@@ -11,7 +11,7 @@ const LegacySlice_1 = (0, tslib_1.__importDefault)(require("./LegacySlice"));
11
11
  const SharedSlice_1 = require("./SharedSlice");
12
12
  const SharedSliceRef_1 = (0, tslib_1.__importDefault)(require("./SharedSliceRef"));
13
13
  const SlicesTypes_1 = (0, tslib_1.__importDefault)(require("./SlicesTypes"));
14
- const SlicesLabels = t.union([
14
+ exports.SlicesLabels = t.union([
15
15
  t.record(t.string, t.array(t.exact(t.intersection([
16
16
  t.type({
17
17
  name: t.string,
@@ -25,7 +25,7 @@ const SlicesLabels = t.union([
25
25
  function slicesConfigReader(format) {
26
26
  return t.exact(t.partial({
27
27
  label: validators_1.StringOrNull,
28
- labels: SlicesLabels,
28
+ labels: exports.SlicesLabels,
29
29
  choices: t.record(t.string, t.union([
30
30
  LegacySlice_1.default,
31
31
  CompositeSlice_1.default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",
@@ -9,7 +9,7 @@ import { SharedSlice } from "./SharedSlice"
9
9
  import SharedSliceRef from "./SharedSliceRef"
10
10
  import SlicesTypes from "./SlicesTypes"
11
11
 
12
- const SlicesLabels = t.union([
12
+ export const SlicesLabels = t.union([
13
13
  t.record(
14
14
  t.string,
15
15
  t.array(
@@ -27,7 +27,7 @@ const SlicesLabels = t.union([
27
27
  ),
28
28
  t.null,
29
29
  ])
30
- type SlicesLabels = t.TypeOf<typeof SlicesLabels>
30
+ export type SlicesLabels = t.TypeOf<typeof SlicesLabels>
31
31
 
32
32
  export function slicesConfigReader<F extends Format>(format: F) {
33
33
  return t.exact(