amateras 0.7.3 → 0.10.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 +76 -85
- package/package.json +27 -21
- package/tsconfig.json +4 -3
- package/packages/core/package.json +0 -32
- package/packages/core/src/env.browser.ts +0 -21
- package/packages/core/src/env.node.ts +0 -21
- package/packages/core/src/global.ts +0 -18
- package/packages/core/src/index.ts +0 -96
- package/packages/core/src/lib/assignNodeProperties.ts +0 -11
- package/packages/core/src/lib/assignProperties.ts +0 -57
- package/packages/core/src/lib/chain.ts +0 -17
- package/packages/core/src/lib/dom.ts +0 -20
- package/packages/core/src/main.ts +0 -4
- package/packages/core/src/node/$Element.ts +0 -366
- package/packages/core/src/node/$EventTarget.ts +0 -48
- package/packages/core/src/node/$HTMLElement.ts +0 -99
- package/packages/core/src/node/$Node.ts +0 -201
- package/packages/core/src/node/$Virtual.ts +0 -65
- package/packages/css/README.md +0 -128
- package/packages/css/package.json +0 -17
- package/packages/css/src/ext/colors/amber.ts +0 -25
- package/packages/css/src/ext/colors/blackwhite.ts +0 -13
- package/packages/css/src/ext/colors/blue.ts +0 -25
- package/packages/css/src/ext/colors/cyan.ts +0 -25
- package/packages/css/src/ext/colors/emerald.ts +0 -25
- package/packages/css/src/ext/colors/fuchsia.ts +0 -25
- package/packages/css/src/ext/colors/gray.ts +0 -25
- package/packages/css/src/ext/colors/green.ts +0 -25
- package/packages/css/src/ext/colors/indigo.ts +0 -25
- package/packages/css/src/ext/colors/lime.ts +0 -25
- package/packages/css/src/ext/colors/neutral.ts +0 -25
- package/packages/css/src/ext/colors/orange.ts +0 -25
- package/packages/css/src/ext/colors/pink.ts +0 -25
- package/packages/css/src/ext/colors/purple.ts +0 -25
- package/packages/css/src/ext/colors/red.ts +0 -25
- package/packages/css/src/ext/colors/rose.ts +0 -25
- package/packages/css/src/ext/colors/sky.ts +0 -25
- package/packages/css/src/ext/colors/slate.ts +0 -25
- package/packages/css/src/ext/colors/stone.ts +0 -25
- package/packages/css/src/ext/colors/teal.ts +0 -25
- package/packages/css/src/ext/colors/violet.ts +0 -25
- package/packages/css/src/ext/colors/yellow.ts +0 -25
- package/packages/css/src/ext/colors/zinc.ts +0 -25
- package/packages/css/src/ext/colors.ts +0 -23
- package/packages/css/src/ext/container.ts +0 -32
- package/packages/css/src/ext/keyframes.ts +0 -54
- package/packages/css/src/ext/media.ts +0 -32
- package/packages/css/src/ext/property.ts +0 -48
- package/packages/css/src/ext/variable.ts +0 -51
- package/packages/css/src/index.ts +0 -436
- package/packages/css/src/lib/colorAssign.ts +0 -6
- package/packages/css/src/lib/utils.ts +0 -11
- package/packages/css/src/structure/$CSSContainerRule.ts +0 -13
- package/packages/css/src/structure/$CSSDeclaration.ts +0 -16
- package/packages/css/src/structure/$CSSKeyframesRule.ts +0 -13
- package/packages/css/src/structure/$CSSMediaRule.ts +0 -10
- package/packages/css/src/structure/$CSSProperty.ts +0 -19
- package/packages/css/src/structure/$CSSRule.ts +0 -13
- package/packages/css/src/structure/$CSSStyleRule.ts +0 -14
- package/packages/css/src/structure/$CSSVariable.ts +0 -30
- package/packages/dom/package.json +0 -20
- package/packages/dom/src/lib/HTMLElementMap.ts +0 -213
- package/packages/dom/src/lib/assignAttributes.ts +0 -16
- package/packages/dom/src/structure/CSS.ts +0 -7
- package/packages/dom/src/structure/CSSStyleSheet.ts +0 -10
- package/packages/dom/src/structure/DOMTokenList.ts +0 -19
- package/packages/dom/src/structure/Document.ts +0 -36
- package/packages/dom/src/structure/Element.ts +0 -106
- package/packages/dom/src/structure/HTMLElement.ts +0 -34
- package/packages/dom/src/structure/History.ts +0 -11
- package/packages/dom/src/structure/Location.ts +0 -9
- package/packages/dom/src/structure/Node.ts +0 -51
- package/packages/dom/src/structure/NodeList.ts +0 -10
- package/packages/dom/src/structure/Storage.ts +0 -8
- package/packages/dom/src/structure/Text.ts +0 -20
- package/packages/dom/src/structure/Window.ts +0 -14
- package/packages/dom/src/structure/html/HTMLAbbrElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLAddressElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLAnchorElement.ts +0 -25
- package/packages/dom/src/structure/html/HTMLAreaElement.ts +0 -26
- package/packages/dom/src/structure/html/HTMLArticleElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLAsideElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLAudioElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLBDIElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLBDOElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLBElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLBRElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLBaseElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLBodyElement.ts +0 -22
- package/packages/dom/src/structure/html/HTMLButtonElement.ts +0 -26
- package/packages/dom/src/structure/html/HTMLCanvasElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLCiteElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLCodeElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLDDElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLDFNElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLDListElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLDTElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLDataElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLDataListElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLDetailsElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLDialogElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLDivElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLEMElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLEmbedElement.ts +0 -20
- package/packages/dom/src/structure/html/HTMLFieldSetElement.ts +0 -19
- package/packages/dom/src/structure/html/HTMLFigCaptionElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLFigureElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLFooterElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLFormElement.ts +0 -24
- package/packages/dom/src/structure/html/HTMLHGroupElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLHRElement.ts +0 -21
- package/packages/dom/src/structure/html/HTMLHeadElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLHeaderElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLHeadingElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLHtmlElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLIElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLIFrameElement.ts +0 -31
- package/packages/dom/src/structure/html/HTMLImageElement.ts +0 -38
- package/packages/dom/src/structure/html/HTMLInputElement.ts +0 -55
- package/packages/dom/src/structure/html/HTMLKBDElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLLIElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLLabelElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLLegendElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLLinkElement.ts +0 -31
- package/packages/dom/src/structure/html/HTMLMainElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLMapElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLMarkElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLMediaElement.ts +0 -48
- package/packages/dom/src/structure/html/HTMLMenuElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLMetaElement.ts +0 -22
- package/packages/dom/src/structure/html/HTMLMeterElement.ts +0 -23
- package/packages/dom/src/structure/html/HTMLModElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLNavElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLNoscriptElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLOListElement.ts +0 -20
- package/packages/dom/src/structure/html/HTMLObjectElement.ts +0 -34
- package/packages/dom/src/structure/html/HTMLOptGroupElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLOptionElement.ts +0 -20
- package/packages/dom/src/structure/html/HTMLOutputElement.ts +0 -20
- package/packages/dom/src/structure/html/HTMLParagraphElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLPictureElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLPreElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLProgressElement.ts +0 -19
- package/packages/dom/src/structure/html/HTMLQuoteElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLRPElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLRTElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLRubyElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLSElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLSampElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLScriptElement.ts +0 -27
- package/packages/dom/src/structure/html/HTMLSectionElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLSelectElement.ts +0 -27
- package/packages/dom/src/structure/html/HTMLSlotElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLSmallElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLSourceElement.ts +0 -21
- package/packages/dom/src/structure/html/HTMLSpanElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLStrongElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLStyleElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLSubElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLSummaryElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLSupElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLTableCaptionElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLTableCellElement.ts +0 -31
- package/packages/dom/src/structure/html/HTMLTableColElement.ts +0 -23
- package/packages/dom/src/structure/html/HTMLTableElement.ts +0 -26
- package/packages/dom/src/structure/html/HTMLTableRowElement.ts +0 -23
- package/packages/dom/src/structure/html/HTMLTableSectionElement.ts +0 -20
- package/packages/dom/src/structure/html/HTMLTemplateElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLTextAreaElement.ts +0 -33
- package/packages/dom/src/structure/html/HTMLTimeElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLTitleElement.ts +0 -17
- package/packages/dom/src/structure/html/HTMLTrackElement.ts +0 -21
- package/packages/dom/src/structure/html/HTMLUElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLUListElement.ts +0 -18
- package/packages/dom/src/structure/html/HTMLVarElement.ts +0 -16
- package/packages/dom/src/structure/html/HTMLVideoElement.ts +0 -22
- package/packages/dom/src/structure/html/HTMLWBRElement.ts +0 -16
- package/packages/html/package.json +0 -18
- package/packages/html/src/index.ts +0 -13
- package/packages/html/src/node/$Anchor.ts +0 -49
- package/packages/html/src/node/$Canvas.ts +0 -38
- package/packages/html/src/node/$Dialog.ts +0 -16
- package/packages/html/src/node/$Form.ts +0 -16
- package/packages/html/src/node/$Image.ts +0 -72
- package/packages/html/src/node/$Input.ts +0 -193
- package/packages/html/src/node/$Label.ts +0 -25
- package/packages/html/src/node/$Media.ts +0 -16
- package/packages/html/src/node/$OptGroup.ts +0 -23
- package/packages/html/src/node/$Option.ts +0 -40
- package/packages/html/src/node/$Select.ts +0 -76
- package/packages/html/src/node/$TextArea.ts +0 -16
- package/packages/i18n/README.md +0 -73
- package/packages/i18n/package.json +0 -19
- package/packages/i18n/src/index.ts +0 -140
- package/packages/i18n/src/structure/I18n.ts +0 -44
- package/packages/i18n/src/structure/I18nDictionary.ts +0 -31
- package/packages/i18n/src/structure/I18nTranslation.ts +0 -41
- package/packages/idb/README.md +0 -127
- package/packages/idb/package.json +0 -19
- package/packages/idb/src/core.ts +0 -6
- package/packages/idb/src/index.ts +0 -17
- package/packages/idb/src/lib/$IDBRequest.ts +0 -8
- package/packages/idb/src/structure/$IDB.ts +0 -63
- package/packages/idb/src/structure/$IDBCursor.ts +0 -34
- package/packages/idb/src/structure/$IDBIndex.ts +0 -48
- package/packages/idb/src/structure/$IDBStore.ts +0 -103
- package/packages/idb/src/structure/$IDBStoreBase.ts +0 -30
- package/packages/idb/src/structure/$IDBTransaction.ts +0 -38
- package/packages/idb/src/structure/builder/$IDBBuilder.ts +0 -229
- package/packages/idb/src/structure/builder/$IDBStoreBuilder.ts +0 -100
- package/packages/markdown/README.md +0 -53
- package/packages/markdown/package.json +0 -19
- package/packages/markdown/src/index.ts +0 -3
- package/packages/markdown/src/lib/type.ts +0 -26
- package/packages/markdown/src/lib/util.ts +0 -21
- package/packages/markdown/src/structure/Markdown.ts +0 -54
- package/packages/markdown/src/structure/MarkdownLexer.ts +0 -111
- package/packages/markdown/src/structure/MarkdownParser.ts +0 -34
- package/packages/markdown/src/syntax/alert.ts +0 -46
- package/packages/markdown/src/syntax/blockquote.ts +0 -35
- package/packages/markdown/src/syntax/bold.ts +0 -11
- package/packages/markdown/src/syntax/code.ts +0 -11
- package/packages/markdown/src/syntax/codeblock.ts +0 -44
- package/packages/markdown/src/syntax/heading.ts +0 -14
- package/packages/markdown/src/syntax/horizontalRule.ts +0 -11
- package/packages/markdown/src/syntax/image.ts +0 -23
- package/packages/markdown/src/syntax/italic.ts +0 -11
- package/packages/markdown/src/syntax/link.ts +0 -46
- package/packages/markdown/src/syntax/list.ts +0 -121
- package/packages/markdown/src/syntax/table.ts +0 -67
- package/packages/markdown/src/syntax/text.ts +0 -19
- package/packages/router/README.md +0 -175
- package/packages/router/package.json +0 -19
- package/packages/router/src/index.ts +0 -68
- package/packages/router/src/node/Page.ts +0 -38
- package/packages/router/src/node/Router.ts +0 -212
- package/packages/router/src/node/RouterAnchor.ts +0 -24
- package/packages/router/src/structure/PageBuilder.ts +0 -24
- package/packages/router/src/structure/Route.ts +0 -105
- package/packages/signal/README.md +0 -93
- package/packages/signal/package.json +0 -18
- package/packages/signal/src/index.ts +0 -221
- package/packages/signal/src/structure/Signal.ts +0 -38
- package/packages/ui/lib/VirtualScroll.ts +0 -25
- package/packages/ui/node/Accordian.ts +0 -97
- package/packages/ui/node/Carousel.ts +0 -20
- package/packages/ui/node/Form.ts +0 -54
- package/packages/ui/node/Grid.ts +0 -0
- package/packages/ui/node/Modal.ts +0 -45
- package/packages/ui/node/Table.ts +0 -43
- package/packages/ui/node/Tabs.ts +0 -129
- package/packages/ui/node/Toast.ts +0 -16
- package/packages/ui/node/Waterfall.ts +0 -94
- package/packages/ui/package.json +0 -21
- package/packages/utils/package.json +0 -17
- package/packages/utils/src/global.ts +0 -25
- package/packages/utils/src/index.ts +0 -90
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _orange = {
|
|
4
|
-
50: '#fff7ed',
|
|
5
|
-
100: '#ffedd5',
|
|
6
|
-
200: '#fed7aa',
|
|
7
|
-
300: '#fdba74',
|
|
8
|
-
400: '#fb923c',
|
|
9
|
-
500: '#f97316',
|
|
10
|
-
600: '#ea580c',
|
|
11
|
-
700: '#c2410c',
|
|
12
|
-
800: '#9a3412',
|
|
13
|
-
900: '#7c2d12',
|
|
14
|
-
950: '#431407',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('orange', _orange);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const orange: typeof _orange;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _pink = {
|
|
4
|
-
50: '#fdf2f8',
|
|
5
|
-
100: '#fce7f3',
|
|
6
|
-
200: '#fbcfe8',
|
|
7
|
-
300: '#f9a8d4',
|
|
8
|
-
400: '#f472b6',
|
|
9
|
-
500: '#ec4899',
|
|
10
|
-
600: '#db2777',
|
|
11
|
-
700: '#be185d',
|
|
12
|
-
800: '#9d174d',
|
|
13
|
-
900: '#831843',
|
|
14
|
-
950: '#500724',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('pink', _pink);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const pink: typeof _pink;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _purple = {
|
|
4
|
-
50: '#faf5ff',
|
|
5
|
-
100: '#f3e8ff',
|
|
6
|
-
200: '#e9d5ff',
|
|
7
|
-
300: '#d8b4fe',
|
|
8
|
-
400: '#c084fc',
|
|
9
|
-
500: '#a855f7',
|
|
10
|
-
600: '#9333ea',
|
|
11
|
-
700: '#7e22ce',
|
|
12
|
-
800: '#6b21a8',
|
|
13
|
-
900: '#581c87',
|
|
14
|
-
950: '#3b0764',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('purple', _purple);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const purple: typeof _purple;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _red = {
|
|
4
|
-
50: '#fef2f2',
|
|
5
|
-
100: '#fee2e2',
|
|
6
|
-
200: '#fecaca',
|
|
7
|
-
300: '#fca5a5',
|
|
8
|
-
400: '#f87171',
|
|
9
|
-
500: '#ef4444',
|
|
10
|
-
600: '#dc2626',
|
|
11
|
-
700: '#b91c1c',
|
|
12
|
-
800: '#991b1b',
|
|
13
|
-
900: '#7f1d1d',
|
|
14
|
-
950: '#450a0a',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('red', _red);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const red: typeof _red;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _rose = {
|
|
4
|
-
50: '#fff1f2',
|
|
5
|
-
100: '#ffe4e6',
|
|
6
|
-
200: '#fecdd3',
|
|
7
|
-
300: '#fda4af',
|
|
8
|
-
400: '#fb7185',
|
|
9
|
-
500: '#f43f5e',
|
|
10
|
-
600: '#e11d48',
|
|
11
|
-
700: '#be123c',
|
|
12
|
-
800: '#9f1239',
|
|
13
|
-
900: '#881337',
|
|
14
|
-
950: '#4c0519',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('rose', _rose);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const rose: typeof _rose;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _sky = {
|
|
4
|
-
50: '#f0f9ff',
|
|
5
|
-
100: '#e0f2fe',
|
|
6
|
-
200: '#bae6fd',
|
|
7
|
-
300: '#7dd3fc',
|
|
8
|
-
400: '#38bdf8',
|
|
9
|
-
500: '#0ea5e9',
|
|
10
|
-
600: '#0284c7',
|
|
11
|
-
700: '#0369a1',
|
|
12
|
-
800: '#075985',
|
|
13
|
-
900: '#0c4a6e',
|
|
14
|
-
950: '#082f49',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('sky', _sky);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const sky: typeof _sky;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _slate = {
|
|
4
|
-
50: '#f8fafc',
|
|
5
|
-
100: '#f1f5f9',
|
|
6
|
-
200: '#e2e8f0',
|
|
7
|
-
300: '#cbd5e1',
|
|
8
|
-
400: '#94a3b8',
|
|
9
|
-
500: '#64748b',
|
|
10
|
-
600: '#475569',
|
|
11
|
-
700: '#334155',
|
|
12
|
-
800: '#1e293b',
|
|
13
|
-
900: '#0f172a',
|
|
14
|
-
950: '#020617',
|
|
15
|
-
} as const
|
|
16
|
-
|
|
17
|
-
colorAssign('slate', _slate);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const slate: typeof _slate;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _stone = {
|
|
4
|
-
50: '#fafaf9',
|
|
5
|
-
100: '#f5f5f4',
|
|
6
|
-
200: '#e7e5e4',
|
|
7
|
-
300: '#d6d3d1',
|
|
8
|
-
400: '#a8a29e',
|
|
9
|
-
500: '#78716c',
|
|
10
|
-
600: '#57534e',
|
|
11
|
-
700: '#44403c',
|
|
12
|
-
800: '#292524',
|
|
13
|
-
900: '#1c1917',
|
|
14
|
-
950: '#0c0a09',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('stone', _stone);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const stone: typeof _stone;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _teal = {
|
|
4
|
-
50: '#f0fdfa',
|
|
5
|
-
100: '#ccfbf1',
|
|
6
|
-
200: '#99f6e4',
|
|
7
|
-
300: '#5eead4',
|
|
8
|
-
400: '#2dd4bf',
|
|
9
|
-
500: '#14b8a6',
|
|
10
|
-
600: '#0d9488',
|
|
11
|
-
700: '#0f766e',
|
|
12
|
-
800: '#115e59',
|
|
13
|
-
900: '#134e4a',
|
|
14
|
-
950: '#042f2e',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('teal', _teal);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const teal: typeof _teal;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _violet = {
|
|
4
|
-
50: '#f5f3ff',
|
|
5
|
-
100: '#ede9fe',
|
|
6
|
-
200: '#ddd6fe',
|
|
7
|
-
300: '#c4b5fd',
|
|
8
|
-
400: '#a78bfa',
|
|
9
|
-
500: '#8b5cf6',
|
|
10
|
-
600: '#7c3aed',
|
|
11
|
-
700: '#6d28d9',
|
|
12
|
-
800: '#5b21b6',
|
|
13
|
-
900: '#4c1d95',
|
|
14
|
-
950: '#2e1065',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('violet', _violet);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const violet: typeof _violet;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _yellow = {
|
|
4
|
-
50: '#fefce8',
|
|
5
|
-
100: '#fef9c3',
|
|
6
|
-
200: '#fef08a',
|
|
7
|
-
300: '#fde047',
|
|
8
|
-
400: '#facc15',
|
|
9
|
-
500: '#eab308',
|
|
10
|
-
600: '#ca8a04',
|
|
11
|
-
700: '#a16207',
|
|
12
|
-
800: '#854d0e',
|
|
13
|
-
900: '#713f12',
|
|
14
|
-
950: '#422006',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('yellow', _yellow);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const yellow: typeof _yellow;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { colorAssign } from "../../lib/colorAssign";
|
|
2
|
-
|
|
3
|
-
const _zinc = {
|
|
4
|
-
50: '#fafafa',
|
|
5
|
-
100: '#f4f4f5',
|
|
6
|
-
200: '#e4e4e7',
|
|
7
|
-
300: '#d4d4d8',
|
|
8
|
-
400: '#a1a1aa',
|
|
9
|
-
500: '#71717a',
|
|
10
|
-
600: '#52525b',
|
|
11
|
-
700: '#3f3f46',
|
|
12
|
-
800: '#27272a',
|
|
13
|
-
900: '#18181b',
|
|
14
|
-
950: '#09090b',
|
|
15
|
-
} as const;
|
|
16
|
-
|
|
17
|
-
colorAssign('zinc', _zinc);
|
|
18
|
-
|
|
19
|
-
declare module '@amateras/core' {
|
|
20
|
-
export namespace $ {
|
|
21
|
-
export namespace color {
|
|
22
|
-
export const zinc: typeof _zinc;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import './colors/amber';
|
|
2
|
-
import './colors/blackwhite';
|
|
3
|
-
import './colors/blue';
|
|
4
|
-
import './colors/cyan';
|
|
5
|
-
import './colors/emerald';
|
|
6
|
-
import './colors/fuchsia';
|
|
7
|
-
import './colors/gray';
|
|
8
|
-
import './colors/green';
|
|
9
|
-
import './colors/indigo';
|
|
10
|
-
import './colors/lime';
|
|
11
|
-
import './colors/neutral';
|
|
12
|
-
import './colors/orange';
|
|
13
|
-
import './colors/pink';
|
|
14
|
-
import './colors/purple';
|
|
15
|
-
import './colors/red';
|
|
16
|
-
import './colors/rose';
|
|
17
|
-
import './colors/sky';
|
|
18
|
-
import './colors/slate';
|
|
19
|
-
import './colors/stone';
|
|
20
|
-
import './colors/teal';
|
|
21
|
-
import './colors/violet';
|
|
22
|
-
import './colors/yellow';
|
|
23
|
-
import './colors/zinc';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { _Array_from, _instanceof, _Object_entries, forEach, startsWith } from "@amateras/utils";
|
|
2
|
-
import { $CSS, $CSSStyleRule } from "..";
|
|
3
|
-
import { $CSSContainerRule } from "#structure/$CSSContainerRule";
|
|
4
|
-
|
|
5
|
-
const CONTAINER = '@container'
|
|
6
|
-
|
|
7
|
-
$CSS.cssTextProcessors.add((rule, _, options) => {
|
|
8
|
-
if (_instanceof(rule, $CSSContainerRule)) {
|
|
9
|
-
const containerContext = [...options?.containerContext ?? [], rule.condition];
|
|
10
|
-
const container: string[] = [], style: string[] = [];
|
|
11
|
-
forEach(
|
|
12
|
-
_Array_from(rule.rules)
|
|
13
|
-
.map(childRule => $CSS.cssText(childRule, '', {...options, containerContext}))
|
|
14
|
-
.flat(),
|
|
15
|
-
(childText => startsWith(childText, CONTAINER) ? container.push(childText) : style.push(childText))
|
|
16
|
-
);
|
|
17
|
-
return [`${CONTAINER} ${rule.name} ${containerContext.join(' and ')} { ${style.join('\n')} }`, ...container]
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
$CSS.createRuleProcessors.add((selector, options, context) => {
|
|
22
|
-
if (startsWith(selector, CONTAINER)) {
|
|
23
|
-
const rule = new $CSSContainerRule(selector);
|
|
24
|
-
// create media rule from $.CSS
|
|
25
|
-
if (!context) forEach(_Object_entries(options), ([key, value]) => rule.rules.add( $CSS.createRule(key, value) ))
|
|
26
|
-
// create from $.css
|
|
27
|
-
else rule.rules.add( $CSS.CSSOptions(new $CSSStyleRule(context), options) );
|
|
28
|
-
return rule;
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
export * from '#structure/$CSSContainerRule';
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { _Object_assign, _Object_fromEntries, _Object_entries, forEach, _Array_from, _instanceof, startsWith } from "@amateras/utils";
|
|
2
|
-
import { $CSS, $CSSStyleRule, type $CSSDeclarations } from ".."
|
|
3
|
-
import { generateId } from "../lib/utils";
|
|
4
|
-
import { $CSSKeyframesRule } from "#structure/$CSSKeyframesRule";
|
|
5
|
-
|
|
6
|
-
declare module '@amateras/core' {
|
|
7
|
-
export namespace $ {
|
|
8
|
-
export namespace css {
|
|
9
|
-
export function keyframes<T extends { [key: string]: $CSSKeyframesType }>(options: T): { [key in keyof T]: $CSSKeyframesRule };
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface $CSSGlobalDeclarationExtendsMap {
|
|
13
|
-
keyframes: $CSSKeyframesSelectorType;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface $CSSValueTypeExtendsMap {
|
|
17
|
-
keyframes: $CSSKeyframesRule
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type $CSSKeyframesSelectorType = { [key: `@keyframes ${string}`]: $CSSKeyframesType }
|
|
23
|
-
export type $CSSKeyframesType = { [key: `${number}%`]: $CSSDeclarations } | { from?: $CSSDeclarations, to?: $CSSDeclarations }
|
|
24
|
-
|
|
25
|
-
const KEYFRAMES = '@keyframes'
|
|
26
|
-
|
|
27
|
-
$CSS.valueInstances.add($CSSKeyframesRule)
|
|
28
|
-
|
|
29
|
-
$CSS.cssTextProcessors.add((rule, context, options) => {
|
|
30
|
-
if (_instanceof(rule, $CSSKeyframesRule))
|
|
31
|
-
return [`${KEYFRAMES} ${rule.name} { ${_Array_from(rule.rules).map(childRule => $CSS.cssText(childRule, context, options)).join('\n')} }`]
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
$CSS.createRuleProcessors.add((selector, options) => {
|
|
35
|
-
if (startsWith(selector, KEYFRAMES)) return createKeyframesRule(selector.replace('@keyframes ', ''), options as $CSSKeyframesType)
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
_Object_assign($.css, {
|
|
39
|
-
keyframes(options: $CSSKeyframesType) {
|
|
40
|
-
return _Object_fromEntries( _Object_entries(options).map(([name, value]) => {
|
|
41
|
-
return [name, $CSS.insertRule( createKeyframesRule(`${name}_${generateId()}`, value) )];
|
|
42
|
-
}) )
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
const createKeyframesRule = (name: string, options: $CSSKeyframesType) => {
|
|
47
|
-
const rule = new $CSSKeyframesRule(name);
|
|
48
|
-
forEach(_Object_entries(options), ([key, value]) => {
|
|
49
|
-
rule.rules.add( $CSS.CSSOptions(new $CSSStyleRule(key), value) );
|
|
50
|
-
})
|
|
51
|
-
return rule;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export * from '#structure/$CSSKeyframesRule'
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { _Array_from, _instanceof, _Object_entries, forEach, startsWith } from "@amateras/utils";
|
|
2
|
-
import { $CSS, $CSSStyleRule } from "..";
|
|
3
|
-
import { $CSSMediaRule } from "#structure/$CSSMediaRule";
|
|
4
|
-
|
|
5
|
-
const MEDIA = '@media'
|
|
6
|
-
|
|
7
|
-
$CSS.cssTextProcessors.add((rule, _, options) => {
|
|
8
|
-
if (_instanceof(rule, $CSSMediaRule)) {
|
|
9
|
-
const mediaContext = [...options?.mediaContext ?? [], rule.condition];
|
|
10
|
-
const media: string[] = [], style: string[] = []
|
|
11
|
-
forEach(
|
|
12
|
-
_Array_from(rule.rules)
|
|
13
|
-
.map(childRule => $CSS.cssText(childRule, '', {...options, mediaContext}))
|
|
14
|
-
.flat(),
|
|
15
|
-
(childText => startsWith(childText, MEDIA) ? media.push(childText) : style.push(childText))
|
|
16
|
-
);
|
|
17
|
-
return [`${MEDIA} ${mediaContext.join(' and ')} { ${style.join('\n')} }`, ...media]
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
$CSS.createRuleProcessors.add((selector, options, context) => {
|
|
22
|
-
if (startsWith(selector, MEDIA)) {
|
|
23
|
-
const rule = new $CSSMediaRule(selector);
|
|
24
|
-
// create media rule from $.CSS
|
|
25
|
-
if (!context) forEach(_Object_entries(options), ([key, value]) => rule.rules.add( $CSS.createRule(key, value) ))
|
|
26
|
-
// create from $.css
|
|
27
|
-
else rule.rules.add( $CSS.CSSOptions(new $CSSStyleRule(context), options) );
|
|
28
|
-
return rule;
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
export * from '#structure/$CSSMediaRule';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { camelCaseToDash, generateId } from "#lib/utils";
|
|
2
|
-
import { $CSSProperty } from "#structure/$CSSProperty";
|
|
3
|
-
import { $CSS } from "..";
|
|
4
|
-
import { _instanceof, _Object_assign, _Object_entries, forEach, isString, isUndefined } from "@amateras/utils";
|
|
5
|
-
|
|
6
|
-
declare module '@amateras/core' {
|
|
7
|
-
export namespace $ {
|
|
8
|
-
export namespace css {
|
|
9
|
-
export function property<T extends $CSSPropertyMap>(resolver: T): { [key in keyof T]: $CSSProperty }
|
|
10
|
-
export function property(syntax: $CSSPropertySyntax, initialValue: string | number, inherits: boolean): $CSSProperty
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface $CSSValueTypeExtendsMap {
|
|
14
|
-
property: $CSSProperty
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type $CSSPropertySyntax =
|
|
20
|
-
'<angle>' | '<color>' | '<custom-ident>' |
|
|
21
|
-
'<image>' | '<integer>' | '<length>' |
|
|
22
|
-
'<length-percentage>' | '<number>' | '<percentage>' |
|
|
23
|
-
'<resolution>' | '<string>' | '<time>' |
|
|
24
|
-
'<transform-function>' | '<transform-list>' | '<url>' |
|
|
25
|
-
'auto' | '*' | string & {}
|
|
26
|
-
|
|
27
|
-
export type $CSSPropertyMap = { [key: string]: [$CSSPropertySyntax, string | number, boolean] }
|
|
28
|
-
|
|
29
|
-
_Object_assign($.css, {
|
|
30
|
-
property(resolver: $CSSPropertyMap | string, initialValue?: string | number, inherits?: boolean) {
|
|
31
|
-
if (isString(resolver)) {
|
|
32
|
-
if (isUndefined(initialValue) || isUndefined(inherits)) throw 'Register CSS Property Error';
|
|
33
|
-
const property = new $CSSProperty({ name: `--${generateId('lower')}`, syntax: resolver, initialValue: `${initialValue}`, inherits });
|
|
34
|
-
CSS.registerProperty(property)
|
|
35
|
-
return property;
|
|
36
|
-
} else {
|
|
37
|
-
const obj = {};
|
|
38
|
-
forEach(_Object_entries(resolver), ([key, [syntax, initialValue, inherits]]) => {
|
|
39
|
-
const property = new $CSSProperty({ name: `--${camelCaseToDash(key)}-${generateId('lower')}`, syntax, initialValue: `${initialValue}`, inherits });
|
|
40
|
-
_Object_assign(obj, { [key]: property });
|
|
41
|
-
CSS.registerProperty(property)
|
|
42
|
-
})
|
|
43
|
-
return obj;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
$CSS.valueInstances.add($CSSProperty);
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { _Object_assign, _Object_entries, _Object_fromEntries, isObject } from "@amateras/utils";
|
|
2
|
-
import { $CSS, type $CSSValueType } from "..";
|
|
3
|
-
import { camelCaseToDash, generateId } from "../lib/utils";
|
|
4
|
-
import { $CSSVariable } from "#structure/$CSSVariable";
|
|
5
|
-
|
|
6
|
-
declare module '@amateras/core' {
|
|
7
|
-
export namespace $ {
|
|
8
|
-
export namespace css {
|
|
9
|
-
export function variable<V extends string>(value: V): $CSSVariable<V>;
|
|
10
|
-
export function variable<T extends $CSSVariableType>(options: T, conditions?: $CSSVariableConditionType<T>): { [key in keyof T]: $CSSVariable<T[key]> }
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface $CSSValueTypeExtendsMap {
|
|
14
|
-
variable: $CSSVariable
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type $CSSVariableType<T = any> = { [key in keyof T]: $CSSValueType }
|
|
20
|
-
export type $CSSVariableConditionType<T extends $CSSVariableType | string> = T extends string ? { [key: string]: $CSSValueType } : { [key: string]: Partial<$CSSVariableType<T>> }
|
|
21
|
-
|
|
22
|
-
$CSS.valueInstances.add($CSSVariable)
|
|
23
|
-
|
|
24
|
-
_Object_assign($.css, {
|
|
25
|
-
variable<T extends $CSSVariableType | string>(options: T, conditions?: $CSSVariableConditionType<T>) {
|
|
26
|
-
if (isObject(options)) {
|
|
27
|
-
const variables = _Object_fromEntries(_Object_entries(options).map(([key, value]) => [
|
|
28
|
-
key,
|
|
29
|
-
new $CSSVariable(`--${camelCaseToDash(key)}_${generateId('lower')}`, `${value}`)
|
|
30
|
-
]))
|
|
31
|
-
|
|
32
|
-
const conditionObj = conditions ? _Object_entries(conditions).map(([condition, _options]) => [
|
|
33
|
-
condition,
|
|
34
|
-
_Object_fromEntries(_Object_entries(_options).map(([key, value]) => [`${variables[key]?.name}`, `${value}`] as const))
|
|
35
|
-
] as const) : [];
|
|
36
|
-
|
|
37
|
-
$.CSS({':root': {
|
|
38
|
-
..._Object_fromEntries(_Object_entries(variables).map(([_, {name, value}]) => [name, value])),
|
|
39
|
-
..._Object_fromEntries(conditionObj)
|
|
40
|
-
}})
|
|
41
|
-
|
|
42
|
-
return variables;
|
|
43
|
-
} else {
|
|
44
|
-
const variable = new $CSSVariable(`--${generateId('lower')}`, options);
|
|
45
|
-
$.CSS({':root': {[variable.name]: variable.value}});
|
|
46
|
-
return variable;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
export * from '#structure/$CSSVariable'
|