lynkow 3.0.2 → 3.2.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.mts CHANGED
@@ -775,20 +775,46 @@ interface Author {
775
775
  avatarUrl: string | null;
776
776
  }
777
777
  /**
778
- * Individual content block
778
+ * TipTap mark (bold, italic, link, etc.)
779
779
  */
780
- interface ContentBlock {
781
- /** Block type */
782
- type: 'paragraph' | 'heading' | 'image' | 'list' | 'quote' | 'code' | 'embed' | 'table' | 'divider' | string;
783
- /** Type-specific data */
784
- data: Record<string, unknown>;
785
- /** Unique block ID */
786
- id?: string;
780
+ interface TipTapMark {
781
+ /** Mark type */
782
+ type: 'bold' | 'italic' | 'link' | 'code' | 'strike' | 'underline' | string;
783
+ /** Mark attributes (e.g., href for links) */
784
+ attrs?: Record<string, unknown>;
787
785
  }
788
786
  /**
789
- * Content body (editor blocks)
787
+ * TipTap node (paragraph, heading, image, etc.)
788
+ * This is the actual format returned by the TipTap editor
789
+ */
790
+ interface TipTapNode {
791
+ /** Node type */
792
+ type: 'doc' | 'paragraph' | 'heading' | 'text' | 'image' | 'bulletList' | 'orderedList' | 'listItem' | 'blockquote' | 'codeBlock' | 'horizontalRule' | 'table' | 'tableRow' | 'tableCell' | 'tableHeader' | 'faqBlock' | 'faqItem' | 'faqQuestion' | 'faqAnswer' | string;
793
+ /** Node attributes (e.g., level for headings, src for images) */
794
+ attrs?: Record<string, unknown>;
795
+ /** Text content (only for 'text' nodes) */
796
+ text?: string;
797
+ /** Text marks (bold, italic, link, etc.) */
798
+ marks?: TipTapMark[];
799
+ /** Child nodes */
800
+ content?: TipTapNode[];
801
+ }
802
+ /**
803
+ * Content body - HTML string
804
+ * The API converts TipTap editor content to HTML server-side.
805
+ *
806
+ * @example
807
+ * ```typescript
808
+ * const body: ContentBody = '<p>Hello world</p><h2>Title</h2>'
809
+ *
810
+ * // Usage in React:
811
+ * <div dangerouslySetInnerHTML={{ __html: content.body }} />
812
+ *
813
+ * // Usage in Vue:
814
+ * <div v-html="content.body" />
815
+ * ```
790
816
  */
791
- type ContentBody = ContentBlock[];
817
+ type ContentBody = string;
792
818
  /**
793
819
  * Content summary (for lists)
794
820
  */
@@ -1988,4 +2014,4 @@ declare function browserOnly<T>(fn: () => T, fallback: T): T;
1988
2014
  */
1989
2015
  declare function browserOnlyAsync<T>(fn: () => Promise<T>, fallback: T): Promise<T>;
1990
2016
 
1991
- export { type Alternate, type ApiErrorDetail, type Author, type BaseRequestOptions, type CategoriesListResponse, type Category, type CategoryDetail, type CategoryDetailResponse, type CategoryOptions, type CategoryResolveResponse, type CategoryTreeNode, type CategoryTreeResponse, type CategoryWithCount, type Client, type ClientConfig, type ConsentCategories, type ConsentLogResponse, type Content, type ContentBlock, type ContentBody, type ContentResolveResponse, type ContentSummary, type ContentsFilters, type ContentsListResponse, type CookieCategory, type CookieConfig, type CookiePreferences, type CookieTexts, type ErrorCode, type EventData, type EventName, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormSettings, type FormSubmitData, type FormSubmitResponse, type FunnelStepData, type GlobalBlock, type GlobalBlockResponse, type LegalDocument, type LynkowClient, type LynkowConfig, LynkowError, type LynkowEvents, type Page, type PageSeo, type PageSummary, type PagesListResponse, type PageviewData, type PaginatedResponse, type PaginationMeta, type PaginationOptions, type Path, type PathsListResponse, type Redirect, type ResolveResponse, type Review, type ReviewResponse, type ReviewSettings, type ReviewSubmitData, type ReviewSubmitResponse, type ReviewsFilters, type ReviewsListResponse, type SiteConfig, type SiteConfigResponse, type SortOptions, type SubmitOptions, type Tag, type TagsListResponse, browserOnly, browserOnlyAsync, createClient, createLynkowClient, isBrowser, isCategoryResolve, isContentResolve, isLynkowError, isServer };
2017
+ export { type Alternate, type ApiErrorDetail, type Author, type BaseRequestOptions, type CategoriesListResponse, type Category, type CategoryDetail, type CategoryDetailResponse, type CategoryOptions, type CategoryResolveResponse, type CategoryTreeNode, type CategoryTreeResponse, type CategoryWithCount, type Client, type ClientConfig, type ConsentCategories, type ConsentLogResponse, type Content, type ContentBody, type ContentResolveResponse, type ContentSummary, type ContentsFilters, type ContentsListResponse, type CookieCategory, type CookieConfig, type CookiePreferences, type CookieTexts, type ErrorCode, type EventData, type EventName, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormSettings, type FormSubmitData, type FormSubmitResponse, type FunnelStepData, type GlobalBlock, type GlobalBlockResponse, type LegalDocument, type LynkowClient, type LynkowConfig, LynkowError, type LynkowEvents, type Page, type PageSeo, type PageSummary, type PagesListResponse, type PageviewData, type PaginatedResponse, type PaginationMeta, type PaginationOptions, type Path, type PathsListResponse, type Redirect, type ResolveResponse, type Review, type ReviewResponse, type ReviewSettings, type ReviewSubmitData, type ReviewSubmitResponse, type ReviewsFilters, type ReviewsListResponse, type SiteConfig, type SiteConfigResponse, type SortOptions, type SubmitOptions, type Tag, type TagsListResponse, type TipTapMark, type TipTapNode, browserOnly, browserOnlyAsync, createClient, createLynkowClient, isBrowser, isCategoryResolve, isContentResolve, isLynkowError, isServer };
package/dist/index.d.ts CHANGED
@@ -775,20 +775,46 @@ interface Author {
775
775
  avatarUrl: string | null;
776
776
  }
777
777
  /**
778
- * Individual content block
778
+ * TipTap mark (bold, italic, link, etc.)
779
779
  */
780
- interface ContentBlock {
781
- /** Block type */
782
- type: 'paragraph' | 'heading' | 'image' | 'list' | 'quote' | 'code' | 'embed' | 'table' | 'divider' | string;
783
- /** Type-specific data */
784
- data: Record<string, unknown>;
785
- /** Unique block ID */
786
- id?: string;
780
+ interface TipTapMark {
781
+ /** Mark type */
782
+ type: 'bold' | 'italic' | 'link' | 'code' | 'strike' | 'underline' | string;
783
+ /** Mark attributes (e.g., href for links) */
784
+ attrs?: Record<string, unknown>;
787
785
  }
788
786
  /**
789
- * Content body (editor blocks)
787
+ * TipTap node (paragraph, heading, image, etc.)
788
+ * This is the actual format returned by the TipTap editor
789
+ */
790
+ interface TipTapNode {
791
+ /** Node type */
792
+ type: 'doc' | 'paragraph' | 'heading' | 'text' | 'image' | 'bulletList' | 'orderedList' | 'listItem' | 'blockquote' | 'codeBlock' | 'horizontalRule' | 'table' | 'tableRow' | 'tableCell' | 'tableHeader' | 'faqBlock' | 'faqItem' | 'faqQuestion' | 'faqAnswer' | string;
793
+ /** Node attributes (e.g., level for headings, src for images) */
794
+ attrs?: Record<string, unknown>;
795
+ /** Text content (only for 'text' nodes) */
796
+ text?: string;
797
+ /** Text marks (bold, italic, link, etc.) */
798
+ marks?: TipTapMark[];
799
+ /** Child nodes */
800
+ content?: TipTapNode[];
801
+ }
802
+ /**
803
+ * Content body - HTML string
804
+ * The API converts TipTap editor content to HTML server-side.
805
+ *
806
+ * @example
807
+ * ```typescript
808
+ * const body: ContentBody = '<p>Hello world</p><h2>Title</h2>'
809
+ *
810
+ * // Usage in React:
811
+ * <div dangerouslySetInnerHTML={{ __html: content.body }} />
812
+ *
813
+ * // Usage in Vue:
814
+ * <div v-html="content.body" />
815
+ * ```
790
816
  */
791
- type ContentBody = ContentBlock[];
817
+ type ContentBody = string;
792
818
  /**
793
819
  * Content summary (for lists)
794
820
  */
@@ -1988,4 +2014,4 @@ declare function browserOnly<T>(fn: () => T, fallback: T): T;
1988
2014
  */
1989
2015
  declare function browserOnlyAsync<T>(fn: () => Promise<T>, fallback: T): Promise<T>;
1990
2016
 
1991
- export { type Alternate, type ApiErrorDetail, type Author, type BaseRequestOptions, type CategoriesListResponse, type Category, type CategoryDetail, type CategoryDetailResponse, type CategoryOptions, type CategoryResolveResponse, type CategoryTreeNode, type CategoryTreeResponse, type CategoryWithCount, type Client, type ClientConfig, type ConsentCategories, type ConsentLogResponse, type Content, type ContentBlock, type ContentBody, type ContentResolveResponse, type ContentSummary, type ContentsFilters, type ContentsListResponse, type CookieCategory, type CookieConfig, type CookiePreferences, type CookieTexts, type ErrorCode, type EventData, type EventName, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormSettings, type FormSubmitData, type FormSubmitResponse, type FunnelStepData, type GlobalBlock, type GlobalBlockResponse, type LegalDocument, type LynkowClient, type LynkowConfig, LynkowError, type LynkowEvents, type Page, type PageSeo, type PageSummary, type PagesListResponse, type PageviewData, type PaginatedResponse, type PaginationMeta, type PaginationOptions, type Path, type PathsListResponse, type Redirect, type ResolveResponse, type Review, type ReviewResponse, type ReviewSettings, type ReviewSubmitData, type ReviewSubmitResponse, type ReviewsFilters, type ReviewsListResponse, type SiteConfig, type SiteConfigResponse, type SortOptions, type SubmitOptions, type Tag, type TagsListResponse, browserOnly, browserOnlyAsync, createClient, createLynkowClient, isBrowser, isCategoryResolve, isContentResolve, isLynkowError, isServer };
2017
+ export { type Alternate, type ApiErrorDetail, type Author, type BaseRequestOptions, type CategoriesListResponse, type Category, type CategoryDetail, type CategoryDetailResponse, type CategoryOptions, type CategoryResolveResponse, type CategoryTreeNode, type CategoryTreeResponse, type CategoryWithCount, type Client, type ClientConfig, type ConsentCategories, type ConsentLogResponse, type Content, type ContentBody, type ContentResolveResponse, type ContentSummary, type ContentsFilters, type ContentsListResponse, type CookieCategory, type CookieConfig, type CookiePreferences, type CookieTexts, type ErrorCode, type EventData, type EventName, type Form, type FormField, type FormFieldOption, type FormFieldType, type FormFieldValidation, type FormSettings, type FormSubmitData, type FormSubmitResponse, type FunnelStepData, type GlobalBlock, type GlobalBlockResponse, type LegalDocument, type LynkowClient, type LynkowConfig, LynkowError, type LynkowEvents, type Page, type PageSeo, type PageSummary, type PagesListResponse, type PageviewData, type PaginatedResponse, type PaginationMeta, type PaginationOptions, type Path, type PathsListResponse, type Redirect, type ResolveResponse, type Review, type ReviewResponse, type ReviewSettings, type ReviewSubmitData, type ReviewSubmitResponse, type ReviewsFilters, type ReviewsListResponse, type SiteConfig, type SiteConfigResponse, type SortOptions, type SubmitOptions, type Tag, type TagsListResponse, type TipTapMark, type TipTapNode, browserOnly, browserOnlyAsync, createClient, createLynkowClient, isBrowser, isCategoryResolve, isContentResolve, isLynkowError, isServer };