@shop-on/theme-contract 0.1.0 → 0.3.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/dist/index.d.ts CHANGED
@@ -8,4 +8,5 @@ import { ARTICLE_ATTRIBUTE_KEYS, ArticleAttributeKey, BLOG_ATTRIBUTE_KEYS, BlogA
8
8
  import { metaobjectGid, metaobjectIdFromGid } from "./metaobject-gid.js";
9
9
  import { RICHTEXT_ALLOWED_TAGS, RichtextTag } from "./richtext.js";
10
10
  import { isNodeIdToken, nodeGid } from "./node-id.js";
11
- export { ARTICLE_ATTRIBUTE_KEYS, ArticleAttributeKey, BLOCK_PATH_SEPARATOR, BLOG_ATTRIBUTE_KEYS, BlockDefinition, BlockSchema, BlogAttributeKey, COLLECTION_ATTRIBUTE_KEYS, COLLECTION_INLINE_ATTRIBUTE_KEYS, CollectedTypes, CollectionAttributeBindingSources, CollectionAttributeKey, CollectionInlineAttributeKey, EDITOR_COMMANDS, EditorCommand, EditorKeyInput, FieldSource, InlineSegment, InlineSources, LayoutGroupDef, MAX_PALETTE_COLORS, MIN_PALETTE_COLORS, PAGE_ATTRIBUTE_KEYS, PALETTE_FALLBACK_COLOR, PALETTE_GROUP_TYPE, PALETTE_PREFIX, PALETTE_REF_PREFIX, PRODUCT_ATTRIBUTE_KEYS, PageAttributeKey, PaletteColor, ProductAttributeKey, RICHTEXT_ALLOWED_TAGS, ResolverCtx, ResolverScope, ResolverShape, ResolverSpec, RichtextTag, SKIP, SchemaSetting, SectionGroup, SectionGroupData, SectionPreset, SectionSchema, SeedMissingStaticsReport, SelectedSection, SettingBinding, SettingBindings, SettingValue, SettingsData, SettingsSchema, SettingsSchemaSection, Skip, Template, TemplateBlock, TemplateSection, TemplateShape, WholeValueBindingOpts, applyCollectionAttributeBindings, applyInlineSources, applyMetafieldBindings, applyMetaobjectFieldBindings, blockPathsEqual, buildBlockInstance, buildDisabledAncestorSet, buildParentMap, buildSectionInstance, buildStaticChildren, collectCollectionAttributeBindings, collectMetaobjectEntryIds, collectTraversedEntryIds, collectTypes, comparePaletteIds, decodeStorefrontMetafield, defaultSettings, editorCommand, encodeSourceToken, escapeInertHtmlText, hasPaletteRefs, isBlockPathPrefix, isEditorCommand, isNodeIdToken, joinBlockPath, metafieldDefinitionFitsSetting, metafieldTypeSupportsInlineToken, metafieldTypeToSettingTypes, metaobjectGid, metaobjectIdFromGid, nodeGid, normalizeBlockPath, paletteKey, paletteRef, paletteValues, parsePalette, parsePaletteRef, parseSourceDescriptor, resolveContainerAtPath, resolveField, resolvePaletteRefs, resolvePaletteValue, resolveThemeSettingsPalette, seedMissingStatics, selectRenderableChildren, selectRenderableSections, serializeSourceDescriptor, settingTypeSupportsBinding, shortcutKey, splitBlockPath, splitInlineTokens, staticBlockId, staticChildId, stripInlineTokenSentinels, stripStaticFromBlockOrder, undoHotkey, walkBlocks, walkSections };
11
+ import { INSTALL_ID_RE, STORE_SLUG_RE } from "./store-path.js";
12
+ export { ARTICLE_ATTRIBUTE_KEYS, ArticleAttributeKey, BLOCK_PATH_SEPARATOR, BLOG_ATTRIBUTE_KEYS, BlockDefinition, BlockSchema, BlogAttributeKey, COLLECTION_ATTRIBUTE_KEYS, COLLECTION_INLINE_ATTRIBUTE_KEYS, CollectedTypes, CollectionAttributeBindingSources, CollectionAttributeKey, CollectionInlineAttributeKey, EDITOR_COMMANDS, EditorCommand, EditorKeyInput, FieldSource, INSTALL_ID_RE, InlineSegment, InlineSources, LayoutGroupDef, MAX_PALETTE_COLORS, MIN_PALETTE_COLORS, PAGE_ATTRIBUTE_KEYS, PALETTE_FALLBACK_COLOR, PALETTE_GROUP_TYPE, PALETTE_PREFIX, PALETTE_REF_PREFIX, PRODUCT_ATTRIBUTE_KEYS, PageAttributeKey, PaletteColor, ProductAttributeKey, RICHTEXT_ALLOWED_TAGS, ResolverCtx, ResolverScope, ResolverShape, ResolverSpec, RichtextTag, SKIP, STORE_SLUG_RE, SchemaSetting, SectionGroup, SectionGroupData, SectionPreset, SectionSchema, SeedMissingStaticsReport, SelectedSection, SettingBinding, SettingBindings, SettingValue, SettingsData, SettingsSchema, SettingsSchemaSection, Skip, Template, TemplateBlock, TemplateSection, TemplateShape, WholeValueBindingOpts, applyCollectionAttributeBindings, applyInlineSources, applyMetafieldBindings, applyMetaobjectFieldBindings, blockPathsEqual, buildBlockInstance, buildDisabledAncestorSet, buildParentMap, buildSectionInstance, buildStaticChildren, collectCollectionAttributeBindings, collectMetaobjectEntryIds, collectTraversedEntryIds, collectTypes, comparePaletteIds, decodeStorefrontMetafield, defaultSettings, editorCommand, encodeSourceToken, escapeInertHtmlText, hasPaletteRefs, isBlockPathPrefix, isEditorCommand, isNodeIdToken, joinBlockPath, metafieldDefinitionFitsSetting, metafieldTypeSupportsInlineToken, metafieldTypeToSettingTypes, metaobjectGid, metaobjectIdFromGid, nodeGid, normalizeBlockPath, paletteKey, paletteRef, paletteValues, parsePalette, parsePaletteRef, parseSourceDescriptor, resolveContainerAtPath, resolveField, resolvePaletteRefs, resolvePaletteValue, resolveThemeSettingsPalette, seedMissingStatics, selectRenderableChildren, selectRenderableSections, serializeSourceDescriptor, settingTypeSupportsBinding, shortcutKey, splitBlockPath, splitInlineTokens, staticBlockId, staticChildId, stripInlineTokenSentinels, stripStaticFromBlockOrder, undoHotkey, walkBlocks, walkSections };
package/dist/index.js CHANGED
@@ -8,4 +8,5 @@ import { metaobjectGid, metaobjectIdFromGid } from "./metaobject-gid.js";
8
8
  import { ARTICLE_ATTRIBUTE_KEYS, BLOG_ATTRIBUTE_KEYS, COLLECTION_ATTRIBUTE_KEYS, COLLECTION_INLINE_ATTRIBUTE_KEYS, PAGE_ATTRIBUTE_KEYS, PRODUCT_ATTRIBUTE_KEYS, applyCollectionAttributeBindings, applyInlineSources, applyMetafieldBindings, applyMetaobjectFieldBindings, collectCollectionAttributeBindings, collectMetaobjectEntryIds, collectTraversedEntryIds, decodeStorefrontMetafield, encodeSourceToken, escapeInertHtmlText, metafieldDefinitionFitsSetting, metafieldTypeSupportsInlineToken, metafieldTypeToSettingTypes, parseSourceDescriptor, serializeSourceDescriptor, settingTypeSupportsBinding, splitInlineTokens, stripInlineTokenSentinels } from "./metafield-binding.js";
9
9
  import { RICHTEXT_ALLOWED_TAGS } from "./richtext.js";
10
10
  import { isNodeIdToken, nodeGid } from "./node-id.js";
11
- export { ARTICLE_ATTRIBUTE_KEYS, BLOCK_PATH_SEPARATOR, BLOG_ATTRIBUTE_KEYS, BlockDefinition, BlockSchema, COLLECTION_ATTRIBUTE_KEYS, COLLECTION_INLINE_ATTRIBUTE_KEYS, EDITOR_COMMANDS, MAX_PALETTE_COLORS, MIN_PALETTE_COLORS, PAGE_ATTRIBUTE_KEYS, PALETTE_FALLBACK_COLOR, PALETTE_GROUP_TYPE, PALETTE_PREFIX, PALETTE_REF_PREFIX, PRODUCT_ATTRIBUTE_KEYS, RICHTEXT_ALLOWED_TAGS, SKIP, SchemaSetting, SectionGroup, SectionPreset, SectionSchema, SettingBinding, SettingBindings, SettingsData, SettingsSchema, SettingsSchemaSection, Template, TemplateBlock, TemplateSection, applyCollectionAttributeBindings, applyInlineSources, applyMetafieldBindings, applyMetaobjectFieldBindings, blockPathsEqual, buildBlockInstance, buildDisabledAncestorSet, buildParentMap, buildSectionInstance, buildStaticChildren, collectCollectionAttributeBindings, collectMetaobjectEntryIds, collectTraversedEntryIds, collectTypes, comparePaletteIds, decodeStorefrontMetafield, defaultSettings, editorCommand, encodeSourceToken, escapeInertHtmlText, hasPaletteRefs, isBlockPathPrefix, isEditorCommand, isNodeIdToken, joinBlockPath, metafieldDefinitionFitsSetting, metafieldTypeSupportsInlineToken, metafieldTypeToSettingTypes, metaobjectGid, metaobjectIdFromGid, nodeGid, normalizeBlockPath, paletteKey, paletteRef, paletteValues, parsePalette, parsePaletteRef, parseSourceDescriptor, resolveContainerAtPath, resolveField, resolvePaletteRefs, resolvePaletteValue, resolveThemeSettingsPalette, seedMissingStatics, selectRenderableChildren, selectRenderableSections, serializeSourceDescriptor, settingTypeSupportsBinding, shortcutKey, splitBlockPath, splitInlineTokens, staticBlockId, staticChildId, stripInlineTokenSentinels, stripStaticFromBlockOrder, undoHotkey, walkBlocks, walkSections };
11
+ import { INSTALL_ID_RE, STORE_SLUG_RE } from "./store-path.js";
12
+ export { ARTICLE_ATTRIBUTE_KEYS, BLOCK_PATH_SEPARATOR, BLOG_ATTRIBUTE_KEYS, BlockDefinition, BlockSchema, COLLECTION_ATTRIBUTE_KEYS, COLLECTION_INLINE_ATTRIBUTE_KEYS, EDITOR_COMMANDS, INSTALL_ID_RE, MAX_PALETTE_COLORS, MIN_PALETTE_COLORS, PAGE_ATTRIBUTE_KEYS, PALETTE_FALLBACK_COLOR, PALETTE_GROUP_TYPE, PALETTE_PREFIX, PALETTE_REF_PREFIX, PRODUCT_ATTRIBUTE_KEYS, RICHTEXT_ALLOWED_TAGS, SKIP, STORE_SLUG_RE, SchemaSetting, SectionGroup, SectionPreset, SectionSchema, SettingBinding, SettingBindings, SettingsData, SettingsSchema, SettingsSchemaSection, Template, TemplateBlock, TemplateSection, applyCollectionAttributeBindings, applyInlineSources, applyMetafieldBindings, applyMetaobjectFieldBindings, blockPathsEqual, buildBlockInstance, buildDisabledAncestorSet, buildParentMap, buildSectionInstance, buildStaticChildren, collectCollectionAttributeBindings, collectMetaobjectEntryIds, collectTraversedEntryIds, collectTypes, comparePaletteIds, decodeStorefrontMetafield, defaultSettings, editorCommand, encodeSourceToken, escapeInertHtmlText, hasPaletteRefs, isBlockPathPrefix, isEditorCommand, isNodeIdToken, joinBlockPath, metafieldDefinitionFitsSetting, metafieldTypeSupportsInlineToken, metafieldTypeToSettingTypes, metaobjectGid, metaobjectIdFromGid, nodeGid, normalizeBlockPath, paletteKey, paletteRef, paletteValues, parsePalette, parsePaletteRef, parseSourceDescriptor, resolveContainerAtPath, resolveField, resolvePaletteRefs, resolvePaletteValue, resolveThemeSettingsPalette, seedMissingStatics, selectRenderableChildren, selectRenderableSections, serializeSourceDescriptor, settingTypeSupportsBinding, shortcutKey, splitBlockPath, splitInlineTokens, staticBlockId, staticChildId, stripInlineTokenSentinels, stripStaticFromBlockOrder, undoHotkey, walkBlocks, walkSections };
@@ -0,0 +1,4 @@
1
+ //#region src/store-path.d.ts
2
+ export declare const STORE_SLUG_RE: RegExp;
3
+ export declare const INSTALL_ID_RE: RegExp;
4
+ //#endregion
@@ -0,0 +1,5 @@
1
+ //#region src/store-path.ts
2
+ const STORE_SLUG_RE = /^[a-z0-9][a-z0-9-]{0,62}$/;
3
+ const INSTALL_ID_RE = /^[a-z0-9_-]{4,32}$/;
4
+ //#endregion
5
+ export { INSTALL_ID_RE, STORE_SLUG_RE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shop-on/theme-contract",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "license": "SEE LICENSE IN dist/LICENSE.md",
5
5
  "files": [
6
6
  "dist"
@@ -13,14 +13,14 @@
13
13
  "./package.json": "./package.json"
14
14
  },
15
15
  "dependencies": {
16
- "zod": "4.6.5"
16
+ "zod": "4.6.7"
17
17
  },
18
18
  "devDependencies": {
19
19
  "typescript": "7.0.2",
20
- "vitest": "5.0.3"
20
+ "vitest": "5.0.5"
21
21
  },
22
22
  "scripts": {
23
23
  "check-types": "tsc --noEmit",
24
- "test": "vitest run"
24
+ "test": "vitest run --maxWorkers=2"
25
25
  }
26
26
  }