@moneko/react 0.0.7 → 0.0.8
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/lib/merge.d.ts +2 -9
- package/lib/merge.js +1 -1
- package/lib/merge.js.map +1 -1
- package/package.json +1 -1
- package/lib/normalize.css +0 -208
package/lib/merge.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
meta?: object;
|
|
4
|
-
element?: any;
|
|
5
|
-
path: string;
|
|
6
|
-
};
|
|
7
|
-
declare function merge<T extends Prefix>(route: T[], key: keyof T): ({
|
|
8
|
-
key: string;
|
|
9
|
-
} & T)[] | undefined;
|
|
1
|
+
import type { RouteConfig } from '@app/routes';
|
|
2
|
+
declare function merge<T extends RouteConfig>(route: T[], key: keyof T): T[] | undefined;
|
|
10
3
|
export default merge;
|
package/lib/merge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export default function e(n,r){if(!n.length)return;let t=[];return n.forEach(n=>{let i=t.findIndex(e=>e[r]==n[r]);if(i>-1){let l=[...t[i].children||[],...n.children||[]];t[i]=Object.assign(n,t[i],t[i].meta&&{meta:{...t[i].meta,...n.meta}}),l.length&&(t[i].children=e(l,r))}else t.push(Object.assign(n,Array.isArray(n.children)&&{children:e(n.children,r)}))}),t};
|
|
2
2
|
//# sourceMappingURL=merge.js.map
|
package/lib/merge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/merge.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../src/merge.ts"],"sourcesContent":["import type { RouteConfig } from '@app/routes';\n\nfunction merge<T extends RouteConfig>(route: T[], key: keyof T) {\n if (!route.length) return void 0;\n const arr: T[] = [];\n\n route.forEach((e) => {\n const idx = arr.findIndex((i) => i[key] == e[key]);\n\n if (idx > -1) {\n const ctree: T[] = [...(arr[idx].children || []), ...(e.children || [])] as T[];\n\n arr[idx] = Object.assign(\n e,\n arr[idx],\n arr[idx].meta && {\n meta: {\n ...arr[idx].meta,\n ...e.meta,\n },\n },\n );\n if (ctree.length) {\n arr[idx].children = merge(ctree, key);\n }\n } else {\n arr.push(\n Object.assign(\n e,\n Array.isArray(e.children) && {\n children: merge(e.children as T[], key),\n },\n ),\n );\n }\n });\n\n return arr;\n}\n\nexport default merge;\n"],"names":["merge","route","key","length","arr","forEach","e","idx","findIndex","i","ctree","children","Object","assign","meta","push","Array","isArray"],"mappings":"AAwCA,eAtCA,SAASA,EAA6BC,CAAU,CAAEC,CAAY,EAC5D,GAAI,CAACD,EAAME,OAAQ,OACnB,IAAMC,EAAW,EAAE,CAiCnB,OA/BAH,EAAMI,QAAQ,AAACC,IACb,IAAMC,EAAMH,EAAII,UAAU,AAACC,GAAMA,CAAC,CAACP,EAAI,EAAII,CAAC,CAACJ,EAAI,EAEjD,GAAIK,EAAM,GAAI,CACZ,IAAMG,EAAa,IAAKN,CAAG,CAACG,EAAI,CAACI,UAAY,EAAE,IAAOL,EAAEK,UAAY,EAAE,CAAE,AAExEP,CAAAA,CAAG,CAACG,EAAI,CAAGK,OAAOC,OAChBP,EACAF,CAAG,CAACG,EAAI,CACRH,CAAG,CAACG,EAAI,CAACO,MAAQ,CACfA,KAAM,CACJ,GAAGV,CAAG,CAACG,EAAI,CAACO,IAAI,CAChB,GAAGR,EAAEQ,IAAI,AACX,CACF,GAEEJ,EAAMP,QACRC,CAAAA,CAAG,CAACG,EAAI,CAACI,SAAWX,EAAMU,EAAOR,EAAG,CAExC,MACEE,EAAIW,KACFH,OAAOC,OACLP,EACAU,MAAMC,QAAQX,EAAEK,WAAa,CAC3BA,SAAUX,EAAMM,EAAEK,SAAiBT,EACrC,GAIR,GAEOE,CACT,CAEqB"}
|
package/package.json
CHANGED
package/lib/normalize.css
DELETED
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
html,
|
|
2
|
-
body {
|
|
3
|
-
margin: 0;
|
|
4
|
-
padding: 0;
|
|
5
|
-
line-height: 1.8;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
input,
|
|
9
|
-
textarea {
|
|
10
|
-
caret-color: inherit;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
h1 {
|
|
14
|
-
margin: 0.67em 0;
|
|
15
|
-
font-size: 2em;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
hr {
|
|
19
|
-
overflow: visible;
|
|
20
|
-
block-size: 0;
|
|
21
|
-
box-sizing: content-box;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
pre {
|
|
25
|
-
font-size: 1em;
|
|
26
|
-
font-family: monospace;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
a {
|
|
30
|
-
text-decoration: none;
|
|
31
|
-
background-color: transparent;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
abbr[title] {
|
|
36
|
-
border-block-end: none;
|
|
37
|
-
text-decoration: underline;
|
|
38
|
-
text-decoration: underline dotted;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
b,
|
|
42
|
-
strong {
|
|
43
|
-
font-weight: bolder;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
code,
|
|
47
|
-
kbd,
|
|
48
|
-
samp {
|
|
49
|
-
font-size: 1em;
|
|
50
|
-
font-family: monospace;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
small {
|
|
54
|
-
font-size: 80%;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
sub,
|
|
58
|
-
sup {
|
|
59
|
-
position: relative;
|
|
60
|
-
font-size: 75%;
|
|
61
|
-
line-height: 0;
|
|
62
|
-
vertical-align: baseline;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
sub {
|
|
66
|
-
inset-block-end: -0.25em;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
sup {
|
|
70
|
-
inset-block-start: -0.5em;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
img {
|
|
74
|
-
border-style: none;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
img,
|
|
78
|
-
button {
|
|
79
|
-
outline: 1px solid transparent;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
button,
|
|
83
|
-
input,
|
|
84
|
-
optgroup,
|
|
85
|
-
select,
|
|
86
|
-
textarea {
|
|
87
|
-
margin: 0;
|
|
88
|
-
font-size: 100%;
|
|
89
|
-
font-family: inherit;
|
|
90
|
-
line-height: 1.15;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
button,
|
|
94
|
-
input {
|
|
95
|
-
overflow: visible;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
button,
|
|
99
|
-
select {
|
|
100
|
-
text-transform: none;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
button,
|
|
104
|
-
[type='button'],
|
|
105
|
-
[type='reset'],
|
|
106
|
-
[type='submit'] {
|
|
107
|
-
appearance: button;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
button::-moz-focus-inner,
|
|
111
|
-
[type='button']::-moz-focus-inner,
|
|
112
|
-
[type='reset']::-moz-focus-inner,
|
|
113
|
-
[type='submit']::-moz-focus-inner {
|
|
114
|
-
border-style: none;
|
|
115
|
-
padding: 0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
button:-moz-focusring,
|
|
119
|
-
[type='button']:-moz-focusring,
|
|
120
|
-
[type='reset']:-moz-focusring,
|
|
121
|
-
[type='submit']:-moz-focusring {
|
|
122
|
-
outline: 1px dotted var(--primary-outline);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
fieldset {
|
|
126
|
-
padding: 0.35em 0.75em 0.625em;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
legend {
|
|
130
|
-
display: table;
|
|
131
|
-
padding: 0;
|
|
132
|
-
max-inline-size: 100%;
|
|
133
|
-
white-space: normal;
|
|
134
|
-
color: inherit;
|
|
135
|
-
box-sizing: border-box;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
progress {
|
|
139
|
-
vertical-align: baseline;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
textarea {
|
|
143
|
-
overflow: auto;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
details {
|
|
147
|
-
display: block;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
summary {
|
|
151
|
-
display: list-item;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
template,
|
|
155
|
-
[hidden] {
|
|
156
|
-
display: none;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
[type='checkbox'],
|
|
160
|
-
[type='radio'] {
|
|
161
|
-
box-sizing: border-box;
|
|
162
|
-
padding: 0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
[type='number']::-webkit-inner-spin-button,
|
|
166
|
-
[type='number']::-webkit-outer-spin-button {
|
|
167
|
-
block-size: auto;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
[type='search'] {
|
|
171
|
-
appearance: textfield;
|
|
172
|
-
outline-offset: -2px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
[type='search']::-webkit-search-decoration {
|
|
176
|
-
appearance: none;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
::-webkit-file-upload-button {
|
|
180
|
-
appearance: button;
|
|
181
|
-
font: inherit;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
::-webkit-scrollbar {
|
|
185
|
-
inline-size: 5px;
|
|
186
|
-
block-size: 5px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
::-webkit-scrollbar-track,
|
|
190
|
-
::-webkit-scrollbar-thumb {
|
|
191
|
-
background-color: transparent;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
:hover::-webkit-scrollbar-thumb {
|
|
195
|
-
background-color: var(--primary-selection);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
::-webkit-scrollbar-thumb:hover {
|
|
199
|
-
background-color: var(--primary-hover);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
::-webkit-scrollbar-thumb:active {
|
|
203
|
-
background-color: var(--primary-active);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
::-webkit-scrollbar-button {
|
|
207
|
-
display: none;
|
|
208
|
-
}
|