@redneckz/wildless-cms-uni-blocks 0.1.6 → 0.1.9

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/Blocks.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import type { PlaceholderContent } from './Placeholder';
2
+ import type { RichTextContent } from './RichText';
2
3
  import type { TextContent } from './Text';
3
- export declare type BlockContent = PlaceholderContent | TextContent;
4
+ export declare type BlockContent = PlaceholderContent | TextContent | RichTextContent;
4
5
  export declare const Blocks: {
5
6
  Text: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Text").TextProps, any>, context?: any) => any;
7
+ RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./RichText").RichTextProps, any>, context?: any) => any;
6
8
  Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder").PlaceholderProps, any>, context?: any) => any;
7
9
  };
package/dist/Blocks.js CHANGED
@@ -1,9 +1,11 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.Blocks = void 0;
3
3
  const Placeholder_1 = require("./Placeholder");
4
+ const RichText_1 = require("./RichText");
4
5
  const Text_1 = require("./Text");
5
6
  exports.Blocks = {
6
7
  Text: Text_1.Text,
8
+ RichText: RichText_1.RichText,
7
9
  Placeholder: Placeholder_1.Placeholder,
8
10
  };
9
11
  //# sourceMappingURL=Blocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":";;AACA,+CAA4C;AAE5C,iCAA8B;AAIjB,QAAA,MAAM,GAAG;IACpB,IAAI,EAAJ,WAAI;IACJ,WAAW,EAAX,yBAAW;CACZ,CAAC"}
1
+ {"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":";;AACA,+CAA4C;AAE5C,yCAAsC;AAEtC,iCAA8B;AAIjB,QAAA,MAAM,GAAG;IACpB,IAAI,EAAJ,WAAI;IACJ,QAAQ,EAAR,mBAAQ;IACR,WAAW,EAAX,yBAAW;CACZ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface RichTextContent {
2
+ __html?: string;
3
+ __md?: string;
4
+ }
5
+ export interface RichTextProps extends RichTextContent {
6
+ className?: string;
7
+ }
8
+ export declare const RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<RichTextProps, any>, context?: any) => any;
@@ -0,0 +1,10 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.RichText = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ exports.RichText = (0, uni_jsx_1.JSX)(({ className, __html, __md }) => {
6
+ const html = __html || __md;
7
+ const props = Object.assign({ className: className || '' }, html ? { dangerouslySetInnerHTML: { __html: html } } : {});
8
+ return (0, jsx_runtime_1.jsx)("div", { ...props });
9
+ });
10
+ //# sourceMappingURL=RichText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RichText.js","sourceRoot":"","sources":["../src/RichText.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAW3B,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAgB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,CAAC;IAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CACzB,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,EAAE,EAC9B,IAAI,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAC;IACF,OAAO,mCAAS,KAAK,GAAI,CAAC;AAC5B,CAAC,CAAC,CAAC"}
package/dist/types.js CHANGED
@@ -5,6 +5,7 @@ exports.GraphQL = {
5
5
  type BlockContent {
6
6
  primary: String
7
7
  secondary: String
8
+ __html: String
8
9
  }
9
10
 
10
11
  type Block {
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAca,QAAA,OAAO,GAAG;IACrB,KAAK,EAAE;;;;;;;;;;;;GAYN;IACD,IAAI,EAAE;;;;;;GAML;CACF,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AAca,QAAA,OAAO,GAAG;IACrB,KAAK,EAAE;;;;;;;;;;;;;GAaN;IACD,IAAI,EAAE;;;;;;GAML;CACF,CAAC"}
package/lib/Blocks.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import type { PlaceholderContent } from './Placeholder';
2
+ import type { RichTextContent } from './RichText';
2
3
  import type { TextContent } from './Text';
3
- export declare type BlockContent = PlaceholderContent | TextContent;
4
+ export declare type BlockContent = PlaceholderContent | TextContent | RichTextContent;
4
5
  export declare const Blocks: {
5
6
  Text: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Text").TextProps, any>, context?: any) => any;
7
+ RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./RichText").RichTextProps, any>, context?: any) => any;
6
8
  Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Placeholder").PlaceholderProps, any>, context?: any) => any;
7
9
  };
package/lib/Blocks.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import { Placeholder } from './Placeholder';
2
+ import { RichText } from './RichText';
2
3
  import { Text } from './Text';
3
4
  export const Blocks = {
4
5
  Text,
6
+ RichText,
5
7
  Placeholder,
6
8
  };
7
9
  //# sourceMappingURL=Blocks.js.map
package/lib/Blocks.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,WAAW;CACZ,CAAC"}
1
+ {"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../src/Blocks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI;IACJ,QAAQ;IACR,WAAW;CACZ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface RichTextContent {
2
+ __html?: string;
3
+ __md?: string;
4
+ }
5
+ export interface RichTextProps extends RichTextContent {
6
+ className?: string;
7
+ }
8
+ export declare const RichText: (props: import("@redneckz/uni-jsx").PropsWithChildren<RichTextProps, any>, context?: any) => any;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ export const RichText = JSX(({ className, __html, __md }) => {
4
+ const html = __html || __md;
5
+ const props = Object.assign({ className: className || '' }, html ? { dangerouslySetInnerHTML: { __html: html } } : {});
6
+ return _jsx("div", { ...props });
7
+ });
8
+ //# sourceMappingURL=RichText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RichText.js","sourceRoot":"","sources":["../src/RichText.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAWxC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,CAAC;IAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CACzB,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,EAAE,EAC9B,IAAI,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAC;IACF,OAAO,iBAAS,KAAK,GAAI,CAAC;AAC5B,CAAC,CAAC,CAAC"}
package/lib/types.js CHANGED
@@ -3,6 +3,7 @@ export const GraphQL = {
3
3
  type BlockContent {
4
4
  primary: String
5
5
  secondary: String
6
+ __html: String
6
7
  }
7
8
 
8
9
  type Block {
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK,EAAE;;;;;;;;;;;;GAYN;IACD,IAAI,EAAE;;;;;;GAML;CACF,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK,EAAE;;;;;;;;;;;;;GAaN;IACD,IAAI,EAAE;;;;;;GAML;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.1.6",
3
+ "version": "0.1.9",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "style": "./dist/common.css",