@wwtdev/bsds-components-vue3 1.2.0 → 1.4.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.
- package/README.md +27 -23
- package/lib/components.d.ts +35 -28
- package/lib/components.js +63 -1
- package/lib/components.js.map +1 -1
- package/lib/plugin-ssr.js +5 -6
- package/lib/vue-component-lib/utils.d.ts +1 -3
- package/lib/vue-component-lib/utils.js +12 -10
- package/lib/vue-component-lib/utils.js.map +1 -1
- package/package.json +3 -5
package/README.md
CHANGED
|
@@ -34,48 +34,51 @@ import { BsButton } from '@wwtdev/bsds-components-vue3'
|
|
|
34
34
|
|
|
35
35
|
The setup steps here are similar to a regular Vue app, but you'll also need to add the Nitro plugin to ensure SSR works.
|
|
36
36
|
|
|
37
|
+
***/server/plugins/bsds-ssr.js*** (or whatever you want to name it)
|
|
37
38
|
```javascript
|
|
39
|
+
import ComponentLibServerPlugin from "@wwtdev/bsds-components-vue3/lib/plugin-ssr.js";
|
|
40
|
+
import { defineNitroPlugin } from 'nitropack/dist/runtime/plugin'
|
|
38
41
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
import { ComponentLibServerPlugin } from "@wwtdev/bsds-components-vue3/lib/plugin-ssr.js";
|
|
43
|
-
export default ComponentLibServerPlugin
|
|
44
|
-
|
|
42
|
+
export default defineNitroPlugin(ComponentLibServerPlugin);
|
|
43
|
+
```
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*/
|
|
45
|
+
***/plugins/bsds-components.js*** (or whatever you want to name it)
|
|
46
|
+
```javascript
|
|
49
47
|
import { ComponentLibrary } from '@wwtdev/bsds-components-vue3'
|
|
50
48
|
|
|
51
49
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
52
50
|
nuxtApp.vueApp.use(ComponentLibrary)
|
|
53
51
|
})
|
|
52
|
+
```
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
the component plugin in /plugins, you will need
|
|
61
|
-
to add the ssr plugin manually here.
|
|
62
|
-
*/
|
|
63
|
-
|
|
54
|
+
***/nuxt.config.ts***
|
|
55
|
+
> Note that though Nuxt will automagically register
|
|
56
|
+
> the component plugin in plugins, you will need
|
|
57
|
+
> to add the ssr plugin manually here.
|
|
58
|
+
```javascript
|
|
64
59
|
export default defineNuxtConfig({
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
...
|
|
61
|
+
css: [ '@wwtdev/bsds-components/dist/components/components.css' ],
|
|
62
|
+
build: {
|
|
63
|
+
transpile: [
|
|
64
|
+
'@wwtdev/bsds-components',
|
|
65
|
+
'@wwtdev/bsds-components-vue3',
|
|
66
|
+
'@wwtdev/bsds-icons'
|
|
67
|
+
]
|
|
67
68
|
},
|
|
68
69
|
vue: {
|
|
69
70
|
compilerOptions: {
|
|
70
71
|
isCustomElement: (tag) => /bs-.+/.test(tag),
|
|
71
72
|
},
|
|
72
73
|
},
|
|
73
|
-
|
|
74
|
+
nitro: {
|
|
75
|
+
plugins: ['plugins/bsds-ssr.js']
|
|
76
|
+
},
|
|
77
|
+
...
|
|
74
78
|
})
|
|
75
79
|
```
|
|
76
80
|
|
|
77
81
|
Now you can use BSDS Components in your code, just like standard Vue components:
|
|
78
|
-
|
|
79
82
|
```javascript
|
|
80
83
|
<script setup>
|
|
81
84
|
import { BsButton } from '@wwtdev/bsds-components-vue3'
|
|
@@ -89,4 +92,5 @@ import { BsButton } from '@wwtdev/bsds-components-vue3'
|
|
|
89
92
|
```
|
|
90
93
|
|
|
91
94
|
### Caveats
|
|
92
|
-
Currently
|
|
95
|
+
- Currently an issue where Vue components clash with Web Components in Nuxt apps. Investigating a fix to Vue wrappers to resolve.
|
|
96
|
+
- Currently looking into a known issue wherein multi-word props are lost during hydration after SSR.
|
package/lib/components.d.ts
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
import type { JSX } from '@wwtdev/bsds-components';
|
|
2
|
-
export declare const BsAccordion:
|
|
3
|
-
export declare const BsBadge:
|
|
4
|
-
export declare const BsBanner:
|
|
5
|
-
export declare const BsButton:
|
|
6
|
-
export declare const BsCharacterCount:
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
2
|
+
export declare const BsAccordion: (props: JSX.BsAccordion & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
3
|
+
export declare const BsBadge: (props: JSX.BsBadge & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
4
|
+
export declare const BsBanner: (props: JSX.BsBanner & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
5
|
+
export declare const BsButton: (props: JSX.BsButton & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
6
|
+
export declare const BsCharacterCount: (props: JSX.BsCharacterCount & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
7
|
+
export declare const BsChartBar: (props: JSX.BsChartBar & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
8
|
+
export declare const BsChartTable: (props: JSX.BsChartTable & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
9
|
+
export declare const BsCheckbox: (props: JSX.BsCheckbox & import("./vue-component-lib/utils").InputProps<boolean> & {}) => any;
|
|
10
|
+
export declare const BsDropdown: (props: JSX.BsDropdown & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
11
|
+
export declare const BsDropdownOption: (props: JSX.BsDropdownOption & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
12
|
+
export declare const BsDropdownOptions: (props: JSX.BsDropdownOptions & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
13
|
+
export declare const BsFieldLayout: (props: JSX.BsFieldLayout & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
14
|
+
export declare const BsHint: (props: JSX.BsHint & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
15
|
+
export declare const BsInput: (props: JSX.BsInput & import("./vue-component-lib/utils").InputProps<string | number> & {}) => any;
|
|
16
|
+
export declare const BsInputAddon: (props: JSX.BsInputAddon & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
17
|
+
export declare const BsInputField: (props: JSX.BsInputField & import("./vue-component-lib/utils").InputProps<string | number> & {}) => any;
|
|
18
|
+
export declare const BsInputSearch: (props: JSX.BsInputSearch & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
19
|
+
export declare const BsLabel: (props: JSX.BsLabel & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
20
|
+
export declare const BsPill: (props: JSX.BsPill & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
21
|
+
export declare const BsProfile: (props: JSX.BsProfile & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
22
|
+
export declare const BsProfileDetails: (props: JSX.BsProfileDetails & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
23
|
+
export declare const BsProfileImg: (props: JSX.BsProfileImg & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
24
|
+
export declare const BsProfileLayout: (props: JSX.BsProfileLayout & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
25
|
+
export declare const BsRadio: (props: JSX.BsRadio & import("./vue-component-lib/utils").InputProps<boolean> & {}) => any;
|
|
26
|
+
export declare const BsSelect: (props: JSX.BsSelect & import("./vue-component-lib/utils").InputProps<string | number> & {}) => any;
|
|
27
|
+
export declare const BsSelectField: (props: JSX.BsSelectField & import("./vue-component-lib/utils").InputProps<string | number> & {}) => any;
|
|
28
|
+
export declare const BsSwitch: (props: JSX.BsSwitch & import("./vue-component-lib/utils").InputProps<boolean> & {}) => any;
|
|
29
|
+
export declare const BsTextarea: (props: JSX.BsTextarea & import("./vue-component-lib/utils").InputProps<string> & {}) => any;
|
|
30
|
+
export declare const BsTextareaField: (props: JSX.BsTextareaField & import("./vue-component-lib/utils").InputProps<string> & {}) => any;
|
|
31
|
+
export declare const BsToast: (props: JSX.BsToast & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
32
|
+
export declare const BsToaster: (props: JSX.BsToaster & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
33
|
+
export declare const BsTooltip: (props: JSX.BsTooltip & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
34
|
+
export declare const DocsCodeDisplay: (props: JSX.DocsCodeDisplay & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
35
|
+
export declare const DocsPlayground: (props: JSX.DocsPlayground & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
|
36
|
+
export declare const DocsPropDisplay: (props: JSX.DocsPropDisplay & import("./vue-component-lib/utils").InputProps<string | number | boolean> & {}) => any;
|
package/lib/components.js
CHANGED
|
@@ -3,7 +3,7 @@ export const BsAccordion = defineContainer('bs-accordion', undefined, [
|
|
|
3
3
|
'controlled',
|
|
4
4
|
'icon',
|
|
5
5
|
'headerText',
|
|
6
|
-
'
|
|
6
|
+
'headingLevel',
|
|
7
7
|
'openItem',
|
|
8
8
|
'stacked',
|
|
9
9
|
'toggled'
|
|
@@ -33,6 +33,23 @@ export const BsCharacterCount = defineContainer('bs-character-count', undefined,
|
|
|
33
33
|
'charCount',
|
|
34
34
|
'charMax'
|
|
35
35
|
]);
|
|
36
|
+
export const BsChartBar = defineContainer('bs-chart-bar', undefined, [
|
|
37
|
+
'chartTitle',
|
|
38
|
+
'data',
|
|
39
|
+
'dataIdxLabels',
|
|
40
|
+
'showLegend',
|
|
41
|
+
'showTooltips',
|
|
42
|
+
'showXGrid',
|
|
43
|
+
'showYGrid',
|
|
44
|
+
'stacked',
|
|
45
|
+
'xLabel',
|
|
46
|
+
'yLabel'
|
|
47
|
+
]);
|
|
48
|
+
export const BsChartTable = defineContainer('bs-chart-table', undefined, [
|
|
49
|
+
'data',
|
|
50
|
+
'dataIdxLabels',
|
|
51
|
+
'tableTitle'
|
|
52
|
+
]);
|
|
36
53
|
export const BsCheckbox = defineContainer('bs-checkbox', undefined, [
|
|
37
54
|
'label',
|
|
38
55
|
'checked',
|
|
@@ -43,6 +60,36 @@ export const BsCheckbox = defineContainer('bs-checkbox', undefined, [
|
|
|
43
60
|
'required',
|
|
44
61
|
'size'
|
|
45
62
|
], 'checked', 'change');
|
|
63
|
+
export const BsDropdown = defineContainer('bs-dropdown', undefined, [
|
|
64
|
+
'dropdownId',
|
|
65
|
+
'shown',
|
|
66
|
+
'label',
|
|
67
|
+
'position',
|
|
68
|
+
'justify',
|
|
69
|
+
'variant',
|
|
70
|
+
'dropdownchange',
|
|
71
|
+
'close'
|
|
72
|
+
]);
|
|
73
|
+
export const BsDropdownOption = defineContainer('bs-dropdown-option', undefined, [
|
|
74
|
+
'value',
|
|
75
|
+
'variant',
|
|
76
|
+
'selected',
|
|
77
|
+
'shown',
|
|
78
|
+
'focused',
|
|
79
|
+
'index',
|
|
80
|
+
'dropdownId',
|
|
81
|
+
'mousefocus',
|
|
82
|
+
'optionselect'
|
|
83
|
+
]);
|
|
84
|
+
export const BsDropdownOptions = defineContainer('bs-dropdown-options', undefined, [
|
|
85
|
+
'dropdownId',
|
|
86
|
+
'shown',
|
|
87
|
+
'label',
|
|
88
|
+
'position',
|
|
89
|
+
'variant',
|
|
90
|
+
'dropdownchange',
|
|
91
|
+
'close'
|
|
92
|
+
]);
|
|
46
93
|
export const BsFieldLayout = defineContainer('bs-field-layout', undefined, [
|
|
47
94
|
'charCount',
|
|
48
95
|
'charMax',
|
|
@@ -69,6 +116,12 @@ export const BsInput = defineContainer('bs-input', undefined, [
|
|
|
69
116
|
'value',
|
|
70
117
|
'hintId'
|
|
71
118
|
], 'value', 'input');
|
|
119
|
+
export const BsInputAddon = defineContainer('bs-input-addon', undefined, [
|
|
120
|
+
'disabled',
|
|
121
|
+
'error',
|
|
122
|
+
'multifocus',
|
|
123
|
+
'variant'
|
|
124
|
+
]);
|
|
72
125
|
export const BsInputField = defineContainer('bs-input-field', undefined, [
|
|
73
126
|
'disabled',
|
|
74
127
|
'error',
|
|
@@ -80,6 +133,15 @@ export const BsInputField = defineContainer('bs-input-field', undefined, [
|
|
|
80
133
|
'type',
|
|
81
134
|
'value'
|
|
82
135
|
], 'value', 'input');
|
|
136
|
+
export const BsInputSearch = defineContainer('bs-input-search', undefined, [
|
|
137
|
+
'disabled',
|
|
138
|
+
'passAttrs',
|
|
139
|
+
'placeholder',
|
|
140
|
+
'ariaLabel',
|
|
141
|
+
'hintId',
|
|
142
|
+
'value',
|
|
143
|
+
'onclear'
|
|
144
|
+
]);
|
|
83
145
|
export const BsLabel = defineContainer('bs-label', undefined, [
|
|
84
146
|
'disabled',
|
|
85
147
|
'for',
|
package/lib/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAO5D,MAAM,CAAC,MAAM,WAAW,GAAiB,eAAe,CAAkB,cAAc,EAAE,SAAS,EAAE;IACnG,YAAY;IACZ,MAAM;IACN,YAAY;IACZ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M,CAAC,MAAM,eAAe,GAAiB,eAAe,CAAoD,mBAAmB,EAAE,SAAS,EAAE;IAC9I,SAAS;IACT,UAAU;IACV,OAAO;IACP,OAAO;IACP,OAAO;IACP,aAAa;IACb,UAAU;IACV,OAAO;IACP,WAAW;CACZ,EACD,OAAO,EAAE,OAAO,CAAC,CAAC;AAGlB,MAAM,CAAC,MAAM,OAAO,GAAiB,eAAe,CAAc,UAAU,EAAE,SAAS,EAAE;IACvF,SAAS;IACT,OAAO;IACP,SAAS;IACT,YAAY;IACZ,SAAS;IACT,SAAS;IACT,UAAU;IACV,eAAe;IACf,mBAAmB;IACnB,iBAAiB;IACjB,qBAAqB;IACrB,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;IACf,SAAS;IACT,aAAa;CACd,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,SAAS,GAAiB,eAAe,CAAgB,YAAY,EAAE,SAAS,CAAC,CAAC;AAG/F,MAAM,CAAC,MAAM,SAAS,GAAiB,eAAe,CAAgB,YAAY,EAAE,SAAS,EAAE;IAC7F,WAAW;IACX,SAAS;IACT,UAAU;CACX,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,eAAe,GAAiB,eAAe,CAAsB,mBAAmB,EAAE,SAAS,EAAE;IAChH,WAAW;IACX,aAAa;IACb,cAAc;CACf,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,cAAc,GAAiB,eAAe,CAAqB,iBAAiB,EAAE,SAAS,EAAE;IAC5G,WAAW;IACX,UAAU;IACV,aAAa;IACb,mBAAmB;IACnB,eAAe;CAChB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,eAAe,GAAiB,eAAe,CAAsB,mBAAmB,EAAE,SAAS,EAAE;IAChH,gBAAgB;CACjB,CAAC,CAAC"}
|
package/lib/plugin-ssr.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { defineNitroPlugin } from 'nitropack/dist/runtime/plugin'
|
|
2
1
|
import { renderToString } from '@wwtdev/bsds-components/dist/hydrate/index.js'
|
|
2
|
+
import { renderToString as renderIconsToString } from '@wwtdev/bsds-icons/dist/hydrate/index.js'
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export default (nitroApp) => {
|
|
5
5
|
nitroApp.hooks.hook('render:response', async (response) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
6
|
+
let render = await renderToString(response.body);
|
|
7
|
+
render = await renderIconsToString(render.html)
|
|
9
8
|
response.body = render.html
|
|
10
9
|
})
|
|
11
|
-
}
|
|
10
|
+
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export interface InputProps<T> {
|
|
2
2
|
modelValue?: T;
|
|
3
3
|
}
|
|
4
|
-
export declare const defineContainer: <Props, VModelType = string | number | boolean>(name: string, defineCustomElement: any, componentProps?: string[], modelProp?: string, modelUpdateEvent?: string, externalModelUpdateEvent?: string) =>
|
|
5
|
-
[x: string]: unknown;
|
|
6
|
-
}> ? import("vue").ExtractPropTypes<T> : T : never : never>, import("vue").ExtractDefaultPropTypes<Props & InputProps<VModelType>>>;
|
|
4
|
+
export declare const defineContainer: <Props, VModelType = string | number | boolean>(name: string, defineCustomElement: any, componentProps?: string[], modelProp?: string, modelUpdateEvent?: string, externalModelUpdateEvent?: string) => (props: Props & InputProps<VModelType> & {}) => any;
|
|
@@ -95,16 +95,18 @@ export const defineContainer = (name, defineCustomElement, componentProps = [],
|
|
|
95
95
|
return h(name, propsToAdd, slots.default && slots.default());
|
|
96
96
|
};
|
|
97
97
|
});
|
|
98
|
-
Container
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
98
|
+
if (typeof Container !== 'function') {
|
|
99
|
+
Container.name = name;
|
|
100
|
+
Container.props = {
|
|
101
|
+
[ROUTER_LINK_VALUE]: DEFAULT_EMPTY_PROP,
|
|
102
|
+
};
|
|
103
|
+
componentProps.forEach((componentProp) => {
|
|
104
|
+
Container.props[componentProp] = DEFAULT_EMPTY_PROP;
|
|
105
|
+
});
|
|
106
|
+
if (modelProp) {
|
|
107
|
+
Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP;
|
|
108
|
+
Container.emits = [UPDATE_VALUE_EVENT, externalModelUpdateEvent];
|
|
109
|
+
}
|
|
108
110
|
}
|
|
109
111
|
return Container;
|
|
110
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/vue-component-lib/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/vue-component-lib/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,eAAe,EAAE,kBAAkB,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAO,MAAM,KAAK,CAAC;AAMtF,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAC/C,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AACpC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAUhC,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAMnD,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC/C,OAAO,CAAC,OAAkB,aAAlB,OAAO,uBAAP,OAAO,CAAa,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CACxB,GAAiC,EACjC,gBAA6B,EAC7B,iBAA2B,EAAE,EAC7B,EAAE;;IACF,OAAO,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA,MAAA,GAAG,CAAC,KAAK,0CAA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AAC,EAAE,cAAc,GAC5B,CAAC;iBACH;aACF;YAED,OAAO,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;QACnC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;QAEtB,SAAS,CAAC,KAAK,GAAG;YAChB,CAAC,iBAAiB,CAAC,EAAE,kBAAkB;SACxC,CAAC;QAEF,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;YACvC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC;YAClD,SAAS,CAAC,KAAK,GAAG,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,CAAC;SAClE;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwtdev/bsds-components-vue3",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "BSDS Vue3 Components",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
"url": "https://github.wwt.com/custom-apps/wwt-blue-steel.git"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "npm run tsc",
|
|
24
|
+
"build": "npm run tsc && npm run build:ssr",
|
|
25
25
|
"build:ssr": "node utils/copyFiles.js src/plugin-ssr.js lib/plugin-ssr.js",
|
|
26
|
-
"prepublishOnly": "npm run build:ssr",
|
|
27
26
|
"publish-wwt": "publish-wwt-package --monorepo",
|
|
28
27
|
"publish-npm": "npm publish --@wwtdev:registry=https://registry.npmjs.org --access=public",
|
|
29
28
|
"start": "npm-watch",
|
|
@@ -47,7 +46,6 @@
|
|
|
47
46
|
"wwt-package-publisher": "^4.1.2"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@wwtdev/bsds-components": "^1.
|
|
51
|
-
"@wwtdev/bsds-icons": "^1.1.2"
|
|
49
|
+
"@wwtdev/bsds-components": "^1.4.0"
|
|
52
50
|
}
|
|
53
51
|
}
|