@promptbook/types 0.103.0-21 → 0.103.0-22

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.
@@ -51,6 +51,9 @@ import { ResetIcon } from '../book-components/icons/ResetIcon';
51
51
  import { SaveIcon } from '../book-components/icons/SaveIcon';
52
52
  import { SendIcon } from '../book-components/icons/SendIcon';
53
53
  import { TemplateIcon } from '../book-components/icons/TemplateIcon';
54
+ import { BrandedQrCode } from '../book-components/Qr/BrandedQrCode';
55
+ import { GenericQrCode } from '../book-components/Qr/GenericQrCode';
56
+ import { PromptbookQrCode } from '../book-components/Qr/PromptbookQrCode';
54
57
  import { injectCssModuleIntoShadowRoot } from '../utils/misc/injectCssModuleIntoShadowRoot';
55
58
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
56
59
  export type { AvatarChipProps };
@@ -105,4 +108,7 @@ export { ResetIcon };
105
108
  export { SaveIcon };
106
109
  export { SendIcon };
107
110
  export { TemplateIcon };
111
+ export { BrandedQrCode };
112
+ export { GenericQrCode };
113
+ export { PromptbookQrCode };
108
114
  export { injectCssModuleIntoShadowRoot };
@@ -21,6 +21,7 @@ import type { string_chat_format_name } from '../book-components/Chat/save/_comm
21
21
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
22
22
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
23
23
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
24
+ import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
24
25
  import type { PipelineCollection } from '../collection/PipelineCollection';
25
26
  import type { Command } from '../commands/_common/types/Command';
26
27
  import type { CommandParser } from '../commands/_common/types/CommandParser';
@@ -354,6 +355,7 @@ export type { string_chat_format_name };
354
355
  export type { ChatMessage };
355
356
  export type { ChatParticipant };
356
357
  export type { MessageButton };
358
+ export type { QrCodeOptions };
357
359
  export type { PipelineCollection };
358
360
  export type { Command };
359
361
  export type { CommandParser };
@@ -1,12 +1,15 @@
1
1
  import type { string_markdown } from '../../../types/typeAliases';
2
+ type MarkdownContentProps = {
3
+ content: string_markdown;
4
+ className?: string;
5
+ };
2
6
  /**
3
7
  * Renders markdown content with support for code highlighting, math, and tables.
4
8
  *
5
9
  * @public exported from `@promptbook/components`
6
10
  */
7
- export declare function MarkdownContent({ content }: {
8
- content: string_markdown;
9
- }): import("react/jsx-runtime").JSX.Element;
11
+ export declare function MarkdownContent(props: MarkdownContentProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
10
13
  /**
11
14
  * TODO: !!! Split into multiple files
12
- */
15
+ */
@@ -0,0 +1,18 @@
1
+ import { QrCodeOptions } from './useQrCode';
2
+ type BrandedQrCodeProps = QrCodeOptions & {
3
+ /**
4
+ * Width and height of the QR code canvas
5
+ *
6
+ * @default 250
7
+ */
8
+ size?: number;
9
+ /**
10
+ * Additional CSS class names to apply to the container div
11
+ */
12
+ className?: string;
13
+ };
14
+ /**
15
+ * @public exported from `@promptbook/components`
16
+ */
17
+ export declare function BrandedQrCode(props: BrandedQrCodeProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,10 @@
1
+ type GenericQrCodeProps = {
2
+ value: string | number;
3
+ size?: number;
4
+ className?: string;
5
+ };
6
+ /**
7
+ * @public exported from `@promptbook/components`
8
+ */
9
+ export declare function GenericQrCode({ value, size, className }: GenericQrCodeProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,18 @@
1
+ type PromptbookQrCodeProps = {
2
+ value: string | number;
3
+ /**
4
+ * Width and height of the QR code canvas
5
+ *
6
+ * @default 250
7
+ */
8
+ size?: number;
9
+ /**
10
+ * Additional CSS class names to apply to the container div
11
+ */
12
+ className?: string;
13
+ };
14
+ /**
15
+ * @public exported from `@promptbook/components`
16
+ */
17
+ export declare function PromptbookQrCode(props: PromptbookQrCodeProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import type { QRCodeRenderersOptions } from 'qrcode';
3
+ import { string_url_image } from '../../types/typeAliases';
4
+ export type QrCodeOptions = QRCodeRenderersOptions & {
5
+ value: string | number;
6
+ logoSrc?: string_url_image;
7
+ };
8
+ /**
9
+ *
10
+ *
11
+ * @private utility of QR code components
12
+ */
13
+ export declare function useQrCode(options: QrCodeOptions): {
14
+ canvasRef: import("react").RefObject<HTMLCanvasElement | null>;
15
+ };
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.103.0-20`).
18
+ * It follows semantic versioning (e.g., `0.103.0-21`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/types",
3
- "version": "0.103.0-21",
3
+ "version": "0.103.0-22",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -92,6 +92,6 @@
92
92
  },
93
93
  "typings": "./esm/typings/src/_packages/types.index.d.ts",
94
94
  "peerDependencies": {
95
- "@promptbook/core": "0.103.0-21"
95
+ "@promptbook/core": "0.103.0-22"
96
96
  }
97
97
  }