cmx-sdk 0.2.2 → 0.2.3
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 +13 -2
- package/dist/cli.js +1509 -115
- package/dist/index.d.ts +138 -31
- package/dist/index.js +33 -11
- package/dist/index.js.map +1 -1
- package/dist/{interactive-menu-UQHS5FLW.js → interactive-menu-BDZOOGQH.js} +11 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -683,6 +683,21 @@ interface DataTypeResponse {
|
|
|
683
683
|
updatedAt: Date;
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
+
/**
|
|
687
|
+
* Generated by orval v7.17.2 🍺
|
|
688
|
+
* Do not edit manually.
|
|
689
|
+
* CMX SDK API
|
|
690
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
691
|
+
* OpenAPI spec version: 1.0.0
|
|
692
|
+
*/
|
|
693
|
+
type DeleteManageDataTypeSlugIdParams = {
|
|
694
|
+
/**
|
|
695
|
+
* 参照中でも強制削除するか
|
|
696
|
+
* @nullable
|
|
697
|
+
*/
|
|
698
|
+
force?: boolean | null;
|
|
699
|
+
};
|
|
700
|
+
|
|
686
701
|
/**
|
|
687
702
|
* Generated by orval v7.17.2 🍺
|
|
688
703
|
* Do not edit manually.
|
|
@@ -1427,11 +1442,8 @@ interface SdkComponentSuccessResponse {
|
|
|
1427
1442
|
*/
|
|
1428
1443
|
|
|
1429
1444
|
interface SdkComponentSyncRequest {
|
|
1430
|
-
/**
|
|
1431
|
-
|
|
1432
|
-
* @minItems 1
|
|
1433
|
-
*/
|
|
1434
|
-
components: SdkComponentDefinition[];
|
|
1445
|
+
/** 同期するコンポーネント定義 */
|
|
1446
|
+
components?: SdkComponentDefinition[];
|
|
1435
1447
|
}
|
|
1436
1448
|
|
|
1437
1449
|
/**
|
|
@@ -1490,9 +1502,55 @@ interface SdkContentReferencesResponse {
|
|
|
1490
1502
|
* CMX SDK API(コンテンツ配信+管理)
|
|
1491
1503
|
* OpenAPI spec version: 1.0.0
|
|
1492
1504
|
*/
|
|
1505
|
+
type SdkCreateContentResponseWarningsItemIssueType = typeof SdkCreateContentResponseWarningsItemIssueType[keyof typeof SdkCreateContentResponseWarningsItemIssueType];
|
|
1506
|
+
declare const SdkCreateContentResponseWarningsItemIssueType: {
|
|
1507
|
+
readonly missing_target: "missing_target";
|
|
1508
|
+
readonly cross_environment: "cross_environment";
|
|
1509
|
+
readonly archived_target: "archived_target";
|
|
1510
|
+
};
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* Generated by orval v7.17.2 🍺
|
|
1514
|
+
* Do not edit manually.
|
|
1515
|
+
* CMX SDK API
|
|
1516
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
1517
|
+
* OpenAPI spec version: 1.0.0
|
|
1518
|
+
*/
|
|
1519
|
+
type SdkCreateContentResponseWarningsItemTargetType = typeof SdkCreateContentResponseWarningsItemTargetType[keyof typeof SdkCreateContentResponseWarningsItemTargetType];
|
|
1520
|
+
declare const SdkCreateContentResponseWarningsItemTargetType: {
|
|
1521
|
+
readonly content: "content";
|
|
1522
|
+
readonly asset: "asset";
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* Generated by orval v7.17.2 🍺
|
|
1527
|
+
* Do not edit manually.
|
|
1528
|
+
* CMX SDK API
|
|
1529
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
1530
|
+
* OpenAPI spec version: 1.0.0
|
|
1531
|
+
*/
|
|
1532
|
+
|
|
1533
|
+
type SdkCreateContentResponseWarningsItem = {
|
|
1534
|
+
issueType: SdkCreateContentResponseWarningsItemIssueType;
|
|
1535
|
+
targetType: SdkCreateContentResponseWarningsItemTargetType;
|
|
1536
|
+
targetId: string;
|
|
1537
|
+
componentName: string;
|
|
1538
|
+
propName: string;
|
|
1539
|
+
message: string;
|
|
1540
|
+
};
|
|
1541
|
+
|
|
1542
|
+
/**
|
|
1543
|
+
* Generated by orval v7.17.2 🍺
|
|
1544
|
+
* Do not edit manually.
|
|
1545
|
+
* CMX SDK API
|
|
1546
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
1547
|
+
* OpenAPI spec version: 1.0.0
|
|
1548
|
+
*/
|
|
1549
|
+
|
|
1493
1550
|
interface SdkCreateContentResponse {
|
|
1494
1551
|
id: string;
|
|
1495
1552
|
slug: string;
|
|
1553
|
+
warnings?: SdkCreateContentResponseWarningsItem[];
|
|
1496
1554
|
}
|
|
1497
1555
|
|
|
1498
1556
|
/**
|
|
@@ -1536,6 +1594,20 @@ interface SdkCreateEntryRequest {
|
|
|
1536
1594
|
status?: SdkCreateEntryRequestStatus;
|
|
1537
1595
|
}
|
|
1538
1596
|
|
|
1597
|
+
/**
|
|
1598
|
+
* Generated by orval v7.17.2 🍺
|
|
1599
|
+
* Do not edit manually.
|
|
1600
|
+
* CMX SDK API
|
|
1601
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
1602
|
+
* OpenAPI spec version: 1.0.0
|
|
1603
|
+
*/
|
|
1604
|
+
type SdkCustomComponentResponseStatus = typeof SdkCustomComponentResponseStatus[keyof typeof SdkCustomComponentResponseStatus];
|
|
1605
|
+
declare const SdkCustomComponentResponseStatus: {
|
|
1606
|
+
readonly requested: "requested";
|
|
1607
|
+
readonly ready: "ready";
|
|
1608
|
+
readonly deprecated: "deprecated";
|
|
1609
|
+
};
|
|
1610
|
+
|
|
1539
1611
|
/**
|
|
1540
1612
|
* Generated by orval v7.17.2 🍺
|
|
1541
1613
|
* Do not edit manually.
|
|
@@ -1561,6 +1633,7 @@ interface SdkCustomComponentResponse {
|
|
|
1561
1633
|
displayName: string;
|
|
1562
1634
|
/** @nullable */
|
|
1563
1635
|
description: string | null;
|
|
1636
|
+
status: SdkCustomComponentResponseStatus;
|
|
1564
1637
|
propsSchema: SdkCustomComponentResponsePropsSchema;
|
|
1565
1638
|
/** @nullable */
|
|
1566
1639
|
examples: string[] | null;
|
|
@@ -1675,6 +1748,37 @@ interface SdkDataEntriesListResponse {
|
|
|
1675
1748
|
entries: SdkDataEntryResponse[];
|
|
1676
1749
|
}
|
|
1677
1750
|
|
|
1751
|
+
/**
|
|
1752
|
+
* Generated by orval v7.17.2 🍺
|
|
1753
|
+
* Do not edit manually.
|
|
1754
|
+
* CMX SDK API
|
|
1755
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
1756
|
+
* OpenAPI spec version: 1.0.0
|
|
1757
|
+
*/
|
|
1758
|
+
interface SdkDataEntryDeletionImpactItem {
|
|
1759
|
+
contentId: string;
|
|
1760
|
+
contentTitle: string;
|
|
1761
|
+
contentSlug: string;
|
|
1762
|
+
contentStatus: string;
|
|
1763
|
+
fieldSlug: string;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* Generated by orval v7.17.2 🍺
|
|
1768
|
+
* Do not edit manually.
|
|
1769
|
+
* CMX SDK API
|
|
1770
|
+
* CMX SDK API(コンテンツ配信+管理)
|
|
1771
|
+
* OpenAPI spec version: 1.0.0
|
|
1772
|
+
*/
|
|
1773
|
+
|
|
1774
|
+
interface SdkDataEntryDeletionImpactResponse {
|
|
1775
|
+
canDelete: boolean;
|
|
1776
|
+
requiresForce: boolean;
|
|
1777
|
+
totalReferences: number;
|
|
1778
|
+
publishedReferences: number;
|
|
1779
|
+
affectedContents: SdkDataEntryDeletionImpactItem[];
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1678
1782
|
/**
|
|
1679
1783
|
* Generated by orval v7.17.2 🍺
|
|
1680
1784
|
* Do not edit manually.
|
|
@@ -2420,6 +2524,13 @@ declare const componentSchemas: {
|
|
|
2420
2524
|
}>;
|
|
2421
2525
|
};
|
|
2422
2526
|
type ComponentName = keyof typeof componentSchemas;
|
|
2527
|
+
type ComponentSource = "standard" | "custom";
|
|
2528
|
+
type ComponentKind = "presentational" | "data-bound";
|
|
2529
|
+
interface ComponentBinding {
|
|
2530
|
+
prop: string;
|
|
2531
|
+
target: "content" | "asset" | "dataEntry";
|
|
2532
|
+
strategy: "by-id";
|
|
2533
|
+
}
|
|
2423
2534
|
interface ComponentDefinition<T extends ComponentName = ComponentName> {
|
|
2424
2535
|
name: T;
|
|
2425
2536
|
displayName: string;
|
|
@@ -2428,15 +2539,29 @@ interface ComponentDefinition<T extends ComponentName = ComponentName> {
|
|
|
2428
2539
|
schema: (typeof componentSchemas)[T];
|
|
2429
2540
|
examples: string[];
|
|
2430
2541
|
hasReferences: boolean;
|
|
2542
|
+
source: "standard";
|
|
2543
|
+
kind: ComponentKind;
|
|
2544
|
+
locked: true;
|
|
2545
|
+
editable: false;
|
|
2546
|
+
bindings?: ComponentBinding[];
|
|
2547
|
+
}
|
|
2548
|
+
interface CatalogForAIComponent {
|
|
2549
|
+
name: string;
|
|
2550
|
+
description: string;
|
|
2551
|
+
props: Record<string, {
|
|
2552
|
+
type: string;
|
|
2553
|
+
description?: string;
|
|
2554
|
+
required: boolean;
|
|
2555
|
+
}>;
|
|
2556
|
+
examples: string[];
|
|
2557
|
+
source: ComponentSource;
|
|
2558
|
+
kind: ComponentKind;
|
|
2559
|
+
locked: boolean;
|
|
2560
|
+
editable: boolean;
|
|
2561
|
+
bindings?: ComponentBinding[];
|
|
2431
2562
|
}
|
|
2432
2563
|
declare const componentCatalog: Record<ComponentName, ComponentDefinition>;
|
|
2433
|
-
/**
|
|
2434
|
-
* コンポーネント名が有効かチェック
|
|
2435
|
-
*/
|
|
2436
2564
|
declare function isValidComponent(name: string): name is ComponentName;
|
|
2437
|
-
/**
|
|
2438
|
-
* コンポーネントのpropsをバリデート
|
|
2439
|
-
*/
|
|
2440
2565
|
declare function validateComponentProps(name: ComponentName, props: unknown): {
|
|
2441
2566
|
success: true;
|
|
2442
2567
|
data: unknown;
|
|
@@ -2444,27 +2569,9 @@ declare function validateComponentProps(name: ComponentName, props: unknown): {
|
|
|
2444
2569
|
success: false;
|
|
2445
2570
|
error: z.ZodError;
|
|
2446
2571
|
};
|
|
2447
|
-
/**
|
|
2448
|
-
* 参照を持つコンポーネント名の一覧
|
|
2449
|
-
*/
|
|
2450
2572
|
declare function getComponentsWithReferences(): ComponentName[];
|
|
2451
|
-
/**
|
|
2452
|
-
* カテゴリでコンポーネントをグループ化
|
|
2453
|
-
*/
|
|
2454
2573
|
declare function getComponentsByCategory(): Record<string, ComponentDefinition[]>;
|
|
2455
|
-
|
|
2456
|
-
* AI向けのカタログ情報(MCP用)
|
|
2457
|
-
*/
|
|
2458
|
-
declare function getCatalogForAI(): Array<{
|
|
2459
|
-
name: string;
|
|
2460
|
-
description: string;
|
|
2461
|
-
props: Record<string, {
|
|
2462
|
-
type: string;
|
|
2463
|
-
description?: string;
|
|
2464
|
-
required: boolean;
|
|
2465
|
-
}>;
|
|
2466
|
-
examples: string[];
|
|
2467
|
-
}>;
|
|
2574
|
+
declare function getCatalogForAI(): CatalogForAIComponent[];
|
|
2468
2575
|
|
|
2469
2576
|
interface ValidationError {
|
|
2470
2577
|
type: "syntax" | "forbidden" | "component" | "props";
|
|
@@ -2539,4 +2646,4 @@ declare function renderMdx(mdx: string, references?: References, options?: Rende
|
|
|
2539
2646
|
*/
|
|
2540
2647
|
declare function renderMdxPreview(mdx: string, additionalComponents?: Record<string, React.ComponentType<any>>): Promise<React.ReactElement>;
|
|
2541
2648
|
|
|
2542
|
-
export { type ApiResponse, type AssetReference, type AssetReferenceVariants, BlogCard, Button, CACHE_TAGS, Callout, CmxApiError, type CollectionConfig, type CollectionConfigDefaults, type CollectionContentDetailResponse, type CollectionContentsOptions, type CollectionContentsResponse, type CollectionListResponse, type CollectionResponse, CollectionType, type ComponentDefinition, type ComponentName, type ContentReference, type CreateCollectionRequest, type CreateContentRequest, type CreateDataTypeRequest, type CreateFormDefinitionRequest, type DataEntriesOptions, type DataEntryDetailResponse, type DataEntryItem, type DataListResponse, type DataTypeConfig, type DataTypeResponse, Embed, type ErrorResponse, type ErrorResponseDetails, type FetchOptions, type FieldDefinition, type FieldDefinitionDefaultValue, type FieldOptions, type FieldOptionsChoicesItem, FieldType, type FormDefinitionResponse, type FormDefinitionResponseConfigJson, type GetCollectionsSlugContentsParams, GetCollectionsSlugContentsSortBy, GetCollectionsSlugContentsSortOrder, type GetDataTypeSlugParams, GetDataTypeSlugSortBy, GetDataTypeSlugSortOrder, type GetManageCollectionPresets200, type GetManageCollectionPresetsParams, GetManageCollectionPresetsType, type GetManageDataTypeSlugParams, GetManageDataTypeSlugSortBy, GetManageDataTypeSlugSortOrder, GetManageDataTypeSlugStatus, type GetPreviewToken200, type GetPreviewToken200Collection, type GetPreviewToken200Content, type GetPreviewToken200References, type GetPreviewToken200ReferencesAssets, type GetPreviewToken200ReferencesAssetsVariants, type GetPreviewToken200ReferencesContents, Image, type PreviewResponse, type PublicCollectionInfo, type PublicContentDetail, type PublicContentListItem, type PublicContentParent, type PublicFetcherOptions, type PublicSubmissionRequest, type PublicSubmissionRequestData, type PublicSubmissionResponse, type ReferenceField, ReferenceFieldReferenceType, type References, type ReferencesAssets, type ReferencesContents, type RenderOptions, type RenderResult, type ResolvedReferences, type RevalidationConfig, type SchemaCollection, type SchemaDataType, type SchemaFieldDefinition, type SchemaFieldOption, type SchemaFieldOptionChoicesItem, type SchemaFormDefinition, type SchemaResponse, type SdkAddCollectionDataTypeRequest, SdkAddCollectionDataTypeRequestReferenceType, type SdkCollectionDataTypeResponse, type SdkCollectionDataTypeResponseAllOf, type SdkComponentDefinition, type SdkComponentDefinitionPropsSchema, type SdkComponentProp, type SdkComponentPropDefault, type SdkComponentSuccessResponse, type SdkComponentSyncRequest, type SdkContentReferencesResponse, type SdkContentReferencesResponseReferencesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItemData, type SdkCreateContentResponse, type SdkCreateEntryRequest, type SdkCreateEntryRequestDataJson, SdkCreateEntryRequestStatus, type SdkCustomComponentResponse, type SdkCustomComponentResponsePropsSchema, type SdkCustomComponentsListResponse, type SdkDataEntriesListResponse, type SdkDataEntryDetailResponse, type SdkDataEntryResponse, type SdkDataEntryResponseCreatedAt, type SdkDataEntryResponseDataJson, SdkDataEntryResponseStatus, type SdkDataEntryResponseUpdatedAt, type SdkDataTypeInfo, type SdkDeleteCollectionDataTypeResponse, type SdkDeleteCollectionResponse, type SdkDeleteDataEntryResponse, type SdkDeleteDataTypeResponse, type SdkDeleteFormDefinitionResponse, type SdkLinkExistingDataTypeRequest, SdkLinkExistingDataTypeRequestReferenceType, type SdkPreset, SdkPresetReferenceType, type SdkPublishContentResponse, type SdkRequestReviewResponse, type SdkSetContentReferencesRequest, type SdkSetContentReferencesRequestReferencesItem, type SdkSetContentReferencesResponse, type SdkUpdateEntryRequest, type SdkUpdateEntryRequestDataJson, SdkUpdateEntryRequestStatus, type UpdateCollectionRequest, type UpdateDataTypeRequest, type UpdateFormDefinitionRequest, type UpdateFormDefinitionRequestConfigJson, type ValidationError, type ValidationResult, basicComponents, componentCatalog, componentSchemas, customComponents, getCatalogForAI, getCollectionContentDetail, getCollectionContentDetailOrThrow, getCollectionContents, getCollectionContentsOrThrow, getCollections, getCollectionsSlugContents, getCollectionsSlugContentsContentSlug, getComponentsByCategory, getComponentsWithReferences, getDataEntries, getDataEntriesOrThrow, getDataEntry, getDataEntryOrThrow, getDataTypeSlug, getGetCollectionsSlugContentsContentSlugUrl, getGetCollectionsSlugContentsUrl, getGetDataTypeSlugUrl, getGetPreviewTokenUrl, getPreviewByToken, getPreviewToken, getSchema, getSdkApiBaseUrl, getSdkApiToken, isValidComponent, markdownComponents, mdxComponents, quickValidateMdx, renderMdx, renderMdxPreview, sdkCustomInstance, sdkFetchWithTags, sdkFetcher, sdkPostFetcher, submitFormData, validateComponentProps, validateMdx };
|
|
2649
|
+
export { type ApiResponse, type AssetReference, type AssetReferenceVariants, BlogCard, Button, CACHE_TAGS, Callout, CmxApiError, type CollectionConfig, type CollectionConfigDefaults, type CollectionContentDetailResponse, type CollectionContentsOptions, type CollectionContentsResponse, type CollectionListResponse, type CollectionResponse, CollectionType, type ComponentDefinition, type ComponentName, type ContentReference, type CreateCollectionRequest, type CreateContentRequest, type CreateDataTypeRequest, type CreateFormDefinitionRequest, type DataEntriesOptions, type DataEntryDetailResponse, type DataEntryItem, type DataListResponse, type DataTypeConfig, type DataTypeResponse, type DeleteManageDataTypeSlugIdParams, Embed, type ErrorResponse, type ErrorResponseDetails, type FetchOptions, type FieldDefinition, type FieldDefinitionDefaultValue, type FieldOptions, type FieldOptionsChoicesItem, FieldType, type FormDefinitionResponse, type FormDefinitionResponseConfigJson, type GetCollectionsSlugContentsParams, GetCollectionsSlugContentsSortBy, GetCollectionsSlugContentsSortOrder, type GetDataTypeSlugParams, GetDataTypeSlugSortBy, GetDataTypeSlugSortOrder, type GetManageCollectionPresets200, type GetManageCollectionPresetsParams, GetManageCollectionPresetsType, type GetManageDataTypeSlugParams, GetManageDataTypeSlugSortBy, GetManageDataTypeSlugSortOrder, GetManageDataTypeSlugStatus, type GetPreviewToken200, type GetPreviewToken200Collection, type GetPreviewToken200Content, type GetPreviewToken200References, type GetPreviewToken200ReferencesAssets, type GetPreviewToken200ReferencesAssetsVariants, type GetPreviewToken200ReferencesContents, Image, type PreviewResponse, type PublicCollectionInfo, type PublicContentDetail, type PublicContentListItem, type PublicContentParent, type PublicFetcherOptions, type PublicSubmissionRequest, type PublicSubmissionRequestData, type PublicSubmissionResponse, type ReferenceField, ReferenceFieldReferenceType, type References, type ReferencesAssets, type ReferencesContents, type RenderOptions, type RenderResult, type ResolvedReferences, type RevalidationConfig, type SchemaCollection, type SchemaDataType, type SchemaFieldDefinition, type SchemaFieldOption, type SchemaFieldOptionChoicesItem, type SchemaFormDefinition, type SchemaResponse, type SdkAddCollectionDataTypeRequest, SdkAddCollectionDataTypeRequestReferenceType, type SdkCollectionDataTypeResponse, type SdkCollectionDataTypeResponseAllOf, type SdkComponentDefinition, type SdkComponentDefinitionPropsSchema, type SdkComponentProp, type SdkComponentPropDefault, type SdkComponentSuccessResponse, type SdkComponentSyncRequest, type SdkContentReferencesResponse, type SdkContentReferencesResponseReferencesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItemData, type SdkCreateContentResponse, type SdkCreateContentResponseWarningsItem, SdkCreateContentResponseWarningsItemIssueType, SdkCreateContentResponseWarningsItemTargetType, type SdkCreateEntryRequest, type SdkCreateEntryRequestDataJson, SdkCreateEntryRequestStatus, type SdkCustomComponentResponse, type SdkCustomComponentResponsePropsSchema, SdkCustomComponentResponseStatus, type SdkCustomComponentsListResponse, type SdkDataEntriesListResponse, type SdkDataEntryDeletionImpactItem, type SdkDataEntryDeletionImpactResponse, type SdkDataEntryDetailResponse, type SdkDataEntryResponse, type SdkDataEntryResponseCreatedAt, type SdkDataEntryResponseDataJson, SdkDataEntryResponseStatus, type SdkDataEntryResponseUpdatedAt, type SdkDataTypeInfo, type SdkDeleteCollectionDataTypeResponse, type SdkDeleteCollectionResponse, type SdkDeleteDataEntryResponse, type SdkDeleteDataTypeResponse, type SdkDeleteFormDefinitionResponse, type SdkLinkExistingDataTypeRequest, SdkLinkExistingDataTypeRequestReferenceType, type SdkPreset, SdkPresetReferenceType, type SdkPublishContentResponse, type SdkRequestReviewResponse, type SdkSetContentReferencesRequest, type SdkSetContentReferencesRequestReferencesItem, type SdkSetContentReferencesResponse, type SdkUpdateEntryRequest, type SdkUpdateEntryRequestDataJson, SdkUpdateEntryRequestStatus, type UpdateCollectionRequest, type UpdateDataTypeRequest, type UpdateFormDefinitionRequest, type UpdateFormDefinitionRequestConfigJson, type ValidationError, type ValidationResult, basicComponents, componentCatalog, componentSchemas, customComponents, getCatalogForAI, getCollectionContentDetail, getCollectionContentDetailOrThrow, getCollectionContents, getCollectionContentsOrThrow, getCollections, getCollectionsSlugContents, getCollectionsSlugContentsContentSlug, getComponentsByCategory, getComponentsWithReferences, getDataEntries, getDataEntriesOrThrow, getDataEntry, getDataEntryOrThrow, getDataTypeSlug, getGetCollectionsSlugContentsContentSlugUrl, getGetCollectionsSlugContentsUrl, getGetDataTypeSlugUrl, getGetPreviewTokenUrl, getPreviewByToken, getPreviewToken, getSchema, getSdkApiBaseUrl, getSdkApiToken, isValidComponent, markdownComponents, mdxComponents, quickValidateMdx, renderMdx, renderMdxPreview, sdkCustomInstance, sdkFetchWithTags, sdkFetcher, sdkPostFetcher, submitFormData, validateComponentProps, validateMdx };
|
package/dist/index.js
CHANGED
|
@@ -597,29 +597,24 @@ var mdxComponents = {
|
|
|
597
597
|
// src/mdx/component-catalog.ts
|
|
598
598
|
import { z } from "zod";
|
|
599
599
|
var componentSchemas = {
|
|
600
|
-
// BlogCard: 他記事への参照
|
|
601
600
|
BlogCard: z.object({
|
|
602
601
|
contentId: z.string().uuid().describe("\u53C2\u7167\u5148\u30B3\u30F3\u30C6\u30F3\u30C4\u306EUUID")
|
|
603
602
|
}),
|
|
604
|
-
// Image: 画像表示
|
|
605
603
|
Image: z.object({
|
|
606
604
|
assetId: z.string().uuid().describe("\u30A2\u30BB\u30C3\u30C8\u306EUUID"),
|
|
607
605
|
alt: z.string().optional().describe("\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8"),
|
|
608
606
|
size: z.enum(["thumbnail", "medium", "large", "original"]).default("large").describe("\u8868\u793A\u30B5\u30A4\u30BA"),
|
|
609
607
|
caption: z.string().optional().describe("\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3")
|
|
610
608
|
}),
|
|
611
|
-
// Callout: 注意書きボックス
|
|
612
609
|
Callout: z.object({
|
|
613
610
|
type: z.enum(["info", "warning", "error", "success", "tip"]).default("info").describe("\u30BF\u30A4\u30D7"),
|
|
614
611
|
title: z.string().optional().describe("\u30BF\u30A4\u30C8\u30EB"),
|
|
615
612
|
children: z.string().describe("\u672C\u6587\uFF08Markdown\u53EF\uFF09")
|
|
616
613
|
}),
|
|
617
|
-
// Embed: 外部埋め込み
|
|
618
614
|
Embed: z.object({
|
|
619
615
|
url: z.string().url().describe("\u57CB\u3081\u8FBC\u307FURL"),
|
|
620
616
|
type: z.enum(["youtube", "twitter", "generic"]).default("generic").describe("\u30BF\u30A4\u30D7")
|
|
621
617
|
}),
|
|
622
|
-
// Button: ボタンリンク
|
|
623
618
|
Button: z.object({
|
|
624
619
|
href: z.string().describe("\u30EA\u30F3\u30AF\u5148URL"),
|
|
625
620
|
children: z.string().describe("\u30DC\u30BF\u30F3\u30C6\u30AD\u30B9\u30C8"),
|
|
@@ -634,7 +629,12 @@ var componentCatalog = {
|
|
|
634
629
|
category: "reference",
|
|
635
630
|
schema: componentSchemas.BlogCard,
|
|
636
631
|
examples: ['<BlogCard contentId="123e4567-e89b-12d3-a456-426614174000" />'],
|
|
637
|
-
hasReferences: true
|
|
632
|
+
hasReferences: true,
|
|
633
|
+
source: "standard",
|
|
634
|
+
kind: "data-bound",
|
|
635
|
+
locked: true,
|
|
636
|
+
editable: false,
|
|
637
|
+
bindings: [{ prop: "contentId", target: "content", strategy: "by-id" }]
|
|
638
638
|
},
|
|
639
639
|
Image: {
|
|
640
640
|
name: "Image",
|
|
@@ -646,7 +646,12 @@ var componentCatalog = {
|
|
|
646
646
|
'<Image assetId="123e4567-e89b-12d3-a456-426614174000" alt="\u8AAC\u660E" />',
|
|
647
647
|
'<Image assetId="123e4567-e89b-12d3-a456-426614174000" size="medium" caption="\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3" />'
|
|
648
648
|
],
|
|
649
|
-
hasReferences: true
|
|
649
|
+
hasReferences: true,
|
|
650
|
+
source: "standard",
|
|
651
|
+
kind: "data-bound",
|
|
652
|
+
locked: true,
|
|
653
|
+
editable: false,
|
|
654
|
+
bindings: [{ prop: "assetId", target: "asset", strategy: "by-id" }]
|
|
650
655
|
},
|
|
651
656
|
Callout: {
|
|
652
657
|
name: "Callout",
|
|
@@ -658,7 +663,11 @@ var componentCatalog = {
|
|
|
658
663
|
'<Callout type="info">\u3053\u308C\u306F\u60C5\u5831\u3067\u3059</Callout>',
|
|
659
664
|
'<Callout type="warning" title="\u6CE8\u610F">\u91CD\u8981\u306A\u6CE8\u610F\u4E8B\u9805\u3067\u3059</Callout>'
|
|
660
665
|
],
|
|
661
|
-
hasReferences: false
|
|
666
|
+
hasReferences: false,
|
|
667
|
+
source: "standard",
|
|
668
|
+
kind: "presentational",
|
|
669
|
+
locked: true,
|
|
670
|
+
editable: false
|
|
662
671
|
},
|
|
663
672
|
Embed: {
|
|
664
673
|
name: "Embed",
|
|
@@ -670,7 +679,11 @@ var componentCatalog = {
|
|
|
670
679
|
'<Embed url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" type="youtube" />',
|
|
671
680
|
'<Embed url="https://twitter.com/example/status/123456789" type="twitter" />'
|
|
672
681
|
],
|
|
673
|
-
hasReferences: false
|
|
682
|
+
hasReferences: false,
|
|
683
|
+
source: "standard",
|
|
684
|
+
kind: "presentational",
|
|
685
|
+
locked: true,
|
|
686
|
+
editable: false
|
|
674
687
|
},
|
|
675
688
|
Button: {
|
|
676
689
|
name: "Button",
|
|
@@ -682,7 +695,11 @@ var componentCatalog = {
|
|
|
682
695
|
'<Button href="/contact">\u304A\u554F\u3044\u5408\u308F\u305B</Button>',
|
|
683
696
|
'<Button href="https://example.com" variant="secondary">\u8A73\u7D30\u3092\u898B\u308B</Button>'
|
|
684
697
|
],
|
|
685
|
-
hasReferences: false
|
|
698
|
+
hasReferences: false,
|
|
699
|
+
source: "standard",
|
|
700
|
+
kind: "presentational",
|
|
701
|
+
locked: true,
|
|
702
|
+
editable: false
|
|
686
703
|
}
|
|
687
704
|
};
|
|
688
705
|
function isValidComponent(name) {
|
|
@@ -727,7 +744,12 @@ function getCatalogForAI() {
|
|
|
727
744
|
name: def.name,
|
|
728
745
|
description: def.description,
|
|
729
746
|
props,
|
|
730
|
-
examples: def.examples
|
|
747
|
+
examples: def.examples,
|
|
748
|
+
source: def.source,
|
|
749
|
+
kind: def.kind,
|
|
750
|
+
locked: def.locked,
|
|
751
|
+
editable: def.editable,
|
|
752
|
+
bindings: def.bindings
|
|
731
753
|
};
|
|
732
754
|
});
|
|
733
755
|
}
|