@truecodeio/sdk-react 0.2.7 → 0.2.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.
@@ -0,0 +1,80 @@
1
+ import { createBokoClient } from '@truecodeio/sdk-core';
2
+ export declare const ClientProvider: ({ children, client, }: React.PropsWithChildren<{
3
+ client: ReturnType<typeof createBokoClient>;
4
+ }>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const useClient: () => {
6
+ getEligibleCampaign: () => Promise<{
7
+ template: {
8
+ content: {
9
+ id: string;
10
+ type: "root";
11
+ name: string;
12
+ isCollapsed: boolean;
13
+ props: {
14
+ color: string;
15
+ };
16
+ children: {
17
+ id: string;
18
+ type: "row";
19
+ name: string;
20
+ isCollapsed: boolean;
21
+ props: {
22
+ padding: {
23
+ top: number;
24
+ right: number;
25
+ bottom: number;
26
+ left: number;
27
+ };
28
+ gap: number;
29
+ background: {
30
+ color: string;
31
+ };
32
+ };
33
+ children: {
34
+ id: string;
35
+ type: "column";
36
+ name: string;
37
+ isCollapsed: boolean;
38
+ props: Record<string, unknown>;
39
+ children: ({
40
+ id: string;
41
+ type: "spacer";
42
+ name: string;
43
+ isCollapsed: boolean;
44
+ props: {
45
+ size: number;
46
+ };
47
+ } | {
48
+ id: string;
49
+ type: "text";
50
+ name: string;
51
+ isCollapsed: boolean;
52
+ props: {
53
+ type: "paragraph" | "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | "heading-6";
54
+ content: string;
55
+ };
56
+ } | {
57
+ id: string;
58
+ type: "button";
59
+ name: string;
60
+ isCollapsed: boolean;
61
+ props: {
62
+ title: string;
63
+ };
64
+ })[];
65
+ }[];
66
+ }[];
67
+ };
68
+ id: string;
69
+ name: string;
70
+ organizationId: string;
71
+ createdBy: string;
72
+ createdAt: Date;
73
+ updatedAt: Date;
74
+ status: string;
75
+ };
76
+ id: string;
77
+ } | null>;
78
+ };
79
+ export declare const Renderer: () => import("react/jsx-runtime").JSX.Element | null;
80
+ export { createBokoClient } from '@truecodeio/sdk-core';
package/dist/index.js ADDED
@@ -0,0 +1,91 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { createContext as p, use as a, useState as o, useEffect as l } from "react";
3
+ import { createBokoClient as N } from "@truecodeio/sdk-core";
4
+ class u extends Error {
5
+ constructor(n) {
6
+ super(n), this.name = "AssertionError";
7
+ }
8
+ }
9
+ function h(t, n, i) {
10
+ if (!n(t))
11
+ throw new u(i);
12
+ }
13
+ function d(t, n, i) {
14
+ return h(t, n, i), t;
15
+ }
16
+ const g = (t) => t !== null, m = (t, n = "should be non null") => d(t, g, n), c = p(null), b = ({
17
+ children: t,
18
+ client: n
19
+ }) => /* @__PURE__ */ e(c, { value: { client: n }, children: t }), f = () => m(a(c)).client, v = () => {
20
+ const [t, n] = o(null), i = f();
21
+ return l(() => {
22
+ (async () => {
23
+ try {
24
+ const r = await i.getEligibleCampaign();
25
+ n(r);
26
+ } catch (r) {
27
+ console.error("Error fetching campaign:", r);
28
+ }
29
+ })();
30
+ }, []), (() => {
31
+ if (!t)
32
+ return null;
33
+ const s = (r) => {
34
+ switch (r.type) {
35
+ case "root":
36
+ return /* @__PURE__ */ e("div", { style: { color: r.props.color }, children: r.children.map(s) });
37
+ case "row":
38
+ return /* @__PURE__ */ e(
39
+ "div",
40
+ {
41
+ style: {
42
+ display: "flex",
43
+ backgroundColor: r.props.background.color,
44
+ paddingLeft: r.props.padding.left,
45
+ paddingRight: r.props.padding.right,
46
+ paddingTop: r.props.padding.top,
47
+ paddingBottom: r.props.padding.bottom
48
+ },
49
+ children: r.children.map(s)
50
+ },
51
+ r.id
52
+ );
53
+ case "column":
54
+ return /* @__PURE__ */ e("div", { style: { flex: 1 }, children: r.children.map(s) }, r.id);
55
+ case "button":
56
+ return /* @__PURE__ */ e("button", { type: "button", children: r.props.title }, r.id);
57
+ case "text":
58
+ switch (r.props.type) {
59
+ case "paragraph":
60
+ return /* @__PURE__ */ e("p", { children: r.props.content }, r.id);
61
+ case "heading-1":
62
+ return /* @__PURE__ */ e("h1", { children: r.props.content }, r.id);
63
+ case "heading-2":
64
+ return /* @__PURE__ */ e("h2", { children: r.props.content }, r.id);
65
+ case "heading-3":
66
+ return /* @__PURE__ */ e("h3", { children: r.props.content }, r.id);
67
+ case "heading-4":
68
+ return /* @__PURE__ */ e("h4", { children: r.props.content }, r.id);
69
+ case "heading-5":
70
+ return /* @__PURE__ */ e("h5", { children: r.props.content }, r.id);
71
+ case "heading-6":
72
+ return /* @__PURE__ */ e("h6", { children: r.props.content }, r.id);
73
+ default:
74
+ return r.props.type;
75
+ }
76
+ case "spacer":
77
+ return /* @__PURE__ */ e("div", { style: { height: r.props.size } }, r.id);
78
+ default:
79
+ return r;
80
+ }
81
+ };
82
+ return s(t.template.content);
83
+ })();
84
+ };
85
+ export {
86
+ b as ClientProvider,
87
+ v as Renderer,
88
+ N as createBokoClient,
89
+ f as useClient
90
+ };
91
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/.pnpm/@truecodeio+common@0.1.3_react@19.1.0/node_modules/@truecodeio/common/src/typescript/utils/assert.ts","../../../node_modules/.pnpm/@truecodeio+common@0.1.3_react@19.1.0/node_modules/@truecodeio/common/src/typescript/utils/non-nullable.ts","../src/index.tsx"],"sourcesContent":["export class AssertionError extends Error {\n constructor(message?: string) {\n super(message);\n\n this.name = \"AssertionError\";\n }\n}\n\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\nexport function assert<InputT, OutputT extends InputT>(\n input: InputT,\n guard: (input: InputT) => input is OutputT,\n message?: string,\n): asserts input is OutputT {\n if (!guard(input)) {\n throw new AssertionError(message);\n }\n}\n\n// eslint-disable-next-line prefer-arrow/prefer-arrow-functions\nexport function asserted<InputT, OutputT extends InputT>(\n input: InputT,\n guard: (input: InputT) => input is OutputT,\n message?: string,\n): OutputT {\n assert(input, guard, message);\n\n return input;\n}\n","import { asserted } from \"./assert.ts\";\n\nexport const checkNonUndefined = <ValueT>(\n value: ValueT,\n): value is Exclude<ValueT, undefined> => {\n return value !== undefined;\n};\n\nexport const assertedNonUndefined = <ValueT>(\n value: ValueT,\n message = \"should be non undefined\",\n) => {\n return asserted(value, checkNonUndefined, message);\n};\n\nexport const checkNonNull = <ValueT>(\n value: ValueT,\n): value is Exclude<ValueT, null> => {\n return value !== null;\n};\n\nexport const assertedNonNull = <ValueT>(\n value: ValueT,\n message = \"should be non null\",\n) => {\n return asserted(value, checkNonNull, message);\n};\n\nexport const checkNonNullable = <ValueT>(\n value: ValueT,\n): value is Exclude<ValueT, null> => {\n return checkNonUndefined(value) && checkNonNull(value);\n};\n\nexport const assertedNonNullable = <ValueT>(value: ValueT) => {\n return asserted(\n value,\n checkNonNullable,\n \"should be non null and non undefined\",\n );\n};\n\nexport const checkIsNullable = <ValueT>(\n value: ValueT,\n): value is Extract<ValueT, null> => {\n return !checkNonNullable(value);\n};\n","import { createContext, use, useEffect, useState } from \"react\";\nimport type { createBokoClient, EligibleCampaign } from \"@truecodeio/sdk-core\";\nimport type { NodeT } from \"@truecodeio/client-shared/schemas/tree-nodes/index.ts\";\nimport { assertedNonNull } from \"@truecodeio/common/typescript/utils/non-nullable.ts\";\n\ntype ClientContextValue = {\n client: ReturnType<typeof createBokoClient>;\n};\n\nconst ClientContext = createContext<ClientContextValue | null>(null);\n\nexport const ClientProvider = ({\n children,\n client,\n}: React.PropsWithChildren<{\n client: ReturnType<typeof createBokoClient>;\n}>) => {\n return <ClientContext value={{ client }}>{children}</ClientContext>;\n};\n\nexport const useClient = () => {\n return assertedNonNull(use(ClientContext)).client;\n};\n\nexport const Renderer = () => {\n const [campaign, setCampaign] = useState<EligibleCampaign | null>(null);\n\n const client = useClient();\n\n useEffect(() => {\n // TODO: Replace with tanstack query\n const fetchCampaign = async () => {\n try {\n const response = await client.getEligibleCampaign();\n\n setCampaign(response);\n } catch (error) {\n console.error(\"Error fetching campaign:\", error);\n }\n };\n\n void fetchCampaign();\n }, []);\n\n const renderCampaign = () => {\n if (!campaign) {\n return null;\n }\n\n const renderNode = (node: NodeT) => {\n switch (node.type) {\n case \"root\": {\n return (\n <div style={{ color: node.props.color }}>\n {node.children.map(renderNode)}\n </div>\n );\n }\n case \"row\": {\n return (\n <div\n style={{\n display: \"flex\",\n backgroundColor: node.props.background.color,\n paddingLeft: node.props.padding.left,\n paddingRight: node.props.padding.right,\n paddingTop: node.props.padding.top,\n paddingBottom: node.props.padding.bottom,\n }}\n key={node.id}\n >\n {node.children.map(renderNode)}\n </div>\n );\n }\n case \"column\": {\n return (\n <div style={{ flex: 1 }} key={node.id}>\n {node.children.map(renderNode)}\n </div>\n );\n }\n case \"button\": {\n return (\n <button type=\"button\" key={node.id}>\n {node.props.title}\n </button>\n );\n }\n case \"text\": {\n switch (node.props.type) {\n case \"paragraph\": {\n return <p key={node.id}>{node.props.content}</p>;\n }\n case \"heading-1\": {\n return <h1 key={node.id}>{node.props.content}</h1>;\n }\n case \"heading-2\": {\n return <h2 key={node.id}>{node.props.content}</h2>;\n }\n case \"heading-3\": {\n return <h3 key={node.id}>{node.props.content}</h3>;\n }\n case \"heading-4\": {\n return <h4 key={node.id}>{node.props.content}</h4>;\n }\n case \"heading-5\": {\n return <h5 key={node.id}>{node.props.content}</h5>;\n }\n case \"heading-6\": {\n return <h6 key={node.id}>{node.props.content}</h6>;\n }\n\n default: {\n return node.props.type satisfies never;\n }\n }\n }\n case \"spacer\": {\n return <div style={{ height: node.props.size }} key={node.id}></div>;\n }\n\n default: {\n return node satisfies never;\n }\n }\n };\n\n return renderNode(campaign.template.content);\n };\n\n return renderCampaign();\n};\n\nexport { createBokoClient } from \"@truecodeio/sdk-core\";\n"],"names":["AssertionError","message","assert","input","guard","asserted","checkNonNull","value","assertedNonNull","ClientContext","createContext","ClientProvider","children","client","useClient","use","Renderer","campaign","setCampaign","useState","useEffect","response","error","renderNode","node","jsx"],"mappings":";;;AAAO,MAAMA,UAAuB,MAAM;AAAA,E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,QAAA,GAArBA,EAAK,EAAwB;AAAA,YAG/C;AACE,qBAAOA,EAAK,MAAM;AAAA,UACpB;AAAA,QAGJ,KAAK;AACH,iBAAO,gBAAAC,EAAC,OAAA,EAAI,OAAO,EAAE,QAAQD,EAAK,MAAM,KAAA,KAAaA,EAAK,EAAI;AAAA,QAGhE;AACE,iBAAOA;AAAA,MACT;AAAA,IACF;AAGF,WAAOD,EAAWN,EAAS,SAAS,OAAO;AAAA,EAAA,GAGtC;AACT;","x_google_ignoreList":[0,1]}
package/package.json CHANGED
@@ -1,14 +1,23 @@
1
1
  {
2
2
  "name": "@truecodeio/sdk-react",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
- "main": "src/index.tsx",
6
- "access": "public",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./dist/index.js",
8
+ "types": "./dist/index.d.ts"
9
+ }
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
7
14
  "devDependencies": {
8
15
  "@types/react": "^19.1.8",
9
16
  "react": "^19.1.0",
10
- "@boko/tsconfig": "^1.0.0",
11
- "@truecodeio/sdk-core": "0.2.7"
17
+ "vite": "^7.0.0",
18
+ "vite-plugin-dts": "^4.5.4",
19
+ "@truecodeio/sdk-core": "0.2.7",
20
+ "@boko/tsconfig": "^1.0.0"
12
21
  },
13
22
  "dependencies": {
14
23
  "@truecodeio/client-shared": "^0.1.5",
@@ -19,6 +28,7 @@
19
28
  "@truecodeio/sdk-core": "0.2.7"
20
29
  },
21
30
  "scripts": {
31
+ "build": "vite build",
22
32
  "format:prettier:fix:all": "prettier --cache --write ./src",
23
33
  "lint:eslint:fix:all": "eslint --cache --fix ./src",
24
34
  "lint:typescript": "tsc --noEmit"
package/CHANGELOG.md DELETED
@@ -1,64 +0,0 @@
1
- # @boko/sdk-react
2
-
3
- ## 0.2.7
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies
8
- - @truecodeio/sdk-core@0.2.7
9
-
10
- ## 0.2.6
11
-
12
- ### Patch Changes
13
-
14
- - Updated dependencies
15
- - @truecodeio/sdk-core@0.2.6
16
-
17
- ## 0.2.5
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies
22
- - @truecodeio/sdk-core@0.2.5
23
-
24
- ## 0.2.4
25
-
26
- ### Patch Changes
27
-
28
- - Remove workspace dependencies
29
- - Updated dependencies
30
- - @truecodeio/sdk-core@0.2.4
31
-
32
- ## 0.2.3
33
-
34
- ### Patch Changes
35
-
36
- - Updated dependencies
37
- - @truecodeio/sdk-core@0.2.3
38
-
39
- ## 0.2.2
40
-
41
- ### Patch Changes
42
-
43
- - change package name
44
- - Updated dependencies
45
- - @truecodeio/sdk-core@0.2.2
46
-
47
- ## 0.2.1
48
-
49
- ### Patch Changes
50
-
51
- - Override access property
52
- - Updated dependencies
53
- - @boko/sdk-core@0.2.1
54
-
55
- ## 0.2.0
56
-
57
- ### Minor Changes
58
-
59
- - Init packages
60
-
61
- ### Patch Changes
62
-
63
- - Updated dependencies
64
- - @boko/sdk-core@0.2.0
package/src/index.tsx DELETED
@@ -1,135 +0,0 @@
1
- import { createContext, use, useEffect, useState } from "react";
2
- import type { createBokoClient, EligibleCampaign } from "@truecodeio/sdk-core";
3
- import type { NodeT } from "@truecodeio/client-shared/schemas/tree-nodes/index.ts";
4
- import { assertedNonNull } from "@truecodeio/common/typescript/utils/non-nullable.ts";
5
-
6
- type ClientContextValue = {
7
- client: ReturnType<typeof createBokoClient>;
8
- };
9
-
10
- const ClientContext = createContext<ClientContextValue | null>(null);
11
-
12
- export const ClientProvider = ({
13
- children,
14
- client,
15
- }: React.PropsWithChildren<{
16
- client: ReturnType<typeof createBokoClient>;
17
- }>) => {
18
- return <ClientContext value={{ client }}>{children}</ClientContext>;
19
- };
20
-
21
- export const useClient = () => {
22
- return assertedNonNull(use(ClientContext)).client;
23
- };
24
-
25
- export const Renderer = () => {
26
- const [campaign, setCampaign] = useState<EligibleCampaign | null>(null);
27
-
28
- const client = useClient();
29
-
30
- useEffect(() => {
31
- // TODO: Replace with tanstack query
32
- const fetchCampaign = async () => {
33
- try {
34
- const response = await client.getEligibleCampaign();
35
-
36
- setCampaign(response);
37
- } catch (error) {
38
- console.error("Error fetching campaign:", error);
39
- }
40
- };
41
-
42
- void fetchCampaign();
43
- }, []);
44
-
45
- const renderCampaign = () => {
46
- if (!campaign) {
47
- return null;
48
- }
49
-
50
- const renderNode = (node: NodeT) => {
51
- switch (node.type) {
52
- case "root": {
53
- return (
54
- <div style={{ color: node.props.color }}>
55
- {node.children.map(renderNode)}
56
- </div>
57
- );
58
- }
59
- case "row": {
60
- return (
61
- <div
62
- style={{
63
- display: "flex",
64
- backgroundColor: node.props.background.color,
65
- paddingLeft: node.props.padding.left,
66
- paddingRight: node.props.padding.right,
67
- paddingTop: node.props.padding.top,
68
- paddingBottom: node.props.padding.bottom,
69
- }}
70
- key={node.id}
71
- >
72
- {node.children.map(renderNode)}
73
- </div>
74
- );
75
- }
76
- case "column": {
77
- return (
78
- <div style={{ flex: 1 }} key={node.id}>
79
- {node.children.map(renderNode)}
80
- </div>
81
- );
82
- }
83
- case "button": {
84
- return (
85
- <button type="button" key={node.id}>
86
- {node.props.title}
87
- </button>
88
- );
89
- }
90
- case "text": {
91
- switch (node.props.type) {
92
- case "paragraph": {
93
- return <p key={node.id}>{node.props.content}</p>;
94
- }
95
- case "heading-1": {
96
- return <h1 key={node.id}>{node.props.content}</h1>;
97
- }
98
- case "heading-2": {
99
- return <h2 key={node.id}>{node.props.content}</h2>;
100
- }
101
- case "heading-3": {
102
- return <h3 key={node.id}>{node.props.content}</h3>;
103
- }
104
- case "heading-4": {
105
- return <h4 key={node.id}>{node.props.content}</h4>;
106
- }
107
- case "heading-5": {
108
- return <h5 key={node.id}>{node.props.content}</h5>;
109
- }
110
- case "heading-6": {
111
- return <h6 key={node.id}>{node.props.content}</h6>;
112
- }
113
-
114
- default: {
115
- return node.props.type satisfies never;
116
- }
117
- }
118
- }
119
- case "spacer": {
120
- return <div style={{ height: node.props.size }} key={node.id}></div>;
121
- }
122
-
123
- default: {
124
- return node satisfies never;
125
- }
126
- }
127
- };
128
-
129
- return renderNode(campaign.template.content);
130
- };
131
-
132
- return renderCampaign();
133
- };
134
-
135
- export { createBokoClient } from "@truecodeio/sdk-core";
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "@boko/tsconfig",
3
- "compilerOptions": {
4
- "allowImportingTsExtensions": true,
5
- "moduleResolution": "bundler",
6
- "module": "ES2022",
7
- "jsx": "react-jsx",
8
- "paths": {
9
- "@truecodeio/sdk-react/*": ["./src/*"]
10
- }
11
- },
12
- "include": ["src"]
13
- }