storyblok 3.28.0 → 3.29.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <h1 align="center">Storyblok CLI</h1>
3
- <p align="center">A simple CLI for scaffolding <a href="https://www.storyblok.com" target="_blank">Storyblok</a> projects and fieldtypes.</p>
3
+ <p align="center">A simple CLI for scaffolding <a href="https://www.storyblok.com?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok" target="_blank">Storyblok</a> projects and fieldtypes.</p>
4
4
  </p>
5
5
 
6
6
  [![npm](https://img.shields.io/npm/v/storyblok.svg)](https://www.npmjs.com/package/storyblok)
@@ -0,0 +1,27 @@
1
+ const teaser = `<div class="quickstart__teaser">
2
+ <!--
3
+ The _editable attribute makes the next
4
+ DOM-element clickable so the sidebar can
5
+ show the right component.
6
+ -->
7
+ {{ blok._editable }}
8
+ <div class="quickstart__inner-teaser">
9
+ <svg class="icon"><use xlink:href="#icon-congrats"></use></svg>
10
+ <h2>
11
+ <!--
12
+ You can access every attribute you
13
+ define in the schema in the blok variable
14
+ -->
15
+ {{ blok.headline }}
16
+ </h2>
17
+ <h3>
18
+ Congrats, you have created the teaser template!<br>
19
+ <a target="_blank" href="https://www.storyblok.com/docs/Rendering-Service/Theme-Documentation">
20
+ Read the theme documentation
21
+ </a>
22
+ <!-- HINT: Try to change something and the browser window in Storyblok will automatically refresh. -->
23
+ </h3>
24
+ </div>
25
+ </div>`;
26
+
27
+ export { teaser as default };
package/dist/cli.d.mts ADDED
@@ -0,0 +1,69 @@
1
+ import { Options, JSONSchema } from 'json-schema-to-typescript';
2
+ export { ISbStoryData } from 'storyblok-js-client';
3
+
4
+ type StoryblokProvidedPropertyType = "asset" | "multiasset" | "multilink" | "table" | "richtext";
5
+ type ComponentPropertySchemaType = StoryblokProvidedPropertyType | "array" | "bloks" | "boolean" | "custom" | "datetime" | "image" | "markdown" | "number" | "option" | "options" | "text" | "textarea";
6
+ type JSONSchemaToTSOptions = Partial<Options>;
7
+ interface GenerateTypescriptTypedefsCLIOptions {
8
+ sourceFilePaths: string[];
9
+ destinationFilePath?: string;
10
+ typeNamesPrefix?: string;
11
+ typeNamesSuffix?: string;
12
+ customFieldTypesParserPath?: string;
13
+ JSONSchemaToTSOptionsPath?: string;
14
+ }
15
+ interface ComponentPropertySchemaOption {
16
+ _uid: string;
17
+ name: string;
18
+ value: string;
19
+ }
20
+ type ComponentPropertySchema = {
21
+ asset_link_type?: boolean;
22
+ component_group_whitelist?: string[];
23
+ component_whitelist?: string[];
24
+ email_link_type?: boolean;
25
+ exclude_empty_option?: boolean;
26
+ filter_content_type?: string[];
27
+ key: string;
28
+ options?: ComponentPropertySchemaOption[];
29
+ pos: number;
30
+ restrict_components?: boolean;
31
+ restrict_type?: "groups" | "";
32
+ source?: "internal" | "external" | "internal_stories" | "internal_languages";
33
+ type: ComponentPropertySchemaType;
34
+ use_uuid?: boolean;
35
+ };
36
+ type ComponentPropertyTypeAnnotation = {
37
+ tsType: string | string[];
38
+ } | {
39
+ type: string | string[];
40
+ enum: string[];
41
+ } | {
42
+ type: string | string[];
43
+ } | {
44
+ type: "array";
45
+ items: {
46
+ type: string | string[];
47
+ };
48
+ } | {
49
+ type: "array";
50
+ items: {
51
+ enum: string[];
52
+ };
53
+ };
54
+ type GenerateTSTypedefsFromComponentsJSONSchemasOptions = {
55
+ sourceFilePaths: string[];
56
+ destinationFilePath: string;
57
+ typeNamesPrefix?: string;
58
+ typeNamesSuffix?: string;
59
+ customFieldTypesParserPath?: string;
60
+ JSONSchemaToTSCustomOptions: JSONSchemaToTSOptions;
61
+ };
62
+ type CustomTypeParser = (_typeName: string, _schema: ComponentPropertySchema) => Record<string, any>;
63
+ type GetStoryblokProvidedPropertyTypeSchemaFn = (title: string) => JSONSchema;
64
+ type ComponentGroupsAndNamesObject = {
65
+ componentGroups: Map<string, Set<string>>;
66
+ componentNames: Set<string>;
67
+ };
68
+
69
+ export type { ComponentGroupsAndNamesObject, ComponentPropertySchema, ComponentPropertySchemaOption, ComponentPropertySchemaType, ComponentPropertyTypeAnnotation, CustomTypeParser, GenerateTSTypedefsFromComponentsJSONSchemasOptions, GenerateTypescriptTypedefsCLIOptions, GetStoryblokProvidedPropertyTypeSchemaFn, JSONSchemaToTSOptions, StoryblokProvidedPropertyType };
package/dist/cli.d.ts ADDED
@@ -0,0 +1,69 @@
1
+ import { Options, JSONSchema } from 'json-schema-to-typescript';
2
+ export { ISbStoryData } from 'storyblok-js-client';
3
+
4
+ type StoryblokProvidedPropertyType = "asset" | "multiasset" | "multilink" | "table" | "richtext";
5
+ type ComponentPropertySchemaType = StoryblokProvidedPropertyType | "array" | "bloks" | "boolean" | "custom" | "datetime" | "image" | "markdown" | "number" | "option" | "options" | "text" | "textarea";
6
+ type JSONSchemaToTSOptions = Partial<Options>;
7
+ interface GenerateTypescriptTypedefsCLIOptions {
8
+ sourceFilePaths: string[];
9
+ destinationFilePath?: string;
10
+ typeNamesPrefix?: string;
11
+ typeNamesSuffix?: string;
12
+ customFieldTypesParserPath?: string;
13
+ JSONSchemaToTSOptionsPath?: string;
14
+ }
15
+ interface ComponentPropertySchemaOption {
16
+ _uid: string;
17
+ name: string;
18
+ value: string;
19
+ }
20
+ type ComponentPropertySchema = {
21
+ asset_link_type?: boolean;
22
+ component_group_whitelist?: string[];
23
+ component_whitelist?: string[];
24
+ email_link_type?: boolean;
25
+ exclude_empty_option?: boolean;
26
+ filter_content_type?: string[];
27
+ key: string;
28
+ options?: ComponentPropertySchemaOption[];
29
+ pos: number;
30
+ restrict_components?: boolean;
31
+ restrict_type?: "groups" | "";
32
+ source?: "internal" | "external" | "internal_stories" | "internal_languages";
33
+ type: ComponentPropertySchemaType;
34
+ use_uuid?: boolean;
35
+ };
36
+ type ComponentPropertyTypeAnnotation = {
37
+ tsType: string | string[];
38
+ } | {
39
+ type: string | string[];
40
+ enum: string[];
41
+ } | {
42
+ type: string | string[];
43
+ } | {
44
+ type: "array";
45
+ items: {
46
+ type: string | string[];
47
+ };
48
+ } | {
49
+ type: "array";
50
+ items: {
51
+ enum: string[];
52
+ };
53
+ };
54
+ type GenerateTSTypedefsFromComponentsJSONSchemasOptions = {
55
+ sourceFilePaths: string[];
56
+ destinationFilePath: string;
57
+ typeNamesPrefix?: string;
58
+ typeNamesSuffix?: string;
59
+ customFieldTypesParserPath?: string;
60
+ JSONSchemaToTSCustomOptions: JSONSchemaToTSOptions;
61
+ };
62
+ type CustomTypeParser = (_typeName: string, _schema: ComponentPropertySchema) => Record<string, any>;
63
+ type GetStoryblokProvidedPropertyTypeSchemaFn = (title: string) => JSONSchema;
64
+ type ComponentGroupsAndNamesObject = {
65
+ componentGroups: Map<string, Set<string>>;
66
+ componentNames: Set<string>;
67
+ };
68
+
69
+ export type { ComponentGroupsAndNamesObject, ComponentPropertySchema, ComponentPropertySchemaOption, ComponentPropertySchemaType, ComponentPropertyTypeAnnotation, CustomTypeParser, GenerateTSTypedefsFromComponentsJSONSchemasOptions, GenerateTypescriptTypedefsCLIOptions, GetStoryblokProvidedPropertyTypeSchemaFn, JSONSchemaToTSOptions, StoryblokProvidedPropertyType };