@oicl/openbridge-webcomponents 0.0.15-dev-20240923191659 → 0.0.15-dev-20240923194534
Sign up to get free protection for your applications and to get access to all the features.
- package/.storybook/main.ts +58 -58
- package/.storybook/preview.ts +55 -55
- package/custom-elements.json +2745 -2745
- package/dist/navigation-instruments/compass/arrow.js.map +1 -1
- package/dist/navigation-instruments/compass/compass.js.map +1 -1
- package/dist/navigation-instruments/compass/radial-tickmark.js.map +1 -1
- package/dist/navigation-instruments/compass-flat/compass-flat.js.map +1 -1
- package/dist/navigation-instruments/thruster/advice.js.map +1 -1
- package/dist/navigation-instruments/watch/advice.js.map +1 -1
- package/dist/navigation-instruments/watch/label.js.map +1 -1
- package/dist/navigation-instruments/watch/watch.js.map +1 -1
- package/dist/navigation-instruments/watch-flat/tickmark-flat.js.map +1 -1
- package/dist/navigation-instruments/watch-flat/watch-flat.js.map +1 -1
- package/dist/svghelpers/rectangular.js.map +1 -1
- package/package.json +83 -83
- package/src/navigation-instruments/compass/arrow.ts +61 -61
- package/src/navigation-instruments/compass/compass.stories.ts +37 -37
- package/src/navigation-instruments/compass/compass.ts +132 -132
- package/src/navigation-instruments/compass/radial-tickmark.ts +77 -77
- package/src/navigation-instruments/compass-flat/compass-flat.css +23 -23
- package/src/navigation-instruments/compass-flat/compass-flat.stories.ts +35 -35
- package/src/navigation-instruments/compass-flat/compass-flat.ts +221 -221
- package/src/navigation-instruments/thruster/advice.ts +109 -109
- package/src/navigation-instruments/watch/advice.ts +120 -120
- package/src/navigation-instruments/watch/label.ts +69 -69
- package/src/navigation-instruments/watch/watch.css +11 -11
- package/src/navigation-instruments/watch/watch.ts +199 -199
- package/src/navigation-instruments/watch-flat/tickmark-flat.ts +62 -62
- package/src/navigation-instruments/watch-flat/watch-flat.css +19 -19
- package/src/navigation-instruments/watch-flat/watch-flat.stories.ts +17 -17
- package/src/navigation-instruments/watch-flat/watch-flat.ts +148 -148
- package/src/svghelpers/rectangular.ts +42 -42
- package/oicl-openbridge-webcomponents-0.0.15-dev-20240923191659.tgz +0 -0
package/.storybook/main.ts
CHANGED
@@ -1,58 +1,58 @@
|
|
1
|
-
import {dirname, join} from 'path';
|
2
|
-
import type {StorybookConfig} from '@storybook/web-components-vite';
|
3
|
-
|
4
|
-
const config: StorybookConfig = {
|
5
|
-
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
6
|
-
|
7
|
-
addons: [
|
8
|
-
getAbsolutePath('@storybook/addon-links'),
|
9
|
-
getAbsolutePath('@storybook/addon-essentials'),
|
10
|
-
getAbsolutePath('@storybook/addon-themes'),
|
11
|
-
getAbsolutePath('@storybook/addon-interactions'),
|
12
|
-
getAbsolutePath('@storybook/addon-storysource'),
|
13
|
-
'@chromatic-com/storybook',
|
14
|
-
],
|
15
|
-
|
16
|
-
framework: {
|
17
|
-
name: getAbsolutePath('@storybook/web-components-vite'),
|
18
|
-
options: {},
|
19
|
-
},
|
20
|
-
|
21
|
-
staticDirs: [{from: '../public', to: '/assets'}],
|
22
|
-
|
23
|
-
previewHead: (head, options) => `
|
24
|
-
<dialog> ${options.configType}</dialog>
|
25
|
-
${head}
|
26
|
-
<style>
|
27
|
-
@font-face {
|
28
|
-
font-family: Noto Sans;
|
29
|
-
src: url(/assets/NotoSans.ttf);
|
30
|
-
}
|
31
|
-
</style>
|
32
|
-
`,
|
33
|
-
|
34
|
-
managerHead: (head, options) => `
|
35
|
-
${head}
|
36
|
-
${
|
37
|
-
options.configType !== 'DEVELOPMENT'
|
38
|
-
? `
|
39
|
-
<!-- Google tag (gtag.js) -->
|
40
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-BBSXX2P5P8"></script>
|
41
|
-
<script>
|
42
|
-
window.dataLayer = window.dataLayer || [];
|
43
|
-
function gtag(){dataLayer.push(arguments);}
|
44
|
-
gtag('js', new Date());
|
45
|
-
|
46
|
-
gtag('config', 'G-BBSXX2P5P8');
|
47
|
-
</script>`
|
48
|
-
: ''
|
49
|
-
}
|
50
|
-
`,
|
51
|
-
|
52
|
-
docs: {},
|
53
|
-
};
|
54
|
-
export default config;
|
55
|
-
|
56
|
-
function getAbsolutePath(value: string): any {
|
57
|
-
return dirname(require.resolve(join(value, 'package.json')));
|
58
|
-
}
|
1
|
+
import {dirname, join} from 'path';
|
2
|
+
import type {StorybookConfig} from '@storybook/web-components-vite';
|
3
|
+
|
4
|
+
const config: StorybookConfig = {
|
5
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
6
|
+
|
7
|
+
addons: [
|
8
|
+
getAbsolutePath('@storybook/addon-links'),
|
9
|
+
getAbsolutePath('@storybook/addon-essentials'),
|
10
|
+
getAbsolutePath('@storybook/addon-themes'),
|
11
|
+
getAbsolutePath('@storybook/addon-interactions'),
|
12
|
+
getAbsolutePath('@storybook/addon-storysource'),
|
13
|
+
'@chromatic-com/storybook',
|
14
|
+
],
|
15
|
+
|
16
|
+
framework: {
|
17
|
+
name: getAbsolutePath('@storybook/web-components-vite'),
|
18
|
+
options: {},
|
19
|
+
},
|
20
|
+
|
21
|
+
staticDirs: [{from: '../public', to: '/assets'}],
|
22
|
+
|
23
|
+
previewHead: (head, options) => `
|
24
|
+
<dialog> ${options.configType}</dialog>
|
25
|
+
${head}
|
26
|
+
<style>
|
27
|
+
@font-face {
|
28
|
+
font-family: Noto Sans;
|
29
|
+
src: url(/assets/NotoSans.ttf);
|
30
|
+
}
|
31
|
+
</style>
|
32
|
+
`,
|
33
|
+
|
34
|
+
managerHead: (head, options) => `
|
35
|
+
${head}
|
36
|
+
${
|
37
|
+
options.configType !== 'DEVELOPMENT'
|
38
|
+
? `
|
39
|
+
<!-- Google tag (gtag.js) -->
|
40
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-BBSXX2P5P8"></script>
|
41
|
+
<script>
|
42
|
+
window.dataLayer = window.dataLayer || [];
|
43
|
+
function gtag(){dataLayer.push(arguments);}
|
44
|
+
gtag('js', new Date());
|
45
|
+
|
46
|
+
gtag('config', 'G-BBSXX2P5P8');
|
47
|
+
</script>`
|
48
|
+
: ''
|
49
|
+
}
|
50
|
+
`,
|
51
|
+
|
52
|
+
docs: {},
|
53
|
+
};
|
54
|
+
export default config;
|
55
|
+
|
56
|
+
function getAbsolutePath(value: string): any {
|
57
|
+
return dirname(require.resolve(join(value, 'package.json')));
|
58
|
+
}
|
package/.storybook/preview.ts
CHANGED
@@ -1,55 +1,55 @@
|
|
1
|
-
import type {Preview} from '@storybook/web-components';
|
2
|
-
import {BadgesConfig} from '@geometricpanda/storybook-addon-badges';
|
3
|
-
|
4
|
-
import '../src/palettes/variables.css';
|
5
|
-
import {setCustomElementsManifest} from '@storybook/web-components';
|
6
|
-
|
7
|
-
import customElements from '../custom-elements.json';
|
8
|
-
|
9
|
-
setCustomElementsManifest(customElements);
|
10
|
-
|
11
|
-
import {withThemeByDataAttribute} from '@storybook/addon-themes';
|
12
|
-
|
13
|
-
export const decorators = [
|
14
|
-
withThemeByDataAttribute({
|
15
|
-
themes: {
|
16
|
-
night: 'night',
|
17
|
-
dusk: 'dusk',
|
18
|
-
day: 'day',
|
19
|
-
bright: 'bright',
|
20
|
-
},
|
21
|
-
defaultTheme: 'day',
|
22
|
-
attributeName: 'data-obc-theme',
|
23
|
-
}),
|
24
|
-
];
|
25
|
-
|
26
|
-
const preview: Preview = {
|
27
|
-
parameters: {
|
28
|
-
controls: {
|
29
|
-
matchers: {
|
30
|
-
color: /(background|color)$/i,
|
31
|
-
date: /Date$/i,
|
32
|
-
},
|
33
|
-
},
|
34
|
-
backgrounds: {
|
35
|
-
grid: {
|
36
|
-
cellSize: 8,
|
37
|
-
},
|
38
|
-
default: 'container-background-color',
|
39
|
-
values: [
|
40
|
-
{
|
41
|
-
name: 'container-section-color',
|
42
|
-
value: 'var(--container-section-color)',
|
43
|
-
},
|
44
|
-
{
|
45
|
-
name: 'container-background-color',
|
46
|
-
value: 'var(--container-background-color)',
|
47
|
-
},
|
48
|
-
],
|
49
|
-
},
|
50
|
-
},
|
51
|
-
|
52
|
-
tags: ['autodocs'],
|
53
|
-
};
|
54
|
-
|
55
|
-
export default preview;
|
1
|
+
import type {Preview} from '@storybook/web-components';
|
2
|
+
import {BadgesConfig} from '@geometricpanda/storybook-addon-badges';
|
3
|
+
|
4
|
+
import '../src/palettes/variables.css';
|
5
|
+
import {setCustomElementsManifest} from '@storybook/web-components';
|
6
|
+
|
7
|
+
import customElements from '../custom-elements.json';
|
8
|
+
|
9
|
+
setCustomElementsManifest(customElements);
|
10
|
+
|
11
|
+
import {withThemeByDataAttribute} from '@storybook/addon-themes';
|
12
|
+
|
13
|
+
export const decorators = [
|
14
|
+
withThemeByDataAttribute({
|
15
|
+
themes: {
|
16
|
+
night: 'night',
|
17
|
+
dusk: 'dusk',
|
18
|
+
day: 'day',
|
19
|
+
bright: 'bright',
|
20
|
+
},
|
21
|
+
defaultTheme: 'day',
|
22
|
+
attributeName: 'data-obc-theme',
|
23
|
+
}),
|
24
|
+
];
|
25
|
+
|
26
|
+
const preview: Preview = {
|
27
|
+
parameters: {
|
28
|
+
controls: {
|
29
|
+
matchers: {
|
30
|
+
color: /(background|color)$/i,
|
31
|
+
date: /Date$/i,
|
32
|
+
},
|
33
|
+
},
|
34
|
+
backgrounds: {
|
35
|
+
grid: {
|
36
|
+
cellSize: 8,
|
37
|
+
},
|
38
|
+
default: 'container-background-color',
|
39
|
+
values: [
|
40
|
+
{
|
41
|
+
name: 'container-section-color',
|
42
|
+
value: 'var(--container-section-color)',
|
43
|
+
},
|
44
|
+
{
|
45
|
+
name: 'container-background-color',
|
46
|
+
value: 'var(--container-background-color)',
|
47
|
+
},
|
48
|
+
],
|
49
|
+
},
|
50
|
+
},
|
51
|
+
|
52
|
+
tags: ['autodocs'],
|
53
|
+
};
|
54
|
+
|
55
|
+
export default preview;
|