@texaryn/web-components 0.0.0 → 0.2.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.
- package/CHANGELOG.md +25 -0
- package/LICENSE +190 -0
- package/README.md +111 -0
- package/dist/binding.d.ts +9 -0
- package/dist/binding.d.ts.map +1 -0
- package/dist/binding.js +38 -0
- package/dist/binding.js.map +1 -0
- package/dist/containers.d.ts +11 -0
- package/dist/containers.d.ts.map +1 -0
- package/dist/containers.js +243 -0
- package/dist/containers.js.map +1 -0
- package/dist/define.d.ts +3 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +11 -0
- package/dist/define.js.map +1 -0
- package/dist/element.d.ts +26 -0
- package/dist/element.d.ts.map +1 -0
- package/dist/element.js +140 -0
- package/dist/element.js.map +1 -0
- package/dist/field-state.d.ts +18 -0
- package/dist/field-state.d.ts.map +1 -0
- package/dist/field-state.js +51 -0
- package/dist/field-state.js.map +1 -0
- package/dist/fields.d.ts +8 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +168 -0
- package/dist/fields.js.map +1 -0
- package/dist/ids.d.ts +4 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +10 -0
- package/dist/ids.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/mount.d.ts +12 -0
- package/dist/mount.d.ts.map +1 -0
- package/dist/mount.js +39 -0
- package/dist/mount.js.map +1 -0
- package/dist/registry.d.ts +9 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +23 -0
- package/dist/registry.js.map +1 -0
- package/dist/widget.d.ts +24 -0
- package/dist/widget.d.ts.map +1 -0
- package/dist/widget.js +2 -0
- package/dist/widget.js.map +1 -0
- package/package.json +44 -3
package/dist/widget.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FormRuntime, RendererRegistry, UINode } from '@texaryn/core';
|
|
2
|
+
/**
|
|
3
|
+
* A widget owns one DOM subtree for one node. `update` may hand it a
|
|
4
|
+
* different node than it mounted with: after an array move the row keeps
|
|
5
|
+
* its widget while the positional node underneath changes.
|
|
6
|
+
*/
|
|
7
|
+
export interface DomWidget {
|
|
8
|
+
element: HTMLElement;
|
|
9
|
+
update(node: UINode): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
}
|
|
12
|
+
export type WidgetFactory = (node: UINode, ctx: RenderContext) => DomWidget;
|
|
13
|
+
export interface NodeBinding {
|
|
14
|
+
readonly element: HTMLElement;
|
|
15
|
+
update(node: UINode): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
export interface RenderContext {
|
|
19
|
+
runtime: FormRuntime;
|
|
20
|
+
registry: RendererRegistry<WidgetFactory>;
|
|
21
|
+
idPrefix: string;
|
|
22
|
+
mountChild(node: UINode): NodeBinding;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../src/widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE1E;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,WAAW,CAAA;IACpB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,SAAS,CAAA;AAE3E,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;IAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,WAAW,CAAA;IACpB,QAAQ,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;CACtC"}
|
package/dist/widget.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../src/widget.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,14 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texaryn/web-components",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "A <texaryn-form> custom element over the Texaryn runtime, with native default widgets",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"web-components",
|
|
7
|
+
"custom-elements",
|
|
8
|
+
"json-schema",
|
|
9
|
+
"forms",
|
|
10
|
+
"form-builder",
|
|
11
|
+
"schema-driven",
|
|
12
|
+
"dynamic-forms",
|
|
13
|
+
"typescript"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
5
16
|
"license": "Apache-2.0",
|
|
17
|
+
"funding": {
|
|
18
|
+
"type": "github",
|
|
19
|
+
"url": "https://github.com/sponsors/hamzahamidi"
|
|
20
|
+
},
|
|
6
21
|
"repository": {
|
|
7
22
|
"type": "git",
|
|
8
23
|
"url": "git+https://github.com/texaryn/texaryn.git",
|
|
9
24
|
"directory": "packages/web-components"
|
|
10
25
|
},
|
|
26
|
+
"homepage": "https://github.com/texaryn/texaryn#readme",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/texaryn/texaryn/issues"
|
|
29
|
+
},
|
|
11
30
|
"publishConfig": {
|
|
12
31
|
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"main": "./dist/index.js",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"CHANGELOG.md"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@texaryn/core": "^0.6.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"jsdom": "^25.0.0",
|
|
50
|
+
"@texaryn/schema-json": "0.2.5"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc --build"
|
|
13
54
|
}
|
|
14
|
-
}
|
|
55
|
+
}
|