@fastkit/vui 0.8.11 → 0.8.15

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.
@@ -68,25 +68,13 @@ async function renderTemplate({ colorScheme, mediaMatch, uiSettings, icons, __de
68
68
  return result;
69
69
  }
70
70
  function defaultDynamicDest() {
71
- // const pkgDir = findPackageDirSync();
72
- // if (!pkgDir) {
73
- // throw new Error(`missing package directory`);
74
- // }
75
- // return path.join(pkgDir, '.vui');
76
71
  return path__default.resolve('.vui');
77
72
  }
78
73
  function getBuiltinsDir() {
79
- // const cwd = process.cwd();
80
74
  const pkgDir = nodeUtil.findPackageDirSync(undefined, true);
81
75
  if (!pkgDir) {
82
76
  throw new Error(`missing package directory`);
83
77
  }
84
- // For development...
85
- // console.log('■■■', cwd);
86
- // if (cwd.endsWith('/docs')) {
87
- // const result = path.resolve(cwd, '../packages/vui/src/assets/builtins');
88
- // return result;
89
- // }
90
78
  return path__default.join(pkgDir, 'node_modules/@fastkit/vui/dist/assets/builtins');
91
79
  }
92
80
  function viteVuiPlugin(options = {}) {
@@ -138,11 +126,6 @@ function viteVuiPlugin(options = {}) {
138
126
  let dynamicDest;
139
127
  const { dynamicDest: _dynamicDest } = options;
140
128
  if (!_dynamicDest) {
141
- // if (options.__dev) {
142
- // dynamicDest = path.resolve(__dirname, '../../../../docs/.vui');
143
- // } else {
144
- // dynamicDest = defaultDynamicDest();
145
- // }
146
129
  dynamicDest = defaultDynamicDest();
147
130
  }
148
131
  else {
@@ -197,7 +180,6 @@ export {};
197
180
  const ssr = config.ssr || {};
198
181
  ssr.noExternal = ssr.noExternal || [];
199
182
  ssr.noExternal.push(/\/vui\/dist\/assets\//);
200
- // ssr.noExternal.push(/\/fastkit\//);
201
183
  config.ssr = ssr;
202
184
  return config;
203
185
  },
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../../../../../../../packages/vui/src/tool/vite-plugin.ts"],"names":[],"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/dist/vui.cjs.js CHANGED
@@ -3530,7 +3530,7 @@ const WysiwygLinter = createWysiwygExtension(ctx => {
3530
3530
  };
3531
3531
  };
3532
3532
 
3533
- return [new prosemirrorState.Plugin({
3533
+ const linterPlugin = new prosemirrorState.Plugin({
3534
3534
  key: new prosemirrorState.PluginKey('linter'),
3535
3535
  state: {
3536
3536
  init(_, {
@@ -3546,7 +3546,7 @@ const WysiwygLinter = createWysiwygExtension(ctx => {
3546
3546
  },
3547
3547
  props: {
3548
3548
  decorations(state) {
3549
- return this.getState(state);
3549
+ return linterPlugin.getState(state);
3550
3550
  },
3551
3551
 
3552
3552
  handleClick(view, _, event) {
@@ -3572,7 +3572,8 @@ const WysiwygLinter = createWysiwygExtension(ctx => {
3572
3572
  }
3573
3573
 
3574
3574
  }
3575
- })];
3575
+ });
3576
+ return [linterPlugin];
3576
3577
  }
3577
3578
 
3578
3579
  });
@@ -3530,7 +3530,7 @@ const WysiwygLinter = createWysiwygExtension(ctx => {
3530
3530
  };
3531
3531
  };
3532
3532
 
3533
- return [new prosemirrorState.Plugin({
3533
+ const linterPlugin = new prosemirrorState.Plugin({
3534
3534
  key: new prosemirrorState.PluginKey('linter'),
3535
3535
  state: {
3536
3536
  init(_, {
@@ -3546,7 +3546,7 @@ const WysiwygLinter = createWysiwygExtension(ctx => {
3546
3546
  },
3547
3547
  props: {
3548
3548
  decorations(state) {
3549
- return this.getState(state);
3549
+ return linterPlugin.getState(state);
3550
3550
  },
3551
3551
 
3552
3552
  handleClick(view, _, event) {
@@ -3572,7 +3572,8 @@ const WysiwygLinter = createWysiwygExtension(ctx => {
3572
3572
  }
3573
3573
 
3574
3574
  }
3575
- })];
3575
+ });
3576
+ return [linterPlugin];
3576
3577
  }
3577
3578
 
3578
3579
  });
package/dist/vui.css CHANGED
@@ -16,10 +16,8 @@
16
16
  * 2. Prevent adjustments of font size after orientation changes in iOS.
17
17
  */
18
18
  html {
19
- line-height: 1.15;
20
- /* 1 */
21
- -webkit-text-size-adjust: 100%;
22
- /* 2 */
19
+ line-height: 1.15; /* 1 */
20
+ -webkit-text-size-adjust: 100%; /* 2 */
23
21
  }
24
22
 
25
23
  /* Sections
@@ -54,10 +52,8 @@ h1 {
54
52
  * 2. Show the overflow in Edge and IE.
55
53
  */
56
54
  hr {
57
- height: 0;
58
- /* 1 */
59
- overflow: visible;
60
- /* 2 */
55
+ height: 0; /* 1 */
56
+ overflow: visible; /* 2 */
61
57
  }
62
58
 
63
59
  /**
@@ -66,10 +62,8 @@ hr {
66
62
  */
67
63
  pre {
68
64
  /* stylelint-disable-next-line */
69
- font-family: monospace, monospace;
70
- /* 1 */
71
- font-size: 1em;
72
- /* 2 */
65
+ font-family: monospace, monospace; /* 1 */
66
+ font-size: 1em; /* 2 */
73
67
  }
74
68
 
75
69
  /* Text-level semantics
@@ -86,12 +80,9 @@ a {
86
80
  * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
87
81
  */
88
82
  abbr[title] {
89
- text-decoration: underline;
90
- /* 2 */
91
- text-decoration: underline dotted;
92
- /* 2 */
93
- border-bottom: none;
94
- /* 1 */
83
+ text-decoration: underline; /* 2 */
84
+ text-decoration: underline dotted; /* 2 */
85
+ border-bottom: none; /* 1 */
95
86
  }
96
87
 
97
88
  /**
@@ -110,10 +101,8 @@ code,
110
101
  kbd,
111
102
  samp {
112
103
  /* stylelint-disable-next-line */
113
- font-family: monospace, monospace;
114
- /* 1 */
115
- font-size: 1em;
116
- /* 2 */
104
+ font-family: monospace, monospace; /* 1 */
105
+ font-size: 1em; /* 2 */
117
106
  }
118
107
 
119
108
  /**
@@ -163,14 +152,10 @@ input,
163
152
  optgroup,
164
153
  select,
165
154
  textarea {
166
- margin: 0;
167
- /* 2 */
168
- font-family: inherit;
169
- /* 1 */
170
- font-size: 100%;
171
- /* 1 */
172
- line-height: 1.15;
173
- /* 1 */
155
+ margin: 0; /* 2 */
156
+ font-family: inherit; /* 1 */
157
+ font-size: 100%; /* 1 */
158
+ line-height: 1.15; /* 1 */
174
159
  color: inherit;
175
160
  }
176
161
 
@@ -239,16 +224,11 @@ fieldset {
239
224
  * `fieldset` elements in all browsers.
240
225
  */
241
226
  legend {
242
- display: table;
243
- /* 1 */
244
- max-width: 100%;
245
- /* 1 */
246
- padding: 0;
247
- /* 3 */
248
- color: inherit;
249
- /* 2 */
250
- white-space: normal;
251
- /* 1 */
227
+ display: table; /* 1 */
228
+ max-width: 100%; /* 1 */
229
+ padding: 0; /* 3 */
230
+ color: inherit; /* 2 */
231
+ white-space: normal; /* 1 */
252
232
  }
253
233
 
254
234
  /**
@@ -271,8 +251,7 @@ textarea {
271
251
  */
272
252
  [type=checkbox],
273
253
  [type=radio] {
274
- padding: 0;
275
- /* 2 */
254
+ padding: 0; /* 2 */
276
255
  }
277
256
 
278
257
  /**
@@ -288,10 +267,8 @@ textarea {
288
267
  * 2. Correct the outline style in Safari.
289
268
  */
290
269
  [type=search] {
291
- -webkit-appearance: textfield;
292
- /* 1 */
293
- outline-offset: -2px;
294
- /* 2 */
270
+ -webkit-appearance: textfield; /* 1 */
271
+ outline-offset: -2px; /* 2 */
295
272
  }
296
273
 
297
274
  /**
@@ -306,10 +283,8 @@ textarea {
306
283
  * 2. Change font properties to `inherit` in Safari.
307
284
  */
308
285
  ::-webkit-file-upload-button {
309
- -webkit-appearance: button;
310
- /* 1 */
311
- font: inherit;
312
- /* 2 */
286
+ -webkit-appearance: button; /* 1 */
287
+ font: inherit; /* 2 */
313
288
  }
314
289
 
315
290
  /* Interactive
@@ -366,46 +341,54 @@ template {
366
341
  --typo-base-height: 1.5;
367
342
  --typo-base-spacing: 0em;
368
343
  --typo-medium-weight: 500;
344
+ --typo-h1-family: inherit;
369
345
  --typo-h1-size: 2.5rem;
370
346
  --typo-h1-weight: 500;
371
347
  --typo-h1-height: 1.2222222222222223;
372
348
  --typo-h1-spacing: 0em;
373
349
  --typo-h1-margin: 16px 0;
374
350
  --typo-h1-color: var(--palette-heading);
351
+ --typo-h2-family: inherit;
375
352
  --typo-h2-size: 1.875rem;
376
353
  --typo-h2-weight: 500;
377
354
  --typo-h2-height: 1.5;
378
355
  --typo-h2-spacing: 0em;
379
356
  --typo-h2-margin: 40px 0 10px;
380
357
  --typo-h2-color: var(--palette-heading);
358
+ --typo-h3-family: inherit;
381
359
  --typo-h3-size: 1.25rem;
382
360
  --typo-h3-weight: 500;
383
361
  --typo-h3-height: 1.5;
384
362
  --typo-h3-spacing: 0em;
385
363
  --typo-h3-margin: 20px 0 10px;
386
364
  --typo-h3-color: var(--palette-heading);
365
+ --typo-h4-family: inherit;
387
366
  --typo-h4-size: 1.25rem;
388
367
  --typo-h4-weight: 400;
389
368
  --typo-h4-height: 1.5;
390
369
  --typo-h4-spacing: 0em;
391
370
  --typo-h4-margin: 10px 0 16px;
392
371
  --typo-h4-color: var(--palette-heading);
372
+ --typo-h5-family: inherit;
393
373
  --typo-h5-size: 0.875rem;
394
374
  --typo-h5-weight: 400;
395
375
  --typo-h5-height: 1.57;
396
376
  --typo-h5-spacing: 0em;
397
377
  --typo-h5-margin: 10px 0 16px;
398
378
  --typo-h5-color: var(--palette-heading);
379
+ --typo-h6-family: inherit;
399
380
  --typo-h6-size: 0.67rem;
400
381
  --typo-h6-weight: 400;
401
382
  --typo-h6-height: 1.5;
402
383
  --typo-h6-spacing: 0em;
403
384
  --typo-h6-margin: 10px 0 16px;
404
385
  --typo-h6-color: var(--palette-heading);
386
+ --typo-subtitle1-family: inherit;
405
387
  --typo-subtitle1-size: 1rem;
406
388
  --typo-subtitle1-weight: 400;
407
389
  --typo-subtitle1-height: 1.75;
408
390
  --typo-subtitle1-spacing: 0.00938em;
391
+ --typo-subtitle2-family: inherit;
409
392
  --typo-subtitle2-size: 0.875rem;
410
393
  --typo-subtitle2-weight: 500;
411
394
  --typo-subtitle2-height: 1.57;
@@ -596,6 +579,7 @@ html {
596
579
  }
597
580
 
598
581
  body {
582
+ font-family: var(--typo-base-family);
599
583
  font-size: var(--typo-base-size);
600
584
  font-weight: var(--typo-base-weight);
601
585
  line-height: var(--typo-base-height);
@@ -606,6 +590,7 @@ body {
606
590
  }
607
591
 
608
592
  h1 {
593
+ font-family: var(--typo-h1-family);
609
594
  font-size: var(--typo-h1-size);
610
595
  font-weight: var(--typo-h1-weight);
611
596
  line-height: var(--typo-h1-height);
@@ -615,6 +600,7 @@ h1 {
615
600
  }
616
601
 
617
602
  h2 {
603
+ font-family: var(--typo-h2-family);
618
604
  font-size: var(--typo-h2-size);
619
605
  font-weight: var(--typo-h2-weight);
620
606
  line-height: var(--typo-h2-height);
@@ -624,6 +610,7 @@ h2 {
624
610
  }
625
611
 
626
612
  h3 {
613
+ font-family: var(--typo-h3-family);
627
614
  font-size: var(--typo-h3-size);
628
615
  font-weight: var(--typo-h3-weight);
629
616
  line-height: var(--typo-h3-height);
@@ -633,6 +620,7 @@ h3 {
633
620
  }
634
621
 
635
622
  h4 {
623
+ font-family: var(--typo-h4-family);
636
624
  font-size: var(--typo-h4-size);
637
625
  font-weight: var(--typo-h4-weight);
638
626
  line-height: var(--typo-h4-height);
@@ -642,6 +630,7 @@ h4 {
642
630
  }
643
631
 
644
632
  h5 {
633
+ font-family: var(--typo-h5-family);
645
634
  font-size: var(--typo-h5-size);
646
635
  font-weight: var(--typo-h5-weight);
647
636
  line-height: var(--typo-h5-height);
@@ -651,6 +640,7 @@ h5 {
651
640
  }
652
641
 
653
642
  h6 {
643
+ font-family: var(--typo-h6-family);
654
644
  font-size: var(--typo-h6-size);
655
645
  font-weight: var(--typo-h6-weight);
656
646
  line-height: var(--typo-h6-height);
@@ -947,8 +937,8 @@ thead th {
947
937
  align-items: center;
948
938
  justify-content: center;
949
939
  width: 1.25em;
950
- user-select: none;
951
940
  aspect-ratio: 1/1;
941
+ user-select: none;
952
942
  }
953
943
  .v-icon--clickable {
954
944
  cursor: pointer;