@dyrected/react 2.5.59 → 2.5.61

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.
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ export interface DyrectedRichTextProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
3
+ /**
4
+ * The value of a `richText` field — an HTML string produced by the editor.
5
+ * Renders nothing when empty.
6
+ */
7
+ content: string | null | undefined;
8
+ }
9
+ /**
10
+ * Renders a Dyrected `richText` field value.
11
+ *
12
+ * The field stores an HTML string, so this outputs it directly. That HTML comes
13
+ * from your own editors through the Admin panel; render only content you trust,
14
+ * and sanitize upstream if untrusted users can author it.
15
+ *
16
+ * ```tsx
17
+ * <DyrectedRichText content={post.body} className="prose" />
18
+ * ```
19
+ */
20
+ export declare function DyrectedRichText({ content, ...props }: DyrectedRichTextProps): React.JSX.Element | null;
21
+ //# sourceMappingURL=DyrectedRichText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DyrectedRichText.d.ts","sourceRoot":"","sources":["../../src/components/DyrectedRichText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IAClG;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,4BAG5E"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Renders a Dyrected `richText` field value.
4
+ *
5
+ * The field stores an HTML string, so this outputs it directly. That HTML comes
6
+ * from your own editors through the Admin panel; render only content you trust,
7
+ * and sanitize upstream if untrusted users can author it.
8
+ *
9
+ * ```tsx
10
+ * <DyrectedRichText content={post.body} className="prose" />
11
+ * ```
12
+ */
13
+ export function DyrectedRichText({ content, ...props }) {
14
+ if (!content)
15
+ return null;
16
+ return _jsx("div", { ...props, dangerouslySetInnerHTML: { __html: content } });
17
+ }
18
+ //# sourceMappingURL=DyrectedRichText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DyrectedRichText.js","sourceRoot":"","sources":["../../src/components/DyrectedRichText.tsx"],"names":[],"mappings":";AAUA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAyB;IAC3E,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,OAAO,iBAAS,KAAK,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAI,CAAC;AAC1E,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,7 +6,8 @@ export * from './providers/DyPathProvider';
6
6
  export * from './components/DyrectedImage';
7
7
  export * from './components/DyrectedMedia';
8
8
  export * from './components/DyrectedIcon';
9
+ export * from './components/DyrectedRichText';
9
10
  export * from './components/Blocks';
10
- export { DyrectedClient, DyrectedError } from '@dyrected/sdk';
11
+ export { DyrectedClient, DyrectedError, getPreviewToken, PREVIEW_TOKEN_PARAM } from '@dyrected/sdk';
11
12
  export type { CollectionConfig, GlobalConfig } from '@dyrected/sdk';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpG,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -6,7 +6,8 @@ export * from './providers/DyPathProvider';
6
6
  export * from './components/DyrectedImage';
7
7
  export * from './components/DyrectedMedia';
8
8
  export * from './components/DyrectedIcon';
9
+ export * from './components/DyrectedRichText';
9
10
  export * from './components/Blocks';
10
11
  // Re-export core types and errors from SDK for convenience
11
- export { DyrectedClient, DyrectedError } from '@dyrected/sdk';
12
+ export { DyrectedClient, DyrectedError, getPreviewToken, PREVIEW_TOKEN_PARAM } from '@dyrected/sdk';
12
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AAEpC,2DAA2D;AAC3D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AAEpC,2DAA2D;AAC3D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/react",
3
- "version": "2.5.59",
3
+ "version": "2.5.61",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "lucide-react": "^1.14.0",
26
- "@dyrected/admin": "2.5.59",
27
- "@dyrected/core": "2.5.59",
28
- "@dyrected/sdk": "2.5.59"
26
+ "@dyrected/admin": "2.5.61",
27
+ "@dyrected/core": "2.5.61",
28
+ "@dyrected/sdk": "2.5.61"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.12.12",