@zentto/studio-react 0.1.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.
@@ -0,0 +1,20 @@
1
+ import { ZenttoStudioRenderer as RendererElement } from '@zentto/studio';
2
+ /**
3
+ * React wrapper for <zentto-studio-renderer> web component.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * import { ZenttoStudioRenderer } from '@zentto/studio-react';
8
+ *
9
+ * <ZenttoStudioRenderer
10
+ * schema={mySchema}
11
+ * data={{ nombre: 'Juan', email: 'juan@test.com' }}
12
+ * onStudioChange={(e) => console.log('Field changed:', e.detail)}
13
+ * onStudioSubmit={(e) => console.log('Form submitted:', e.detail.data)}
14
+ * />
15
+ * ```
16
+ */
17
+ export declare const ZenttoStudioRenderer: import("@lit/react").ReactWebComponent<RendererElement, any>;
18
+ export type { StudioSchema, FieldConfig, FieldType, Section, LayoutConfig, LayoutType, DataSourceConfig, ActionConfig, Rule, RuleAction, ValidationRule, ThemeConfig, Flavor, PermissionConfig, SelectOption, StudioBindingContext, } from '@zentto/studio-core';
19
+ export { validateSchema, safeValidateSchema, evaluateExpression, evaluateCondition, DataModel, EventBus, } from '@zentto/studio-core';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGzE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,8DAS/B,CAAC;AAGH,YAAY,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,OAAO,EACP,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import { createComponent } from '@lit/react';
2
+ import { ZenttoStudioRenderer as RendererElement } from '@zentto/studio';
3
+ import React from 'react';
4
+ /**
5
+ * React wrapper for <zentto-studio-renderer> web component.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * import { ZenttoStudioRenderer } from '@zentto/studio-react';
10
+ *
11
+ * <ZenttoStudioRenderer
12
+ * schema={mySchema}
13
+ * data={{ nombre: 'Juan', email: 'juan@test.com' }}
14
+ * onStudioChange={(e) => console.log('Field changed:', e.detail)}
15
+ * onStudioSubmit={(e) => console.log('Form submitted:', e.detail.data)}
16
+ * />
17
+ * ```
18
+ */
19
+ export const ZenttoStudioRenderer = createComponent({
20
+ tagName: 'zentto-studio-renderer',
21
+ elementClass: RendererElement,
22
+ react: React,
23
+ events: {
24
+ onStudioChange: 'studio-change',
25
+ onStudioSubmit: 'studio-submit',
26
+ onStudioAction: 'studio-action',
27
+ },
28
+ });
29
+ // Re-export core utilities
30
+ export { validateSchema, safeValidateSchema, evaluateExpression, evaluateCondition, DataModel, EventBus, } from '@zentto/studio-core';
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,oBAAoB,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;IAClD,OAAO,EAAE,wBAAwB;IACjC,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,cAAc,EAAE,eAAe;QAC/B,cAAc,EAAE,eAAe;QAC/B,cAAc,EAAE,eAAe;KACzB;CACT,CAAC,CAAC;AAsBH,2BAA2B;AAC3B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,qBAAqB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@zentto/studio-react",
3
+ "version": "0.1.0",
4
+ "description": "React wrapper for Zentto Studio web components — <ZenttoStudioRenderer> and <ZenttoStudioDesigner>.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": ["dist", "README.md"],
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "dev": "tsc --watch",
18
+ "clean": "rm -rf dist"
19
+ },
20
+ "dependencies": {
21
+ "@zentto/studio": "*",
22
+ "@zentto/studio-core": "*",
23
+ "@lit/react": "^1.0.0"
24
+ },
25
+ "peerDependencies": {
26
+ "react": ">=18",
27
+ "react-dom": ">=18"
28
+ },
29
+ "devDependencies": {
30
+ "typescript": "^5.7.0"
31
+ },
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/zentto-erp/zentto-studio"
36
+ },
37
+ "keywords": [
38
+ "zentto",
39
+ "studio",
40
+ "react",
41
+ "form-builder",
42
+ "dynamic-forms"
43
+ ]
44
+ }