Skip to content

Commit 7e55955

Browse files
committed
chore: minor fixes before pre-publish
1 parent 7a6d3a5 commit 7e55955

23 files changed

+1149
-266
lines changed

.eslintrc.cjs

+13-18
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
/** @type {import("@types/eslint").Linter.Config} */
22

3+
const tsConfigs = [
4+
'./tsconfig.json',
5+
'./packages/types/tsconfig.json',
6+
'./packages/form/tsconfig.json',
7+
'./packages/material/tsconfig.json',
8+
'./packages/shoelace/tsconfig.json',
9+
'./packages/wired/tsconfig.json',
10+
'./packages/carbon/tsconfig.json',
11+
'./packages/system/tsconfig.json',
12+
];
13+
314
module.exports = {
415
settings: {
516
// This loads <rootdir>/tsconfig.json to eslint
617
'import/resolver': {
718
typescript: {
8-
project: [
9-
'./packages/types/tsconfig.json',
10-
'./packages/form/tsconfig.json',
11-
'./packages/material/tsconfig.json',
12-
'./packages/shoelace/tsconfig.json',
13-
'./packages/wired/tsconfig.json',
14-
'./packages/carbon/tsconfig.json',
15-
'./packages/system/tsconfig.json',
16-
],
19+
project: tsConfigs,
1720
},
1821
},
1922
},
@@ -36,15 +39,7 @@ module.exports = {
3639

3740
parser: '@typescript-eslint/parser',
3841
parserOptions: {
39-
project: [
40-
'./packages/types/tsconfig.json',
41-
'./packages/form/tsconfig.json',
42-
'./packages/material/tsconfig.json',
43-
'./packages/shoelace/tsconfig.json',
44-
'./packages/wired/tsconfig.json',
45-
'./packages/carbon/tsconfig.json',
46-
'./packages/system/tsconfig.json',
47-
], // Specify it only for TypeScript files
42+
project: tsConfigs, // Specify it only for TypeScript files
4843
ecmaVersion: 'latest',
4944
sourceType: 'module',
5045
},

README.md

+46-9
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ Jump to **implementations**:
6464

6565
---
6666

67+
<div align="center">
68+
69+
Jump to **UI libraries**:
70+
[Shoelace](#ui-libraries)
71+
[Material](#ui-libraries)
72+
[Carbon](#ui-libraries)
73+
[Wired](#ui-libraries)
74+
[System](#ui-libraries)
75+
76+
77+
</div>
78+
79+
---
80+
6781
<details>
6882
<summary align="center"><strong>Table of Contents</strong></summary>
6983

@@ -97,6 +111,7 @@ Jump to **implementations**:
97111
- [Schema](#schema)
98112
- [Usage](#usage)
99113
- [Installation](#installation)
114+
- [UI Libraries](#ui-libraries)
100115
- [Implementation](#implementation)
101116
- [All examples](#all-examples)
102117
- [Pure HTML with CDN](#pure-html-with-cdn)
@@ -525,21 +540,43 @@ items:
525540
### Installation
526541
527542
```sh
528-
npm i @jsfe/core
543+
npm i @jsfe/form
529544
# or
530-
pnpm i @jsfe/core
545+
pnpm i @jsfe/form
531546
# or
532-
yarn add @jsfe/core
547+
yarn add @jsfe/form
533548
```
534549

535-
```ts
536-
import '@jsfe/core';
550+
#### UI Libraries
551+
552+
See [examples/src/pages/flavored.astro](https://github.com/json-schema-form-element/examples/blob/main/src/pages/flavored.astro)
553+
554+
Alternatively:
555+
556+
```
557+
npm install @jsfe/shoelace
558+
npm install @jsfe/material
559+
npm install @jsfe/carbon
560+
npm install @jsfe/wired
561+
npm install @jsfe/system
537562
```
538563

539-
```ts
564+
```html
565+
<jsf-shoelace schema="..." uiSchema="..." data="..."></jsf-shoelace>
566+
<jsf-material schema="..." uiSchema="..." data="..."></jsf-material>
567+
<jsf-carbon schema="..." uiSchema="..." data="..."></jsf-carbon>
568+
<jsf-wired schema="..." uiSchema="..." data="..."></jsf-wired>
569+
<jsf-system schema="..." uiSchema="..." data="..."></jsf-system>
570+
```
571+
572+
<!-- ```ts
573+
import '@jsfe/form';
574+
``` -->
575+
576+
<!-- ```ts
540577
import '@shoelace-style/shoelace/dist/themes/light.css';
541578
import '@shoelace-style/shoelace/dist/themes/dark.css';
542-
```
579+
``` -->
543580

544581
See also the [CSS section](#CSS).
545582

@@ -760,7 +797,7 @@ With all external JS dependencies included, minus some CSS:
760797

761798
| Package | Size |
762799
| ---------- | --------------------------------------------------------------- |
763-
| @jsfe/core | ![](https://deno.bundlejs.com/badge?q=@jsfe/core&treeshake=[*]) |
800+
| @jsfe/form | ![](https://deno.bundlejs.com/badge?q=@jsfe/form&treeshake=[*]) |
764801

765802
Components are planned to be extracted in separate packages as soon as more UI library are added. E.g. `@jsfe/shoelace`, `@jsfe/material`
766803

@@ -800,7 +837,7 @@ Actual **features flags** list:
800837
- Drag and drop for array items, using native API.
801838
- Autofocuses (for added array item, etc.)
802839
-
803-
- Have an idea? [Discussions are open](https://github.com/json-schema-form-element/core/discussions)!
840+
- Have an idea? [Discussions are open](https://github.com/json-schema-form-element/form/discussions)!
804841

805842
## Acknowledgements
806843

lerna.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"$schema": "./node_modules/lerna/schemas/lerna-schema.json",
33
"version": "independent",
4-
"npmClient": "pnpm"
4+
"npmClient": "pnpm",
5+
"command": {
6+
"publish": {
7+
"message": "chore: publish release"
8+
}
9+
}
510
}

package.json

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "@j_c/jsfe__root",
33
"version": "0.0.0",
44
"private": true,
5+
"homepage": "https://jsfe.js.org",
56
"description": "Effortless forms, with standards.",
67
"repository": {
7-
"url": "https://github.com/json-schema-form-element/core"
8+
"type": "git",
9+
"url": "https://github.com/json-schema-form-element/jsfe"
810
},
911
"license": "ISC",
1012
"author": {
@@ -14,17 +16,18 @@
1416
},
1517
"type": "module",
1618
"scripts": {
19+
"dev": "turbo dev",
20+
"build": "turbo build",
1721
"gen:manifests": "./scripts/manifests.sh",
1822
"// test": "cd tests && pnpm test",
1923
"// publish:dry": "pnpm lerna publish --dry-run",
24+
"util:scaffold": "plop --plopfile scripts/scaffold/plopfile.js",
2025
"util:sort": "keep-sorted packages/*/src/index.ts packages/*/src/styles.scss && sort-package-json packages/*/package.json"
2126
},
2227
"devDependencies": {
2328
"@custom-elements-manifest/analyzer": "^0.8.4",
24-
"@custom-elements-manifest/to-markdown": "^0.1.0",
2529
"@types/eslint": "^8.44.2",
26-
"@types/json-schema": "^7.0.13",
27-
"@types/lodash-es": "^4.17.9",
30+
"@types/node": "^20.8.3",
2831
"@typescript-eslint/eslint-plugin": "^6.7.0",
2932
"@typescript-eslint/parser": "^6.7.0",
3033
"cem-plugin-vs-code-custom-data-generator": "^1.4.2",
@@ -50,9 +53,14 @@
5053
"stylelint-config-standard": "^34.0.0",
5154
"stylelint-config-standard-scss": "^11.0.0",
5255
"stylelint-order": "^6.0.3",
56+
"tsx": "^3.13.0",
5357
"turbo": "^1.10.15",
5458
"typedoc": "^0.25.1",
5559
"typedoc-plugin-markdown": "^3.16.0",
5660
"typescript": "^5.2.2"
61+
},
62+
"dependencies": {
63+
"plop": "^4.0.0",
64+
"@custom-elements-manifest/to-markdown": "^0.1.0"
5765
}
5866
}

packages/carbon/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"mongodb",
1414
"page-builder"
1515
],
16+
"homepage": "https://jsfe.js.org",
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/json-schema-form-element/jsfe",
20+
"directory": "packages/carbon"
21+
},
1622
"license": "ISC",
1723
"author": {
1824
"name": "Julian Cataldo",

packages/carbon/src/styles.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
// STUB
1+
/* STUB */
22

3-
export const styles = '';
3+
import { css } from 'lit';
4+
5+
export const styles = css`
6+
/* STUB - Compiled SCSS goes here */
7+
`;

packages/form/package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
"mongodb",
1212
"page-builder"
1313
],
14+
"homepage": "https://jsfe.js.org",
1415
"repository": {
15-
"url": "https://github.com/json-schema-form-element/core"
16+
"type": "git",
17+
"url": "https://github.com/json-schema-form-element/jsfe",
18+
"directory": "packages/form"
1619
},
1720
"license": "ISC",
1821
"author": {
@@ -44,7 +47,7 @@
4447
"// css:to-js": "node ../../scripts/css-to-js.js dist/esm/styles.css",
4548
"// css:to-js:dev": "nodemon dist/esm/styles.css -x 'pnpm css:to-js'",
4649
"// dev": "pnpm ts:dev & pnpm css:dev & (sleep 3 && pnpm css:to-js:dev)",
47-
"build": "pnpm clean ; pnpm ts:build",
50+
"build": "pnpm clean ; pnpm ts:build || exit 0",
4851
"clean": "rm -rf ./dist",
4952
"dev": "pnpm ts:dev",
5053
"ts:build": "pnpm tsc",

packages/form/src/json-schema-form.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ export class Jsf extends LitElement {
111111

112112
/* --- Object --- */
113113
if (currentNode.properties || currentNode.allOf) {
114-
if (currentNode.allOf && this.experimental?.allOf !== true)
115-
return flag('allOf');
114+
if (currentNode.allOf && this.experimental?.allOf !== true) {
115+
return html`Unsupported feature.`;
116+
// return flag('allOf');
117+
}
116118

117119
let nodeParsed = node;
118120

packages/material/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"mongodb",
1414
"page-builder"
1515
],
16+
"homepage": "https://jsfe.js.org",
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/json-schema-form-element/jsfe",
20+
"directory": "packages/material"
21+
},
1622
"license": "ISC",
1723
"author": {
1824
"name": "Julian Cataldo",

packages/material/src/styles.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
// STUB
1+
/* STUB */
22

3-
export const styles = '';
3+
import { css } from 'lit';
4+
5+
export const styles = css`
6+
/* STUB - Compiled SCSS goes here */
7+
`;

packages/shoelace/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
"mongodb",
1313
"page-builder"
1414
],
15+
"homepage": "https://jsfe.js.org",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/json-schema-form-element/jsfe",
19+
"directory": "packages/shoelace"
20+
},
1521
"license": "ISC",
1622
"author": {
1723
"name": "Julian Cataldo",

packages/shoelace/src/styles.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
// STUB
1+
/* STUB */
22

3-
export const styles = '';
3+
import { css } from 'lit';
4+
5+
export const styles = css`
6+
/* STUB - Compiled SCSS goes here */
7+
`;

packages/system/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
"mongodb",
1313
"page-builder"
1414
],
15+
"homepage": "https://jsfe.js.org",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/json-schema-form-element/jsfe",
19+
"directory": "packages/system"
20+
},
1521
"license": "ISC",
1622
"author": {
1723
"name": "Julian Cataldo",

packages/system/src/styles.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
// STUB
1+
/* STUB */
22

3-
export const styles = '';
3+
import { css } from 'lit';
4+
5+
export const styles = css`
6+
/* STUB - Compiled SCSS goes here */
7+
`;

packages/types/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"name": "@j_c/jsfe__types",
33
"version": "0.0.0",
4+
"homepage": "https://jsfe.js.org",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/json-schema-form-element/jsfe",
8+
"directory": "packages/types"
9+
},
410
"type": "module",
511
"exports": {
612
".": "./dist/index.js"

packages/wired/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
"mongodb",
1313
"page-builder"
1414
],
15+
"homepage": "https://jsfe.js.org",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/json-schema-form-element/jsfe",
19+
"directory": "packages/wired"
20+
},
1521
"license": "ISC",
1622
"author": {
1723
"name": "Julian Cataldo",

packages/wired/src/styles.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
// STUB
1+
/* STUB */
22

3-
export const styles = '';
3+
import { css } from 'lit';
4+
5+
export const styles = css`
6+
/* STUB - Compiled SCSS goes here */
7+
`;

0 commit comments

Comments
 (0)