@rline/schema 1.0.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,26 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "InputType",
4
+ "description": "UI input type",
5
+ "enum": [
6
+ "text",
7
+ "textarea",
8
+ "texteditor",
9
+ "number",
10
+ "number-range",
11
+ "integer",
12
+ "integer-range",
13
+ "currency",
14
+ "percent",
15
+ "rate",
16
+ "switch",
17
+ "select",
18
+ "autocomplete",
19
+ "date",
20
+ "date-time",
21
+ "checkbox",
22
+ "checkbox-group",
23
+ "radio",
24
+ "radio-group"
25
+ ]
26
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "NumberFormat",
4
+ "description": "Number format such as rate (0-5), percentage (0-100)",
5
+ "enum": [
6
+ [
7
+ "integer",
8
+ "float",
9
+ "double",
10
+ "decimal",
11
+ "positive-integer",
12
+ "negative-integer",
13
+ "non-negative-integer",
14
+ "non-positive-integer",
15
+ "percentage",
16
+ "currency",
17
+ "rate",
18
+ "scientific-notation",
19
+ "hexadecimal",
20
+ "octal",
21
+ "binary",
22
+ "roman-numeral",
23
+ "prime-number",
24
+ "natural-number",
25
+ "odd-number",
26
+ "even-number",
27
+ "latitude",
28
+ "longitude",
29
+ "timezone-offset",
30
+ "temperature-celsius",
31
+ "temperature-fahrenheit",
32
+ "angle-degree",
33
+ "angle-radian",
34
+ "year",
35
+ "month",
36
+ "day",
37
+ "age",
38
+ "count",
39
+ "rating",
40
+ "probability",
41
+ "weight",
42
+ "height",
43
+ "distance",
44
+ "speed",
45
+ "time-duration",
46
+ "voltage",
47
+ "current",
48
+ "frequency",
49
+ "acceleration"
50
+ ]
51
+ ]
52
+ }
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@rline/schema",
3
+ "version": "1.0.0",
4
+ "description": "Project description",
5
+ "author": {
6
+ "email": "robert.brightline@gmail.com",
7
+ "name": "Robert Brightline",
8
+ "url": "https://rbrightline.github.io"
9
+ },
10
+ "homepage": "https://rbrightline.github.io/rline/schema",
11
+ "repository": {
12
+ "url": "https://github.com/rbrightline/common/tree/main/libs/schema",
13
+ "type": "github"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public",
17
+ "tag": "latest"
18
+ },
19
+ "keywords": [
20
+ "rline",
21
+ "library"
22
+ ],
23
+ "dependencies": {
24
+ "@swc/helpers": "~0.5.11"
25
+ },
26
+ "files": [
27
+ "*.schema.json"
28
+ ],
29
+ "exports": {
30
+ "./package.json": "./package.json",
31
+ ".": {
32
+ "types": "./dist/index.d.ts",
33
+ "import": "./dist/index.js",
34
+ "default": "./dist/index.js"
35
+ }
36
+ },
37
+ "module": "./dist/index.js",
38
+ "nx": {
39
+ "sourceRoot": "libs/schema/src",
40
+ "projectType": "library",
41
+ "targets": {
42
+ "build": {
43
+ "executor": "@nx/js:swc",
44
+ "outputs": [
45
+ "{options.outputPath}"
46
+ ],
47
+ "options": {
48
+ "outputPath": "libs/schema/dist",
49
+ "main": "libs/schema/src/index.ts",
50
+ "tsConfig": "libs/schema/tsconfig.lib.json",
51
+ "skipTypeCheck": true,
52
+ "stripLeadingPaths": true
53
+ }
54
+ }
55
+ },
56
+ "name": "schema"
57
+ }
58
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "PropertyType",
4
+ "description": "Propert type",
5
+ "enum": [
6
+ "string",
7
+ "number",
8
+ "integer",
9
+ "boolean",
10
+ "object",
11
+ "array"
12
+ ]
13
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "SchemaCompilerConfig",
4
+ "description": "Schema is for the `@rline/json` schema compiler. This file is generated using `json init`",
5
+ "properties": {
6
+ "root": {
7
+ "type": "string",
8
+ "description": "Project's root directory, the relative path to the directory of the main schema file such as `./schemas` and `./src`"
9
+ },
10
+ "main": {
11
+ "type": "string",
12
+ "description": "The entity file such as `main.schema.json` or `schema.json` or `model.schema.json`"
13
+ },
14
+ "output": {
15
+ "properties": {
16
+ "schema": {
17
+ "type": "string",
18
+ "description": "Relative output file path for the compiled schema such as `../dist/schema.json`"
19
+ },
20
+ "type": {
21
+ "type": "string",
22
+ "description": "Relative output file path for the compiled type such as `../src/type.ts`"
23
+ }
24
+ },
25
+ "required": [
26
+ "schema",
27
+ "type"
28
+ ],
29
+ "additionalProperties": false
30
+ }
31
+ },
32
+ "required": [
33
+ "root",
34
+ "main",
35
+ "output"
36
+ ],
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "StringFormat",
4
+ "description": "String format such as email, password, uuid, ip6, ip4 and so more",
5
+ "enum": [
6
+ "short",
7
+ "long",
8
+ "email",
9
+ "hostname",
10
+ "ipv4",
11
+ "ipv6",
12
+ "uuid",
13
+ "url",
14
+ "uri",
15
+ "uri-reference",
16
+ "iri",
17
+ "iri-reference",
18
+ "date",
19
+ "time",
20
+ "date-time",
21
+ "regex",
22
+ "phone-number",
23
+ "credit-card",
24
+ "isbn",
25
+ "issn",
26
+ "zipcode",
27
+ "postal-code",
28
+ "currency",
29
+ "mac-address",
30
+ "alphanumeric",
31
+ "hexadecimal",
32
+ "base64",
33
+ "binary",
34
+ "json",
35
+ "slug",
36
+ "username",
37
+ "password",
38
+ "country-code",
39
+ "language-code",
40
+ "timezone",
41
+ "html-color",
42
+ "semver",
43
+ "domain-name",
44
+ "subdomain",
45
+ "file-path",
46
+ "sha256",
47
+ "sha512",
48
+ "md5",
49
+ "jwt",
50
+ "object-id"
51
+ ]
52
+ }
@@ -0,0 +1,92 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Unit",
4
+ "description": "Unit of the value such as meter, inch, centimeter and some more",
5
+ "enum": [
6
+ "meter",
7
+ "kilometer",
8
+ "centimeter",
9
+ "millimeter",
10
+ "micrometer",
11
+ "nanometer",
12
+ "mile",
13
+ "yard",
14
+ "foot",
15
+ "inch",
16
+ "light-year",
17
+ "nautical-mile",
18
+ "square-meter",
19
+ "square-kilometer",
20
+ "square-mile",
21
+ "hectare",
22
+ "acre",
23
+ "liter",
24
+ "milliliter",
25
+ "cubic-meter",
26
+ "gallon",
27
+ "quart",
28
+ "pint",
29
+ "cup",
30
+ "fluid-ounce",
31
+ "gram",
32
+ "kilogram",
33
+ "milligram",
34
+ "tonne",
35
+ "pound",
36
+ "ounce",
37
+ "stone",
38
+ "degree-celsius",
39
+ "degree-fahrenheit",
40
+ "kelvin",
41
+ "pascal",
42
+ "bar",
43
+ "atmosphere",
44
+ "psi",
45
+ "joule",
46
+ "kilojoule",
47
+ "calorie",
48
+ "kilocalorie",
49
+ "watt",
50
+ "kilowatt",
51
+ "megawatt",
52
+ "ampere",
53
+ "milliampere",
54
+ "volt",
55
+ "ohm",
56
+ "hertz",
57
+ "kilohertz",
58
+ "megahertz",
59
+ "gigahertz",
60
+ "newton",
61
+ "kilonewton",
62
+ "meter-per-second",
63
+ "kilometer-per-hour",
64
+ "mile-per-hour",
65
+ "knot",
66
+ "degree",
67
+ "radian",
68
+ "steradian",
69
+ "lux",
70
+ "candela",
71
+ "lumen",
72
+ "decibel",
73
+ "bit",
74
+ "byte",
75
+ "kilobyte",
76
+ "megabyte",
77
+ "gigabyte",
78
+ "terabyte",
79
+ "petabyte",
80
+ "second",
81
+ "millisecond",
82
+ "microsecond",
83
+ "minute",
84
+ "hour",
85
+ "day",
86
+ "week",
87
+ "month",
88
+ "year",
89
+ "decade",
90
+ "century"
91
+ ]
92
+ }