@genexus/mercury 0.12.9 → 0.13.1
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/dist/bundles/css/all.css +1 -1
- package/dist/bundles/css/base/base.css +1 -1
- package/dist/bundles/css/base/icons.css +1 -1
- package/dist/bundles/css/chameleon/scrollbar.css +1 -1
- package/dist/bundles/css/components/accordion.css +1 -1
- package/dist/bundles/css/components/button.css +1 -1
- package/dist/bundles/css/components/chat.css +1 -1
- package/dist/bundles/css/components/checkbox.css +1 -1
- package/dist/bundles/css/components/code.css +1 -1
- package/dist/bundles/css/components/combo-box.css +1 -1
- package/dist/bundles/css/components/dialog.css +1 -1
- package/dist/bundles/css/components/dropdown.css +1 -1
- package/dist/bundles/css/components/edit.css +1 -1
- package/dist/bundles/css/components/flexible-layout.css +1 -1
- package/dist/bundles/css/components/icon.css +1 -1
- package/dist/bundles/css/components/layout-splitter.css +1 -1
- package/dist/bundles/css/components/list-box.css +1 -1
- package/dist/bundles/css/components/markdown-viewer.css +1 -1
- package/dist/bundles/css/components/navigation-list.css +1 -1
- package/dist/bundles/css/components/pills.css +1 -1
- package/dist/bundles/css/components/radio-group.css +1 -1
- package/dist/bundles/css/components/segmented-control.css +1 -1
- package/dist/bundles/css/components/sidebar.css +1 -1
- package/dist/bundles/css/components/slider.css +1 -1
- package/dist/bundles/css/components/switch.css +1 -1
- package/dist/bundles/css/components/tab.css +1 -1
- package/dist/bundles/css/components/tabular-grid.css +1 -1
- package/dist/bundles/css/components/ticket-list.css +1 -1
- package/dist/bundles/css/components/tooltip.css +1 -1
- package/dist/bundles/css/components/tree-view.css +1 -1
- package/dist/bundles/css/components/widget.css +1 -1
- package/dist/bundles/css/resets/box-sizing.css +1 -1
- package/dist/bundles/css/utils/elevation.css +1 -1
- package/dist/bundles/css/utils/form--full.css +1 -1
- package/dist/bundles/css/utils/form.css +1 -1
- package/dist/bundles/css/utils/layout.css +1 -1
- package/dist/bundles/css/utils/spacing.css +1 -1
- package/dist/bundles/css/utils/typography.css +1 -1
- package/dist/bundles/js/all.js +1 -0
- package/dist/bundles/js/base/base.js +1 -0
- package/dist/bundles/js/base/icons.js +1 -0
- package/dist/bundles/js/bundle-mappings.js +231 -0
- package/dist/bundles/js/chameleon/scrollbar.js +1 -0
- package/dist/bundles/js/components/accordion.js +1 -0
- package/dist/bundles/js/components/button.js +1 -0
- package/dist/bundles/js/components/chat.js +1 -0
- package/dist/bundles/js/components/checkbox.js +1 -0
- package/dist/bundles/js/components/code.js +1 -0
- package/dist/bundles/js/components/combo-box.js +1 -0
- package/dist/bundles/js/components/dialog.js +1 -0
- package/dist/bundles/js/components/dropdown.js +1 -0
- package/dist/bundles/js/components/edit.js +1 -0
- package/dist/bundles/js/components/flexible-layout.js +1 -0
- package/dist/bundles/js/components/icon.js +1 -0
- package/dist/bundles/js/components/layout-splitter.js +1 -0
- package/dist/bundles/js/components/list-box.js +1 -0
- package/dist/bundles/js/components/markdown-viewer.js +1 -0
- package/dist/bundles/js/components/navigation-list.js +1 -0
- package/dist/bundles/js/components/pills.js +1 -0
- package/dist/bundles/js/components/radio-group.js +1 -0
- package/dist/bundles/js/components/segmented-control.js +1 -0
- package/dist/bundles/js/components/sidebar.js +1 -0
- package/dist/bundles/js/components/slider.js +1 -0
- package/dist/bundles/js/components/switch.js +1 -0
- package/dist/bundles/js/components/tab.js +1 -0
- package/dist/bundles/js/components/tabular-grid.js +1 -0
- package/dist/bundles/js/components/ticket-list.js +1 -0
- package/dist/bundles/js/components/tooltip.js +1 -0
- package/dist/bundles/js/components/tree-view.js +1 -0
- package/dist/bundles/js/components/widget.js +1 -0
- package/dist/bundles/js/resets/box-sizing.js +1 -0
- package/dist/bundles/js/utils/elevation.js +1 -0
- package/dist/bundles/js/utils/form--full.js +1 -0
- package/dist/bundles/js/utils/form.js +1 -0
- package/dist/bundles/js/utils/layout.js +1 -0
- package/dist/bundles/js/utils/spacing.js +1 -0
- package/dist/bundles/js/utils/typography.js +1 -0
- package/dist/bundles.d.ts +153 -146
- package/dist/bundles.js +1 -1
- package/dist/cli/bundle.d.ts +2 -0
- package/dist/cli/bundle.js +20 -0
- package/dist/cli/internal/constants.d.ts +28 -0
- package/dist/cli/internal/constants.js +33 -0
- package/dist/cli/internal/create-bundles-with-custom-paths.d.ts +2 -0
- package/dist/cli/internal/create-bundles-with-custom-paths.js +67 -0
- package/dist/cli/internal/file-management.d.ts +4 -0
- package/dist/cli/internal/file-management.js +20 -0
- package/dist/cli/internal/print-utils.d.ts +18 -0
- package/dist/cli/internal/print-utils.js +33 -0
- package/dist/cli/internal/transpile-bundle-and-create-mappings.d.ts +3 -0
- package/dist/cli/internal/transpile-bundle-and-create-mappings.js +85 -0
- package/dist/cli/internal/types.d.ts +21 -0
- package/dist/cli/internal/types.js +1 -0
- package/dist/cli/internal/utils.d.ts +11 -0
- package/dist/cli/internal/utils.js +42 -0
- package/dist/cli/internal/validate-args.d.ts +2 -0
- package/dist/cli/internal/validate-args.js +119 -0
- package/dist/cli/mercury.d.ts +2 -0
- package/dist/cli/mercury.js +14 -0
- package/dist/mercury.scss +2 -0
- package/dist/types.d.ts +3 -0
- package/package.json +13 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const bundle = `.field{display:grid}.field-group-inline,.field-group{--spacing-body-block-start: var(--mer-spacing--md);--spacing-body-block-end: var(--mer-spacing--md);--spacing-body-inline-start: var(--mer-spacing--md);--spacing-body-inline-end: var(--mer-spacing--md);row-gap:var(--field-group__row-gap);column-gap:var(--field-group__column-gap)}.field-group{display:grid}.field-group-inline{display:flex;flex-wrap:wrap}.field-group-cols-2{display:grid;column-gap:var(--field__column-gap);row-gap:var(--field-group__row-gap);grid-template-columns:max-content auto}.field-block{row-gap:var(--field__row-gap);grid-template-rows:max-content 1fr}.field-inline{column-gap:var(--field__column-gap);grid-template-columns:max-content 1fr}.field-group-cols-2 .label,.field-inline>.label{margin-block-start:var(--field-inline-label__margin-block-start)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.label{color:var(--label__color);font-weight:var(--label__font-weight);font-size:var(--label__font-size);line-height:var(--label__line-height)}.label--disabled{--label__color: var(--label__color--disabled)}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const bundle = `.layout{--spacing-body-block-start: var(--mer-spacing--md);--spacing-body-block-end: var(--mer-spacing--md);--spacing-body-inline-start: var(--mer-spacing--lg);--spacing-body-inline-end: var(--mer-spacing--lg);display:grid;gap:var(--mer-spacing--md)}.layout__panel{display:grid}.layout--cols-1{grid-template-rows:1fr;grid-template-columns:1fr}.layout--cols-2{grid-template-rows:1fr;grid-template-columns:repeat(2, 1fr)}.layout--cols-3{grid-template-rows:1fr;grid-template-columns:repeat(3, 1fr)}.layout--cols-4{grid-template-rows:1fr;grid-template-columns:repeat(4, 1fr)}.layout--cols-1-2{grid-template-rows:1fr;grid-template-columns:1fr 2fr}.layout--cols-2-1{grid-template-rows:1fr;grid-template-columns:2fr 1fr}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.control-footer,.control-footer-with-border{--control-footer-justify-content: end;padding-block-start:var(--mer-spacing--xs);display:flex;justify-content:var(--control-footer-justify-content);align-items:center}.control-footer-start{--control-footer-justify-content: start}.control-footer-center{--control-footer-justify-content: center}.control-footer-space-between{--control-footer-justify-content: space-between}.control-footer-with-border{border-block-start:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01)}.control-header,.control-header-with-border{padding-block-end:var(--mer-spacing--md)}.control-header-with-border{border-block-end:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01)}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const bundle = `.spacing-body,:host(.spacing-body){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end);padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-block,:host(.spacing-body-block){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end)}.spacing-body-block-start,:host(.spacing-body-block-start){padding-block-start:var(--spacing-body-block-start)}.spacing-body-block-end,:host(.spacing-body-block-end){padding-block-end:var(--spacing-body-block-end)}.spacing-body-inline,:host(.spacing-body-inline){padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-inline-start,:host(.spacing-body-inline-start){padding-inline-start:var(--spacing-body-inline-start)}.spacing-body-inline-end,:host(.spacing-body-inline-end){padding-inline-end:var(--spacing-body-inline-end)}.spacing-body,:host(.spacing-body){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end);padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-block,:host(.spacing-body-block){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end)}.spacing-body-block-start,:host(.spacing-body-block-start){padding-block-start:var(--spacing-body-block-start)}.spacing-body-block-end,:host(.spacing-body-block-end){padding-block-end:var(--spacing-body-block-end)}.spacing-body-inline,:host(.spacing-body-inline){padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-inline-start,:host(.spacing-body-inline-start){padding-inline-start:var(--spacing-body-inline-start)}.spacing-body-inline-end,:host(.spacing-body-inline-end){padding-inline-end:var(--spacing-body-inline-end)}.spacing-body,:host(.spacing-body){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end);padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-block,:host(.spacing-body-block){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end)}.spacing-body-block-start,:host(.spacing-body-block-start){padding-block-start:var(--spacing-body-block-start)}.spacing-body-block-end,:host(.spacing-body-block-end){padding-block-end:var(--spacing-body-block-end)}.spacing-body-inline,:host(.spacing-body-inline){padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-inline-start,:host(.spacing-body-inline-start){padding-inline-start:var(--spacing-body-inline-start)}.spacing-body-inline-end,:host(.spacing-body-inline-end){padding-inline-end:var(--spacing-body-inline-end)}.spacing-body,:host(.spacing-body){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end);padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-block,:host(.spacing-body-block){padding-block:var(--spacing-body-block-start) var(--spacing-body-block-end)}.spacing-body-block-start,:host(.spacing-body-block-start){padding-block-start:var(--spacing-body-block-start)}.spacing-body-block-end,:host(.spacing-body-block-end){padding-block-end:var(--spacing-body-block-end)}.spacing-body-inline,:host(.spacing-body-inline){padding-inline:var(--spacing-body-inline-start) var(--spacing-body-inline-end)}.spacing-body-inline-start,:host(.spacing-body-inline-start){padding-inline-start:var(--spacing-body-inline-start)}.spacing-body-inline-end,:host(.spacing-body-inline-end){padding-inline-end:var(--spacing-body-inline-end)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const bundle = `.heading-6,.heading-5,.heading-4,.heading-3,.heading-2,.heading-1{--heading-base__font-family: var(--mer-font-family--title);--heading__color: var( --mer-heading__gray--light );--heading-h1__font-size: var(--mer-font__size--xl);--heading-h1__font-weight: var(--mer-font__weight--bold);--heading-h1__line-height: var(--mer-line-height--tight);--heading-h2__font-size: var(--mer-font__size--lg);--heading-h2__font-weight: var(--mer-font__weight--bold);--heading-h2__line-height: var(--mer-line-height--tight);--heading-h3__font-size: var(--mer-font__size--sm);--heading-h3__font-weight: var(--mer-font__weight--bold);--heading-h3__line-height: var(--mer-line-height--regular);--heading-h4__font-size: var(--mer-font__size--xs);--heading-h4__font-weight: var(--mer-font__weight--bold);--heading-h4__line-height: var(--mer-line-height--spaced);--heading-h5__font-size: var(--mer-font__size--2xs);--heading-h5__font-weight: var(--mer-font__weight--bold);--heading-h5__line-height: var(--mer-line-height--spaced);--heading-h6__font-size: var(--mer-font__size--3xs);--heading-h6__font-weight: var(--mer-font__weight--semi-bold);--heading-h6__line-height: var(--mer-line-height--spaced);font-family:var(--mer-font-family--title);line-height:var(--mer-line-height--tight);color:var(--heading__color)}.heading-1{font-size:var(--mer-font__size--xl);font-weight:var(--mer-font__weight--bold);line-height:var(--heading-h1__line-height)}.heading-2{font-size:var(--mer-font__size--lg);font-weight:var(--mer-font__weight--bold);line-height:var(--heading-h2__line-height)}.heading-3{font-size:var(--mer-font__size--sm);font-weight:var(--mer-font__weight--bold);line-height:var(--heading-h3__line-height)}.heading-4{font-size:var(--mer-font__size--xs);font-weight:var(--mer-font__weight--bold);line-height:var(--heading-h4__line-height)}.heading-5{font-size:var(--mer-font__size--2xs);font-weight:var(--mer-font__weight--bold);line-height:var(--heading-h5__line-height)}.heading-6{font-size:var(--mer-font__size--3xs);font-weight:var(--mer-font__weight--semi-bold);line-height:var(--heading-h6__line-height)}.heading-gray--light{--heading__color: var(--mer-heading__gray--light)}.text-body-italic-xs,.text-body-italic-s,.text-body-italic-m,.text-body-italic-l,.text-body-highlighted-xs,.text-body-highlighted-s,.text-body-highlighted-m,.text-body-highlighted-l,.text-body-regular-xs,.text-body-regular-s,.text-body-regular-m,.text-body-regular-l{--text-body__font-size--l: var(--mer-font__size--sm);--text-body__font-size--m: var(--mer-font__size--xs);--text-body__font-size--s: var(--mer-font__size--3xs);--text-body__font-size--xs: var(--mer-font__size--4xs);--text-body__line-height: var(--mer-line-height--spaced);--text-body-regular__font-weight: var(--mer-font__weight--regular);--text-body-highlighted__font-weight: var(--mer-font__weight--semi-bold);--text-body-italic__font-weight: var(--mer-font__weight--regular)}.text-body-regular-l{font-size:var(--text-body__font-size--l);font-weight:var(--text-body-regular__font-weight);line-height:var(--text-body__line-height)}.text-body-regular-m{font-size:var(--text-body__font-size--m);font-weight:var(--text-body-regular__font-weight);line-height:var(--text-body__line-height)}.text-body-regular-s{font-size:var(--text-body__font-size--s);font-weight:var(--text-body-regular__font-weight);line-height:var(--text-body__line-height)}.text-body-regular-xs{font-size:var(--text-body__font-size--xs);font-weight:var(--text-body-regular__font-weight);line-height:var(--text-body__line-height)}.text-body-highlighted-l{font-size:var(--text-body__font-size--l);font-weight:var(--text-body-highlighted__font-weight);line-height:var(--text-body__line-height)}.text-body-highlighted-m{font-size:var(--text-body__font-size--m);font-weight:var(--text-body-highlighted__font-weight);line-height:var(--text-body__line-height)}.text-body-highlighted-s{font-size:var(--text-body__font-size--s);font-weight:var(--text-body-highlighted__font-weight);line-height:var(--text-body__line-height)}.text-body-highlighted-xs{font-size:var(--text-body__font-size--xs);font-weight:var(--text-body-highlighted__font-weight);line-height:var(--text-body__line-height)}.text-body-italic-l{font-size:var(--text-body__font-size--l);font-style:italic;font-weight:var(--text-body-italic__font-weight);line-height:var(--text-body__line-height)}.text-body-italic-m{font-size:var(--text-body__font-size--m);font-style:italic;font-weight:var(--text-body-italic__font-weight);line-height:var(--text-body__line-height)}.text-body-italic-s{font-size:var(--text-body__font-size--s);font-style:italic;font-weight:var(--text-body-italic__font-weight);line-height:var(--text-body__line-height)}.text-body-italic-xs{font-size:var(--text-body__font-size--xs);font-style:italic;font-weight:var(--text-body-italic__font-weight);line-height:var(--text-body__line-height)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}h1,h2,h3,h4,h5,h6,p{font:unset;margin:0;padding:0;color:unset}`;
|
package/dist/bundles.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ThemeModel } from "@genexus/chameleon-controls-library";
|
|
2
|
-
import type {
|
|
3
|
-
type BundleNames = MercuryBundleComponent | MercuryBundleComponentForm | MercuryBundleReset | MercuryBundleUtil | MercuryBundleUtilFormFull;
|
|
2
|
+
import type { MercuryBundleFull, MercuryBundleMapping, MercuryBundleOptimized } from "./types.ts";
|
|
4
3
|
/**
|
|
5
4
|
* Given the basePath, returns all bundles (except base and icons) in the
|
|
6
5
|
* format of type `ThemeModel`.
|
|
@@ -17,285 +16,285 @@ type BundleNames = MercuryBundleComponent | MercuryBundleComponentForm | Mercury
|
|
|
17
16
|
* </body>
|
|
18
17
|
* ```
|
|
19
18
|
*/
|
|
20
|
-
export declare const getThemeBundles: (basePath: string) => [{
|
|
21
|
-
readonly name:
|
|
22
|
-
readonly url:
|
|
19
|
+
export declare const getThemeBundles: (basePath: string, bundleNamePrefix?: string) => [{
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly url: string;
|
|
23
22
|
readonly attachStyleSheet?: undefined;
|
|
24
23
|
} | {
|
|
25
|
-
readonly name:
|
|
26
|
-
readonly url:
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly url: string;
|
|
27
26
|
readonly attachStyleSheet: boolean;
|
|
28
27
|
}, {
|
|
29
|
-
readonly name:
|
|
30
|
-
readonly url:
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly url: string;
|
|
31
30
|
readonly attachStyleSheet?: undefined;
|
|
32
31
|
} | {
|
|
33
|
-
readonly name:
|
|
34
|
-
readonly url:
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly url: string;
|
|
35
34
|
readonly attachStyleSheet: boolean;
|
|
36
35
|
}, {
|
|
37
|
-
readonly name:
|
|
38
|
-
readonly url:
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly url: string;
|
|
39
38
|
readonly attachStyleSheet?: undefined;
|
|
40
39
|
} | {
|
|
41
|
-
readonly name:
|
|
42
|
-
readonly url:
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly url: string;
|
|
43
42
|
readonly attachStyleSheet: boolean;
|
|
44
43
|
}, {
|
|
45
|
-
readonly name:
|
|
46
|
-
readonly url:
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly url: string;
|
|
47
46
|
readonly attachStyleSheet?: undefined;
|
|
48
47
|
} | {
|
|
49
|
-
readonly name:
|
|
50
|
-
readonly url:
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly url: string;
|
|
51
50
|
readonly attachStyleSheet: boolean;
|
|
52
51
|
}, {
|
|
53
|
-
readonly name:
|
|
54
|
-
readonly url:
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly url: string;
|
|
55
54
|
readonly attachStyleSheet?: undefined;
|
|
56
55
|
} | {
|
|
57
|
-
readonly name:
|
|
58
|
-
readonly url:
|
|
56
|
+
readonly name: string;
|
|
57
|
+
readonly url: string;
|
|
59
58
|
readonly attachStyleSheet: boolean;
|
|
60
59
|
}, {
|
|
61
|
-
readonly name:
|
|
62
|
-
readonly url:
|
|
60
|
+
readonly name: string;
|
|
61
|
+
readonly url: string;
|
|
63
62
|
readonly attachStyleSheet?: undefined;
|
|
64
63
|
} | {
|
|
65
|
-
readonly name:
|
|
66
|
-
readonly url:
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly url: string;
|
|
67
66
|
readonly attachStyleSheet: boolean;
|
|
68
67
|
}, {
|
|
69
|
-
readonly name:
|
|
70
|
-
readonly url:
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly url: string;
|
|
71
70
|
readonly attachStyleSheet?: undefined;
|
|
72
71
|
} | {
|
|
73
|
-
readonly name:
|
|
74
|
-
readonly url:
|
|
72
|
+
readonly name: string;
|
|
73
|
+
readonly url: string;
|
|
75
74
|
readonly attachStyleSheet: boolean;
|
|
76
75
|
}, {
|
|
77
|
-
readonly name:
|
|
78
|
-
readonly url:
|
|
76
|
+
readonly name: string;
|
|
77
|
+
readonly url: string;
|
|
79
78
|
readonly attachStyleSheet?: undefined;
|
|
80
79
|
} | {
|
|
81
|
-
readonly name:
|
|
82
|
-
readonly url:
|
|
80
|
+
readonly name: string;
|
|
81
|
+
readonly url: string;
|
|
83
82
|
readonly attachStyleSheet: boolean;
|
|
84
83
|
}, {
|
|
85
|
-
readonly name:
|
|
86
|
-
readonly url:
|
|
84
|
+
readonly name: string;
|
|
85
|
+
readonly url: string;
|
|
87
86
|
readonly attachStyleSheet?: undefined;
|
|
88
87
|
} | {
|
|
89
|
-
readonly name:
|
|
90
|
-
readonly url:
|
|
88
|
+
readonly name: string;
|
|
89
|
+
readonly url: string;
|
|
91
90
|
readonly attachStyleSheet: boolean;
|
|
92
91
|
}, {
|
|
93
|
-
readonly name:
|
|
94
|
-
readonly url:
|
|
92
|
+
readonly name: string;
|
|
93
|
+
readonly url: string;
|
|
95
94
|
readonly attachStyleSheet?: undefined;
|
|
96
95
|
} | {
|
|
97
|
-
readonly name:
|
|
98
|
-
readonly url:
|
|
96
|
+
readonly name: string;
|
|
97
|
+
readonly url: string;
|
|
99
98
|
readonly attachStyleSheet: boolean;
|
|
100
99
|
}, {
|
|
101
|
-
readonly name:
|
|
102
|
-
readonly url:
|
|
100
|
+
readonly name: string;
|
|
101
|
+
readonly url: string;
|
|
103
102
|
readonly attachStyleSheet?: undefined;
|
|
104
103
|
} | {
|
|
105
|
-
readonly name:
|
|
106
|
-
readonly url:
|
|
104
|
+
readonly name: string;
|
|
105
|
+
readonly url: string;
|
|
107
106
|
readonly attachStyleSheet: boolean;
|
|
108
107
|
}, {
|
|
109
|
-
readonly name:
|
|
110
|
-
readonly url:
|
|
108
|
+
readonly name: string;
|
|
109
|
+
readonly url: string;
|
|
111
110
|
readonly attachStyleSheet?: undefined;
|
|
112
111
|
} | {
|
|
113
|
-
readonly name:
|
|
114
|
-
readonly url:
|
|
112
|
+
readonly name: string;
|
|
113
|
+
readonly url: string;
|
|
115
114
|
readonly attachStyleSheet: boolean;
|
|
116
115
|
}, {
|
|
117
|
-
readonly name:
|
|
118
|
-
readonly url:
|
|
116
|
+
readonly name: string;
|
|
117
|
+
readonly url: string;
|
|
119
118
|
readonly attachStyleSheet?: undefined;
|
|
120
119
|
} | {
|
|
121
|
-
readonly name:
|
|
122
|
-
readonly url:
|
|
120
|
+
readonly name: string;
|
|
121
|
+
readonly url: string;
|
|
123
122
|
readonly attachStyleSheet: boolean;
|
|
124
123
|
}, {
|
|
125
|
-
readonly name:
|
|
126
|
-
readonly url:
|
|
124
|
+
readonly name: string;
|
|
125
|
+
readonly url: string;
|
|
127
126
|
readonly attachStyleSheet?: undefined;
|
|
128
127
|
} | {
|
|
129
|
-
readonly name:
|
|
130
|
-
readonly url:
|
|
128
|
+
readonly name: string;
|
|
129
|
+
readonly url: string;
|
|
131
130
|
readonly attachStyleSheet: boolean;
|
|
132
131
|
}, {
|
|
133
|
-
readonly name:
|
|
134
|
-
readonly url:
|
|
132
|
+
readonly name: string;
|
|
133
|
+
readonly url: string;
|
|
135
134
|
readonly attachStyleSheet?: undefined;
|
|
136
135
|
} | {
|
|
137
|
-
readonly name:
|
|
138
|
-
readonly url:
|
|
136
|
+
readonly name: string;
|
|
137
|
+
readonly url: string;
|
|
139
138
|
readonly attachStyleSheet: boolean;
|
|
140
139
|
}, {
|
|
141
|
-
readonly name:
|
|
142
|
-
readonly url:
|
|
140
|
+
readonly name: string;
|
|
141
|
+
readonly url: string;
|
|
143
142
|
readonly attachStyleSheet?: undefined;
|
|
144
143
|
} | {
|
|
145
|
-
readonly name:
|
|
146
|
-
readonly url:
|
|
144
|
+
readonly name: string;
|
|
145
|
+
readonly url: string;
|
|
147
146
|
readonly attachStyleSheet: boolean;
|
|
148
147
|
}, {
|
|
149
|
-
readonly name:
|
|
150
|
-
readonly url:
|
|
148
|
+
readonly name: string;
|
|
149
|
+
readonly url: string;
|
|
151
150
|
readonly attachStyleSheet?: undefined;
|
|
152
151
|
} | {
|
|
153
|
-
readonly name:
|
|
154
|
-
readonly url:
|
|
152
|
+
readonly name: string;
|
|
153
|
+
readonly url: string;
|
|
155
154
|
readonly attachStyleSheet: boolean;
|
|
156
155
|
}, {
|
|
157
|
-
readonly name:
|
|
158
|
-
readonly url:
|
|
156
|
+
readonly name: string;
|
|
157
|
+
readonly url: string;
|
|
159
158
|
readonly attachStyleSheet?: undefined;
|
|
160
159
|
} | {
|
|
161
|
-
readonly name:
|
|
162
|
-
readonly url:
|
|
160
|
+
readonly name: string;
|
|
161
|
+
readonly url: string;
|
|
163
162
|
readonly attachStyleSheet: boolean;
|
|
164
163
|
}, {
|
|
165
|
-
readonly name:
|
|
166
|
-
readonly url:
|
|
164
|
+
readonly name: string;
|
|
165
|
+
readonly url: string;
|
|
167
166
|
readonly attachStyleSheet?: undefined;
|
|
168
167
|
} | {
|
|
169
|
-
readonly name:
|
|
170
|
-
readonly url:
|
|
168
|
+
readonly name: string;
|
|
169
|
+
readonly url: string;
|
|
171
170
|
readonly attachStyleSheet: boolean;
|
|
172
171
|
}, {
|
|
173
|
-
readonly name:
|
|
174
|
-
readonly url:
|
|
172
|
+
readonly name: string;
|
|
173
|
+
readonly url: string;
|
|
175
174
|
readonly attachStyleSheet?: undefined;
|
|
176
175
|
} | {
|
|
177
|
-
readonly name:
|
|
178
|
-
readonly url:
|
|
176
|
+
readonly name: string;
|
|
177
|
+
readonly url: string;
|
|
179
178
|
readonly attachStyleSheet: boolean;
|
|
180
179
|
}, {
|
|
181
|
-
readonly name:
|
|
182
|
-
readonly url:
|
|
180
|
+
readonly name: string;
|
|
181
|
+
readonly url: string;
|
|
183
182
|
readonly attachStyleSheet?: undefined;
|
|
184
183
|
} | {
|
|
185
|
-
readonly name:
|
|
186
|
-
readonly url:
|
|
184
|
+
readonly name: string;
|
|
185
|
+
readonly url: string;
|
|
187
186
|
readonly attachStyleSheet: boolean;
|
|
188
187
|
}, {
|
|
189
|
-
readonly name:
|
|
190
|
-
readonly url:
|
|
188
|
+
readonly name: string;
|
|
189
|
+
readonly url: string;
|
|
191
190
|
readonly attachStyleSheet?: undefined;
|
|
192
191
|
} | {
|
|
193
|
-
readonly name:
|
|
194
|
-
readonly url:
|
|
192
|
+
readonly name: string;
|
|
193
|
+
readonly url: string;
|
|
195
194
|
readonly attachStyleSheet: boolean;
|
|
196
195
|
}, {
|
|
197
|
-
readonly name:
|
|
198
|
-
readonly url:
|
|
196
|
+
readonly name: string;
|
|
197
|
+
readonly url: string;
|
|
199
198
|
readonly attachStyleSheet?: undefined;
|
|
200
199
|
} | {
|
|
201
|
-
readonly name:
|
|
202
|
-
readonly url:
|
|
200
|
+
readonly name: string;
|
|
201
|
+
readonly url: string;
|
|
203
202
|
readonly attachStyleSheet: boolean;
|
|
204
203
|
}, {
|
|
205
|
-
readonly name:
|
|
206
|
-
readonly url:
|
|
204
|
+
readonly name: string;
|
|
205
|
+
readonly url: string;
|
|
207
206
|
readonly attachStyleSheet?: undefined;
|
|
208
207
|
} | {
|
|
209
|
-
readonly name:
|
|
210
|
-
readonly url:
|
|
208
|
+
readonly name: string;
|
|
209
|
+
readonly url: string;
|
|
211
210
|
readonly attachStyleSheet: boolean;
|
|
212
211
|
}, {
|
|
213
|
-
readonly name:
|
|
214
|
-
readonly url:
|
|
212
|
+
readonly name: string;
|
|
213
|
+
readonly url: string;
|
|
215
214
|
readonly attachStyleSheet?: undefined;
|
|
216
215
|
} | {
|
|
217
|
-
readonly name:
|
|
218
|
-
readonly url:
|
|
216
|
+
readonly name: string;
|
|
217
|
+
readonly url: string;
|
|
219
218
|
readonly attachStyleSheet: boolean;
|
|
220
219
|
}, {
|
|
221
|
-
readonly name:
|
|
222
|
-
readonly url:
|
|
220
|
+
readonly name: string;
|
|
221
|
+
readonly url: string;
|
|
223
222
|
readonly attachStyleSheet?: undefined;
|
|
224
223
|
} | {
|
|
225
|
-
readonly name:
|
|
226
|
-
readonly url:
|
|
224
|
+
readonly name: string;
|
|
225
|
+
readonly url: string;
|
|
227
226
|
readonly attachStyleSheet: boolean;
|
|
228
227
|
}, {
|
|
229
|
-
readonly name:
|
|
230
|
-
readonly url:
|
|
228
|
+
readonly name: string;
|
|
229
|
+
readonly url: string;
|
|
231
230
|
readonly attachStyleSheet?: undefined;
|
|
232
231
|
} | {
|
|
233
|
-
readonly name:
|
|
234
|
-
readonly url:
|
|
232
|
+
readonly name: string;
|
|
233
|
+
readonly url: string;
|
|
235
234
|
readonly attachStyleSheet: boolean;
|
|
236
235
|
}, {
|
|
237
|
-
readonly name:
|
|
238
|
-
readonly url:
|
|
236
|
+
readonly name: string;
|
|
237
|
+
readonly url: string;
|
|
239
238
|
readonly attachStyleSheet?: undefined;
|
|
240
239
|
} | {
|
|
241
|
-
readonly name:
|
|
242
|
-
readonly url:
|
|
240
|
+
readonly name: string;
|
|
241
|
+
readonly url: string;
|
|
243
242
|
readonly attachStyleSheet: boolean;
|
|
244
243
|
}, {
|
|
245
|
-
readonly name:
|
|
246
|
-
readonly url:
|
|
244
|
+
readonly name: string;
|
|
245
|
+
readonly url: string;
|
|
247
246
|
readonly attachStyleSheet?: undefined;
|
|
248
247
|
} | {
|
|
249
|
-
readonly name:
|
|
250
|
-
readonly url:
|
|
248
|
+
readonly name: string;
|
|
249
|
+
readonly url: string;
|
|
251
250
|
readonly attachStyleSheet: boolean;
|
|
252
251
|
}, {
|
|
253
|
-
readonly name:
|
|
254
|
-
readonly url:
|
|
252
|
+
readonly name: string;
|
|
253
|
+
readonly url: string;
|
|
255
254
|
readonly attachStyleSheet?: undefined;
|
|
256
255
|
} | {
|
|
257
|
-
readonly name:
|
|
258
|
-
readonly url:
|
|
256
|
+
readonly name: string;
|
|
257
|
+
readonly url: string;
|
|
259
258
|
readonly attachStyleSheet: boolean;
|
|
260
259
|
}, {
|
|
261
|
-
readonly name:
|
|
262
|
-
readonly url:
|
|
260
|
+
readonly name: string;
|
|
261
|
+
readonly url: string;
|
|
263
262
|
readonly attachStyleSheet?: undefined;
|
|
264
263
|
} | {
|
|
265
|
-
readonly name:
|
|
266
|
-
readonly url:
|
|
264
|
+
readonly name: string;
|
|
265
|
+
readonly url: string;
|
|
267
266
|
readonly attachStyleSheet: boolean;
|
|
268
267
|
}, {
|
|
269
|
-
readonly name:
|
|
270
|
-
readonly url:
|
|
268
|
+
readonly name: string;
|
|
269
|
+
readonly url: string;
|
|
271
270
|
readonly attachStyleSheet?: undefined;
|
|
272
271
|
} | {
|
|
273
|
-
readonly name:
|
|
274
|
-
readonly url:
|
|
272
|
+
readonly name: string;
|
|
273
|
+
readonly url: string;
|
|
275
274
|
readonly attachStyleSheet: boolean;
|
|
276
275
|
}, {
|
|
277
|
-
readonly name:
|
|
278
|
-
readonly url:
|
|
276
|
+
readonly name: string;
|
|
277
|
+
readonly url: string;
|
|
279
278
|
readonly attachStyleSheet?: undefined;
|
|
280
279
|
} | {
|
|
281
|
-
readonly name:
|
|
282
|
-
readonly url:
|
|
280
|
+
readonly name: string;
|
|
281
|
+
readonly url: string;
|
|
283
282
|
readonly attachStyleSheet: boolean;
|
|
284
283
|
}, {
|
|
285
|
-
readonly name:
|
|
286
|
-
readonly url:
|
|
284
|
+
readonly name: string;
|
|
285
|
+
readonly url: string;
|
|
287
286
|
readonly attachStyleSheet?: undefined;
|
|
288
287
|
} | {
|
|
289
|
-
readonly name:
|
|
290
|
-
readonly url:
|
|
288
|
+
readonly name: string;
|
|
289
|
+
readonly url: string;
|
|
291
290
|
readonly attachStyleSheet: boolean;
|
|
292
291
|
}, {
|
|
293
|
-
readonly name:
|
|
294
|
-
readonly url:
|
|
292
|
+
readonly name: string;
|
|
293
|
+
readonly url: string;
|
|
295
294
|
readonly attachStyleSheet?: undefined;
|
|
296
295
|
} | {
|
|
297
|
-
readonly name:
|
|
298
|
-
readonly url:
|
|
296
|
+
readonly name: string;
|
|
297
|
+
readonly url: string;
|
|
299
298
|
readonly attachStyleSheet: boolean;
|
|
300
299
|
}];
|
|
301
300
|
/**
|
|
@@ -316,7 +315,8 @@ export declare const getThemeBundles: (basePath: string) => [{
|
|
|
316
315
|
* "utils/form",
|
|
317
316
|
* "utils/layout",
|
|
318
317
|
* ],
|
|
319
|
-
* "./assets/css/"
|
|
318
|
+
* "./assets/css/", (optional)
|
|
319
|
+
* "mercury" (optional)
|
|
320
320
|
* );
|
|
321
321
|
*
|
|
322
322
|
* HTML/render/template:
|
|
@@ -326,5 +326,12 @@ export declare const getThemeBundles: (basePath: string) => [{
|
|
|
326
326
|
* </Host>
|
|
327
327
|
* ```
|
|
328
328
|
*/
|
|
329
|
-
export declare const getBundles: (bundles: MercuryBundleOptimized[] | MercuryBundleFull[], basePath?: string) => ThemeModel;
|
|
330
|
-
|
|
329
|
+
export declare const getBundles: (bundles: MercuryBundleOptimized[] | MercuryBundleFull[], basePath?: string, bundleNamePrefix?: string) => ThemeModel;
|
|
330
|
+
/**
|
|
331
|
+
* Establish the mapping between the bundle name and its generated hash.
|
|
332
|
+
*
|
|
333
|
+
* If the bundles are created with the CLI that provides Mercury
|
|
334
|
+
* (`mercury` command), this mapping must be set to download the right bundles
|
|
335
|
+
* with the ch-theme component.
|
|
336
|
+
*/
|
|
337
|
+
export declare const setBundleMapping: (mappings: MercuryBundleMapping) => void;
|
package/dist/bundles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=(o,
|
|
1
|
+
"use strict";let s;const n=(c,o,p,t=void 0)=>{const g=p?p+o:o,m=s?s[o]:o,w=`${c}${m}.css`;return t===void 0?{name:g,url:w}:{name:g,url:w,attachStyleSheet:t}};export const getThemeBundles=(c,o)=>[n(c,"components/accordion",o),n(c,"components/button",o),n(c,"components/chat",o),n(c,"components/checkbox",o),n(c,"components/code",o),n(c,"components/combo-box",o),n(c,"components/flexible-layout",o),n(c,"components/dialog",o),n(c,"components/dropdown",o),n(c,"components/icon",o),n(c,"components/edit",o),n(c,"components/layout-splitter",o),n(c,"components/list-box",o),n(c,"components/markdown-viewer",o,!1),n(c,"components/navigation-list",o),n(c,"components/pills",o),n(c,"components/radio-group",o),n(c,"components/segmented-control",o),n(c,"components/sidebar",o),n(c,"components/slider",o),n(c,"components/switch",o),n(c,"components/tab",o),n(c,"components/tabular-grid",o),n(c,"components/ticket-list",o),n(c,"components/tooltip",o),n(c,"components/tree-view",o),n(c,"components/widget",o),n(c,"resets/box-sizing",o),n(c,"utils/form",o),n(c,"utils/elevation",o),n(c,"utils/form--full",o),n(c,"utils/layout",o),n(c,"utils/spacing",o),n(c,"utils/typography",o),n(c,"chameleon/scrollbar",o)];const v=(c,o)=>o?c.map(p=>o+p):c;export const getBundles=(c,o,p)=>o?c.map(t=>n(o,t,p)):v(c,p),setBundleMapping=c=>{s=c};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { ensureDirectoryExistsAndItsClear, walkSync, copyDirectories } from "./internal/file-management.js";
|
|
3
|
+
import { BASE_BUNDLES_OUT_DIR, SCSS_BUNDLES_INPUT_DIR, SCSS_BUNDLES_OUT_DIR } from "./internal/constants.js";
|
|
4
|
+
import { createBundleMappingsFile, transpileCssBundleWithPlaceholder } from "./internal/transpile-bundle-and-create-mappings.js";
|
|
5
|
+
import { measureTime } from "./internal/utils.js";
|
|
6
|
+
measureTime(() => {
|
|
7
|
+
// Improve process visualization
|
|
8
|
+
console.log("");
|
|
9
|
+
// Clear bundle directories
|
|
10
|
+
ensureDirectoryExistsAndItsClear(BASE_BUNDLES_OUT_DIR);
|
|
11
|
+
// Copy the src/bundles/scss content to the dist/bundles/scss and create the
|
|
12
|
+
// bundles
|
|
13
|
+
copyDirectories(SCSS_BUNDLES_INPUT_DIR, SCSS_BUNDLES_OUT_DIR);
|
|
14
|
+
// Transpile scss bundles into .css and .js files
|
|
15
|
+
for (const fileMetadata of walkSync(SCSS_BUNDLES_OUT_DIR)) {
|
|
16
|
+
transpileCssBundleWithPlaceholder(fileMetadata);
|
|
17
|
+
}
|
|
18
|
+
// Import all .js files into a single file (defined in `BUNDLE_MAPPING_FILE` var)
|
|
19
|
+
createBundleMappingsFile();
|
|
20
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const KB = 1000;
|
|
2
|
+
export declare const SCSS_BUNDLES_INPUT_DIR: string;
|
|
3
|
+
export declare const BASE_BUNDLES_OUT_DIR: string;
|
|
4
|
+
export declare const SCSS_BUNDLES_OUT_DIR: string;
|
|
5
|
+
export declare const CSS_BUNDLES_OUT_DIR: string;
|
|
6
|
+
export declare const JS_BUNDLES_OUT_DIR: string;
|
|
7
|
+
export declare const BASE_BUNDLE = "base/base";
|
|
8
|
+
export declare const BASE_BUNDLE_WITH_BACK_SLASH = "\\base\\base";
|
|
9
|
+
export declare const BASE_GLOBANT_BUNDLE = "base/base-globant";
|
|
10
|
+
export declare const BUNDLE_MAPPING_FILE = "bundle-mappings.js";
|
|
11
|
+
export declare const BUNDLE_MAPPING_TO_HASH_FILE = "bundle-to-hash-mappings.ts";
|
|
12
|
+
export declare const BASE_SCSS_FILE = "base.scss";
|
|
13
|
+
export declare const BASE_GLOBANT_FILE = "base-globant";
|
|
14
|
+
export declare const BASE_GLOBANT_CSS_FILE = "base-globant.css";
|
|
15
|
+
export declare const BASE_GLOBANT_JS_FILE = "base-globant.js";
|
|
16
|
+
export declare const BASE_GLOBANT_SCSS_FILE = "base-globant.scss";
|
|
17
|
+
export declare const ICONS_PATH_PLACEHOLDER = "{{ICONS_PATH}}";
|
|
18
|
+
export declare const FONT_FACE_PATH_PLACEHOLDER = "{{FONT_FACE_PATH}}";
|
|
19
|
+
export declare const DEFAULT_FONT_FACE_PATH = "./assets/fonts/";
|
|
20
|
+
export declare const DEFAULT_ICONS_PATH = "./assets/icons/";
|
|
21
|
+
export declare const DEFAULT_OUT_DIR_PATH = "./.mercury";
|
|
22
|
+
export declare const SEPARATE_BY_COMMA_REGEX: RegExp;
|
|
23
|
+
export declare const SPECIAL_CHARS_IN_BUNDLE_NAME_REGEX: RegExp;
|
|
24
|
+
export declare const BUNDLE_MAPPING_ENTRIES: {
|
|
25
|
+
readonly BUNDLE_NAME: "bundleName";
|
|
26
|
+
readonly FILE_DIR: "fileDir";
|
|
27
|
+
readonly TRANSPILED_BUNDLE: "transpiledBundle";
|
|
28
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
export const KB = 1000;
|
|
3
|
+
export const SCSS_BUNDLES_INPUT_DIR = path.join("src", "bundles", "scss");
|
|
4
|
+
export const BASE_BUNDLES_OUT_DIR = path.join("dist", "bundles");
|
|
5
|
+
export const SCSS_BUNDLES_OUT_DIR = path.join(BASE_BUNDLES_OUT_DIR, "scss");
|
|
6
|
+
export const CSS_BUNDLES_OUT_DIR = path.join(BASE_BUNDLES_OUT_DIR, "css");
|
|
7
|
+
export const JS_BUNDLES_OUT_DIR = path.join(BASE_BUNDLES_OUT_DIR, "js");
|
|
8
|
+
export const BASE_BUNDLE = "base/base";
|
|
9
|
+
export const BASE_BUNDLE_WITH_BACK_SLASH = "\\base\\base";
|
|
10
|
+
export const BASE_GLOBANT_BUNDLE = "base/base-globant";
|
|
11
|
+
// Files
|
|
12
|
+
export const BUNDLE_MAPPING_FILE = "bundle-mappings.js";
|
|
13
|
+
export const BUNDLE_MAPPING_TO_HASH_FILE = "bundle-to-hash-mappings.ts";
|
|
14
|
+
export const BASE_SCSS_FILE = "base.scss";
|
|
15
|
+
export const BASE_GLOBANT_FILE = "base-globant";
|
|
16
|
+
export const BASE_GLOBANT_CSS_FILE = "base-globant.css";
|
|
17
|
+
export const BASE_GLOBANT_JS_FILE = "base-globant.js";
|
|
18
|
+
export const BASE_GLOBANT_SCSS_FILE = "base-globant.scss";
|
|
19
|
+
// Placeholders
|
|
20
|
+
export const ICONS_PATH_PLACEHOLDER = "{{ICONS_PATH}}";
|
|
21
|
+
export const FONT_FACE_PATH_PLACEHOLDER = "{{FONT_FACE_PATH}}";
|
|
22
|
+
// Defaults
|
|
23
|
+
export const DEFAULT_FONT_FACE_PATH = "./assets/fonts/";
|
|
24
|
+
export const DEFAULT_ICONS_PATH = "./assets/icons/";
|
|
25
|
+
export const DEFAULT_OUT_DIR_PATH = "./.mercury";
|
|
26
|
+
export const SEPARATE_BY_COMMA_REGEX = /\s*,\s*/g;
|
|
27
|
+
export const SPECIAL_CHARS_IN_BUNDLE_NAME_REGEX = /[\/-]/g;
|
|
28
|
+
// Bundle mapping entries
|
|
29
|
+
export const BUNDLE_MAPPING_ENTRIES = {
|
|
30
|
+
BUNDLE_NAME: "bundleName",
|
|
31
|
+
FILE_DIR: "fileDir",
|
|
32
|
+
TRANSPILED_BUNDLE: "transpiledBundle"
|
|
33
|
+
};
|