vira 1.0.1 → 2.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.
@@ -8,4 +8,4 @@ export declare const ViraButton: import("element-vir").DeclarativeElementDefinit
8
8
  icon?: undefined | Pick<ViraIconSvg, 'svgTemplate'>;
9
9
  disabled?: boolean | undefined;
10
10
  buttonStyle?: ViraButtonStyleEnum | undefined;
11
- }, {}, {}, "vira-button-outline-style" | "vira-button-disabled", "vira-button-primary-color" | "vira-button-primary-hover-color" | "vira-button-primary-active-color" | "vira-button-secondary-color" | "vira-button-internal-foreground-color" | "vira-button-internal-background-color" | "vira-button-padding", import("lit-html").HTMLTemplateResult>;
11
+ }, {}, {}, "vira-button-outline-style" | "vira-button-disabled", "vira-button-primary-color" | "vira-button-primary-hover-color" | "vira-button-primary-active-color" | "vira-button-secondary-color" | "vira-button-padding" | "vira-button-internal-foreground-color" | "vira-button-internal-background-color", import("lit-html").HTMLTemplateResult>;
@@ -20,14 +20,14 @@ export const ViraButton = defineViraElement()({
20
20
  },
21
21
  cssVars: {
22
22
  /** On the default button style this is the background color. */
23
- 'vira-button-primary-color': '#0A89FF',
24
- 'vira-button-primary-hover-color': '#59B1FF',
25
- 'vira-button-primary-active-color': '#007FF6',
23
+ 'vira-button-primary-color': '#0a89ff',
24
+ 'vira-button-primary-hover-color': '#59b1ff',
25
+ 'vira-button-primary-active-color': '#007ff6',
26
26
  /** On the default button style this is the text color. */
27
- 'vira-button-secondary-color': 'white',
27
+ 'vira-button-secondary-color': '#ffffff',
28
+ 'vira-button-padding': '5px 10px',
28
29
  'vira-button-internal-foreground-color': '',
29
30
  'vira-button-internal-background-color': '',
30
- 'vira-button-padding': '5px 10px',
31
31
  },
32
32
  styles: ({ hostClasses, cssVars }) => css `
33
33
  :host {
@@ -1,5 +1,4 @@
1
1
  import { css } from 'element-vir';
2
- import { viraIconCssVars } from '../../icons/icon-css-vars';
3
2
  import { defineViraElement } from '../define-vira-element';
4
3
  export const ViraIcon = defineViraElement()({
5
4
  tagName: 'vira-icon',
@@ -10,9 +9,6 @@ export const ViraIcon = defineViraElement()({
10
9
  styles: ({ hostClasses }) => css `
11
10
  :host {
12
11
  display: inline-block;
13
- color: ${viraIconCssVars['vira-icon-color'].value};
14
- fill: ${viraIconCssVars['vira-icon-fill-color'].value};
15
- stroke: ${viraIconCssVars['vira-icon-stroke-color'].value};
16
12
  }
17
13
 
18
14
  svg {
@@ -3,7 +3,8 @@ import { SharedTextInputElementInputs } from '../common/shared-text-input-logic'
3
3
  export declare const ViraInput: import("element-vir").DeclarativeElementDefinition<"vira-input", {
4
4
  icon?: undefined | Pick<ViraIconSvg, 'svgTemplate'>;
5
5
  /** A suffix that, if provided, is shown following the user input field. */
6
- suffix?: string;
6
+ suffix?: string | undefined;
7
+ showClearButton?: boolean | undefined;
7
8
  } & SharedTextInputElementInputs, {
8
9
  forcedInputWidth: number;
9
10
  }, {
@@ -1,4 +1,5 @@
1
1
  import { css, defineElementEvent, html, listen, onResize, renderIf } from 'element-vir';
2
+ import { CloseX24Icon } from '../../icons/icon-svgs/close-x-24.icon';
2
3
  import { noUserSelect, viraAnimationDurations, viraDisabledStyles } from '../../styles';
3
4
  import { createFocusStyles, viraFocusCssVars } from '../../styles/focus';
4
5
  import { noNativeFormStyles } from '../../styles/native-styles';
@@ -13,11 +14,11 @@ export const ViraInput = defineViraElement()({
13
14
  'vira-input-fit-text': ({ inputs }) => !!inputs.fitText,
14
15
  },
15
16
  cssVars: {
16
- 'vira-input-placeholder-color': '#ccc',
17
- 'vira-input-text-color': 'black',
18
- 'vira-input-border-color': '#ccc',
19
- 'vira-input-focus-border-color': '#59B1FF',
20
- 'vira-input-text-selection-color': '#CFE9FF',
17
+ 'vira-input-placeholder-color': '#cccccc',
18
+ 'vira-input-text-color': '#000000',
19
+ 'vira-input-border-color': '#cccccc',
20
+ 'vira-input-focus-border-color': '#59b1ff',
21
+ 'vira-input-text-selection-color': '#cfe9ff',
21
22
  'vira-input-padding-horizontal': '10px',
22
23
  'vira-input-padding-vertical': '6px',
23
24
  },
@@ -118,7 +119,6 @@ export const ViraInput = defineViraElement()({
118
119
  ${noNativeFormStyles};
119
120
  max-width: 100%;
120
121
  flex-grow: 1;
121
- cursor: text;
122
122
  display: inline-flex;
123
123
  box-sizing: border-box;
124
124
  align-items: center;
@@ -132,6 +132,7 @@ export const ViraInput = defineViraElement()({
132
132
  */
133
133
  border: 1px solid transparent;
134
134
  gap: 4px;
135
+ cursor: text;
135
136
  }
136
137
 
137
138
  ${createFocusStyles({
@@ -139,7 +140,7 @@ export const ViraInput = defineViraElement()({
139
140
  elementBorderSize: 0,
140
141
  })}
141
142
 
142
- ${ViraIcon} {
143
+ .left-side-icon {
143
144
  margin-right: calc(${cssVars['vira-input-padding-horizontal'].value} - 4px);
144
145
  }
145
146
 
@@ -182,6 +183,18 @@ export const ViraInput = defineViraElement()({
182
183
  font-weight: bold;
183
184
  ${noUserSelect};
184
185
  }
186
+
187
+ .close-x-button {
188
+ color: ${cssVars['vira-input-text-color'].value};
189
+ ${noNativeFormStyles};
190
+ cursor: pointer;
191
+ display: flex;
192
+ transition: ${viraAnimationDurations['vira-interaction-animation-duration'].value};
193
+ }
194
+
195
+ .close-x-button:hover {
196
+ color: red;
197
+ }
185
198
  `;
186
199
  },
187
200
  stateInitStatic: {
@@ -195,7 +208,7 @@ export const ViraInput = defineViraElement()({
195
208
  });
196
209
  const iconTemplate = inputs.icon
197
210
  ? html `
198
- <${ViraIcon.assign({ icon: inputs.icon })}></${ViraIcon}>
211
+ <${ViraIcon.assign({ icon: inputs.icon })} class="left-side-icon"></${ViraIcon}>
199
212
  `
200
213
  : '';
201
214
  const forcedInputWidthStyles = inputs.fitText
@@ -239,6 +252,20 @@ export const ViraInput = defineViraElement()({
239
252
  })}
240
253
  placeholder=${inputs.placeholder}
241
254
  />
255
+ ${renderIf(!!(inputs.showClearButton && inputs.value), html `
256
+ <button
257
+ class="close-x-button"
258
+ title="clear input"
259
+ ${listen('click', (event) => {
260
+ /** Prevent focus of the input. */
261
+ event.stopImmediatePropagation();
262
+ event.preventDefault();
263
+ dispatch(new events.valueChange(''));
264
+ })}
265
+ >
266
+ <${ViraIcon.assign({ icon: CloseX24Icon })}></${ViraIcon}>
267
+ </button>
268
+ `)}
242
269
  ${renderIf(!!inputs.suffix, html `
243
270
  <div class="suffix">${inputs.suffix}</div>
244
271
  `)}
@@ -1,6 +1,7 @@
1
- export declare const viraIconCssVars: {
2
- 'vira-icon-stroke-color': import("lit-css-vars").SingleCssVarDefinition;
3
- 'vira-icon-fill-color': import("lit-css-vars").SingleCssVarDefinition;
4
- 'vira-icon-stroke-width': import("lit-css-vars").SingleCssVarDefinition;
5
- 'vira-icon-color': import("lit-css-vars").SingleCssVarDefinition;
6
- };
1
+ export declare const viraIconCssVars: import("lit-css-vars").CssVarDefinitions<{
2
+ /** To be used for coloring an icon's stroke. */
3
+ 'vira-icon-stroke-color': string;
4
+ /** To be used for coloring an icon's fill. */
5
+ 'vira-icon-fill-color': string;
6
+ 'vira-icon-stroke-width': string;
7
+ }>;
@@ -1,21 +1,8 @@
1
1
  import { defineCssVars } from 'lit-css-vars';
2
- const genericIconColorCssVar = defineCssVars({
3
- /**
4
- * Specifies the icon color as a whole. This will color both the icon stroke and icon fill
5
- * colors unless those respective CSS vars are specifically overridden. This CSS var value
6
- * defaults to "currentColor", so in most cases you don't even need to override this variable,
7
- * you just need to change the icon's "color" property.
8
- */
9
- 'vira-icon-color': 'currentColor',
10
- });
11
- const specificIconCssVars = defineCssVars({
2
+ export const viraIconCssVars = defineCssVars({
12
3
  /** To be used for coloring an icon's stroke. */
13
- 'vira-icon-stroke-color': genericIconColorCssVar['vira-icon-color'].value,
4
+ 'vira-icon-stroke-color': 'currentColor',
14
5
  /** To be used for coloring an icon's fill. */
15
- 'vira-icon-fill-color': genericIconColorCssVar['vira-icon-color'].value,
6
+ 'vira-icon-fill-color': 'none',
16
7
  'vira-icon-stroke-width': '1px',
17
8
  });
18
- export const viraIconCssVars = {
19
- ...genericIconColorCssVar,
20
- ...specificIconCssVars,
21
- };
@@ -0,0 +1 @@
1
+ export declare const CloseX24Icon: import("../icon-svg").ViraIconSvg;
@@ -0,0 +1,30 @@
1
+ import { html } from 'element-vir';
2
+ import { viraIconCssVars } from '../icon-css-vars';
3
+ import { defineIcon } from '../icon-svg';
4
+ export const CloseX24Icon = defineIcon({
5
+ name: 'CloseX24Icon',
6
+ svgTemplate: html `
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ xml:space="preserve"
10
+ width="24"
11
+ height="24"
12
+ viewBox="0 0 24 24"
13
+ >
14
+ <circle
15
+ cx="12"
16
+ cy="12"
17
+ r="8"
18
+ fill=${viraIconCssVars['vira-icon-fill-color'].value}
19
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
20
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
21
+ />
22
+ <path
23
+ fill="none"
24
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
25
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
26
+ d="M9 8.5l6 7m0 -7l-6 7"
27
+ />
28
+ </svg>
29
+ `,
30
+ });
@@ -12,9 +12,10 @@ export const Element16Icon = defineIcon({
12
12
  viewBox="0 0 16 16"
13
13
  >
14
14
  <path
15
- stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
16
- vector-effect="non-scaling-stroke"
17
15
  d="M4 5 1 8l3 3m8-6 3 3-3 3m-5 0 2-6"
16
+ fill="none"
17
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
18
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
18
19
  />
19
20
  </svg>
20
21
  `,
@@ -12,6 +12,8 @@ export const Element24Icon = defineIcon({
12
12
  width="24"
13
13
  >
14
14
  <path
15
+ fill="none"
16
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
15
17
  stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
16
18
  d="m7 7-5 5 5 5M17 7l5 5-5 5m-6 0 2-10"
17
19
  />
@@ -10,9 +10,12 @@ export const Loader24Icon = defineIcon({
10
10
  height="24"
11
11
  viewBox="0 0 24 24"
12
12
  width="24"
13
+ class="loader-animated-24-icon"
13
14
  >
14
15
  <path
15
16
  d="M12 8V2M16 12h6M12 16v6M8 12H2M9.17 9.17 4.93 4.93M14.83 9.17l4.24-4.24M14.83 14.83l4.24 4.24M9.17 14.83l-4.24 4.24"
17
+ fill="none"
18
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
16
19
  stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
17
20
  />
18
21
  </svg>
@@ -1,7 +1,7 @@
1
1
  import { css, html } from 'element-vir';
2
2
  import { viraAnimationDurations } from '../../styles/durations';
3
- import { viraIconCssVars } from '../icon-css-vars';
4
3
  import { defineIcon } from '../icon-svg';
4
+ import { Loader24Icon } from './loader-24.icon';
5
5
  const animatedLoaderStyles = css `
6
6
  @keyframes loader-animated-spin {
7
7
  from {
@@ -12,7 +12,7 @@ const animatedLoaderStyles = css `
12
12
  }
13
13
  }
14
14
 
15
- svg.loader-animated-24-icon {
15
+ svg {
16
16
  animation: ${viraAnimationDurations['vira-extended-animation-duration'].value} linear
17
17
  loader-animated-spin infinite;
18
18
  }
@@ -23,19 +23,6 @@ export const LoaderAnimated24Icon = defineIcon({
23
23
  <style>
24
24
  ${animatedLoaderStyles}
25
25
  </style>
26
- <svg
27
- xmlns="http://www.w3.org/2000/svg"
28
- class="loader-animated-24-icon"
29
- fill="none"
30
- height="24"
31
- viewBox="0 0 24 24"
32
- width="24"
33
- style=${animatedLoaderStyles}
34
- >
35
- <path
36
- d="M12 8V2M16 12h6M12 16v6M8 12H2M9.17 9.17 4.93 4.93M14.83 9.17l4.24-4.24M14.83 14.83l4.24 4.24M9.17 14.83l-4.24 4.24"
37
- stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
38
- />
39
- </svg>
26
+ ${Loader24Icon.svgTemplate}
40
27
  `,
41
28
  });
@@ -5,15 +5,20 @@ export const Options24Icon = defineIcon({
5
5
  name: 'Options24Icon',
6
6
  svgTemplate: html `
7
7
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
8
- <g fill="none" stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}>
8
+ <g
9
+ fill=${viraIconCssVars['vira-icon-fill-color'].value}
10
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
11
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
12
+ >
9
13
  <circle cx="9.5" cy="5.5" r="2.5" />
10
14
  <circle cx="16.5" cy="12.5" r="2.5" />
11
15
  <circle cx="8.5" cy="18.5" r="2.5" />
12
16
  </g>
13
17
  <path
14
- stroke="none"
15
- fill="${viraIconCssVars['vira-icon-stroke-color'].value}"
16
- d="M6 18a3 3 0 0 0 0 1H3v-1h3Zm5 1a3 3 0 0 0 0-1h10v1H11Zm3-7a3 3 0 0 0 0 1H3v-1h11Zm5 1a3 3 0 0 0 0-1h2v1h-2ZM7 5a3 3 0 0 0 0 1H3V5h4Zm5 1a3 3 0 0 0 0-1h9v1h-9Z"
18
+ fill="none"
19
+ stroke="${viraIconCssVars['vira-icon-stroke-color'].value}"
20
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
21
+ d="M3 5.5h3.5m5 0h8.5M3 12.5h11m5 0h2M3 18.5h3m5 0h10"
17
22
  />
18
23
  </svg>
19
24
  `,
@@ -7,7 +7,6 @@ export const StatusFailure24Icon = defineIcon({
7
7
  <svg
8
8
  xmlns="http://www.w3.org/2000/svg"
9
9
  xml:space="preserve"
10
- style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
11
10
  width="24"
12
11
  height="24"
13
12
  viewBox="0 0 24 24"
@@ -15,14 +14,16 @@ export const StatusFailure24Icon = defineIcon({
15
14
  <circle
16
15
  cx="12"
17
16
  cy="12"
18
- r="9"
17
+ r="10"
18
+ fill=${viraIconCssVars['vira-icon-fill-color'].value}
19
19
  stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
20
- fill="none"
20
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
21
21
  />
22
22
  <path
23
- stroke="none"
24
- fill=${viraIconCssVars['vira-icon-stroke-color'].value}
25
- d="m11.33 12-3.7-4.17.74-.66L12 11.25l3.63-4.08.74.66-3.7 4.17 3.7 4.17-.74.66L12 12.75l-3.63 4.08-.74-.66 3.7-4.17Z"
23
+ fill="none"
24
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
25
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
26
+ d="M8 16.5 L16 7.5 M8 7.5 L16 16.5"
26
27
  />
27
28
  </svg>
28
29
  `,
@@ -8,30 +8,34 @@ export const StatusInProgress24Icon = defineIcon({
8
8
  <circle
9
9
  cx="12"
10
10
  cy="12"
11
- r="9"
11
+ r="10"
12
+ fill=${viraIconCssVars['vira-icon-fill-color'].value}
12
13
  stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
13
- fill="none"
14
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
14
15
  />
15
16
  <circle
16
17
  cx="7"
17
18
  cy="12"
18
19
  r="1"
19
20
  fill=${viraIconCssVars['vira-icon-stroke-color'].value}
20
- stroke="none"
21
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
22
+ stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
21
23
  />
22
24
  <circle
23
25
  cx="12"
24
26
  cy="12"
25
27
  r="1"
26
28
  fill=${viraIconCssVars['vira-icon-stroke-color'].value}
27
- stroke="none"
29
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
30
+ stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
28
31
  />
29
32
  <circle
30
33
  cx="17"
31
34
  cy="12"
32
35
  r="1"
33
36
  fill=${viraIconCssVars['vira-icon-stroke-color'].value}
34
- stroke="none"
37
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
38
+ stroke-width="calc(${viraIconCssVars['vira-icon-stroke-width'].value} - 1px)"
35
39
  />
36
40
  </svg>
37
41
  `,
@@ -8,14 +8,16 @@ export const StatusSuccess24Icon = defineIcon({
8
8
  <circle
9
9
  cx="12"
10
10
  cy="12"
11
- r="9"
11
+ r="10"
12
+ fill=${viraIconCssVars['vira-icon-fill-color'].value}
12
13
  stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
13
- fill="none"
14
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
14
15
  />
15
16
  <path
16
- d="m6.64 13.81.7-.7 2.63 2.62 6.65-7.6.74.66-7.35 8.4-3.37-3.38Z"
17
- fill=${viraIconCssVars['vira-icon-stroke-color'].value}
18
- stroke="none"
17
+ d="m17 8.5-7 8-3-3"
18
+ fill="none"
19
+ stroke=${viraIconCssVars['vira-icon-stroke-color'].value}
20
+ stroke-width=${viraIconCssVars['vira-icon-stroke-width'].value}
19
21
  />
20
22
  </svg>
21
23
  `,
@@ -1,6 +1,7 @@
1
1
  /** This file is automatically updated by update-icon-exports.ts */
2
2
  export * from './icon-css-vars';
3
3
  export * from './icon-svg';
4
+ export * from './icon-svgs/close-x-24.icon';
4
5
  export * from './icon-svgs/element-16.icon';
5
6
  export * from './icon-svgs/element-24.icon';
6
7
  export * from './icon-svgs/loader-24.icon';
@@ -10,6 +11,7 @@ export * from './icon-svgs/status-failure-24.icon';
10
11
  export * from './icon-svgs/status-in-progress-24.icon';
11
12
  export * from './icon-svgs/status-success-24.icon';
12
13
  export declare const allIconsByName: {
14
+ readonly CloseX24Icon: import("./icon-svg").ViraIconSvg;
13
15
  readonly Element16Icon: import("./icon-svg").ViraIconSvg;
14
16
  readonly Element24Icon: import("./icon-svg").ViraIconSvg;
15
17
  readonly Loader24Icon: import("./icon-svg").ViraIconSvg;
@@ -1,4 +1,5 @@
1
1
  /** This file is automatically updated by update-icon-exports.ts */
2
+ import { CloseX24Icon } from './icon-svgs/close-x-24.icon';
2
3
  import { Element16Icon } from './icon-svgs/element-16.icon';
3
4
  import { Element24Icon } from './icon-svgs/element-24.icon';
4
5
  import { Loader24Icon } from './icon-svgs/loader-24.icon';
@@ -9,6 +10,7 @@ import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon';
9
10
  import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon';
10
11
  export * from './icon-css-vars';
11
12
  export * from './icon-svg';
13
+ export * from './icon-svgs/close-x-24.icon';
12
14
  export * from './icon-svgs/element-16.icon';
13
15
  export * from './icon-svgs/element-24.icon';
14
16
  export * from './icon-svgs/loader-24.icon';
@@ -18,6 +20,7 @@ export * from './icon-svgs/status-failure-24.icon';
18
20
  export * from './icon-svgs/status-in-progress-24.icon';
19
21
  export * from './icon-svgs/status-success-24.icon';
20
22
  export const allIconsByName = {
23
+ CloseX24Icon,
21
24
  Element16Icon,
22
25
  Element24Icon,
23
26
  Loader24Icon,
@@ -1,7 +1,7 @@
1
1
  import { defineCssVars } from 'lit-css-vars';
2
2
  export const viraAnimationDurations = defineCssVars({
3
3
  /** A longer duration show a full animation. */
4
- 'vira-extended-animation-duration': '1s',
4
+ 'vira-extended-animation-duration': '1.2s',
5
5
  /** A longer duration to emphasize the animation. */
6
6
  'vira-pretty-animation-duration': '300ms',
7
7
  /**
@@ -5,6 +5,7 @@ export const noNativeSpacing = css `
5
5
  `;
6
6
  export const noNativeFormStyles = css `
7
7
  ${noNativeSpacing};
8
+ cursor: unset;
8
9
  background: none;
9
10
  border: none;
10
11
  font: inherit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",
@@ -29,11 +29,11 @@
29
29
  "types": "dist/index.d.ts",
30
30
  "scripts": {
31
31
  "build": "npm run compile && virmator frontend build",
32
- "compile": "virmator compile",
32
+ "compile": "virmator compile && rm -rf ../../node_modules/element-book/node_modules/vira",
33
33
  "prepublishOnly": "cd ../scripts && npm run publish:pre",
34
- "preview": "virmator frontend preview",
34
+ "preview": "npm run compile && virmator frontend preview --outDir ./book-dist",
35
35
  "postpublish": "cd ../scripts && npm run publish:post",
36
- "start": "virmator frontend",
36
+ "start": "npm run compile && virmator frontend",
37
37
  "test": "virmator test-web",
38
38
  "test:all": "npm test",
39
39
  "test:coverage": "npm run test",