@swiftwc/ui 0.0.0-dev.4 → 0.0.0-dev.41
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 +15 -0
- package/generated/buses/alert-dialog.d.ts +2 -0
- package/generated/buses/alert-dialog.js +1 -0
- package/generated/buses/confirmation-dialog.d.ts +2 -0
- package/generated/buses/confirmation-dialog.js +1 -0
- package/generated/buses/index.d.ts +6 -0
- package/generated/buses/index.js +6 -0
- package/generated/buses/lifecycle-observer.d.ts +2 -0
- package/generated/buses/lifecycle-observer.js +1 -0
- package/generated/client/index.d.ts +24 -0
- package/generated/client/index.js +272 -0
- package/generated/components/alert-dialog.d.ts +8 -0
- package/generated/components/alert-dialog.js +99 -0
- package/generated/components/body-view.d.ts +5 -0
- package/generated/components/body-view.js +14 -0
- package/generated/components/bordered-button.d.ts +13 -0
- package/generated/components/bordered-button.js +45 -0
- package/generated/components/bordered-prominent-button.d.ts +13 -0
- package/generated/components/bordered-prominent-button.js +45 -0
- package/generated/components/borderless-button.d.ts +13 -0
- package/generated/components/borderless-button.js +45 -0
- package/generated/components/confirmation-dialog.d.ts +9 -0
- package/generated/components/confirmation-dialog.js +113 -0
- package/generated/components/content-unavailable-view.d.ts +24 -0
- package/generated/components/content-unavailable-view.js +81 -0
- package/generated/components/date-picker.d.ts +36 -0
- package/generated/components/date-picker.js +468 -0
- package/generated/components/disclosure-group.d.ts +9 -0
- package/generated/components/disclosure-group.js +58 -0
- package/generated/components/fine-tooltip.d.ts +7 -0
- package/generated/components/fine-tooltip.js +107 -0
- package/generated/components/form-view.d.ts +6 -0
- package/generated/components/form-view.js +60 -0
- package/generated/components/glass-button.d.ts +12 -0
- package/generated/components/glass-button.js +42 -0
- package/generated/components/glass-prominent-button.d.ts +12 -0
- package/generated/components/glass-prominent-button.js +42 -0
- package/generated/components/index.d.ts +42 -0
- package/generated/components/index.js +42 -0
- package/generated/components/label-view.d.ts +9 -0
- package/generated/components/label-view.js +59 -0
- package/generated/components/list-view.d.ts +5 -0
- package/generated/components/list-view.js +29 -0
- package/generated/components/menu-view.d.ts +9 -0
- package/generated/components/menu-view.js +145 -0
- package/generated/components/navigation-large-title.d.ts +6 -0
- package/generated/components/navigation-large-title.js +181 -0
- package/generated/components/navigation-split-view.d.ts +10 -0
- package/generated/components/navigation-split-view.js +25 -0
- package/generated/components/navigation-stack.d.ts +10 -0
- package/generated/components/navigation-stack.js +31 -0
- package/generated/components/navigation-title.d.ts +8 -0
- package/generated/components/navigation-title.js +52 -0
- package/generated/components/picker-view.d.ts +28 -0
- package/generated/components/picker-view.js +697 -0
- package/generated/components/plain-button.d.ts +7 -0
- package/generated/components/plain-button.js +22 -0
- package/generated/components/progress-view.d.ts +13 -0
- package/generated/components/progress-view.js +125 -0
- package/generated/components/screen-view.d.ts +5 -0
- package/generated/components/screen-view.js +11 -0
- package/generated/components/scroll-view-proxy.d.ts +8 -0
- package/generated/components/scroll-view-proxy.js +17 -0
- package/generated/components/scroll-view.d.ts +10 -0
- package/generated/components/scroll-view.js +202 -0
- package/generated/components/search-view.d.ts +8 -0
- package/generated/components/search-view.js +30 -0
- package/generated/components/section-view.d.ts +9 -0
- package/generated/components/section-view.js +83 -0
- package/generated/components/sheet-view.d.ts +8 -0
- package/generated/components/sheet-view.js +62 -0
- package/generated/components/sidebar-toggle.d.ts +7 -0
- package/generated/components/sidebar-toggle.js +85 -0
- package/generated/components/sidebar-view.d.ts +7 -0
- package/generated/components/sidebar-view.js +34 -0
- package/generated/components/sticky-container.d.ts +6 -0
- package/generated/components/sticky-container.js +26 -0
- package/generated/components/tab-bar.d.ts +10 -0
- package/generated/components/tab-bar.js +43 -0
- package/generated/components/tab-item.d.ts +7 -0
- package/generated/components/tab-item.js +132 -0
- package/generated/components/tab-view.d.ts +22 -0
- package/generated/components/tab-view.js +264 -0
- package/generated/components/table-view.d.ts +7 -0
- package/generated/components/table-view.js +174 -0
- package/generated/components/text-field.d.ts +29 -0
- package/generated/components/text-field.js +503 -0
- package/generated/components/tool-bar-item-group.d.ts +5 -0
- package/generated/components/tool-bar-item-group.js +28 -0
- package/generated/components/tool-bar-item.d.ts +8 -0
- package/generated/components/tool-bar-item.js +66 -0
- package/generated/components/tool-bar.d.ts +19 -0
- package/generated/components/tool-bar.js +93 -0
- package/generated/components/v-keyboard.d.ts +15 -0
- package/generated/components/v-keyboard.js +89 -0
- package/generated/components/v-stack.d.ts +10 -0
- package/generated/components/v-stack.js +19 -0
- package/generated/css/index.css +8089 -0
- package/generated/events/alert-dialog.d.ts +8 -0
- package/generated/events/alert-dialog.js +1 -0
- package/generated/events/confirmation-dialog.d.ts +9 -0
- package/generated/events/confirmation-dialog.js +1 -0
- package/generated/events/date-picker.d.ts +8 -0
- package/generated/events/date-picker.js +1 -0
- package/generated/events/index.d.ts +8 -0
- package/generated/events/index.js +8 -0
- package/generated/events/lifecycle-observer.d.ts +10 -0
- package/generated/events/lifecycle-observer.js +1 -0
- package/generated/events/picker-view.d.ts +15 -0
- package/generated/events/picker-view.js +1 -0
- package/generated/events/scroll-view.d.ts +10 -0
- package/generated/events/scroll-view.js +1 -0
- package/generated/events/tab-view.d.ts +28 -0
- package/generated/events/tab-view.js +1 -0
- package/generated/events/text-field.d.ts +8 -0
- package/generated/events/text-field.js +1 -0
- package/generated/i18n/index.d.ts +34 -0
- package/generated/i18n/index.js +167 -0
- package/generated/i18n/locales/el.d.ts +16 -0
- package/generated/i18n/locales/el.js +16 -0
- package/generated/i18n/locales/en.d.ts +16 -0
- package/generated/i18n/locales/en.js +16 -0
- package/generated/i18n/locales/index.d.ts +4 -0
- package/generated/i18n/locales/index.js +4 -0
- package/generated/index.d.ts +2 -0
- package/generated/index.js +3 -0
- package/generated/internal/class/cleanup-registry.d.ts +5 -0
- package/generated/internal/class/cleanup-registry.js +38 -0
- package/generated/internal/class/css-style-observer.d.ts +8 -0
- package/generated/internal/class/css-style-observer.js +26 -0
- package/generated/internal/class/form-associated-base.d.ts +16 -0
- package/generated/internal/class/form-associated-base.js +78 -0
- package/generated/internal/class/mutation-observer-set.d.ts +9 -0
- package/generated/internal/class/mutation-observer-set.js +42 -0
- package/generated/internal/class/mutation-observer-singleton.d.ts +10 -0
- package/generated/internal/class/mutation-observer-singleton.js +64 -0
- package/generated/internal/class/navigation-path.d.ts +15 -0
- package/generated/internal/class/navigation-path.js +84 -0
- package/generated/internal/class/navigation-view.d.ts +8 -0
- package/generated/internal/class/navigation-view.js +79 -0
- package/generated/internal/class/resize-observer-singleton.d.ts +7 -0
- package/generated/internal/class/resize-observer-singleton.js +22 -0
- package/generated/internal/decorators/adaptive-slot.d.ts +1 -0
- package/generated/internal/decorators/adaptive-slot.js +50 -0
- package/generated/internal/decorators/custom-element.d.ts +5 -0
- package/generated/internal/decorators/custom-element.js +5 -0
- package/generated/internal/decorators/index.d.ts +4 -0
- package/generated/internal/decorators/index.js +4 -0
- package/generated/internal/privateNamespace.d.ts +14 -0
- package/generated/internal/privateNamespace.js +168 -0
- package/generated/internal/utils/add.d.ts +1 -0
- package/generated/internal/utils/add.js +7 -0
- package/generated/internal/utils/cash/ancestors.d.ts +1 -0
- package/generated/internal/utils/cash/ancestors.js +27 -0
- package/generated/internal/utils/cash/index.d.ts +23 -0
- package/generated/internal/utils/cash/index.js +25 -0
- package/generated/internal/utils/cash/next-all.d.ts +1 -0
- package/generated/internal/utils/cash/next-all.js +10 -0
- package/generated/internal/utils/cash/next.d.ts +1 -0
- package/generated/internal/utils/cash/next.js +9 -0
- package/generated/internal/utils/cash/prev-all.d.ts +1 -0
- package/generated/internal/utils/cash/prev-all.js +10 -0
- package/generated/internal/utils/cash/prev.d.ts +1 -0
- package/generated/internal/utils/cash/prev.js +9 -0
- package/generated/internal/utils/cash/prop.d.ts +18 -0
- package/generated/internal/utils/cash/prop.js +30 -0
- package/generated/internal/utils/cash/siblings.d.ts +1 -0
- package/generated/internal/utils/cash/siblings.js +10 -0
- package/generated/internal/utils/clamp.d.ts +1 -0
- package/generated/internal/utils/clamp.js +4 -0
- package/generated/internal/utils/compare-big-decimals.d.ts +1 -0
- package/generated/internal/utils/compare-big-decimals.js +90 -0
- package/generated/internal/utils/css-time.d.ts +1 -0
- package/generated/internal/utils/css-time.js +3 -0
- package/generated/internal/utils/debounce.d.ts +1 -0
- package/generated/internal/utils/debounce.js +13 -0
- package/generated/internal/utils/dev-flags.d.ts +3 -0
- package/generated/internal/utils/dev-flags.js +5 -0
- package/generated/internal/utils/ensure-placeholder.d.ts +1 -0
- package/generated/internal/utils/ensure-placeholder.js +55 -0
- package/generated/internal/utils/frame.d.ts +1 -0
- package/generated/internal/utils/frame.js +6 -0
- package/generated/internal/utils/index.d.ts +19 -0
- package/generated/internal/utils/index.js +22 -0
- package/generated/internal/utils/is-inside.d.ts +1 -0
- package/generated/internal/utils/is-inside.js +4 -0
- package/generated/internal/utils/kebab-case.d.ts +1 -0
- package/generated/internal/utils/kebab-case.js +11 -0
- package/generated/internal/utils/list-active.d.ts +7 -0
- package/generated/internal/utils/list-active.js +83 -0
- package/generated/internal/utils/microtask.d.ts +1 -0
- package/generated/internal/utils/microtask.js +3 -0
- package/generated/internal/utils/onoff.d.ts +45 -0
- package/generated/internal/utils/onoff.js +31 -0
- package/generated/internal/utils/set.d.ts +1 -0
- package/generated/internal/utils/set.js +7 -0
- package/generated/internal/utils/sleep.d.ts +1 -0
- package/generated/internal/utils/sleep.js +3 -0
- package/generated/internal/utils/slow-hide-show.d.ts +1 -0
- package/generated/internal/utils/slow-hide-show.js +16 -0
- package/generated/internal/utils/timeout.d.ts +5 -0
- package/generated/internal/utils/timeout.js +16 -0
- package/generated/internal/utils/touch-glass.d.ts +7 -0
- package/generated/internal/utils/touch-glass.js +19 -0
- package/generated/namespace-browser/base.d.ts +45 -0
- package/generated/namespace-browser/base.js +115 -0
- package/generated/namespace-browser/index.d.ts +7 -0
- package/generated/namespace-browser/index.js +1 -0
- package/generated/snapshot/index.d.ts +9 -0
- package/generated/snapshot/index.js +60 -0
- package/package.json +35 -11
- package/scss/_components.scss +59 -14
- package/scss/_final.scss +1 -0
- package/scss/_functions.scss +10 -0
- package/scss/_mixins.scss +4 -169
- package/scss/_placeholders.scss +3 -0
- package/scss/_transitions.scss +22 -1
- package/scss/_utils.scss +9 -0
- package/scss/_vars.scss +142 -23
- package/scss/base/_layout.scss +31 -16
- package/scss/base/_reboot.scss +151 -15
- package/scss/base/_root.scss +355 -25
- package/scss/colors/_index.scss +672 -70
- package/scss/components/_alert-dialog.scss +111 -0
- package/scss/components/_body-view.scss +12 -3
- package/scss/components/_bordered-button.scss +57 -0
- package/scss/components/_bordered-prominent-button.scss +63 -0
- package/scss/components/_borderless-button.scss +36 -6
- package/scss/components/_confirmation-dialog.scss +84 -0
- package/scss/components/_content-unavailable-view.scss +45 -0
- package/scss/components/_date-picker.scss +30 -0
- package/scss/components/_detail-placeholder.scss +153 -0
- package/scss/components/_disclosure-group.scss +146 -51
- package/scss/components/_fine-tooltip.scss +82 -0
- package/scss/components/_form-view.scss +195 -0
- package/scss/components/_full-screen.scss +7 -5
- package/scss/components/_glass-button.scss +59 -0
- package/scss/components/_glass-prominent-button.scss +68 -0
- package/scss/components/_h-divider.scss +13 -0
- package/scss/components/_h-flex-stack.scss +23 -0
- package/scss/components/_h-stack.scss +29 -0
- package/scss/components/_index.scss +234 -7
- package/scss/components/_label-view copy.scss.txt +420 -0
- package/scss/components/_label-view.scss +355 -0
- package/scss/components/_label-view.scss.txt +536 -0
- package/scss/components/_labeled-content.scss +9 -0
- package/scss/components/_list-view.scss +229 -0
- package/scss/components/_menu-view.scss +211 -0
- package/scss/components/_navigation-large-title.scss +27 -0
- package/scss/components/_navigation-split-view.scss +329 -269
- package/scss/components/_navigation-stack.scss +6 -6
- package/scss/components/_navigation-title.scss +10 -0
- package/scss/components/_picker-view.scss +131 -0
- package/scss/components/_plain-button.scss +18 -0
- package/scss/components/_progress-view.scss +98 -0
- package/scss/components/_scroll-view-proxy.scss +79 -0
- package/scss/components/_scroll-view-toolbars.scss +126 -0
- package/scss/components/_scroll-view.scss +114 -66
- package/scss/components/_search-view.scss +18 -0
- package/scss/components/_section-view.scss +119 -0
- package/scss/components/_sheet-view.scss +78 -35
- package/scss/components/_sidebar-toggle.scss +87 -27
- package/scss/components/_sidebar-view.scss +30 -40
- package/scss/components/_sticky-container.scss +42 -0
- package/scss/components/_tab-bar.scss +207 -84
- package/scss/components/_tab-item.scss +25 -0
- package/scss/components/_tab-view.scss +270 -126
- package/scss/components/_table-column.scss +52 -0
- package/scss/components/_table-row.scss +172 -0
- package/scss/components/_table-view.scss +223 -0
- package/scss/components/_text-field.scss +37 -0
- package/scss/components/_tool-bar-item-group.scss +30 -19
- package/scss/components/_tool-bar-item.scss +81 -71
- package/scss/components/_tool-bar.scss +126 -63
- package/scss/components/_v-divider.scss +13 -0
- package/scss/components/_v-flex-stack.scss +29 -0
- package/scss/components/_v-keyboard.scss +6 -4
- package/scss/components/_v-stack.scss +15 -9
- package/scss/final/_touch-glass.scss +91 -0
- package/scss/index.scss +6 -2
- package/scss/mixins/_button.scss +44 -0
- package/scss/mixins/_color.scss +16 -0
- package/scss/mixins/_dialog.scss +89 -0
- package/scss/mixins/_index.scss +422 -0
- package/scss/placeholders/_buttons.scss +117 -0
- package/scss/placeholders/_lists.scss +571 -0
- package/scss/transitions/_alert-dialog.scss +18 -0
- package/scss/transitions/_bwd.navbar.scss +3 -13
- package/scss/transitions/_bwd.scss +4 -20
- package/scss/transitions/_confirmation-dialog.scss +22 -0
- package/scss/transitions/_disclosure-group.scss +35 -0
- package/scss/transitions/_fine-tooltip.scss +21 -0
- package/scss/transitions/_fwd.navbar.scss +4 -9
- package/scss/transitions/_fwd.scss +4 -34
- package/scss/transitions/_glass-button.scss +12 -0
- package/scss/transitions/_glass-prominent-button.scss +12 -0
- package/scss/transitions/_index.scss +35 -143
- package/scss/transitions/_menu-view.scss +26 -0
- package/scss/transitions/_navigation-split-view.scss +23 -0
- package/scss/transitions/_progress-view.scss +23 -0
- package/scss/transitions/_sheet-view.scss +30 -0
- package/scss/transitions/_sidebar-view.scss +36 -0
- package/scss/transitions/_tab-bar.scss +20 -0
- package/scss/utils/_frame.scss +91 -0
- package/scss/utils/_index.scss +91 -0
- package/scss/utils/_scroll-view.scss +14 -0
- package/scss/utils/_spacing.scss +25 -0
- package/scss/utils/_stacks.scss +209 -0
- package/web-components.html-data/en.json +500 -0
- package/generated/styles.css +0 -1305
- package/scss/_dev.scss +0 -68
- package/scss/components/_tab-bar-stack.scss +0 -101
- package/scss/components/_toolbars.scss +0 -100
- package/scss/transitions/_dialog.scss +0 -32
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import ancestors from './ancestors';
|
|
2
|
+
import next from './next';
|
|
3
|
+
import nextAll from './next-all';
|
|
4
|
+
import prev from './prev';
|
|
5
|
+
import prevAll from './prev-all';
|
|
6
|
+
import prop from './prop';
|
|
7
|
+
import siblings from './siblings';
|
|
8
|
+
declare const DEFAULT: ">1";
|
|
9
|
+
interface CashFn {
|
|
10
|
+
(innerHTML: string): DocumentFragment;
|
|
11
|
+
<T extends Element = Element>(innerHTML: string, selector: typeof DEFAULT): T;
|
|
12
|
+
<T extends Element = Element>(innerHTML: string, selector: string): T;
|
|
13
|
+
prop: typeof prop;
|
|
14
|
+
nextAll: typeof nextAll;
|
|
15
|
+
prevAll: typeof prevAll;
|
|
16
|
+
next: typeof next;
|
|
17
|
+
prev: typeof prev;
|
|
18
|
+
siblings: typeof siblings;
|
|
19
|
+
ancestors: typeof ancestors;
|
|
20
|
+
}
|
|
21
|
+
declare const cash: CashFn;
|
|
22
|
+
export default cash;
|
|
23
|
+
export { ancestors, next, nextAll, prev, prevAll, prop, siblings };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ancestors from './ancestors';
|
|
2
|
+
import next from './next';
|
|
3
|
+
import nextAll from './next-all';
|
|
4
|
+
import prev from './prev';
|
|
5
|
+
import prevAll from './prev-all';
|
|
6
|
+
import prop from './prop';
|
|
7
|
+
import siblings from './siblings';
|
|
8
|
+
const DEFAULT = '>1';
|
|
9
|
+
const cash = ((innerHTML, selector) => {
|
|
10
|
+
const template = Object.assign(document.createElement('template'), { innerHTML });
|
|
11
|
+
if (!selector)
|
|
12
|
+
return template.content;
|
|
13
|
+
if (selector === DEFAULT)
|
|
14
|
+
return template.content.firstElementChild; // OVERKILL
|
|
15
|
+
return template.content.querySelector('>1' === selector ? ':first-child' : selector);
|
|
16
|
+
});
|
|
17
|
+
cash.prop = prop;
|
|
18
|
+
cash.nextAll = nextAll;
|
|
19
|
+
cash.prevAll = prevAll;
|
|
20
|
+
cash.next = next;
|
|
21
|
+
cash.prev = prev;
|
|
22
|
+
cash.siblings = siblings;
|
|
23
|
+
cash.ancestors = ancestors;
|
|
24
|
+
export default cash;
|
|
25
|
+
export { ancestors, next, nextAll, prev, prevAll, prop, siblings };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <T extends Element>(selector?: string, element?: Element): T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <T extends Element>(selector?: string, element?: Element): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <T extends Element>(selector?: string, element?: Element): T[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function (selector, element) {
|
|
2
|
+
const siblings = [];
|
|
3
|
+
let prev = element?.previousElementSibling;
|
|
4
|
+
while (prev) {
|
|
5
|
+
if (!selector || prev.matches(selector))
|
|
6
|
+
siblings.push(prev);
|
|
7
|
+
prev = prev.previousElementSibling;
|
|
8
|
+
}
|
|
9
|
+
return siblings;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <T extends Element>(selector?: string, element?: Element): T | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A remove/set property utility that checks before doing DOM manipulations.
|
|
3
|
+
* It enforces the important flag, the built-in functionality is to leave it as-is if there was an important flat and the setProperty does not have one
|
|
4
|
+
* In case of undefined it does a removeProperty, the built-in functionality is to add a string representation ("undefined")
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* By default setProperty does NOT enforce important. It always triggers a DOM manipulation.
|
|
8
|
+
* By default getPropertyValue returns a trimmed string but fails to inform of the presence in the style attribute.
|
|
9
|
+
*
|
|
10
|
+
* Examples:
|
|
11
|
+
* [style] prop('--prop', '1rem', el) style="--prop: 1rem;"
|
|
12
|
+
* [style] prop('--prop', null | '' | undefined, el) style
|
|
13
|
+
* [style] prop('--prop', ' ', el) style="--prop: ;"
|
|
14
|
+
* [style] prop('--prop', ' ', el) style="--prop: ;"
|
|
15
|
+
* style="--prop: 1rem;" prop('--prop', '1rem', el, 'important') style="--prop: 1rem !important;"
|
|
16
|
+
* style="--prop: 1rem !important;" prop('--prop', '1rem', el) style="--prop: 1rem;"
|
|
17
|
+
*/
|
|
18
|
+
export default function (property: string, value?: string | null, el?: HTMLElement | null, priority?: 'important'): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A remove/set property utility that checks before doing DOM manipulations.
|
|
3
|
+
* It enforces the important flag, the built-in functionality is to leave it as-is if there was an important flat and the setProperty does not have one
|
|
4
|
+
* In case of undefined it does a removeProperty, the built-in functionality is to add a string representation ("undefined")
|
|
5
|
+
*
|
|
6
|
+
* Notes:
|
|
7
|
+
* By default setProperty does NOT enforce important. It always triggers a DOM manipulation.
|
|
8
|
+
* By default getPropertyValue returns a trimmed string but fails to inform of the presence in the style attribute.
|
|
9
|
+
*
|
|
10
|
+
* Examples:
|
|
11
|
+
* [style] prop('--prop', '1rem', el) style="--prop: 1rem;"
|
|
12
|
+
* [style] prop('--prop', null | '' | undefined, el) style
|
|
13
|
+
* [style] prop('--prop', ' ', el) style="--prop: ;"
|
|
14
|
+
* [style] prop('--prop', ' ', el) style="--prop: ;"
|
|
15
|
+
* style="--prop: 1rem;" prop('--prop', '1rem', el, 'important') style="--prop: 1rem !important;"
|
|
16
|
+
* style="--prop: 1rem !important;" prop('--prop', '1rem', el) style="--prop: 1rem;"
|
|
17
|
+
*/
|
|
18
|
+
export default function (property, value, el, priority) {
|
|
19
|
+
if (!el)
|
|
20
|
+
return;
|
|
21
|
+
if (!value) {
|
|
22
|
+
if (-1 !== Array.from(el.style).indexOf(property))
|
|
23
|
+
el.style.removeProperty(property); // remove key entirely
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const currentValue = el.style.getPropertyValue(property), // "" always trimmed
|
|
27
|
+
currentPriority = el.style.getPropertyPriority(property); // "" always lowercase
|
|
28
|
+
if (currentValue !== value.trim() || currentPriority !== (priority ?? '').toLowerCase())
|
|
29
|
+
el.style.setProperty(property, value, priority); // enforce priority
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <T extends Element>(selector?: string, element?: Element): T[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function (selector, element) {
|
|
2
|
+
const siblings = [];
|
|
3
|
+
let child = element?.parentElement?.firstElementChild;
|
|
4
|
+
while (child) {
|
|
5
|
+
if (child !== element && (!selector || child.matches(selector)))
|
|
6
|
+
siblings.push(child);
|
|
7
|
+
child = child.nextElementSibling;
|
|
8
|
+
}
|
|
9
|
+
return siblings;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (value?: string, min?: number, max?: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (a: string, b: string): number;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* compareBigDecimals("1e3", "1000") // 0
|
|
4
|
+
* compareBigDecimals("1e-3", "0.001") // 0
|
|
5
|
+
* compareBigDecimals("-10", "-2") // -1 ✅
|
|
6
|
+
* const arr = ["1.2","1.10","1.02","1e2","100","-0.5"]
|
|
7
|
+
* arr.sort(compareBigDecimals)
|
|
8
|
+
* console.log(arr)
|
|
9
|
+
* function isInRange(value: string, min: string, max: string): boolean {return compareBigDecimals(value, min) >= 0 && compareBigDecimals(value, max) <= 0}
|
|
10
|
+
* // examples
|
|
11
|
+
* isInRange("-5", "-10", "-1") // true
|
|
12
|
+
* isInRange("-11", "-10", "-1") // false
|
|
13
|
+
* isInRange("0", "-10", "-1") // false
|
|
14
|
+
* isInRange("-Infinity", "-Infinity", "-1") // true
|
|
15
|
+
* isInRange("5", "-Infinity", "Infinity") // true
|
|
16
|
+
*/
|
|
17
|
+
const POSITIVE_INFINITY = 'Infinity', NEGATIVE_INFINITY = '-Infinity';
|
|
18
|
+
export default function (a, b) {
|
|
19
|
+
const aInf = isInfinity(a), bInf = isInfinity(b);
|
|
20
|
+
if (aInf !== 0 || bInf !== 0) {
|
|
21
|
+
if (aInf === bInf)
|
|
22
|
+
return 0;
|
|
23
|
+
return aInf > bInf ? 1 : -1;
|
|
24
|
+
}
|
|
25
|
+
const A = parse(a), B = parse(b);
|
|
26
|
+
// different signs
|
|
27
|
+
if (A.sign !== B.sign)
|
|
28
|
+
return A.sign - B.sign;
|
|
29
|
+
const sign = A.sign;
|
|
30
|
+
// compare integer length
|
|
31
|
+
if (A.i.length !== B.i.length)
|
|
32
|
+
return (A.i.length - B.i.length) * sign;
|
|
33
|
+
// compare integer part
|
|
34
|
+
if (A.i !== B.i)
|
|
35
|
+
return (A.i > B.i ? 1 : -1) * sign;
|
|
36
|
+
// compare fractional part
|
|
37
|
+
const max = Math.max(A.f.length, B.f.length);
|
|
38
|
+
for (let i = 0; i < max; i++) {
|
|
39
|
+
const da = A.f.charCodeAt(i) || 48, // '0'
|
|
40
|
+
db = B.f.charCodeAt(i) || 48;
|
|
41
|
+
if (da !== db)
|
|
42
|
+
return (da > db ? 1 : -1) * sign;
|
|
43
|
+
}
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
46
|
+
function isInfinity(s) {
|
|
47
|
+
const t = s.trim();
|
|
48
|
+
if (t === POSITIVE_INFINITY || t === '+Infinity')
|
|
49
|
+
return 1;
|
|
50
|
+
if (t === NEGATIVE_INFINITY)
|
|
51
|
+
return -1;
|
|
52
|
+
return 0;
|
|
53
|
+
}
|
|
54
|
+
function parse(input) {
|
|
55
|
+
let s = input.trim(), sign = 1;
|
|
56
|
+
// sign
|
|
57
|
+
if (s[0] === '-') {
|
|
58
|
+
sign = -1;
|
|
59
|
+
s = s.slice(1);
|
|
60
|
+
}
|
|
61
|
+
else if (s[0] === '+') {
|
|
62
|
+
s = s.slice(1);
|
|
63
|
+
}
|
|
64
|
+
// scientific notation
|
|
65
|
+
let exp = 0;
|
|
66
|
+
const eIndex = s.search(/e/i);
|
|
67
|
+
if (eIndex !== -1) {
|
|
68
|
+
exp = parseInt(s.slice(eIndex + 1), 10) || 0;
|
|
69
|
+
s = s.slice(0, eIndex);
|
|
70
|
+
}
|
|
71
|
+
let [i = '0', f = ''] = s.split('.');
|
|
72
|
+
// remove leading zeros
|
|
73
|
+
i = i.replace(/^0+/, '') || '0';
|
|
74
|
+
// apply exponent by shifting decimal
|
|
75
|
+
if (exp > 0) {
|
|
76
|
+
const move = Math.min(exp, f.length);
|
|
77
|
+
i += f.slice(0, move);
|
|
78
|
+
f = f.slice(move) + '0'.repeat(exp - move);
|
|
79
|
+
}
|
|
80
|
+
else if (exp < 0) {
|
|
81
|
+
const move = Math.min(-exp, i.length);
|
|
82
|
+
f = i.slice(i.length - move) + f;
|
|
83
|
+
i = i.slice(0, i.length - move) || '0';
|
|
84
|
+
f = '0'.repeat(-exp - move) + f;
|
|
85
|
+
}
|
|
86
|
+
// normalize again
|
|
87
|
+
i = i.replace(/^0+/, '') || '0';
|
|
88
|
+
f = f.replace(/0+$/, '');
|
|
89
|
+
return { sign, i, f };
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (cssTime: string): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <F extends (...args: any[]) => any>(fn: F, delay?: number, immediate?: boolean): (...args: Parameters<F>) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import timeout from './timeout';
|
|
2
|
+
export default function (fn, delay = 300, immediate = false) {
|
|
3
|
+
const { next, pending } = timeout();
|
|
4
|
+
return function (...args) {
|
|
5
|
+
const context = this, callNow = immediate && !pending();
|
|
6
|
+
next(() => {
|
|
7
|
+
if (!immediate)
|
|
8
|
+
fn.apply(context, args);
|
|
9
|
+
}, delay);
|
|
10
|
+
if (callNow)
|
|
11
|
+
fn.apply(context, args);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (target: HTMLElement | null, role: string | null, titleKey?: string | null): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { I18n } from '../../i18n';
|
|
2
|
+
import { Snapshot } from '../../snapshot';
|
|
3
|
+
import { default as $ } from './cash';
|
|
4
|
+
function renderPlaceholder(el, role, titleKey) {
|
|
5
|
+
// if (!el.isConnected) return
|
|
6
|
+
// self.requestAnimationFrame(() => {
|
|
7
|
+
// if (!el.isConnected) return
|
|
8
|
+
const label = el.querySelector(':scope>[slot=placeholder]') ?? el.appendChild($(`<label-view slot="placeholder"></label-view>`, '>1'));
|
|
9
|
+
switch (role) {
|
|
10
|
+
case 'cancel':
|
|
11
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Cancel);
|
|
12
|
+
label.setAttribute('system-image', Snapshot.config['cancel-button-icon']);
|
|
13
|
+
break;
|
|
14
|
+
case 'close':
|
|
15
|
+
if (label.closest('[is=alert-dialog]')) {
|
|
16
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').OK);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Close);
|
|
20
|
+
label.setAttribute('system-image', Snapshot.config['close-button-icon']);
|
|
21
|
+
}
|
|
22
|
+
break;
|
|
23
|
+
case 'confirm':
|
|
24
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Confirm);
|
|
25
|
+
label.setAttribute('system-image', Snapshot.config['confirm-button-icon']);
|
|
26
|
+
break;
|
|
27
|
+
case 'confirmation-action':
|
|
28
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Confirm);
|
|
29
|
+
label.setAttribute('system-image', Snapshot.config['confirm-button-icon']);
|
|
30
|
+
break;
|
|
31
|
+
case 'cancellation-action':
|
|
32
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Cancel);
|
|
33
|
+
label.setAttribute('system-image', Snapshot.config['cancel-button-icon']);
|
|
34
|
+
break;
|
|
35
|
+
case 'destructive':
|
|
36
|
+
label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Destructive);
|
|
37
|
+
label.setAttribute('system-image', Snapshot.config['delete-button-icon']);
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
label?.remove();
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
// if (role) {
|
|
44
|
+
// label.setAttribute('title', I18n.t('ButtonRole').Default.Destructive)
|
|
45
|
+
// } else label?.remove()
|
|
46
|
+
// })
|
|
47
|
+
}
|
|
48
|
+
export default function (target, role, titleKey) {
|
|
49
|
+
if (!target)
|
|
50
|
+
return;
|
|
51
|
+
const overiderTitle = typeof titleKey === 'string' && titleKey in I18n.t('ButtonRole') ? titleKey : undefined;
|
|
52
|
+
renderPlaceholder(target, role, overiderTitle);
|
|
53
|
+
// CleanupRegistry.unregister(target, 'i18n')
|
|
54
|
+
// CleanupRegistry.register(target, onoff('localechange', () => renderPlaceholder(target, role, overiderTitle), I18n.on).on(), 'i18n')
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (element?: Element): Promise<number | undefined>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { default as add } from './add';
|
|
2
|
+
export { default as $ } from './cash';
|
|
3
|
+
export { default as clamp } from './clamp';
|
|
4
|
+
export { default as compareBigDecimals } from './compare-big-decimals';
|
|
5
|
+
export { default as cssTime } from './css-time';
|
|
6
|
+
export { default as debounce } from './debounce';
|
|
7
|
+
export { default as devFlags } from './dev-flags';
|
|
8
|
+
export { default as ensurePlaceholder } from './ensure-placeholder';
|
|
9
|
+
export { default as frame } from './frame';
|
|
10
|
+
export { default as isInside } from './is-inside';
|
|
11
|
+
export { default as kebabCase } from './kebab-case';
|
|
12
|
+
export { default as listActive } from './list-active';
|
|
13
|
+
export { default as microtask } from './microtask';
|
|
14
|
+
export { default as onoff } from './onoff';
|
|
15
|
+
export { default as set } from './set';
|
|
16
|
+
export { default as sleep } from './sleep';
|
|
17
|
+
export { default as slowHideShow } from './slow-hide-show';
|
|
18
|
+
export { default as timeout } from './timeout';
|
|
19
|
+
export { default as touchGlass } from './touch-glass';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// import * as _intl from './intl'
|
|
2
|
+
// import cash from './cash'
|
|
3
|
+
export { default as add } from './add';
|
|
4
|
+
export { default as $ } from './cash';
|
|
5
|
+
export { default as clamp } from './clamp';
|
|
6
|
+
export { default as compareBigDecimals } from './compare-big-decimals';
|
|
7
|
+
export { default as cssTime } from './css-time';
|
|
8
|
+
export { default as debounce } from './debounce';
|
|
9
|
+
export { default as devFlags } from './dev-flags';
|
|
10
|
+
export { default as ensurePlaceholder } from './ensure-placeholder';
|
|
11
|
+
export { default as frame } from './frame';
|
|
12
|
+
export { default as isInside } from './is-inside';
|
|
13
|
+
export { default as kebabCase } from './kebab-case';
|
|
14
|
+
export { default as listActive } from './list-active';
|
|
15
|
+
export { default as microtask } from './microtask';
|
|
16
|
+
export { default as onoff } from './onoff';
|
|
17
|
+
export { default as set } from './set';
|
|
18
|
+
export { default as sleep } from './sleep';
|
|
19
|
+
export { default as slowHideShow } from './slow-hide-show';
|
|
20
|
+
export { default as timeout } from './timeout';
|
|
21
|
+
export { default as touchGlass } from './touch-glass';
|
|
22
|
+
// export const $: typeof cash = cash
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (x: number, y: number, rect: DOMRect): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (str: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default function (str) {
|
|
2
|
+
return (str
|
|
3
|
+
// Replace uppercase letters with - + lowercase
|
|
4
|
+
.replace(/([A-Z])/g, '-$1')
|
|
5
|
+
// Replace spaces and underscores with -
|
|
6
|
+
.replace(/[\s_]+/g, '-')
|
|
7
|
+
// Convert to lowercase
|
|
8
|
+
.toLowerCase()
|
|
9
|
+
// Remove leading/trailing dashes
|
|
10
|
+
.replace(/^-+|-+$/g, ''));
|
|
11
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const touchList = new WeakMap();
|
|
2
|
+
function onDown({ target }) {
|
|
3
|
+
if (!(target instanceof HTMLElement && target))
|
|
4
|
+
return;
|
|
5
|
+
const el = target.closest('button,summary');
|
|
6
|
+
if (!el)
|
|
7
|
+
return;
|
|
8
|
+
touchList.set(el, setTimeout(() => {
|
|
9
|
+
if (!touchList.has(el))
|
|
10
|
+
return;
|
|
11
|
+
el.classList.add('active');
|
|
12
|
+
}, 70));
|
|
13
|
+
el.addEventListener('pointerleave', onLeave, { once: true, passive: true });
|
|
14
|
+
el.closest('scroll-view')?.addEventListener('scroll', onScroll, { once: true, passive: true });
|
|
15
|
+
}
|
|
16
|
+
function onOver({ target, buttons }) {
|
|
17
|
+
if (!(target instanceof HTMLElement && target))
|
|
18
|
+
return;
|
|
19
|
+
const el = target.closest('button,summary');
|
|
20
|
+
if (!el)
|
|
21
|
+
return;
|
|
22
|
+
if (0 === buttons)
|
|
23
|
+
return;
|
|
24
|
+
el.classList.add('active');
|
|
25
|
+
el.removeEventListener('pointerover', onOver);
|
|
26
|
+
el.addEventListener('pointerleave', onLeave, { once: true, passive: true });
|
|
27
|
+
}
|
|
28
|
+
function onLeave({ target }) {
|
|
29
|
+
if (!(target instanceof HTMLElement && target))
|
|
30
|
+
return;
|
|
31
|
+
const el = target.closest('button,summary');
|
|
32
|
+
if (!el)
|
|
33
|
+
return;
|
|
34
|
+
el.addEventListener('pointerover', onOver, { once: true, passive: true });
|
|
35
|
+
// self.requestAnimationFrame(() => {
|
|
36
|
+
el.removeEventListener('pointerleave', onLeave);
|
|
37
|
+
el.closest('scroll-view')?.removeEventListener('scroll', onScroll);
|
|
38
|
+
el.classList.remove('active');
|
|
39
|
+
if (touchList.has(el))
|
|
40
|
+
clearTimeout(touchList.get(el));
|
|
41
|
+
touchList.delete(el);
|
|
42
|
+
// })
|
|
43
|
+
}
|
|
44
|
+
function onCancel({ target }) {
|
|
45
|
+
if (!(target instanceof HTMLElement && target))
|
|
46
|
+
return;
|
|
47
|
+
const el = target.closest('button,summary');
|
|
48
|
+
if (!el)
|
|
49
|
+
return;
|
|
50
|
+
// self.requestAnimationFrame(() => {
|
|
51
|
+
el.removeEventListener('pointerleave', onLeave);
|
|
52
|
+
el.removeEventListener('pointerover', onOver);
|
|
53
|
+
el.closest('scroll-view')?.removeEventListener('scroll', onScroll);
|
|
54
|
+
el.classList.remove('active');
|
|
55
|
+
if (touchList.has(el))
|
|
56
|
+
clearTimeout(touchList.get(el));
|
|
57
|
+
touchList.delete(el);
|
|
58
|
+
// })
|
|
59
|
+
}
|
|
60
|
+
function onScroll({ target }) {
|
|
61
|
+
if (!(target instanceof HTMLElement && target))
|
|
62
|
+
return;
|
|
63
|
+
for (const el of target.querySelectorAll('button,summary') ?? []) {
|
|
64
|
+
el.classList.remove('active');
|
|
65
|
+
if (touchList.has(el))
|
|
66
|
+
clearTimeout(touchList.get(el));
|
|
67
|
+
touchList.delete(el);
|
|
68
|
+
el.removeEventListener('pointerleave', onLeave);
|
|
69
|
+
el.removeEventListener('pointerover', onOver);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const makePointerdownHandler = (target) => {
|
|
73
|
+
return onDown;
|
|
74
|
+
}, makePointerCancelHandler = (target) => {
|
|
75
|
+
return onCancel;
|
|
76
|
+
};
|
|
77
|
+
export default function (t) {
|
|
78
|
+
const downListener = makePointerdownHandler(t), offListener = makePointerCancelHandler(t);
|
|
79
|
+
return [
|
|
80
|
+
{ types: 'pointerdown', listener: downListener, addOptions: { passive: true } },
|
|
81
|
+
{ types: 'pointerup pointercancel', listener: offListener, addOptions: { passive: true } },
|
|
82
|
+
];
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): Promise<void>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* const el = document.querySelector('button')!
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* // 1. Single — no event arg
|
|
6
|
+
* onoff('click', () => console.log('clicked'), el)
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // 2. Single — with event arg
|
|
10
|
+
* onoff('click', (e) => console.log(e.target), el)
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // 3. Single — with options
|
|
14
|
+
* onoff('click', (e) => console.log(e), el, { passive: true, once: true })
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 4. Single — capture as boolean
|
|
18
|
+
* onoff('click', (e) => console.log(e), el, true)
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 5. Array — shared t
|
|
22
|
+
* onoff([
|
|
23
|
+
* { types: 'click', listener: (e) => console.log('click', e) },
|
|
24
|
+
* { types: 'mouseover mouseout', listener: (e) => console.log('hover', e) },
|
|
25
|
+
* ], el)
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // 6. Using on/off
|
|
29
|
+
* const { on, off } = onoff('scroll', (e) => console.log(e), el, { passive: true })
|
|
30
|
+
* on() // start listening
|
|
31
|
+
* off() // stop listening
|
|
32
|
+
*/
|
|
33
|
+
type Options = boolean | AddEventListenerOptions;
|
|
34
|
+
interface EventConfig {
|
|
35
|
+
types: string;
|
|
36
|
+
listener: EventListener;
|
|
37
|
+
addOptions?: Options;
|
|
38
|
+
}
|
|
39
|
+
declare function single(types: string, listener: EventListener, t?: EventTarget, addOptions?: Options): {
|
|
40
|
+
on: () => () => void;
|
|
41
|
+
off: () => void;
|
|
42
|
+
};
|
|
43
|
+
export default function (configs: EventConfig[], t?: EventTarget): ReturnType<typeof single>;
|
|
44
|
+
export default function (types: string, listener: EventListener, t?: EventTarget, addOptions?: Options): ReturnType<typeof single>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function single(types, listener, t, addOptions) {
|
|
2
|
+
const events = types?.split(' ');
|
|
3
|
+
const removeOptions = typeof addOptions === 'boolean' ? addOptions : addOptions !== undefined && 'capture' in addOptions ? { capture: addOptions.capture } : undefined;
|
|
4
|
+
const off = () => {
|
|
5
|
+
for (const event of events)
|
|
6
|
+
t?.removeEventListener(event, listener, removeOptions);
|
|
7
|
+
}, on = () => {
|
|
8
|
+
for (const event of events)
|
|
9
|
+
t?.addEventListener(event, listener, addOptions);
|
|
10
|
+
return off;
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
on,
|
|
14
|
+
off,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export default function (typesOrConfigs, listenerOrT, t, addOptions) {
|
|
18
|
+
if (Array.isArray(typesOrConfigs)) {
|
|
19
|
+
const element = listenerOrT, results = typesOrConfigs.map((c) => single(c.types, c.listener, element, c.addOptions)); //, c.t ?? element, c.addOptions))
|
|
20
|
+
const off = () => results.forEach((r) => r.off()), on = () => {
|
|
21
|
+
for (const r of results)
|
|
22
|
+
r.on();
|
|
23
|
+
return off;
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
on,
|
|
27
|
+
off,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return single(typesOrConfigs, listenerOrT, t, addOptions);
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function <T extends object, K extends keyof T>(obj: T, key: K, value: T[K]): boolean;
|