@yorkie-js/schema 0.6.6-rc → 0.6.7-rc
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/dist/style.css +96 -0
- package/dist/yorkie-js-schema.d.ts +32 -0
- package/dist/yorkie-js-schema.es.js +2897 -2854
- package/dist/yorkie-js-schema.js +178 -178
- package/package.json +1 -1
package/dist/style.css
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: #646cff;
|
|
19
|
+
text-decoration: inherit;
|
|
20
|
+
}
|
|
21
|
+
a:hover {
|
|
22
|
+
color: #535bf2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
place-items: center;
|
|
29
|
+
min-width: 320px;
|
|
30
|
+
min-height: 100vh;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
h1 {
|
|
34
|
+
font-size: 3.2em;
|
|
35
|
+
line-height: 1.1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#app {
|
|
39
|
+
max-width: 1280px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
padding: 2rem;
|
|
42
|
+
text-align: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.logo {
|
|
46
|
+
height: 6em;
|
|
47
|
+
padding: 1.5em;
|
|
48
|
+
will-change: filter;
|
|
49
|
+
transition: filter 300ms;
|
|
50
|
+
}
|
|
51
|
+
.logo:hover {
|
|
52
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
53
|
+
}
|
|
54
|
+
.logo.vanilla:hover {
|
|
55
|
+
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card {
|
|
59
|
+
padding: 2em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.read-the-docs {
|
|
63
|
+
color: #888;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button {
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
border: 1px solid transparent;
|
|
69
|
+
padding: 0.6em 1.2em;
|
|
70
|
+
font-size: 1em;
|
|
71
|
+
font-weight: 500;
|
|
72
|
+
font-family: inherit;
|
|
73
|
+
background-color: #1a1a1a;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
transition: border-color 0.25s;
|
|
76
|
+
}
|
|
77
|
+
button:hover {
|
|
78
|
+
border-color: #646cff;
|
|
79
|
+
}
|
|
80
|
+
button:focus,
|
|
81
|
+
button:focus-visible {
|
|
82
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (prefers-color-scheme: light) {
|
|
86
|
+
:root {
|
|
87
|
+
color: #213547;
|
|
88
|
+
background-color: #ffffff;
|
|
89
|
+
}
|
|
90
|
+
a:hover {
|
|
91
|
+
color: #747bff;
|
|
92
|
+
}
|
|
93
|
+
button {
|
|
94
|
+
background-color: #f9f9f9;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
declare type ArrayRule = {
|
|
2
|
+
type: 'array';
|
|
3
|
+
} & RuleBase;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* `buildRuleset` builds a ruleset from the given schema string.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildRuleset(schema: string): Map<string, Rule>;
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* `Diagnostic` represents a diagnostic message.
|
|
3
12
|
*/
|
|
@@ -16,6 +25,29 @@ declare type Diagnostic = {
|
|
|
16
25
|
};
|
|
17
26
|
};
|
|
18
27
|
|
|
28
|
+
declare type ObjectRule = {
|
|
29
|
+
type: 'object';
|
|
30
|
+
properties: {
|
|
31
|
+
[key: string]: RuleBase;
|
|
32
|
+
};
|
|
33
|
+
} & RuleBase;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* `Rule` represents a rule for a field in the schema.
|
|
37
|
+
*/
|
|
38
|
+
declare type Rule = StringRule | ObjectRule | ArrayRule;
|
|
39
|
+
|
|
40
|
+
declare type RuleBase = {
|
|
41
|
+
path: string;
|
|
42
|
+
type: RuleType;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
declare type RuleType = 'string' | 'object' | 'array';
|
|
46
|
+
|
|
47
|
+
declare type StringRule = {
|
|
48
|
+
type: 'string';
|
|
49
|
+
} & RuleBase;
|
|
50
|
+
|
|
19
51
|
/**
|
|
20
52
|
* `validate` validates the given schema string and returns a list of errors.
|
|
21
53
|
*/
|