@commercetools-demo/puck-types 0.5.1 → 0.6.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.d.mts +73 -51
- package/dist/index.d.ts +73 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -113,56 +113,6 @@ interface PuckContentVersion {
|
|
|
113
113
|
versions: PuckContentVersionEntry[];
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
interface ThemeTokens {
|
|
117
|
-
colorPrimary: string;
|
|
118
|
-
colorPrimaryHover: string;
|
|
119
|
-
colorPrimaryForeground?: string;
|
|
120
|
-
colorSecondary: string;
|
|
121
|
-
colorSecondaryForeground?: string;
|
|
122
|
-
colorBackground: string;
|
|
123
|
-
colorSurface: string;
|
|
124
|
-
colorText: string;
|
|
125
|
-
colorTextMuted: string;
|
|
126
|
-
colorForeground?: string;
|
|
127
|
-
colorMuted?: string;
|
|
128
|
-
colorMutedForeground?: string;
|
|
129
|
-
colorDestructive?: string;
|
|
130
|
-
colorDestructiveForeground?: string;
|
|
131
|
-
colorAccent?: string;
|
|
132
|
-
colorAccentForeground?: string;
|
|
133
|
-
colorBorder?: string;
|
|
134
|
-
colorInput?: string;
|
|
135
|
-
colorRing?: string;
|
|
136
|
-
colorShadowLight?: string;
|
|
137
|
-
colorShadowDark?: string;
|
|
138
|
-
colorSurfaceGlass?: string;
|
|
139
|
-
borderRadius: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
140
|
-
borderWidth: '0' | '1' | '2';
|
|
141
|
-
borderStyle?: 'solid' | 'dashed' | 'double';
|
|
142
|
-
fontFamily: string;
|
|
143
|
-
fontHeading: string;
|
|
144
|
-
fontWeightBase?: '300' | '400' | '500';
|
|
145
|
-
fontWeightHeading?: '400' | '500' | '700' | '900';
|
|
146
|
-
letterSpacing?: 'tight' | 'normal' | 'wide' | 'wider';
|
|
147
|
-
textTransform?: 'none' | 'uppercase';
|
|
148
|
-
spacingScale: number;
|
|
149
|
-
buttonStyle: 'solid' | 'outline' | 'ghost';
|
|
150
|
-
cardShadow: 'none' | 'sm' | 'md' | 'lg';
|
|
151
|
-
headerStyle: 'transparent' | 'solid' | 'minimal';
|
|
152
|
-
shadowStyle?: 'none' | 'soft' | 'hard-offset' | 'neumorphic' | 'clay' | 'glow';
|
|
153
|
-
surfaceBlur?: 'none' | 'sm' | 'md' | 'lg';
|
|
154
|
-
surfaceOpacity?: number;
|
|
155
|
-
backgroundStyle?: 'solid' | 'gradient' | 'noise';
|
|
156
|
-
animationStyle?: string;
|
|
157
|
-
}
|
|
158
|
-
interface ImportResult {
|
|
159
|
-
imported: string[];
|
|
160
|
-
failed: Array<{
|
|
161
|
-
key: string;
|
|
162
|
-
error: string;
|
|
163
|
-
}>;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
116
|
interface MediaFile {
|
|
167
117
|
url: string;
|
|
168
118
|
name: string;
|
|
@@ -227,4 +177,76 @@ type PuckContentWithStatesResponse = PuckContentWithStates;
|
|
|
227
177
|
type PuckContentStateResponse = PuckContentState;
|
|
228
178
|
type PuckContentVersionResponse = PuckContentVersion;
|
|
229
179
|
|
|
230
|
-
|
|
180
|
+
/** Whether a template seeds a page or a content item. */
|
|
181
|
+
type PuckTemplateKind = 'page' | 'content';
|
|
182
|
+
interface PuckTemplateValue {
|
|
183
|
+
key: string;
|
|
184
|
+
businessUnitKey: string;
|
|
185
|
+
name: string;
|
|
186
|
+
kind: PuckTemplateKind;
|
|
187
|
+
/** Puck data snapshot used to seed new pages/content (stripped or full). */
|
|
188
|
+
puckData: Data;
|
|
189
|
+
createdAt: string;
|
|
190
|
+
updatedAt: string;
|
|
191
|
+
}
|
|
192
|
+
/** A template as returned by the API (custom-object wrapper). */
|
|
193
|
+
type PuckTemplateListItem = CtCustomObject<PuckTemplateValue>;
|
|
194
|
+
interface CreatePuckTemplateInput {
|
|
195
|
+
name: string;
|
|
196
|
+
kind: PuckTemplateKind;
|
|
197
|
+
puckData: Data;
|
|
198
|
+
}
|
|
199
|
+
type PuckTemplateResponse = CtCustomObject<PuckTemplateValue>;
|
|
200
|
+
type PuckTemplateListResponse = PuckTemplateListItem[];
|
|
201
|
+
|
|
202
|
+
interface ThemeTokens {
|
|
203
|
+
colorPrimary: string;
|
|
204
|
+
colorPrimaryHover: string;
|
|
205
|
+
colorPrimaryForeground?: string;
|
|
206
|
+
colorSecondary: string;
|
|
207
|
+
colorSecondaryForeground?: string;
|
|
208
|
+
colorBackground: string;
|
|
209
|
+
colorSurface: string;
|
|
210
|
+
colorText: string;
|
|
211
|
+
colorTextMuted: string;
|
|
212
|
+
colorForeground?: string;
|
|
213
|
+
colorMuted?: string;
|
|
214
|
+
colorMutedForeground?: string;
|
|
215
|
+
colorDestructive?: string;
|
|
216
|
+
colorDestructiveForeground?: string;
|
|
217
|
+
colorAccent?: string;
|
|
218
|
+
colorAccentForeground?: string;
|
|
219
|
+
colorBorder?: string;
|
|
220
|
+
colorInput?: string;
|
|
221
|
+
colorRing?: string;
|
|
222
|
+
colorShadowLight?: string;
|
|
223
|
+
colorShadowDark?: string;
|
|
224
|
+
colorSurfaceGlass?: string;
|
|
225
|
+
borderRadius: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
226
|
+
borderWidth: '0' | '1' | '2';
|
|
227
|
+
borderStyle?: 'solid' | 'dashed' | 'double';
|
|
228
|
+
fontFamily: string;
|
|
229
|
+
fontHeading: string;
|
|
230
|
+
fontWeightBase?: '300' | '400' | '500';
|
|
231
|
+
fontWeightHeading?: '400' | '500' | '700' | '900';
|
|
232
|
+
letterSpacing?: 'tight' | 'normal' | 'wide' | 'wider';
|
|
233
|
+
textTransform?: 'none' | 'uppercase';
|
|
234
|
+
spacingScale: number;
|
|
235
|
+
buttonStyle: 'solid' | 'outline' | 'ghost';
|
|
236
|
+
cardShadow: 'none' | 'sm' | 'md' | 'lg';
|
|
237
|
+
headerStyle: 'transparent' | 'solid' | 'minimal';
|
|
238
|
+
shadowStyle?: 'none' | 'soft' | 'hard-offset' | 'neumorphic' | 'clay' | 'glow';
|
|
239
|
+
surfaceBlur?: 'none' | 'sm' | 'md' | 'lg';
|
|
240
|
+
surfaceOpacity?: number;
|
|
241
|
+
backgroundStyle?: 'solid' | 'gradient' | 'noise';
|
|
242
|
+
animationStyle?: string;
|
|
243
|
+
}
|
|
244
|
+
interface ImportResult {
|
|
245
|
+
imported: string[];
|
|
246
|
+
failed: Array<{
|
|
247
|
+
key: string;
|
|
248
|
+
error: string;
|
|
249
|
+
}>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export type { CreatePuckContentInput, CreatePuckPageInput, CreatePuckTemplateInput, CtCustomObject, ImportResult, MediaFile, MediaLibraryPagination, MediaLibraryResult, PuckContentListItem, PuckContentListResponse, PuckContentMeta, PuckContentResponse, PuckContentState, PuckContentStateInfo, PuckContentStateResponse, PuckContentValue, PuckContentVersion, PuckContentVersionEntry, PuckContentVersionResponse, PuckContentWithStates, PuckContentWithStatesResponse, PuckPageListItem, PuckPageListResponse, PuckPageMeta, PuckPageResponse, PuckPageState, PuckPageStateResponse, PuckPageValue, PuckPageVersion, PuckPageVersionEntry, PuckPageVersionResponse, PuckPageWithStates, PuckPageWithStatesResponse, PuckStateInfo, PuckTemplateKind, PuckTemplateListItem, PuckTemplateListResponse, PuckTemplateResponse, PuckTemplateValue, ThemeTokens, UpdatePuckContentInput, UpdatePuckPageInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -113,56 +113,6 @@ interface PuckContentVersion {
|
|
|
113
113
|
versions: PuckContentVersionEntry[];
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
interface ThemeTokens {
|
|
117
|
-
colorPrimary: string;
|
|
118
|
-
colorPrimaryHover: string;
|
|
119
|
-
colorPrimaryForeground?: string;
|
|
120
|
-
colorSecondary: string;
|
|
121
|
-
colorSecondaryForeground?: string;
|
|
122
|
-
colorBackground: string;
|
|
123
|
-
colorSurface: string;
|
|
124
|
-
colorText: string;
|
|
125
|
-
colorTextMuted: string;
|
|
126
|
-
colorForeground?: string;
|
|
127
|
-
colorMuted?: string;
|
|
128
|
-
colorMutedForeground?: string;
|
|
129
|
-
colorDestructive?: string;
|
|
130
|
-
colorDestructiveForeground?: string;
|
|
131
|
-
colorAccent?: string;
|
|
132
|
-
colorAccentForeground?: string;
|
|
133
|
-
colorBorder?: string;
|
|
134
|
-
colorInput?: string;
|
|
135
|
-
colorRing?: string;
|
|
136
|
-
colorShadowLight?: string;
|
|
137
|
-
colorShadowDark?: string;
|
|
138
|
-
colorSurfaceGlass?: string;
|
|
139
|
-
borderRadius: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
140
|
-
borderWidth: '0' | '1' | '2';
|
|
141
|
-
borderStyle?: 'solid' | 'dashed' | 'double';
|
|
142
|
-
fontFamily: string;
|
|
143
|
-
fontHeading: string;
|
|
144
|
-
fontWeightBase?: '300' | '400' | '500';
|
|
145
|
-
fontWeightHeading?: '400' | '500' | '700' | '900';
|
|
146
|
-
letterSpacing?: 'tight' | 'normal' | 'wide' | 'wider';
|
|
147
|
-
textTransform?: 'none' | 'uppercase';
|
|
148
|
-
spacingScale: number;
|
|
149
|
-
buttonStyle: 'solid' | 'outline' | 'ghost';
|
|
150
|
-
cardShadow: 'none' | 'sm' | 'md' | 'lg';
|
|
151
|
-
headerStyle: 'transparent' | 'solid' | 'minimal';
|
|
152
|
-
shadowStyle?: 'none' | 'soft' | 'hard-offset' | 'neumorphic' | 'clay' | 'glow';
|
|
153
|
-
surfaceBlur?: 'none' | 'sm' | 'md' | 'lg';
|
|
154
|
-
surfaceOpacity?: number;
|
|
155
|
-
backgroundStyle?: 'solid' | 'gradient' | 'noise';
|
|
156
|
-
animationStyle?: string;
|
|
157
|
-
}
|
|
158
|
-
interface ImportResult {
|
|
159
|
-
imported: string[];
|
|
160
|
-
failed: Array<{
|
|
161
|
-
key: string;
|
|
162
|
-
error: string;
|
|
163
|
-
}>;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
116
|
interface MediaFile {
|
|
167
117
|
url: string;
|
|
168
118
|
name: string;
|
|
@@ -227,4 +177,76 @@ type PuckContentWithStatesResponse = PuckContentWithStates;
|
|
|
227
177
|
type PuckContentStateResponse = PuckContentState;
|
|
228
178
|
type PuckContentVersionResponse = PuckContentVersion;
|
|
229
179
|
|
|
230
|
-
|
|
180
|
+
/** Whether a template seeds a page or a content item. */
|
|
181
|
+
type PuckTemplateKind = 'page' | 'content';
|
|
182
|
+
interface PuckTemplateValue {
|
|
183
|
+
key: string;
|
|
184
|
+
businessUnitKey: string;
|
|
185
|
+
name: string;
|
|
186
|
+
kind: PuckTemplateKind;
|
|
187
|
+
/** Puck data snapshot used to seed new pages/content (stripped or full). */
|
|
188
|
+
puckData: Data;
|
|
189
|
+
createdAt: string;
|
|
190
|
+
updatedAt: string;
|
|
191
|
+
}
|
|
192
|
+
/** A template as returned by the API (custom-object wrapper). */
|
|
193
|
+
type PuckTemplateListItem = CtCustomObject<PuckTemplateValue>;
|
|
194
|
+
interface CreatePuckTemplateInput {
|
|
195
|
+
name: string;
|
|
196
|
+
kind: PuckTemplateKind;
|
|
197
|
+
puckData: Data;
|
|
198
|
+
}
|
|
199
|
+
type PuckTemplateResponse = CtCustomObject<PuckTemplateValue>;
|
|
200
|
+
type PuckTemplateListResponse = PuckTemplateListItem[];
|
|
201
|
+
|
|
202
|
+
interface ThemeTokens {
|
|
203
|
+
colorPrimary: string;
|
|
204
|
+
colorPrimaryHover: string;
|
|
205
|
+
colorPrimaryForeground?: string;
|
|
206
|
+
colorSecondary: string;
|
|
207
|
+
colorSecondaryForeground?: string;
|
|
208
|
+
colorBackground: string;
|
|
209
|
+
colorSurface: string;
|
|
210
|
+
colorText: string;
|
|
211
|
+
colorTextMuted: string;
|
|
212
|
+
colorForeground?: string;
|
|
213
|
+
colorMuted?: string;
|
|
214
|
+
colorMutedForeground?: string;
|
|
215
|
+
colorDestructive?: string;
|
|
216
|
+
colorDestructiveForeground?: string;
|
|
217
|
+
colorAccent?: string;
|
|
218
|
+
colorAccentForeground?: string;
|
|
219
|
+
colorBorder?: string;
|
|
220
|
+
colorInput?: string;
|
|
221
|
+
colorRing?: string;
|
|
222
|
+
colorShadowLight?: string;
|
|
223
|
+
colorShadowDark?: string;
|
|
224
|
+
colorSurfaceGlass?: string;
|
|
225
|
+
borderRadius: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
226
|
+
borderWidth: '0' | '1' | '2';
|
|
227
|
+
borderStyle?: 'solid' | 'dashed' | 'double';
|
|
228
|
+
fontFamily: string;
|
|
229
|
+
fontHeading: string;
|
|
230
|
+
fontWeightBase?: '300' | '400' | '500';
|
|
231
|
+
fontWeightHeading?: '400' | '500' | '700' | '900';
|
|
232
|
+
letterSpacing?: 'tight' | 'normal' | 'wide' | 'wider';
|
|
233
|
+
textTransform?: 'none' | 'uppercase';
|
|
234
|
+
spacingScale: number;
|
|
235
|
+
buttonStyle: 'solid' | 'outline' | 'ghost';
|
|
236
|
+
cardShadow: 'none' | 'sm' | 'md' | 'lg';
|
|
237
|
+
headerStyle: 'transparent' | 'solid' | 'minimal';
|
|
238
|
+
shadowStyle?: 'none' | 'soft' | 'hard-offset' | 'neumorphic' | 'clay' | 'glow';
|
|
239
|
+
surfaceBlur?: 'none' | 'sm' | 'md' | 'lg';
|
|
240
|
+
surfaceOpacity?: number;
|
|
241
|
+
backgroundStyle?: 'solid' | 'gradient' | 'noise';
|
|
242
|
+
animationStyle?: string;
|
|
243
|
+
}
|
|
244
|
+
interface ImportResult {
|
|
245
|
+
imported: string[];
|
|
246
|
+
failed: Array<{
|
|
247
|
+
key: string;
|
|
248
|
+
error: string;
|
|
249
|
+
}>;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export type { CreatePuckContentInput, CreatePuckPageInput, CreatePuckTemplateInput, CtCustomObject, ImportResult, MediaFile, MediaLibraryPagination, MediaLibraryResult, PuckContentListItem, PuckContentListResponse, PuckContentMeta, PuckContentResponse, PuckContentState, PuckContentStateInfo, PuckContentStateResponse, PuckContentValue, PuckContentVersion, PuckContentVersionEntry, PuckContentVersionResponse, PuckContentWithStates, PuckContentWithStatesResponse, PuckPageListItem, PuckPageListResponse, PuckPageMeta, PuckPageResponse, PuckPageState, PuckPageStateResponse, PuckPageValue, PuckPageVersion, PuckPageVersionEntry, PuckPageVersionResponse, PuckPageWithStates, PuckPageWithStatesResponse, PuckStateInfo, PuckTemplateKind, PuckTemplateListItem, PuckTemplateListResponse, PuckTemplateResponse, PuckTemplateValue, ThemeTokens, UpdatePuckContentInput, UpdatePuckPageInput };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type {\n PuckConfig,\n PuckComponentConfig,\n PuckData,\n PuckComponentData,\n Fields,\n Field,\n} from './puck-data.types';\n\nexport type {\n PuckPageMeta,\n PuckPageValue,\n PuckPageListItem,\n PuckPageWithStates,\n} from './puck-page.types';\n\nexport type {\n PuckStateInfo,\n PuckPageState,\n PuckPageVersionEntry,\n PuckPageVersion,\n} from './puck-state.types';\n\nexport type {\n PuckContentMeta,\n PuckContentValue,\n PuckContentStateInfo,\n PuckContentListItem,\n PuckContentWithStates,\n PuckContentState,\n PuckContentVersionEntry,\n PuckContentVersion,\n} from './puck-content.types';\n\nexport type { ThemeTokens, ImportResult } from './theme-types';\n\nexport type {\n MediaFile,\n MediaLibraryPagination,\n MediaLibraryResult,\n CtCustomObject,\n CreatePuckPageInput,\n UpdatePuckPageInput,\n PuckPageResponse,\n PuckPageListResponse,\n PuckPageWithStatesResponse,\n PuckPageStateResponse,\n PuckPageVersionResponse,\n CreatePuckContentInput,\n UpdatePuckContentInput,\n PuckContentResponse,\n PuckContentListResponse,\n PuckContentWithStatesResponse,\n PuckContentStateResponse,\n PuckContentVersionResponse,\n} from './puck-api.types';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type {\n PuckConfig,\n PuckComponentConfig,\n PuckData,\n PuckComponentData,\n Fields,\n Field,\n} from './puck-data.types';\n\nexport type {\n PuckPageMeta,\n PuckPageValue,\n PuckPageListItem,\n PuckPageWithStates,\n} from './puck-page.types';\n\nexport type {\n PuckStateInfo,\n PuckPageState,\n PuckPageVersionEntry,\n PuckPageVersion,\n} from './puck-state.types';\n\nexport type {\n PuckContentMeta,\n PuckContentValue,\n PuckContentStateInfo,\n PuckContentListItem,\n PuckContentWithStates,\n PuckContentState,\n PuckContentVersionEntry,\n PuckContentVersion,\n} from './puck-content.types';\n\nexport type {\n PuckTemplateKind,\n PuckTemplateValue,\n PuckTemplateListItem,\n CreatePuckTemplateInput,\n PuckTemplateResponse,\n PuckTemplateListResponse,\n} from './puck-template.types';\n\nexport type { ThemeTokens, ImportResult } from './theme-types';\n\nexport type {\n MediaFile,\n MediaLibraryPagination,\n MediaLibraryResult,\n CtCustomObject,\n CreatePuckPageInput,\n UpdatePuckPageInput,\n PuckPageResponse,\n PuckPageListResponse,\n PuckPageWithStatesResponse,\n PuckPageStateResponse,\n PuckPageVersionResponse,\n CreatePuckContentInput,\n UpdatePuckContentInput,\n PuckContentResponse,\n PuckContentListResponse,\n PuckContentWithStatesResponse,\n PuckContentStateResponse,\n PuckContentVersionResponse,\n} from './puck-api.types';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|