@gooddata/sdk-model 11.62.0-alpha.2 → 11.62.0-alpha.4
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/esm/dashboard/filterContext.d.ts +1 -1
- package/esm/dashboard/filterContext.d.ts.map +1 -1
- package/esm/dashboard/filterContext.js +2 -2
- package/esm/dashboard/filterConverters.d.ts.map +1 -1
- package/esm/dashboard/filterConverters.js +10 -2
- package/esm/execution/filter/factory.d.ts +35 -0
- package/esm/execution/filter/factory.d.ts.map +1 -1
- package/esm/execution/filter/factory.js +5 -11
- package/esm/execution/filter/index.d.ts +13 -0
- package/esm/execution/filter/index.d.ts.map +1 -1
- package/esm/execution/filter/index.js +2 -0
- package/esm/execution/objectFactoryNotation/index.d.ts.map +1 -1
- package/esm/execution/objectFactoryNotation/index.js +16 -5
- package/esm/genAI/chat.d.ts +3 -2
- package/esm/genAI/chat.d.ts.map +1 -1
- package/esm/index.d.ts +23 -12
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +20 -10
- package/esm/publisher/aliases.d.ts +580 -0
- package/esm/publisher/aliases.d.ts.map +1 -0
- package/esm/publisher/aliases.js +304 -0
- package/esm/publisher/v1/builtinPageLayouts.d.ts +45 -0
- package/esm/publisher/v1/builtinPageLayouts.d.ts.map +1 -0
- package/esm/publisher/{builtinPageLayouts.js → v1/builtinPageLayouts.js} +14 -14
- package/esm/publisher/{content.d.ts → v1/content.d.ts} +14 -14
- package/esm/publisher/v1/content.d.ts.map +1 -0
- package/esm/publisher/{content.js → v1/content.js} +1 -1
- package/esm/publisher/{document.d.ts → v1/document.d.ts} +21 -21
- package/esm/publisher/v1/document.d.ts.map +1 -0
- package/esm/publisher/v1/document.js +35 -0
- package/esm/publisher/v1/factory.d.ts +65 -0
- package/esm/publisher/v1/factory.d.ts.map +1 -0
- package/esm/publisher/{factory.js → v1/factory.js} +12 -12
- package/esm/publisher/{layout.d.ts → v1/layout.d.ts} +13 -13
- package/esm/publisher/v1/layout.d.ts.map +1 -0
- package/esm/publisher/{layout.js → v1/layout.js} +4 -4
- package/esm/publisher/{pageFormat.d.ts → v1/pageFormat.d.ts} +6 -6
- package/esm/publisher/v1/pageFormat.d.ts.map +1 -0
- package/esm/publisher/{pageFormat.js → v1/pageFormat.js} +6 -6
- package/esm/publisher/{pageLayout.d.ts → v1/pageLayout.d.ts} +27 -27
- package/esm/publisher/v1/pageLayout.d.ts.map +1 -0
- package/esm/publisher/{pageLayout.js → v1/pageLayout.js} +18 -18
- package/esm/publisher/{slot.d.ts → v1/slot.d.ts} +41 -41
- package/esm/publisher/v1/slot.d.ts.map +1 -0
- package/esm/publisher/v1/slot.js +90 -0
- package/esm/publisher/{styling.d.ts → v1/styling.d.ts} +36 -36
- package/esm/publisher/v1/styling.d.ts.map +1 -0
- package/esm/publisher/{styling.js → v1/styling.js} +14 -14
- package/esm/publisher/{variables.d.ts → v1/variables.d.ts} +10 -10
- package/esm/publisher/v1/variables.d.ts.map +1 -0
- package/esm/publisher/{variables.js → v1/variables.js} +4 -4
- package/esm/publisher/v2/checks.d.ts +58 -0
- package/esm/publisher/v2/checks.d.ts.map +1 -0
- package/esm/publisher/v2/checks.js +100 -0
- package/esm/publisher/v2/content.d.ts +154 -0
- package/esm/publisher/v2/content.d.ts.map +1 -0
- package/esm/publisher/v2/content.js +34 -0
- package/esm/publisher/v2/document.d.ts +116 -0
- package/esm/publisher/v2/document.d.ts.map +1 -0
- package/esm/publisher/v2/document.js +47 -0
- package/esm/publisher/v2/factory.d.ts +69 -0
- package/esm/publisher/v2/factory.d.ts.map +1 -0
- package/esm/publisher/v2/factory.js +80 -0
- package/esm/publisher/v2/layout.d.ts +48 -0
- package/esm/publisher/v2/layout.d.ts.map +1 -0
- package/esm/publisher/v2/layout.js +20 -0
- package/esm/publisher/v2/page.d.ts +67 -0
- package/esm/publisher/v2/page.d.ts.map +1 -0
- package/esm/publisher/v2/page.js +34 -0
- package/esm/publisher/v2/sections.d.ts +34 -0
- package/esm/publisher/v2/sections.d.ts.map +1 -0
- package/esm/publisher/v2/sections.js +40 -0
- package/esm/publisher/v2/structure.d.ts +5 -0
- package/esm/publisher/v2/structure.d.ts.map +1 -0
- package/esm/publisher/v2/structure.js +533 -0
- package/esm/publisher/v2/style.d.ts +323 -0
- package/esm/publisher/v2/style.d.ts.map +1 -0
- package/esm/publisher/v2/style.js +22 -0
- package/esm/publisher/v2/validation.d.ts +26 -0
- package/esm/publisher/v2/validation.d.ts.map +1 -0
- package/esm/publisher/v2/validation.js +157 -0
- package/esm/publisher/v2/widget.d.ts +295 -0
- package/esm/publisher/v2/widget.d.ts.map +1 -0
- package/esm/publisher/v2/widget.js +79 -0
- package/esm/sdk-model.d.ts +2426 -453
- package/esm/settings/settings.d.ts +31 -1
- package/esm/settings/settings.d.ts.map +1 -1
- package/package.json +4 -4
- package/esm/publisher/builtinPageLayouts.d.ts +0 -45
- package/esm/publisher/builtinPageLayouts.d.ts.map +0 -1
- package/esm/publisher/content.d.ts.map +0 -1
- package/esm/publisher/document.d.ts.map +0 -1
- package/esm/publisher/document.js +0 -35
- package/esm/publisher/factory.d.ts +0 -65
- package/esm/publisher/factory.d.ts.map +0 -1
- package/esm/publisher/layout.d.ts.map +0 -1
- package/esm/publisher/pageFormat.d.ts.map +0 -1
- package/esm/publisher/pageLayout.d.ts.map +0 -1
- package/esm/publisher/slot.d.ts.map +0 -1
- package/esm/publisher/slot.js +0 -87
- package/esm/publisher/styling.d.ts.map +0 -1
- package/esm/publisher/variables.d.ts.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type FilterContextItem, type IDashboardFilterReference } from "
|
|
2
|
-
import { type VisualizationProperties } from "
|
|
3
|
-
import { type ObjRef } from "
|
|
4
|
-
import { type
|
|
1
|
+
import { type FilterContextItem, type IDashboardFilterReference } from "../../dashboard/filterContext.js";
|
|
2
|
+
import { type VisualizationProperties } from "../../insight/index.js";
|
|
3
|
+
import { type ObjRef } from "../../objRef/index.js";
|
|
4
|
+
import { type IPublisherHeadingStyleV1, type IPublisherImageStyleV1, type IPublisherParagraphStyleV1, type PublisherTextTypeV1 } from "./styling.js";
|
|
5
5
|
/**
|
|
6
6
|
* Metadata of a slot that is intentionally left unfilled in a page layout or template.
|
|
7
7
|
*
|
|
8
8
|
* @alpha
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface IPublisherSlotPlaceholderV1 {
|
|
11
11
|
/**
|
|
12
12
|
* Authoring hint shown in the empty slot.
|
|
13
13
|
*/
|
|
@@ -26,7 +26,7 @@ export interface IPublisherSlotPlaceholder {
|
|
|
26
26
|
*
|
|
27
27
|
* @alpha
|
|
28
28
|
*/
|
|
29
|
-
export interface
|
|
29
|
+
export interface IPublisherSlotBaseV1 {
|
|
30
30
|
type: string;
|
|
31
31
|
/**
|
|
32
32
|
* Identifier unique within the page body. The layout tree references it, and it is
|
|
@@ -37,14 +37,14 @@ export interface IPublisherSlotBase {
|
|
|
37
37
|
/**
|
|
38
38
|
* Present when the slot is an unfilled placeholder.
|
|
39
39
|
*/
|
|
40
|
-
placeholder?:
|
|
40
|
+
placeholder?: IPublisherSlotPlaceholderV1;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Slot rendering an insight, with its own filter context.
|
|
44
44
|
*
|
|
45
45
|
* @alpha
|
|
46
46
|
*/
|
|
47
|
-
export interface
|
|
47
|
+
export interface IPublisherVisualizationSlotV1 extends IPublisherSlotBaseV1 {
|
|
48
48
|
type: "visualization";
|
|
49
49
|
/**
|
|
50
50
|
* Insight to render. Undefined = declared-but-empty slot; renderers show a placeholder.
|
|
@@ -85,7 +85,7 @@ export interface IPublisherVisualizationSlot extends IPublisherSlotBase {
|
|
|
85
85
|
*
|
|
86
86
|
* @alpha
|
|
87
87
|
*/
|
|
88
|
-
export interface
|
|
88
|
+
export interface IPublisherStaticTextSourceV1 {
|
|
89
89
|
type: "static";
|
|
90
90
|
/**
|
|
91
91
|
* Markdown content with `{variable}` placeholders. Stored raw — placeholders are
|
|
@@ -98,7 +98,7 @@ export interface IPublisherStaticTextSource {
|
|
|
98
98
|
*
|
|
99
99
|
* @alpha
|
|
100
100
|
*/
|
|
101
|
-
export interface
|
|
101
|
+
export interface IPublisherAiTextSourceV1 {
|
|
102
102
|
type: "ai";
|
|
103
103
|
/**
|
|
104
104
|
* Instruction for the generator. Supports `{variables}`.
|
|
@@ -119,7 +119,7 @@ export interface IPublisherAiTextSource {
|
|
|
119
119
|
*
|
|
120
120
|
* @alpha
|
|
121
121
|
*/
|
|
122
|
-
export type
|
|
122
|
+
export type PublisherTextSourceV1 = IPublisherStaticTextSourceV1 | IPublisherAiTextSourceV1;
|
|
123
123
|
/**
|
|
124
124
|
* Slot rendering a heading.
|
|
125
125
|
*
|
|
@@ -129,39 +129,39 @@ export type PublisherTextSource = IPublisherStaticTextSource | IPublisherAiTextS
|
|
|
129
129
|
*
|
|
130
130
|
* @alpha
|
|
131
131
|
*/
|
|
132
|
-
export interface
|
|
132
|
+
export interface IPublisherHeadingSlotV1 extends IPublisherSlotBaseV1 {
|
|
133
133
|
type: "heading";
|
|
134
|
-
style?:
|
|
134
|
+
style?: IPublisherHeadingStyleV1;
|
|
135
135
|
/**
|
|
136
136
|
* Undefined = declared-but-empty slot.
|
|
137
137
|
*/
|
|
138
|
-
source?:
|
|
138
|
+
source?: PublisherTextSourceV1;
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* Slot rendering prose, written as markdown.
|
|
142
142
|
*
|
|
143
143
|
* @alpha
|
|
144
144
|
*/
|
|
145
|
-
export interface
|
|
145
|
+
export interface IPublisherParagraphSlotV1 extends IPublisherSlotBaseV1 {
|
|
146
146
|
type: "paragraph";
|
|
147
|
-
style?:
|
|
147
|
+
style?: IPublisherParagraphStyleV1;
|
|
148
148
|
/**
|
|
149
149
|
* Undefined = declared-but-empty slot.
|
|
150
150
|
*/
|
|
151
|
-
source?:
|
|
151
|
+
source?: PublisherTextSourceV1;
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Slot rendering text of either kind.
|
|
155
155
|
*
|
|
156
156
|
* @alpha
|
|
157
157
|
*/
|
|
158
|
-
export type
|
|
158
|
+
export type IPublisherTextSlotV1 = IPublisherHeadingSlotV1 | IPublisherParagraphSlotV1;
|
|
159
159
|
/**
|
|
160
160
|
* What an image slot displays.
|
|
161
161
|
*
|
|
162
162
|
* @alpha
|
|
163
163
|
*/
|
|
164
|
-
export type
|
|
164
|
+
export type PublisherImageSourceV1 = {
|
|
165
165
|
type: "url";
|
|
166
166
|
/**
|
|
167
167
|
* Image URL. Supports `{variables}` — a logo slot uses `{logo}`.
|
|
@@ -180,52 +180,52 @@ export type PublisherImageSource = {
|
|
|
180
180
|
*
|
|
181
181
|
* @alpha
|
|
182
182
|
*/
|
|
183
|
-
export type
|
|
183
|
+
export type PublisherImageFitV1 = "contain" | "cover" | "fill";
|
|
184
184
|
/**
|
|
185
185
|
* Slot rendering an image.
|
|
186
186
|
*
|
|
187
187
|
* @alpha
|
|
188
188
|
*/
|
|
189
|
-
export interface
|
|
189
|
+
export interface IPublisherImageSlotV1 extends IPublisherSlotBaseV1 {
|
|
190
190
|
type: "image";
|
|
191
191
|
/**
|
|
192
192
|
* Undefined = declared-but-empty slot.
|
|
193
193
|
*/
|
|
194
|
-
source?:
|
|
194
|
+
source?: PublisherImageSourceV1;
|
|
195
195
|
altText?: string;
|
|
196
196
|
/**
|
|
197
197
|
* How the image fills the slot area. Defaults to "contain".
|
|
198
198
|
*/
|
|
199
|
-
fit?:
|
|
199
|
+
fit?: PublisherImageFitV1;
|
|
200
200
|
/**
|
|
201
201
|
* Placement overrides for the drawn image; centered on both axes by default.
|
|
202
202
|
*/
|
|
203
|
-
style?:
|
|
203
|
+
style?: IPublisherImageStyleV1;
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* All slot types of document content version 1.
|
|
207
207
|
*
|
|
208
208
|
* @alpha
|
|
209
209
|
*/
|
|
210
|
-
export type
|
|
210
|
+
export type PublisherSlotV1 = IPublisherVisualizationSlotV1 | IPublisherTextSlotV1 | IPublisherImageSlotV1;
|
|
211
211
|
/**
|
|
212
212
|
* List of built-in document slot type names.
|
|
213
213
|
*
|
|
214
214
|
* @alpha
|
|
215
215
|
*/
|
|
216
|
-
export declare const
|
|
216
|
+
export declare const BuiltInPublisherSlotTypesV1: string[];
|
|
217
217
|
/**
|
|
218
218
|
* All sizes a text slot can be rendered at, headings first.
|
|
219
219
|
*
|
|
220
220
|
* @alpha
|
|
221
221
|
*/
|
|
222
|
-
export declare const
|
|
222
|
+
export declare const PublisherTextTypesV1: PublisherTextTypeV1[];
|
|
223
223
|
/**
|
|
224
224
|
* Sizes the slot can be rendered at, which is what its own type decides.
|
|
225
225
|
*
|
|
226
226
|
* @alpha
|
|
227
227
|
*/
|
|
228
|
-
export declare function
|
|
228
|
+
export declare function publisherTextSlotTypesV1(slot: IPublisherTextSlotV1): PublisherTextTypeV1[];
|
|
229
229
|
/**
|
|
230
230
|
* Size the slot is rendered at.
|
|
231
231
|
*
|
|
@@ -235,41 +235,41 @@ export declare function publisherTextSlotTypes(slot: IPublisherTextSlot): Publis
|
|
|
235
235
|
*
|
|
236
236
|
* @alpha
|
|
237
237
|
*/
|
|
238
|
-
export declare function
|
|
238
|
+
export declare function publisherTextSlotTypeV1(slot: IPublisherTextSlotV1): PublisherTextTypeV1;
|
|
239
239
|
/**
|
|
240
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
240
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherVisualizationSlotV1}.
|
|
241
241
|
*
|
|
242
242
|
* @alpha
|
|
243
243
|
*/
|
|
244
|
-
export declare function
|
|
244
|
+
export declare function isPublisherVisualizationSlotV1(obj: unknown): obj is IPublisherVisualizationSlotV1;
|
|
245
245
|
/**
|
|
246
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
246
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherHeadingSlotV1}.
|
|
247
247
|
*
|
|
248
248
|
* @alpha
|
|
249
249
|
*/
|
|
250
|
-
export declare function
|
|
250
|
+
export declare function isPublisherHeadingSlotV1(obj: unknown): obj is IPublisherHeadingSlotV1;
|
|
251
251
|
/**
|
|
252
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
252
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherParagraphSlotV1}.
|
|
253
253
|
*
|
|
254
254
|
* @alpha
|
|
255
255
|
*/
|
|
256
|
-
export declare function
|
|
256
|
+
export declare function isPublisherParagraphSlotV1(obj: unknown): obj is IPublisherParagraphSlotV1;
|
|
257
257
|
/**
|
|
258
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
258
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherTextSlotV1}.
|
|
259
259
|
*
|
|
260
260
|
* @alpha
|
|
261
261
|
*/
|
|
262
|
-
export declare function
|
|
262
|
+
export declare function isPublisherTextSlotV1(obj: unknown): obj is IPublisherTextSlotV1;
|
|
263
263
|
/**
|
|
264
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
264
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherImageSlotV1}.
|
|
265
265
|
*
|
|
266
266
|
* @alpha
|
|
267
267
|
*/
|
|
268
|
-
export declare function
|
|
268
|
+
export declare function isPublisherImageSlotV1(obj: unknown): obj is IPublisherImageSlotV1;
|
|
269
269
|
/**
|
|
270
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
270
|
+
* Type-guard testing whether the provided object is an instance of {@link PublisherSlotV1}.
|
|
271
271
|
*
|
|
272
272
|
* @alpha
|
|
273
273
|
*/
|
|
274
|
-
export declare function
|
|
274
|
+
export declare function isPublisherSlotV1(obj: unknown): obj is PublisherSlotV1;
|
|
275
275
|
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/publisher/v1/slot.ts"],"names":[],"m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, PublisherHeadingTypesV1, PublisherParagraphTypesV1, isPublisherHeadingTypeV1, isPublisherParagraphTypeV1, } from "./styling.js";
|
|
4
|
+
/**
|
|
5
|
+
* List of built-in document slot type names.
|
|
6
|
+
*
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export const BuiltInPublisherSlotTypesV1 = ["visualization", "heading", "paragraph", "image"];
|
|
10
|
+
/**
|
|
11
|
+
* All sizes a text slot can be rendered at, headings first.
|
|
12
|
+
*
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
export const PublisherTextTypesV1 = [
|
|
16
|
+
...PublisherHeadingTypesV1,
|
|
17
|
+
...PublisherParagraphTypesV1,
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Sizes the slot can be rendered at, which is what its own type decides.
|
|
21
|
+
*
|
|
22
|
+
* @alpha
|
|
23
|
+
*/
|
|
24
|
+
export function publisherTextSlotTypesV1(slot) {
|
|
25
|
+
return slot.type === "heading" ? PublisherHeadingTypesV1 : PublisherParagraphTypesV1;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Size the slot is rendered at.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* A slot states its size, and content is an open format: a size the slot cannot carry, and a size
|
|
32
|
+
* from a newer version, both fall back to the default of the slot's own type.
|
|
33
|
+
*
|
|
34
|
+
* @alpha
|
|
35
|
+
*/
|
|
36
|
+
export function publisherTextSlotTypeV1(slot) {
|
|
37
|
+
const stated = slot.style?.type;
|
|
38
|
+
if (slot.type === "heading") {
|
|
39
|
+
return isPublisherHeadingTypeV1(stated) ? stated : DefaultPublisherHeadingTypeV1;
|
|
40
|
+
}
|
|
41
|
+
return isPublisherParagraphTypeV1(stated) ? stated : DefaultPublisherParagraphTypeV1;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherVisualizationSlotV1}.
|
|
45
|
+
*
|
|
46
|
+
* @alpha
|
|
47
|
+
*/
|
|
48
|
+
export function isPublisherVisualizationSlotV1(obj) {
|
|
49
|
+
return !isEmpty(obj) && obj.type === "visualization";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherHeadingSlotV1}.
|
|
53
|
+
*
|
|
54
|
+
* @alpha
|
|
55
|
+
*/
|
|
56
|
+
export function isPublisherHeadingSlotV1(obj) {
|
|
57
|
+
return !isEmpty(obj) && obj.type === "heading";
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherParagraphSlotV1}.
|
|
61
|
+
*
|
|
62
|
+
* @alpha
|
|
63
|
+
*/
|
|
64
|
+
export function isPublisherParagraphSlotV1(obj) {
|
|
65
|
+
return !isEmpty(obj) && obj.type === "paragraph";
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherTextSlotV1}.
|
|
69
|
+
*
|
|
70
|
+
* @alpha
|
|
71
|
+
*/
|
|
72
|
+
export function isPublisherTextSlotV1(obj) {
|
|
73
|
+
return isPublisherHeadingSlotV1(obj) || isPublisherParagraphSlotV1(obj);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherImageSlotV1}.
|
|
77
|
+
*
|
|
78
|
+
* @alpha
|
|
79
|
+
*/
|
|
80
|
+
export function isPublisherImageSlotV1(obj) {
|
|
81
|
+
return !isEmpty(obj) && obj.type === "image";
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Type-guard testing whether the provided object is an instance of {@link PublisherSlotV1}.
|
|
85
|
+
*
|
|
86
|
+
* @alpha
|
|
87
|
+
*/
|
|
88
|
+
export function isPublisherSlotV1(obj) {
|
|
89
|
+
return [isPublisherVisualizationSlotV1, isPublisherTextSlotV1, isPublisherImageSlotV1].some((guard) => guard(obj));
|
|
90
|
+
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @alpha
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type PublisherContentAlignmentV1 = "start" | "center" | "end";
|
|
7
7
|
/**
|
|
8
8
|
* Solid color painted behind a section's or page's content.
|
|
9
9
|
*
|
|
10
10
|
* @alpha
|
|
11
11
|
*/
|
|
12
|
-
export interface
|
|
12
|
+
export interface IPublisherColorBackgroundV1 {
|
|
13
13
|
type: "color";
|
|
14
14
|
/**
|
|
15
15
|
* CSS color value. Absolute: document styling states brand colors directly and does not
|
|
@@ -22,10 +22,10 @@ export interface IPublisherColorBackground {
|
|
|
22
22
|
*
|
|
23
23
|
* @alpha
|
|
24
24
|
*/
|
|
25
|
-
export interface
|
|
25
|
+
export interface IPublisherImageBackgroundV1 {
|
|
26
26
|
type: "image";
|
|
27
27
|
/**
|
|
28
|
-
* Local identifier of an image slot in {@link
|
|
28
|
+
* Local identifier of an image slot in {@link IPublisherPageBodyV1.slots}. Routing the image
|
|
29
29
|
* through a slot keeps it template-fillable and gives it the slot's placeholder metadata.
|
|
30
30
|
* A reference that is missing or resolves to a non-image slot paints no background.
|
|
31
31
|
*/
|
|
@@ -36,15 +36,15 @@ export interface IPublisherImageBackground {
|
|
|
36
36
|
*
|
|
37
37
|
* @alpha
|
|
38
38
|
*/
|
|
39
|
-
export type
|
|
39
|
+
export type PublisherBackgroundV1 = IPublisherColorBackgroundV1 | IPublisherImageBackgroundV1;
|
|
40
40
|
/**
|
|
41
41
|
* Paint of the box itself. Never affects the geometry of the box or its children —
|
|
42
42
|
* geometry always comes from layout weights.
|
|
43
43
|
*
|
|
44
44
|
* @alpha
|
|
45
45
|
*/
|
|
46
|
-
export interface
|
|
47
|
-
background?:
|
|
46
|
+
export interface IPublisherBoxStyleV1 {
|
|
47
|
+
background?: PublisherBackgroundV1;
|
|
48
48
|
/**
|
|
49
49
|
* Corner radius in percent of the page width — the same relative unit the rest of a document page
|
|
50
50
|
* is sized in, so the corners keep their proportion however large the page is rendered.
|
|
@@ -53,7 +53,7 @@ export interface IPublisherBoxStyle {
|
|
|
53
53
|
borderRadius?: number;
|
|
54
54
|
/**
|
|
55
55
|
* Inset of the box's own content, in percent of the page width like
|
|
56
|
-
* {@link
|
|
56
|
+
* {@link IPublisherBoxStyleV1.borderRadius}. Insets only inward — siblings and the layout
|
|
57
57
|
* gaps around the box are untouched. A box that paints a background usually wants one;
|
|
58
58
|
* a full-bleed box (an image-backed cover) wants none, which is why no default exists.
|
|
59
59
|
*/
|
|
@@ -65,91 +65,91 @@ export interface IPublisherBoxStyle {
|
|
|
65
65
|
*
|
|
66
66
|
* @alpha
|
|
67
67
|
*/
|
|
68
|
-
export type
|
|
68
|
+
export type PublisherHeadingTypeV1 = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
69
69
|
/**
|
|
70
70
|
* Size a paragraph is rendered at. Each size is styled by the matching theme text level
|
|
71
71
|
* (`reports.textStyle.paragraph.largeText` ...).
|
|
72
72
|
*
|
|
73
73
|
* @alpha
|
|
74
74
|
*/
|
|
75
|
-
export type
|
|
75
|
+
export type PublisherParagraphTypeV1 = "largeText" | "normalText" | "smallText";
|
|
76
76
|
/**
|
|
77
77
|
* Size any document text is rendered at.
|
|
78
78
|
*
|
|
79
79
|
* @alpha
|
|
80
80
|
*/
|
|
81
|
-
export type
|
|
81
|
+
export type PublisherTextTypeV1 = PublisherHeadingTypeV1 | PublisherParagraphTypeV1;
|
|
82
82
|
/**
|
|
83
83
|
* All heading sizes, largest first.
|
|
84
84
|
*
|
|
85
85
|
* @alpha
|
|
86
86
|
*/
|
|
87
|
-
export declare const
|
|
87
|
+
export declare const PublisherHeadingTypesV1: PublisherHeadingTypeV1[];
|
|
88
88
|
/**
|
|
89
89
|
* All paragraph sizes, largest first.
|
|
90
90
|
*
|
|
91
91
|
* @alpha
|
|
92
92
|
*/
|
|
93
|
-
export declare const
|
|
93
|
+
export declare const PublisherParagraphTypesV1: PublisherParagraphTypeV1[];
|
|
94
94
|
/**
|
|
95
95
|
* Size a heading slot that states none is rendered at.
|
|
96
96
|
*
|
|
97
97
|
* @alpha
|
|
98
98
|
*/
|
|
99
|
-
export declare const
|
|
99
|
+
export declare const DefaultPublisherHeadingTypeV1: PublisherHeadingTypeV1;
|
|
100
100
|
/**
|
|
101
101
|
* Size a paragraph slot that states none is rendered at.
|
|
102
102
|
*
|
|
103
103
|
* @alpha
|
|
104
104
|
*/
|
|
105
|
-
export declare const
|
|
105
|
+
export declare const DefaultPublisherParagraphTypeV1: PublisherParagraphTypeV1;
|
|
106
106
|
/**
|
|
107
|
-
* Type-guard testing whether the value is a {@link
|
|
107
|
+
* Type-guard testing whether the value is a {@link PublisherHeadingTypeV1}.
|
|
108
108
|
*
|
|
109
109
|
* @alpha
|
|
110
110
|
*/
|
|
111
|
-
export declare function
|
|
111
|
+
export declare function isPublisherHeadingTypeV1(value: unknown): value is PublisherHeadingTypeV1;
|
|
112
112
|
/**
|
|
113
|
-
* Type-guard testing whether the value is a {@link
|
|
113
|
+
* Type-guard testing whether the value is a {@link PublisherParagraphTypeV1}.
|
|
114
114
|
*
|
|
115
115
|
* @alpha
|
|
116
116
|
*/
|
|
117
|
-
export declare function
|
|
117
|
+
export declare function isPublisherParagraphTypeV1(value: unknown): value is PublisherParagraphTypeV1;
|
|
118
118
|
/**
|
|
119
119
|
* Styling of a text slot: the paint of its box, plus the ink and placement of the text it owns.
|
|
120
120
|
*
|
|
121
121
|
* @alpha
|
|
122
122
|
*/
|
|
123
|
-
export interface
|
|
123
|
+
export interface IPublisherTextStyleV1 extends IPublisherBoxStyleV1 {
|
|
124
124
|
/**
|
|
125
|
-
* CSS color value. Absolute, like {@link
|
|
125
|
+
* CSS color value. Absolute, like {@link IPublisherColorBackgroundV1.color}.
|
|
126
126
|
*/
|
|
127
127
|
color?: string;
|
|
128
|
-
horizontalAlign?:
|
|
129
|
-
verticalAlign?:
|
|
128
|
+
horizontalAlign?: PublisherContentAlignmentV1;
|
|
129
|
+
verticalAlign?: PublisherContentAlignmentV1;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
132
|
* Styling of a heading slot.
|
|
133
133
|
*
|
|
134
134
|
* @alpha
|
|
135
135
|
*/
|
|
136
|
-
export interface
|
|
136
|
+
export interface IPublisherHeadingStyleV1 extends IPublisherTextStyleV1 {
|
|
137
137
|
/**
|
|
138
|
-
* Defaults to {@link
|
|
138
|
+
* Defaults to {@link DefaultPublisherHeadingTypeV1}. The size owns the semantic typography that goes
|
|
139
139
|
* with it; the rest of the style overrides ink and placement on top of it.
|
|
140
140
|
*/
|
|
141
|
-
type?:
|
|
141
|
+
type?: PublisherHeadingTypeV1;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* Styling of a paragraph slot.
|
|
145
145
|
*
|
|
146
146
|
* @alpha
|
|
147
147
|
*/
|
|
148
|
-
export interface
|
|
148
|
+
export interface IPublisherParagraphStyleV1 extends IPublisherTextStyleV1 {
|
|
149
149
|
/**
|
|
150
|
-
* Defaults to {@link
|
|
150
|
+
* Defaults to {@link DefaultPublisherParagraphTypeV1}.
|
|
151
151
|
*/
|
|
152
|
-
type?:
|
|
152
|
+
type?: PublisherParagraphTypeV1;
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
* Where the drawn image sits when it does not fill its box, and which part of it is kept when it
|
|
@@ -157,20 +157,20 @@ export interface IPublisherParagraphStyle extends IPublisherTextStyle {
|
|
|
157
157
|
*
|
|
158
158
|
* @alpha
|
|
159
159
|
*/
|
|
160
|
-
export interface
|
|
161
|
-
horizontalAlign?:
|
|
162
|
-
verticalAlign?:
|
|
160
|
+
export interface IPublisherImageStyleV1 {
|
|
161
|
+
horizontalAlign?: PublisherContentAlignmentV1;
|
|
162
|
+
verticalAlign?: PublisherContentAlignmentV1;
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
165
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherColorBackgroundV1}.
|
|
166
166
|
*
|
|
167
167
|
* @alpha
|
|
168
168
|
*/
|
|
169
|
-
export declare function
|
|
169
|
+
export declare function isPublisherColorBackgroundV1(obj: unknown): obj is IPublisherColorBackgroundV1;
|
|
170
170
|
/**
|
|
171
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
171
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherImageBackgroundV1}.
|
|
172
172
|
*
|
|
173
173
|
* @alpha
|
|
174
174
|
*/
|
|
175
|
-
export declare function
|
|
175
|
+
export declare function isPublisherImageBackgroundV1(obj: unknown): obj is IPublisherImageBackgroundV1;
|
|
176
176
|
//# sourceMappingURL=styling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styling.d.ts","sourceRoot":"","sources":["../../../src/publisher/v1/styling.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAAG,2BAA2B,CAAC;AAE9F;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,UAAU,CAAC,EAAE,qBAAqB,CAAC;IAEnC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI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A4B,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,2BAA2B,CAE7F;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,2BAA2B,CAE7F"}
|
|
@@ -5,54 +5,54 @@ import { isEmpty } from "lodash-es";
|
|
|
5
5
|
*
|
|
6
6
|
* @alpha
|
|
7
7
|
*/
|
|
8
|
-
export const
|
|
8
|
+
export const PublisherHeadingTypesV1 = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
9
9
|
/**
|
|
10
10
|
* All paragraph sizes, largest first.
|
|
11
11
|
*
|
|
12
12
|
* @alpha
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
14
|
+
export const PublisherParagraphTypesV1 = ["largeText", "normalText", "smallText"];
|
|
15
15
|
/**
|
|
16
16
|
* Size a heading slot that states none is rendered at.
|
|
17
17
|
*
|
|
18
18
|
* @alpha
|
|
19
19
|
*/
|
|
20
|
-
export const
|
|
20
|
+
export const DefaultPublisherHeadingTypeV1 = "h1";
|
|
21
21
|
/**
|
|
22
22
|
* Size a paragraph slot that states none is rendered at.
|
|
23
23
|
*
|
|
24
24
|
* @alpha
|
|
25
25
|
*/
|
|
26
|
-
export const
|
|
26
|
+
export const DefaultPublisherParagraphTypeV1 = "normalText";
|
|
27
27
|
/**
|
|
28
|
-
* Type-guard testing whether the value is a {@link
|
|
28
|
+
* Type-guard testing whether the value is a {@link PublisherHeadingTypeV1}.
|
|
29
29
|
*
|
|
30
30
|
* @alpha
|
|
31
31
|
*/
|
|
32
|
-
export function
|
|
33
|
-
return
|
|
32
|
+
export function isPublisherHeadingTypeV1(value) {
|
|
33
|
+
return PublisherHeadingTypesV1.includes(value);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Type-guard testing whether the value is a {@link
|
|
36
|
+
* Type-guard testing whether the value is a {@link PublisherParagraphTypeV1}.
|
|
37
37
|
*
|
|
38
38
|
* @alpha
|
|
39
39
|
*/
|
|
40
|
-
export function
|
|
41
|
-
return
|
|
40
|
+
export function isPublisherParagraphTypeV1(value) {
|
|
41
|
+
return PublisherParagraphTypesV1.includes(value);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
44
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherColorBackgroundV1}.
|
|
45
45
|
*
|
|
46
46
|
* @alpha
|
|
47
47
|
*/
|
|
48
|
-
export function
|
|
48
|
+
export function isPublisherColorBackgroundV1(obj) {
|
|
49
49
|
return !isEmpty(obj) && obj.type === "color";
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Type-guard testing whether the provided object is an instance of {@link
|
|
52
|
+
* Type-guard testing whether the provided object is an instance of {@link IPublisherImageBackgroundV1}.
|
|
53
53
|
*
|
|
54
54
|
* @alpha
|
|
55
55
|
*/
|
|
56
|
-
export function
|
|
56
|
+
export function isPublisherImageBackgroundV1(obj) {
|
|
57
57
|
return !isEmpty(obj) && obj.type === "image";
|
|
58
58
|
}
|