@histoire/vendors 0.8.4 → 0.9.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/dist/client/b-floating-vue.d.ts +3 -0
- package/dist/client/{floating-vue.js → b-floating-vue.js} +1 -1
- package/dist/client/b-iconify.d.ts +1 -0
- package/dist/client/{iconify.js → b-iconify.js} +0 -0
- package/dist/client/b-pinia.d.ts +1 -0
- package/dist/client/{pinia.js → b-pinia.js} +41 -8
- package/dist/client/b-scroll.d.ts +2 -0
- package/dist/client/{scroll.js → b-scroll.js} +1 -1
- package/dist/client/b-vue-router.d.ts +1 -0
- package/dist/client/{vue-router.js → b-vue-router.js} +279 -158
- package/dist/client/b-vue-use.d.ts +1 -0
- package/dist/client/{vue-use.js → b-vue-use.js} +1070 -603
- package/dist/client/b-vue.d.ts +1 -0
- package/dist/client/{vue.js → b-vue.js} +1 -1
- package/dist/client/node_modules/@babel/parser/package.json +45 -0
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +214 -0
- package/dist/client/node_modules/@floating-ui/core/index.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/core/package.json +70 -0
- package/dist/client/node_modules/@floating-ui/core/src/_babel.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/core/src/computeCoordsFromPlacement.d.ts +4 -0
- package/dist/client/node_modules/@floating-ui/core/src/computePosition.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/detectOverflow.d.ts +9 -0
- package/dist/client/node_modules/@floating-ui/core/src/enums.d.ts +4 -0
- package/dist/client/node_modules/@floating-ui/core/src/index.d.ts +11 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/arrow.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts +9 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/flip.d.ts +10 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/hide.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/inline.d.ts +5 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/offset.d.ts +21 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/shift.d.ts +32 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/size.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/core/src/types.d.ts +148 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/expandPaddingObject.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignment.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignmentSides.d.ts +5 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getBasePlacement.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getCrossAxis.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getExpandedPlacements.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getLengthFromAxis.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getMainAxisFromPlacement.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositeAlignmentPlacement.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositePlacement.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getPaddingObject.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/math.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/rectToClientRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/within.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/index.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/package.json +75 -0
- package/dist/client/node_modules/@floating-ui/dom/src/index.d.ts +7 -0
- package/dist/client/node_modules/@floating-ui/dom/src/platform.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/types.d.ts +27 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/contains.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/convertOffsetParentRelativeRectToViewportRelativeRect.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingClientRect.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getComputedStyle.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getDimensions.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentElement.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeName.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeScroll.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getOffsetParent.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getParentNode.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getRectRelativeToOffsetParent.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParent.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParents.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/is.d.ts +15 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/math.d.ts +3 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/window.d.ts +2 -0
- package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +680 -0
- package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +347 -0
- package/dist/client/node_modules/@iconify/vue/offline/package.json +14 -0
- package/dist/client/node_modules/@iconify/vue/package.json +61 -0
- package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +176 -0
- package/dist/client/node_modules/@types/web-bluetooth/package.json +40 -0
- package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1198 -0
- package/dist/client/node_modules/@vue/compiler-core/package.json +43 -0
- package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +66 -0
- package/dist/client/node_modules/@vue/compiler-dom/package.json +43 -0
- package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +321 -0
- package/dist/client/node_modules/@vue/compiler-sfc/package.json +59 -0
- package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +6 -0
- package/dist/client/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +108 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +1 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +77 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +5 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +179 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +6 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +4 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +2 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +15 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +18 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +47 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +20 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +2 -0
- package/dist/client/node_modules/@vue/devtools-api/package.json +37 -0
- package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +347 -0
- package/dist/client/node_modules/@vue/reactivity/package.json +41 -0
- package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +33 -0
- package/dist/client/node_modules/@vue/reactivity-transform/package.json +41 -0
- package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +2018 -0
- package/dist/client/node_modules/@vue/runtime-core/package.json +38 -0
- package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1522 -0
- package/dist/client/node_modules/@vue/runtime-dom/package.json +42 -0
- package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +100 -0
- package/dist/client/node_modules/@vue/server-renderer/package.json +41 -0
- package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +356 -0
- package/dist/client/node_modules/@vue/shared/package.json +33 -0
- package/dist/client/node_modules/@vueuse/core/index.d.ts +4305 -0
- package/dist/client/node_modules/@vueuse/core/metadata.d.ts +1 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/@vueuse/shared/index.d.ts +874 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/@vueuse/shared/package.json +50 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v2/index.d.ts +31 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v2.7/index.d.ts +52 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v3/index.d.ts +22 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +47 -0
- package/dist/client/node_modules/@vueuse/core/package.json +59 -0
- package/dist/client/node_modules/@vueuse/metadata/index.d.ts +75 -0
- package/dist/client/node_modules/@vueuse/metadata/package.json +39 -0
- package/dist/client/node_modules/compute-scroll-into-view/package.json +90 -0
- package/dist/client/node_modules/compute-scroll-into-view/typings/index.d.ts +19 -0
- package/dist/client/node_modules/csstype/index.d.ts +38372 -0
- package/dist/client/node_modules/csstype/package.json +57 -0
- package/dist/client/node_modules/estree-walker/dist/esm/package.json +1 -0
- package/dist/client/node_modules/estree-walker/package.json +37 -0
- package/dist/client/node_modules/estree-walker/src/package.json +1 -0
- package/dist/client/node_modules/estree-walker/types/async.d.ts +53 -0
- package/dist/client/node_modules/estree-walker/types/index.d.ts +56 -0
- package/dist/client/node_modules/estree-walker/types/sync.d.ts +53 -0
- package/dist/client/node_modules/estree-walker/types/walker.d.ts +37 -0
- package/dist/client/node_modules/floating-vue/dist/components/Dropdown.vue.d.ts +25 -0
- package/dist/client/node_modules/floating-vue/dist/components/Menu.vue.d.ts +25 -0
- package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +374 -0
- package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +366 -0
- package/dist/client/node_modules/floating-vue/dist/components/PopperContent.vue.d.ts +48 -0
- package/dist/client/node_modules/floating-vue/dist/components/PopperMethods.d.ts +9 -0
- package/dist/client/node_modules/floating-vue/dist/components/PopperWrapper.vue.d.ts +28 -0
- package/dist/client/node_modules/floating-vue/dist/components/ThemeClass.d.ts +6 -0
- package/dist/client/node_modules/floating-vue/dist/components/Tooltip.vue.d.ts +25 -0
- package/dist/client/node_modules/floating-vue/dist/components/TooltipDirective.vue.d.ts +28 -0
- package/dist/client/node_modules/floating-vue/dist/config.d.ts +11 -0
- package/dist/client/node_modules/floating-vue/dist/directives/v-close-popper.d.ts +13 -0
- package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.d.ts +27 -0
- package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.spec.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/index.d.ts +414 -0
- package/dist/client/node_modules/floating-vue/dist/util/assign-deep.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/util/env.d.ts +2 -0
- package/dist/client/node_modules/floating-vue/dist/util/events.d.ts +12 -0
- package/dist/client/node_modules/floating-vue/dist/util/frame.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/util/lang.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/util/popper.d.ts +3 -0
- package/dist/client/node_modules/floating-vue/package.json +71 -0
- package/dist/client/node_modules/floating-vue/src/global-shim.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/src/vue-shim.d.ts +5 -0
- package/dist/client/node_modules/magic-string/index.d.ts +221 -0
- package/dist/client/node_modules/magic-string/package.json +52 -0
- package/dist/client/node_modules/nanoid/async/index.d.ts +56 -0
- package/dist/client/node_modules/nanoid/async/package.json +12 -0
- package/dist/client/node_modules/nanoid/index.d.ts +91 -0
- package/dist/client/node_modules/nanoid/non-secure/index.d.ts +33 -0
- package/dist/client/node_modules/nanoid/non-secure/package.json +6 -0
- package/dist/client/node_modules/nanoid/package.json +60 -0
- package/dist/client/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/dist/client/node_modules/picocolors/package.json +25 -0
- package/dist/client/node_modules/picocolors/picocolors.d.ts +5 -0
- package/dist/client/node_modules/pinia/dist/pinia.d.ts +963 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +31 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +52 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +22 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +47 -0
- package/dist/client/node_modules/pinia/package.json +101 -0
- package/dist/client/node_modules/postcss/lib/at-rule.d.ts +106 -0
- package/dist/client/node_modules/postcss/lib/comment.d.ts +56 -0
- package/dist/client/node_modules/postcss/lib/container.d.ts +442 -0
- package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +239 -0
- package/dist/client/node_modules/postcss/lib/declaration.d.ts +124 -0
- package/dist/client/node_modules/postcss/lib/document.d.ts +57 -0
- package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +5 -0
- package/dist/client/node_modules/postcss/lib/input.d.ts +150 -0
- package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +176 -0
- package/dist/client/node_modules/postcss/lib/list.d.ts +51 -0
- package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +37 -0
- package/dist/client/node_modules/postcss/lib/node.d.ts +478 -0
- package/dist/client/node_modules/postcss/lib/parse.d.ts +5 -0
- package/dist/client/node_modules/postcss/lib/postcss.d.ts +473 -0
- package/dist/client/node_modules/postcss/lib/previous-map.d.ts +72 -0
- package/dist/client/node_modules/postcss/lib/processor.d.ts +102 -0
- package/dist/client/node_modules/postcss/lib/result.d.ts +196 -0
- package/dist/client/node_modules/postcss/lib/root.d.ts +73 -0
- package/dist/client/node_modules/postcss/lib/rule.d.ts +104 -0
- package/dist/client/node_modules/postcss/lib/stringifier.d.ts +37 -0
- package/dist/client/node_modules/postcss/lib/stringify.d.ts +5 -0
- package/dist/client/node_modules/postcss/lib/warning.d.ts +138 -0
- package/dist/client/node_modules/postcss/package.json +85 -0
- package/dist/client/node_modules/scroll-into-view-if-needed/package.json +144 -0
- package/dist/client/node_modules/scroll-into-view-if-needed/typings/index.d.ts +13 -0
- package/dist/client/node_modules/scroll-into-view-if-needed/typings/types.d.ts +19 -0
- package/dist/client/node_modules/source-map/package.json +73 -0
- package/dist/client/node_modules/source-map/source-map.d.ts +98 -0
- package/dist/client/node_modules/source-map-js/package.json +71 -0
- package/dist/client/node_modules/source-map-js/source-map.d.ts +115 -0
- package/dist/client/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +5 -0
- package/dist/client/node_modules/sourcemap-codec/package.json +53 -0
- package/dist/client/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/dist/client/node_modules/vue/compiler-sfc/package.json +5 -0
- package/dist/client/node_modules/vue/dist/vue.d.ts +9 -0
- package/dist/client/node_modules/vue/macros-global.d.ts +19 -0
- package/dist/client/node_modules/vue/macros.d.ts +110 -0
- package/dist/client/node_modules/vue/package.json +75 -0
- package/dist/client/node_modules/vue/ref-macros.d.ts +2 -0
- package/dist/client/node_modules/vue/server-renderer/index.d.ts +1 -0
- package/dist/client/node_modules/vue/server-renderer/package.json +5 -0
- package/dist/client/node_modules/vue-resize/package.json +77 -0
- package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +1491 -0
- package/dist/client/node_modules/vue-router/package.json +114 -0
- package/dist/client/vue.runtime.esm-bundler.js +24 -19
- package/entries.js +7 -7
- package/floating-vue.d.ts +3 -0
- package/iconify.d.ts +3 -0
- package/package.json +13 -4
- package/pinia.d.ts +3 -0
- package/rollup.config.mjs +116 -0
- package/scroll.d.ts +3 -0
- package/src/client/b-floating-vue.ts +3 -0
- package/src/client/b-iconify.ts +1 -0
- package/src/client/b-pinia.ts +1 -0
- package/src/client/b-scroll.ts +2 -0
- package/src/client/b-vue-router.ts +1 -0
- package/src/client/b-vue-use.ts +1 -0
- package/src/client/b-vue.ts +1 -0
- package/vue-router.d.ts +3 -0
- package/vue-use.d.ts +3 -0
- package/vue.d.ts +3 -0
- package/dist/client/floating-vue.d.ts +0 -2
- package/dist/client/iconify.d.ts +0 -1
- package/dist/client/pinia.d.ts +0 -1
- package/dist/client/scroll.d.ts +0 -1
- package/dist/client/vue-router.d.ts +0 -1
- package/dist/client/vue-use.d.ts +0 -1
- package/dist/client/vue.d.ts +0 -1
- package/rollup.config.js +0 -37
- package/src/client/floating-vue.ts +0 -2
- package/src/client/iconify.ts +0 -1
- package/src/client/pinia.ts +0 -1
- package/src/client/scroll.ts +0 -1
- package/src/client/vue-router.ts +0 -1
- package/src/client/vue-use.ts +0 -1
- package/src/client/vue.ts +0 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import type { AllowedComponentProps } from 'vue';
|
|
2
|
+
import type { ComponentCustomProps } from 'vue';
|
|
3
|
+
import type { ComponentOptionsMixin } from 'vue';
|
|
4
|
+
import type { DefineComponent } from 'vue';
|
|
5
|
+
import type { EmitsOptions } from 'vue';
|
|
6
|
+
import { ExtractPropTypes } from 'vue';
|
|
7
|
+
import type { VNodeProps } from 'vue';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Add collection to storage, allowing to call icons by name
|
|
11
|
+
*
|
|
12
|
+
* @param data Icon set
|
|
13
|
+
* @param prefix Optional prefix to add to icon names, true (default) if prefix from icon set should be used.
|
|
14
|
+
*/
|
|
15
|
+
export declare function addCollection(data: IconifyJSON, prefix?: string | boolean): void;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Add icon to storage, allowing to call it by name
|
|
19
|
+
*
|
|
20
|
+
* @param name
|
|
21
|
+
* @param data
|
|
22
|
+
*/
|
|
23
|
+
export declare function addIcon(name: string, data: IconifyIcon): void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Icon with optional parameters that are provided by API and affect only search
|
|
27
|
+
*/
|
|
28
|
+
declare interface APIIconAttributes {
|
|
29
|
+
// True if icon is hidden.
|
|
30
|
+
// Used in icon sets to keep icons that no longer exist, but should still be accessible
|
|
31
|
+
// from API, preventing websites from breaking when icon is removed by developer.
|
|
32
|
+
hidden?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare interface ExtendedIconifyAlias extends IconifyAlias, APIIconAttributes {}
|
|
36
|
+
|
|
37
|
+
declare interface ExtendedIconifyIcon extends IconifyIcon, APIIconAttributes {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Component
|
|
41
|
+
*/
|
|
42
|
+
export declare const Icon: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Alias.
|
|
46
|
+
*/
|
|
47
|
+
declare interface IconifyAlias extends IconifyOptional {
|
|
48
|
+
// Parent icon index without prefix, required.
|
|
49
|
+
parent: string;
|
|
50
|
+
|
|
51
|
+
// IconifyOptional properties.
|
|
52
|
+
// Alias should have only properties that it overrides.
|
|
53
|
+
// Transformations are merged, not overridden. See IconifyTransformations comments.
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* "aliases" field of JSON file.
|
|
58
|
+
*/
|
|
59
|
+
declare interface IconifyAliases {
|
|
60
|
+
// Index is name of icon, without prefix. Value is ExtendedIconifyAlias object.
|
|
61
|
+
[index: string]: ExtendedIconifyAlias;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Icon categories
|
|
66
|
+
*/
|
|
67
|
+
declare interface IconifyCategories {
|
|
68
|
+
// Index is category title, such as "Weather".
|
|
69
|
+
// Value is array of icons that belong to that category.
|
|
70
|
+
// Each icon can belong to multiple categories or no categories.
|
|
71
|
+
[index: string]: string[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Characters used in font.
|
|
76
|
+
*/
|
|
77
|
+
declare interface IconifyChars {
|
|
78
|
+
// Index is character, such as "f000".
|
|
79
|
+
// Value is icon name.
|
|
80
|
+
[index: string]: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Icon dimensions.
|
|
85
|
+
*
|
|
86
|
+
* Used in:
|
|
87
|
+
* icon (as is)
|
|
88
|
+
* alias (overwrite icon's properties)
|
|
89
|
+
* root of JSON file (default values)
|
|
90
|
+
*/
|
|
91
|
+
declare interface IconifyDimenisons {
|
|
92
|
+
// Left position of viewBox.
|
|
93
|
+
// Defaults to 0.
|
|
94
|
+
left?: number;
|
|
95
|
+
|
|
96
|
+
// Top position of viewBox.
|
|
97
|
+
// Defaults to 0.
|
|
98
|
+
top?: number;
|
|
99
|
+
|
|
100
|
+
// Width of viewBox.
|
|
101
|
+
// Defaults to 16.
|
|
102
|
+
width?: number;
|
|
103
|
+
|
|
104
|
+
// Height of viewBox.
|
|
105
|
+
// Defaults to 16.
|
|
106
|
+
height?: number;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Properties for element that are mentioned in render.ts
|
|
111
|
+
*/
|
|
112
|
+
declare interface IconifyElementProps {
|
|
113
|
+
id?: string;
|
|
114
|
+
style?: unknown;
|
|
115
|
+
onLoad?: IconifyIconOnLoad;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Icon alignment
|
|
120
|
+
*/
|
|
121
|
+
export declare type IconifyHorizontalIconAlignment = 'left' | 'center' | 'right';
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Icon.
|
|
125
|
+
*/
|
|
126
|
+
export declare interface IconifyIcon extends IconifyOptional {
|
|
127
|
+
// Icon body: <path d="..." />, required.
|
|
128
|
+
body: string;
|
|
129
|
+
|
|
130
|
+
// IconifyOptional properties.
|
|
131
|
+
// If property is missing in JSON file, look in root object for default value.
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Icon customisations
|
|
136
|
+
*/
|
|
137
|
+
export declare type IconifyIconCustomisations = IconifyIconCustomisations_2 & {
|
|
138
|
+
rotate?: string | number;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Icon customisations
|
|
143
|
+
*/
|
|
144
|
+
declare interface IconifyIconCustomisations_2 {
|
|
145
|
+
inline?: boolean;
|
|
146
|
+
width?: IconifyIconSize;
|
|
147
|
+
height?: IconifyIconSize;
|
|
148
|
+
hAlign?: IconifyHorizontalIconAlignment;
|
|
149
|
+
vAlign?: IconifyVerticalIconAlignment;
|
|
150
|
+
slice?: boolean;
|
|
151
|
+
hFlip?: boolean;
|
|
152
|
+
vFlip?: boolean;
|
|
153
|
+
rotate?: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Callback for when icon has been loaded (only triggered for icons loaded from API)
|
|
158
|
+
*/
|
|
159
|
+
declare type IconifyIconOnLoad = (name: string) => void;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Icon properties
|
|
163
|
+
*/
|
|
164
|
+
export declare interface IconifyIconProps extends IconifyIconCustomisations {
|
|
165
|
+
icon: IconifyIcon | string;
|
|
166
|
+
color?: string;
|
|
167
|
+
flip?: string;
|
|
168
|
+
align?: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* "icons" field of JSON file.
|
|
173
|
+
*/
|
|
174
|
+
declare interface IconifyIcons {
|
|
175
|
+
// Index is name of icon, without prefix. Value is ExtendedIconifyIcon object.
|
|
176
|
+
[index: string]: ExtendedIconifyIcon;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Icon size
|
|
181
|
+
*/
|
|
182
|
+
export declare type IconifyIconSize = null | string | number;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Icon set information block.
|
|
186
|
+
*/
|
|
187
|
+
declare interface IconifyInfo {
|
|
188
|
+
// Icon set name.
|
|
189
|
+
name: string;
|
|
190
|
+
|
|
191
|
+
// Total number of icons.
|
|
192
|
+
total?: number;
|
|
193
|
+
|
|
194
|
+
// Version string.
|
|
195
|
+
version?: string;
|
|
196
|
+
|
|
197
|
+
// Author information.
|
|
198
|
+
author: {
|
|
199
|
+
// Author name.
|
|
200
|
+
name: string;
|
|
201
|
+
|
|
202
|
+
// Link to author's website or icon set website.
|
|
203
|
+
url?: string;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// License
|
|
207
|
+
license: {
|
|
208
|
+
// Human readable license.
|
|
209
|
+
title: string;
|
|
210
|
+
|
|
211
|
+
// SPDX license identifier.
|
|
212
|
+
spdx?: string;
|
|
213
|
+
|
|
214
|
+
// License URL.
|
|
215
|
+
url?: string;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
// Array of icons that should be used for samples in icon sets list.
|
|
219
|
+
samples?: string[];
|
|
220
|
+
|
|
221
|
+
// Icon grid: number or array of numbers.
|
|
222
|
+
height?: number | number[];
|
|
223
|
+
|
|
224
|
+
// Display height for samples: 16 - 24
|
|
225
|
+
displayHeight?: number;
|
|
226
|
+
|
|
227
|
+
// Category on Iconify collections list.
|
|
228
|
+
category?: string;
|
|
229
|
+
|
|
230
|
+
// Palette status. True if icons have predefined color scheme, false if icons use currentColor.
|
|
231
|
+
// Ideally, icon set should not mix icons with and without palette to simplify search.
|
|
232
|
+
palette?: boolean;
|
|
233
|
+
|
|
234
|
+
// If true, icon set should not appear in icon sets list.
|
|
235
|
+
hidden?: boolean;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* JSON structure.
|
|
240
|
+
*
|
|
241
|
+
* All optional values can exist in root of JSON file, used as defaults.
|
|
242
|
+
*/
|
|
243
|
+
export declare interface IconifyJSON extends IconifyJSONIconsData, IconifyMetaData {
|
|
244
|
+
// Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist.
|
|
245
|
+
not_found?: string[];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* JSON structure, contains only icon data
|
|
250
|
+
*/
|
|
251
|
+
declare interface IconifyJSONIconsData extends IconifyOptional {
|
|
252
|
+
// Prefix for icons in JSON file, required.
|
|
253
|
+
prefix: string;
|
|
254
|
+
|
|
255
|
+
// API provider, optional.
|
|
256
|
+
provider?: string;
|
|
257
|
+
|
|
258
|
+
// List of icons, required.
|
|
259
|
+
icons: IconifyIcons;
|
|
260
|
+
|
|
261
|
+
// Optional aliases.
|
|
262
|
+
aliases?: IconifyAliases;
|
|
263
|
+
|
|
264
|
+
// IconifyOptional properties that are used as default values for icons when icon is missing value.
|
|
265
|
+
// If property exists in both icon and root, use value from icon.
|
|
266
|
+
// This is used to reduce duplication.
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Meta data stored in JSON file, used for browsing icon set.
|
|
271
|
+
*/
|
|
272
|
+
declare interface IconifyMetaData {
|
|
273
|
+
// Icon set information block. Used for public icon sets, can be skipped for private icon sets.
|
|
274
|
+
info?: IconifyInfo;
|
|
275
|
+
|
|
276
|
+
// Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font.
|
|
277
|
+
chars?: IconifyChars;
|
|
278
|
+
|
|
279
|
+
// Categories. Used for filtering icons.
|
|
280
|
+
categories?: IconifyCategories;
|
|
281
|
+
|
|
282
|
+
// Optional themes (old format).
|
|
283
|
+
themes?: LegacyIconifyThemes;
|
|
284
|
+
|
|
285
|
+
// Optional themes (new format). Key is prefix or suffix, value is title.
|
|
286
|
+
prefixes?: Record<string, string>;
|
|
287
|
+
suffixes?: Record<string, string>;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Combination of dimensions and transformations.
|
|
292
|
+
*/
|
|
293
|
+
declare interface IconifyOptional
|
|
294
|
+
extends IconifyDimenisons,
|
|
295
|
+
IconifyTransformations {
|
|
296
|
+
//
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Icon transformations.
|
|
301
|
+
*
|
|
302
|
+
* Used in:
|
|
303
|
+
* icon (as is)
|
|
304
|
+
* alias (merged with icon's properties)
|
|
305
|
+
* root of JSON file (default values)
|
|
306
|
+
*/
|
|
307
|
+
declare interface IconifyTransformations {
|
|
308
|
+
// Number of 90 degrees rotations.
|
|
309
|
+
// 0 = 0, 1 = 90deg and so on.
|
|
310
|
+
// Defaults to 0.
|
|
311
|
+
// When merged (such as alias + icon), result is icon.rotation + alias.rotation.
|
|
312
|
+
rotate?: number;
|
|
313
|
+
|
|
314
|
+
// Horizontal flip.
|
|
315
|
+
// Defaults to false.
|
|
316
|
+
// When merged, result is icon.hFlip !== alias.hFlip
|
|
317
|
+
hFlip?: boolean;
|
|
318
|
+
|
|
319
|
+
// Vertical flip. (see hFlip comments)
|
|
320
|
+
vFlip?: boolean;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export declare type IconifyVerticalIconAlignment = 'top' | 'middle' | 'bottom';
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Mix of icon properties and HTMLElement properties
|
|
327
|
+
*/
|
|
328
|
+
export declare type IconProps = IconifyElementProps & IconifyIconProps;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Optional themes, old format.
|
|
332
|
+
*
|
|
333
|
+
* Deprecated because format is unnecessary complicated. Key is meaningless, suffixes and prefixes are mixed together.
|
|
334
|
+
*/
|
|
335
|
+
declare interface LegacyIconifyThemes {
|
|
336
|
+
// Key is unique string.
|
|
337
|
+
[index: string]: {
|
|
338
|
+
// Theme title.
|
|
339
|
+
title: string;
|
|
340
|
+
|
|
341
|
+
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme.
|
|
342
|
+
prefix?: string; // Example: 'baseline-'
|
|
343
|
+
suffix?: string; // Example: '-filled'
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export { }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iconify/vue/offline",
|
|
3
|
+
"module": "../dist/offline.mjs",
|
|
4
|
+
"main": "../dist/offline.js",
|
|
5
|
+
"types": "../dist/offline.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./*": "./*",
|
|
8
|
+
".": {
|
|
9
|
+
"import": "../dist/offline.mjs",
|
|
10
|
+
"types": "../dist/offline.d.ts",
|
|
11
|
+
"default": "../dist/offline.js"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iconify/vue",
|
|
3
|
+
"description": "Iconify icon component for Vue 3.",
|
|
4
|
+
"author": "Vjacheslav Trushkin",
|
|
5
|
+
"version": "3.2.1",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bugs": "https://github.com/iconify/iconify/issues",
|
|
8
|
+
"homepage": "https://iconify.design/",
|
|
9
|
+
"funding": "http://github.com/sponsors/cyberalien",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/iconify/iconify.git",
|
|
13
|
+
"directory": "packages/vue"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "node build",
|
|
17
|
+
"build:lib": "tsc -b",
|
|
18
|
+
"build:dist": "rollup -c rollup.config.js",
|
|
19
|
+
"prebuild:api": "api-extractor run --local --verbose --config api-extractor.offline.json",
|
|
20
|
+
"build:api": "api-extractor run --local --verbose --config api-extractor.iconify.json",
|
|
21
|
+
"test": "vitest"
|
|
22
|
+
},
|
|
23
|
+
"main": "dist/iconify.js",
|
|
24
|
+
"module": "dist/iconify.mjs",
|
|
25
|
+
"types": "dist/iconify.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
"./*": "./*",
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./dist/iconify.mjs",
|
|
30
|
+
"types": "./dist/iconify.d.ts",
|
|
31
|
+
"default": "./dist/iconify.js"
|
|
32
|
+
},
|
|
33
|
+
"./offline": {
|
|
34
|
+
"import": "./dist/offline.mjs",
|
|
35
|
+
"types": "./dist/offline.d.ts",
|
|
36
|
+
"default": "./dist/offline.js"
|
|
37
|
+
},
|
|
38
|
+
"./dist/offline": {
|
|
39
|
+
"import": "./dist/offline.mjs",
|
|
40
|
+
"types": "./dist/offline.d.ts",
|
|
41
|
+
"default": "./dist/offline.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@babel/preset-env": "^7.16.11",
|
|
46
|
+
"@iconify/core": "^1.3.2",
|
|
47
|
+
"@microsoft/api-extractor": "^7.19.5",
|
|
48
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
49
|
+
"@types/jest": "^27.4.1",
|
|
50
|
+
"@vitejs/plugin-vue": "^2.2.4",
|
|
51
|
+
"@vue/test-utils": "^2.0.0-rc.17",
|
|
52
|
+
"jsdom": "^19.0.0",
|
|
53
|
+
"rollup": "^2.70.1",
|
|
54
|
+
"typescript": "^4.6.2",
|
|
55
|
+
"vitest": "^0.7.7",
|
|
56
|
+
"vue": "^3.2.31"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"vue": "3.x"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// Type definitions for Web Bluetooth
|
|
2
|
+
// Project: https://webbluetoothcg.github.io/web-bluetooth/
|
|
3
|
+
// Definitions by: Uri Shaked <https://github.com/urish>
|
|
4
|
+
// Xavier Lozinguez <https://github.com/xlozinguez>
|
|
5
|
+
// Rob Moran <https://github.com/thegecko>
|
|
6
|
+
// David Bjerremose <https://github.com/DaBs>
|
|
7
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
8
|
+
|
|
9
|
+
type BluetoothServiceUUID = number | string;
|
|
10
|
+
type BluetoothCharacteristicUUID = number | string;
|
|
11
|
+
type BluetoothDescriptorUUID = number | string;
|
|
12
|
+
|
|
13
|
+
type BluetoothManufacturerData = Map<number, DataView>;
|
|
14
|
+
type BluetoothServiceData = Map<BluetoothServiceUUID, DataView>;
|
|
15
|
+
|
|
16
|
+
interface BluetoothDataFilter {
|
|
17
|
+
readonly dataPrefix?: BufferSource | undefined;
|
|
18
|
+
readonly mask?: BufferSource | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface BluetoothManufacturerDataFilter extends BluetoothDataFilter {
|
|
22
|
+
companyIdentifier: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface BluetoothServiceDataFilter extends BluetoothDataFilter {
|
|
26
|
+
service: BluetoothServiceUUID;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface BluetoothLEScanFilter {
|
|
30
|
+
readonly name?: string | undefined;
|
|
31
|
+
readonly namePrefix?: string | undefined;
|
|
32
|
+
readonly services?: BluetoothServiceUUID[] | undefined;
|
|
33
|
+
readonly manufacturerData?: BluetoothManufacturerDataFilter[] | undefined;
|
|
34
|
+
readonly serviceData?: BluetoothServiceDataFilter[] | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface BluetoothLEScanOptions {
|
|
38
|
+
readonly filters?: BluetoothLEScanFilter[] | undefined;
|
|
39
|
+
readonly keepRepeatedDevices?: boolean | undefined;
|
|
40
|
+
readonly acceptAllAdvertisements?: boolean | undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface BluetoothLEScan extends BluetoothLEScanOptions {
|
|
44
|
+
active: boolean;
|
|
45
|
+
stop: () => void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type RequestDeviceOptions = {
|
|
49
|
+
filters: BluetoothLEScanFilter[];
|
|
50
|
+
optionalServices?: BluetoothServiceUUID[] | undefined;
|
|
51
|
+
optionalManufacturerData?: number[] | undefined;
|
|
52
|
+
} | {
|
|
53
|
+
acceptAllDevices: boolean;
|
|
54
|
+
optionalServices?: BluetoothServiceUUID[] | undefined;
|
|
55
|
+
optionalManufacturerData?: number[] | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
interface BluetoothAdvertisingEvent extends Event {
|
|
59
|
+
readonly device: BluetoothDevice;
|
|
60
|
+
readonly uuids: BluetoothServiceUUID[];
|
|
61
|
+
readonly manufacturerData: BluetoothManufacturerData;
|
|
62
|
+
readonly serviceData: BluetoothServiceData;
|
|
63
|
+
readonly name?: string | undefined;
|
|
64
|
+
readonly appearance?: number | undefined;
|
|
65
|
+
readonly rssi?: number | undefined;
|
|
66
|
+
readonly txPower?: number | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface BluetoothRemoteGATTDescriptor {
|
|
70
|
+
readonly characteristic: BluetoothRemoteGATTCharacteristic;
|
|
71
|
+
readonly uuid: string;
|
|
72
|
+
readonly value?: DataView | undefined;
|
|
73
|
+
readValue(): Promise<DataView>;
|
|
74
|
+
writeValue(value: BufferSource): Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface BluetoothCharacteristicProperties {
|
|
78
|
+
readonly broadcast: boolean;
|
|
79
|
+
readonly read: boolean;
|
|
80
|
+
readonly writeWithoutResponse: boolean;
|
|
81
|
+
readonly write: boolean;
|
|
82
|
+
readonly notify: boolean;
|
|
83
|
+
readonly indicate: boolean;
|
|
84
|
+
readonly authenticatedSignedWrites: boolean;
|
|
85
|
+
readonly reliableWrite: boolean;
|
|
86
|
+
readonly writableAuxiliaries: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface CharacteristicEventHandlers {
|
|
90
|
+
oncharacteristicvaluechanged: (this: this, ev: Event) => any;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface BluetoothRemoteGATTCharacteristic extends EventTarget, CharacteristicEventHandlers {
|
|
94
|
+
readonly service: BluetoothRemoteGATTService;
|
|
95
|
+
readonly uuid: string;
|
|
96
|
+
readonly properties: BluetoothCharacteristicProperties;
|
|
97
|
+
readonly value?: DataView | undefined;
|
|
98
|
+
getDescriptor(descriptor: BluetoothDescriptorUUID): Promise<BluetoothRemoteGATTDescriptor>;
|
|
99
|
+
getDescriptors(descriptor?: BluetoothDescriptorUUID): Promise<BluetoothRemoteGATTDescriptor[]>;
|
|
100
|
+
readValue(): Promise<DataView>;
|
|
101
|
+
writeValue(value: BufferSource): Promise<void>;
|
|
102
|
+
writeValueWithResponse(value: BufferSource): Promise<void>;
|
|
103
|
+
writeValueWithoutResponse(value: BufferSource): Promise<void>;
|
|
104
|
+
startNotifications(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
105
|
+
stopNotifications(): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
106
|
+
addEventListener(type: "characteristicvaluechanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
|
|
107
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface ServiceEventHandlers {
|
|
111
|
+
onserviceadded: (this: this, ev: Event) => any;
|
|
112
|
+
onservicechanged: (this: this, ev: Event) => any;
|
|
113
|
+
onserviceremoved: (this: this, ev: Event) => any;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface BluetoothRemoteGATTService extends EventTarget, CharacteristicEventHandlers, ServiceEventHandlers {
|
|
117
|
+
readonly device: BluetoothDevice;
|
|
118
|
+
readonly uuid: string;
|
|
119
|
+
readonly isPrimary: boolean;
|
|
120
|
+
getCharacteristic(characteristic: BluetoothCharacteristicUUID): Promise<BluetoothRemoteGATTCharacteristic>;
|
|
121
|
+
getCharacteristics(characteristic?: BluetoothCharacteristicUUID): Promise<BluetoothRemoteGATTCharacteristic[]>;
|
|
122
|
+
getIncludedService(service: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService>;
|
|
123
|
+
getIncludedServices(service?: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService[]>;
|
|
124
|
+
addEventListener(type: "serviceadded", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
|
|
125
|
+
addEventListener(type: "servicechanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
|
|
126
|
+
addEventListener(type: "serviceremoved", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
|
|
127
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface BluetoothRemoteGATTServer {
|
|
131
|
+
readonly device: BluetoothDevice;
|
|
132
|
+
readonly connected: boolean;
|
|
133
|
+
connect(): Promise<BluetoothRemoteGATTServer>;
|
|
134
|
+
disconnect(): void;
|
|
135
|
+
getPrimaryService(service: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService>;
|
|
136
|
+
getPrimaryServices(service?: BluetoothServiceUUID): Promise<BluetoothRemoteGATTService[]>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface BluetoothDeviceEventHandlers {
|
|
140
|
+
onadvertisementreceived: (this: this, ev: BluetoothAdvertisingEvent) => any;
|
|
141
|
+
ongattserverdisconnected: (this: this, ev: Event) => any;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface WatchAdvertisementsOptions {
|
|
145
|
+
signal?: AbortSignal;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface BluetoothDevice extends EventTarget, BluetoothDeviceEventHandlers, CharacteristicEventHandlers, ServiceEventHandlers {
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly name?: string | undefined;
|
|
151
|
+
readonly gatt?: BluetoothRemoteGATTServer | undefined;
|
|
152
|
+
readonly uuids?: string[] | undefined;
|
|
153
|
+
forget(): Promise<void>;
|
|
154
|
+
watchAdvertisements(options?: WatchAdvertisementsOptions): Promise<void>;
|
|
155
|
+
unwatchAdvertisements(): void;
|
|
156
|
+
readonly watchingAdvertisements: boolean;
|
|
157
|
+
addEventListener(type: "gattserverdisconnected", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
|
|
158
|
+
addEventListener(type: "advertisementreceived", listener: (this: this, ev: BluetoothAdvertisingEvent) => any, useCapture?: boolean): void;
|
|
159
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface Bluetooth extends EventTarget, BluetoothDeviceEventHandlers, CharacteristicEventHandlers, ServiceEventHandlers {
|
|
163
|
+
getDevices(): Promise<BluetoothDevice[]>;
|
|
164
|
+
getAvailability(): Promise<boolean>;
|
|
165
|
+
onavailabilitychanged: (this: this, ev: Event) => any;
|
|
166
|
+
readonly referringDevice?: BluetoothDevice | undefined;
|
|
167
|
+
requestDevice(options?: RequestDeviceOptions): Promise<BluetoothDevice>;
|
|
168
|
+
requestLEScan(options?: BluetoothLEScanOptions): Promise<BluetoothLEScan>;
|
|
169
|
+
addEventListener(type: "availabilitychanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
|
|
170
|
+
addEventListener(type: "advertisementreceived", listener: (this: this, ev: BluetoothAdvertisingEvent) => any, useCapture?: boolean): void;
|
|
171
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
interface Navigator {
|
|
175
|
+
bluetooth: Bluetooth;
|
|
176
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@types/web-bluetooth",
|
|
3
|
+
"version": "0.0.14",
|
|
4
|
+
"description": "TypeScript definitions for Web Bluetooth",
|
|
5
|
+
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/web-bluetooth",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Uri Shaked",
|
|
10
|
+
"url": "https://github.com/urish",
|
|
11
|
+
"githubUsername": "urish"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "Xavier Lozinguez",
|
|
15
|
+
"url": "https://github.com/xlozinguez",
|
|
16
|
+
"githubUsername": "xlozinguez"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Rob Moran",
|
|
20
|
+
"url": "https://github.com/thegecko",
|
|
21
|
+
"githubUsername": "thegecko"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "David Bjerremose",
|
|
25
|
+
"url": "https://github.com/DaBs",
|
|
26
|
+
"githubUsername": "DaBs"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"main": "",
|
|
30
|
+
"types": "index.d.ts",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
34
|
+
"directory": "types/web-bluetooth"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {},
|
|
37
|
+
"dependencies": {},
|
|
38
|
+
"typesPublisherContentHash": "d892e9ae9d24a1f67aeaec0b21dff39deea3612836f422c06a0997bcbc3d1e6f",
|
|
39
|
+
"typeScriptVersion": "3.9"
|
|
40
|
+
}
|