@glodon-aiot/react-components 3.3.0-beta.17 → 3.3.0-beta.19
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/es/components/Markdown/Code/index.mjs +43 -43
- package/dist/es/components/Markdown/Image/index.mjs +10 -11
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +2 -25
- package/package.json +5 -1
- package/dist/es/_virtual/_commonjsHelpers.mjs +0 -8
- package/dist/es/_virtual/index.mjs +0 -4
- package/dist/es/_virtual/index2.mjs +0 -4
- package/dist/es/_virtual/index3.mjs +0 -4
- package/dist/es/_virtual/lib.mjs +0 -4
- package/dist/es/_virtual/prism-core.mjs +0 -4
- package/dist/es/_virtual/types.mjs +0 -4
- package/dist/es/_virtual/ua-parser.min.mjs +0 -4
- package/dist/es/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.mjs +0 -9
- package/dist/es/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.mjs +0 -8
- package/dist/es/node_modules/@babel/runtime/helpers/esm/defineProperty.mjs +0 -12
- package/dist/es/node_modules/@babel/runtime/helpers/esm/extends.mjs +0 -13
- package/dist/es/node_modules/@babel/runtime/helpers/esm/iterableToArray.mjs +0 -7
- package/dist/es/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.mjs +0 -7
- package/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.mjs +0 -15
- package/dist/es/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.mjs +0 -15
- package/dist/es/node_modules/@babel/runtime/helpers/esm/toConsumableArray.mjs +0 -10
- package/dist/es/node_modules/@babel/runtime/helpers/esm/toPrimitive.mjs +0 -16
- package/dist/es/node_modules/@babel/runtime/helpers/esm/toPropertyKey.mjs +0 -9
- package/dist/es/node_modules/@babel/runtime/helpers/esm/typeof.mjs +0 -11
- package/dist/es/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.mjs +0 -12
- package/dist/es/node_modules/@react-spring/animated/dist/react-spring-animated.esm.mjs +0 -201
- package/dist/es/node_modules/@react-spring/core/dist/react-spring-core.esm.mjs +0 -1087
- package/dist/es/node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.mjs +0 -104
- package/dist/es/node_modules/@react-spring/shared/dist/react-spring-shared.esm.mjs +0 -568
- package/dist/es/node_modules/@react-spring/web/dist/react-spring-web.esm.mjs +0 -158
- package/dist/es/node_modules/@use-gesture/core/dist/actions-fe213e88.esm.mjs +0 -908
- package/dist/es/node_modules/@use-gesture/core/dist/maths-0ab39ae9.esm.mjs +0 -35
- package/dist/es/node_modules/@use-gesture/core/dist/use-gesture-core.esm.mjs +0 -242
- package/dist/es/node_modules/@use-gesture/react/dist/use-gesture-react.esm.mjs +0 -33
- package/dist/es/node_modules/antd-mobile/es/components/config-provider/config-provider.mjs +0 -20
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.css.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/image-viewer.mjs +0 -78
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/index.mjs +0 -14
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/methods.mjs +0 -34
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slide.mjs +0 -178
- package/dist/es/node_modules/antd-mobile/es/components/image-viewer/slides.mjs +0 -83
- package/dist/es/node_modules/antd-mobile/es/components/mask/index.mjs +0 -5
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.css.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/components/mask/mask.mjs +0 -84
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/index.mjs +0 -5
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.css.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/components/safe-area/safe-area.mjs +0 -9
- package/dist/es/node_modules/antd-mobile/es/global/global.css.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/global/index.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/locales/zh-CN.mjs +0 -141
- package/dist/es/node_modules/antd-mobile/es/utils/attach-properties-to-component.mjs +0 -9
- package/dist/es/node_modules/antd-mobile/es/utils/bound.mjs +0 -7
- package/dist/es/node_modules/antd-mobile/es/utils/can-use-dom.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/utils/convert-px.mjs +0 -11
- package/dist/es/node_modules/antd-mobile/es/utils/dev-log.mjs +0 -7
- package/dist/es/node_modules/antd-mobile/es/utils/get-container.mjs +0 -6
- package/dist/es/node_modules/antd-mobile/es/utils/get-scroll-parent.mjs +0 -22
- package/dist/es/node_modules/antd-mobile/es/utils/is-dev.mjs +0 -4
- package/dist/es/node_modules/antd-mobile/es/utils/matrix.mjs +0 -11
- package/dist/es/node_modules/antd-mobile/es/utils/native-props.mjs +0 -12
- package/dist/es/node_modules/antd-mobile/es/utils/render-imperatively.mjs +0 -47
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-body.mjs +0 -12
- package/dist/es/node_modules/antd-mobile/es/utils/render-to-container.mjs +0 -13
- package/dist/es/node_modules/antd-mobile/es/utils/render.mjs +0 -52
- package/dist/es/node_modules/antd-mobile/es/utils/rubberband.mjs +0 -11
- package/dist/es/node_modules/antd-mobile/es/utils/should-render.mjs +0 -10
- package/dist/es/node_modules/antd-mobile/es/utils/supports-passive.mjs +0 -15
- package/dist/es/node_modules/antd-mobile/es/utils/use-drag-and-pinch.mjs +0 -6
- package/dist/es/node_modules/antd-mobile/es/utils/use-initialized.mjs +0 -8
- package/dist/es/node_modules/antd-mobile/es/utils/use-lock-scroll.mjs +0 -54
- package/dist/es/node_modules/antd-mobile/es/utils/use-touch.mjs +0 -32
- package/dist/es/node_modules/antd-mobile/es/utils/with-default-props.mjs +0 -11
- package/dist/es/node_modules/antd-mobile/es/utils/with-stop-propagation.mjs +0 -19
- package/dist/es/node_modules/character-reference-invalid/index.json.mjs +0 -33
- package/dist/es/node_modules/classnames/index.mjs +0 -42
- package/dist/es/node_modules/hast-util-parse-selector/index.mjs +0 -14
- package/dist/es/node_modules/is-alphabetical/index.mjs +0 -8
- package/dist/es/node_modules/is-alphanumerical/index.mjs +0 -9
- package/dist/es/node_modules/is-decimal/index.mjs +0 -8
- package/dist/es/node_modules/is-hexadecimal/index.mjs +0 -8
- package/dist/es/node_modules/parse-entities/decode-entity.browser.mjs +0 -8
- package/dist/es/node_modules/parse-entities/index.mjs +0 -83
- package/dist/es/node_modules/parse-entities/node_modules/character-entities-legacy/index.json.mjs +0 -217
- package/dist/es/node_modules/property-information/find.mjs +0 -25
- package/dist/es/node_modules/property-information/html.mjs +0 -10
- package/dist/es/node_modules/property-information/lib/aria.mjs +0 -63
- package/dist/es/node_modules/property-information/lib/html.mjs +0 -354
- package/dist/es/node_modules/property-information/lib/util/case-insensitive-transform.mjs +0 -8
- package/dist/es/node_modules/property-information/lib/util/case-sensitive-transform.mjs +0 -7
- package/dist/es/node_modules/property-information/lib/util/create.mjs +0 -13
- package/dist/es/node_modules/property-information/lib/util/defined-info.mjs +0 -18
- package/dist/es/node_modules/property-information/lib/util/info.mjs +0 -19
- package/dist/es/node_modules/property-information/lib/util/merge.mjs +0 -11
- package/dist/es/node_modules/property-information/lib/util/schema.mjs +0 -10
- package/dist/es/node_modules/property-information/lib/util/types.mjs +0 -15
- package/dist/es/node_modules/property-information/lib/xlink.mjs +0 -20
- package/dist/es/node_modules/property-information/lib/xml.mjs +0 -16
- package/dist/es/node_modules/property-information/lib/xmlns.mjs +0 -16
- package/dist/es/node_modules/property-information/normalize.mjs +0 -7
- package/dist/es/node_modules/react-device-detect/dist/lib.mjs +0 -723
- package/dist/es/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.mjs +0 -7
- package/dist/es/node_modules/react-syntax-highlighter/dist/esm/create-element.mjs +0 -101
- package/dist/es/node_modules/react-syntax-highlighter/dist/esm/highlight.mjs +0 -283
- package/dist/es/node_modules/react-syntax-highlighter/dist/esm/languages/prism/supported-languages.mjs +0 -4
- package/dist/es/node_modules/react-syntax-highlighter/dist/esm/prism.mjs +0 -10
- package/dist/es/node_modules/react-syntax-highlighter/dist/esm/styles/prism/prism.mjs +0 -195
- package/dist/es/node_modules/refractor/core.mjs +0 -111
- package/dist/es/node_modules/refractor/index.mjs +0 -553
- package/dist/es/node_modules/refractor/lang/abap.mjs +0 -60
- package/dist/es/node_modules/refractor/lang/abnf.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/actionscript.mjs +0 -22
- package/dist/es/node_modules/refractor/lang/ada.mjs +0 -28
- package/dist/es/node_modules/refractor/lang/agda.mjs +0 -35
- package/dist/es/node_modules/refractor/lang/al.mjs +0 -35
- package/dist/es/node_modules/refractor/lang/antlr4.mjs +0 -72
- package/dist/es/node_modules/refractor/lang/apacheconf.mjs +0 -59
- package/dist/es/node_modules/refractor/lang/apex.mjs +0 -69
- package/dist/es/node_modules/refractor/lang/apl.mjs +0 -44
- package/dist/es/node_modules/refractor/lang/applescript.mjs +0 -26
- package/dist/es/node_modules/refractor/lang/aql.mjs +0 -57
- package/dist/es/node_modules/refractor/lang/arduino.mjs +0 -20
- package/dist/es/node_modules/refractor/lang/arff.mjs +0 -22
- package/dist/es/node_modules/refractor/lang/asciidoc.mjs +0 -208
- package/dist/es/node_modules/refractor/lang/asm6502.mjs +0 -41
- package/dist/es/node_modules/refractor/lang/asmatmel.mjs +0 -53
- package/dist/es/node_modules/refractor/lang/aspnet.mjs +0 -53
- package/dist/es/node_modules/refractor/lang/autohotkey.mjs +0 -40
- package/dist/es/node_modules/refractor/lang/autoit.mjs +0 -43
- package/dist/es/node_modules/refractor/lang/avisynth.mjs +0 -167
- package/dist/es/node_modules/refractor/lang/avro-idl.mjs +0 -50
- package/dist/es/node_modules/refractor/lang/bash.mjs +0 -206
- package/dist/es/node_modules/refractor/lang/basic.mjs +0 -29
- package/dist/es/node_modules/refractor/lang/batch.mjs +0 -95
- package/dist/es/node_modules/refractor/lang/bbcode.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/bicep.mjs +0 -72
- package/dist/es/node_modules/refractor/lang/birb.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/bison.mjs +0 -52
- package/dist/es/node_modules/refractor/lang/bnf.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/brainfuck.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/brightscript.mjs +0 -55
- package/dist/es/node_modules/refractor/lang/bro.mjs +0 -39
- package/dist/es/node_modules/refractor/lang/bsl.mjs +0 -77
- package/dist/es/node_modules/refractor/lang/c.mjs +0 -78
- package/dist/es/node_modules/refractor/lang/cfscript.mjs +0 -44
- package/dist/es/node_modules/refractor/lang/chaiscript.mjs +0 -65
- package/dist/es/node_modules/refractor/lang/cil.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/clike.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/clojure.mjs +0 -42
- package/dist/es/node_modules/refractor/lang/cmake.mjs +0 -41
- package/dist/es/node_modules/refractor/lang/cobol.mjs +0 -58
- package/dist/es/node_modules/refractor/lang/coffeescript.mjs +0 -86
- package/dist/es/node_modules/refractor/lang/concurnas.mjs +0 -69
- package/dist/es/node_modules/refractor/lang/coq.mjs +0 -52
- package/dist/es/node_modules/refractor/lang/cpp.mjs +0 -98
- package/dist/es/node_modules/refractor/lang/crystal.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/csharp.mjs +0 -277
- package/dist/es/node_modules/refractor/lang/cshtml.mjs +0 -104
- package/dist/es/node_modules/refractor/lang/csp.mjs +0 -61
- package/dist/es/node_modules/refractor/lang/css-extras.mjs +0 -109
- package/dist/es/node_modules/refractor/lang/css.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/csv.mjs +0 -16
- package/dist/es/node_modules/refractor/lang/cypher.mjs +0 -44
- package/dist/es/node_modules/refractor/lang/d.mjs +0 -77
- package/dist/es/node_modules/refractor/lang/dart.mjs +0 -72
- package/dist/es/node_modules/refractor/lang/dataweave.mjs +0 -49
- package/dist/es/node_modules/refractor/lang/dax.mjs +0 -39
- package/dist/es/node_modules/refractor/lang/dhall.mjs +0 -74
- package/dist/es/node_modules/refractor/lang/diff.mjs +0 -54
- package/dist/es/node_modules/refractor/lang/django.mjs +0 -60
- package/dist/es/node_modules/refractor/lang/dns-zone-file.mjs +0 -40
- package/dist/es/node_modules/refractor/lang/docker.mjs +0 -83
- package/dist/es/node_modules/refractor/lang/dot.mjs +0 -75
- package/dist/es/node_modules/refractor/lang/ebnf.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/editorconfig.mjs +0 -39
- package/dist/es/node_modules/refractor/lang/eiffel.mjs +0 -46
- package/dist/es/node_modules/refractor/lang/ejs.mjs +0 -33
- package/dist/es/node_modules/refractor/lang/elixir.mjs +0 -100
- package/dist/es/node_modules/refractor/lang/elm.mjs +0 -54
- package/dist/es/node_modules/refractor/lang/erb.mjs +0 -35
- package/dist/es/node_modules/refractor/lang/erlang.mjs +0 -47
- package/dist/es/node_modules/refractor/lang/etlua.mjs +0 -33
- package/dist/es/node_modules/refractor/lang/excel-formula.mjs +0 -74
- package/dist/es/node_modules/refractor/lang/factor.mjs +0 -569
- package/dist/es/node_modules/refractor/lang/false.mjs +0 -39
- package/dist/es/node_modules/refractor/lang/firestore-security-rules.mjs +0 -43
- package/dist/es/node_modules/refractor/lang/flow.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/fortran.mjs +0 -49
- package/dist/es/node_modules/refractor/lang/fsharp.mjs +0 -76
- package/dist/es/node_modules/refractor/lang/ftl.mjs +0 -102
- package/dist/es/node_modules/refractor/lang/gap.mjs +0 -57
- package/dist/es/node_modules/refractor/lang/gcode.mjs +0 -28
- package/dist/es/node_modules/refractor/lang/gdscript.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/gedcom.mjs +0 -40
- package/dist/es/node_modules/refractor/lang/gherkin.mjs +0 -94
- package/dist/es/node_modules/refractor/lang/git.mjs +0 -75
- package/dist/es/node_modules/refractor/lang/glsl.mjs +0 -18
- package/dist/es/node_modules/refractor/lang/gml.mjs +0 -19
- package/dist/es/node_modules/refractor/lang/gn.mjs +0 -55
- package/dist/es/node_modules/refractor/lang/go-module.mjs +0 -34
- package/dist/es/node_modules/refractor/lang/go.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/graphql.mjs +0 -133
- package/dist/es/node_modules/refractor/lang/groovy.mjs +0 -58
- package/dist/es/node_modules/refractor/lang/haml.mjs +0 -132
- package/dist/es/node_modules/refractor/lang/handlebars.mjs +0 -46
- package/dist/es/node_modules/refractor/lang/haskell.mjs +0 -76
- package/dist/es/node_modules/refractor/lang/haxe.mjs +0 -84
- package/dist/es/node_modules/refractor/lang/hcl.mjs +0 -68
- package/dist/es/node_modules/refractor/lang/hlsl.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/hoon.mjs +0 -26
- package/dist/es/node_modules/refractor/lang/hpkp.mjs +0 -20
- package/dist/es/node_modules/refractor/lang/hsts.mjs +0 -20
- package/dist/es/node_modules/refractor/lang/http.mjs +0 -126
- package/dist/es/node_modules/refractor/lang/ichigojam.mjs +0 -25
- package/dist/es/node_modules/refractor/lang/icon.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/icu-message-format.mjs +0 -136
- package/dist/es/node_modules/refractor/lang/idris.mjs +0 -30
- package/dist/es/node_modules/refractor/lang/iecst.mjs +0 -38
- package/dist/es/node_modules/refractor/lang/ignore.mjs +0 -30
- package/dist/es/node_modules/refractor/lang/inform7.mjs +0 -69
- package/dist/es/node_modules/refractor/lang/ini.mjs +0 -52
- package/dist/es/node_modules/refractor/lang/io.mjs +0 -34
- package/dist/es/node_modules/refractor/lang/j.mjs +0 -40
- package/dist/es/node_modules/refractor/lang/java.mjs +0 -86
- package/dist/es/node_modules/refractor/lang/javadoc.mjs +0 -89
- package/dist/es/node_modules/refractor/lang/javadoclike.mjs +0 -60
- package/dist/es/node_modules/refractor/lang/javascript.mjs +0 -114
- package/dist/es/node_modules/refractor/lang/javastacktrace.mjs +0 -146
- package/dist/es/node_modules/refractor/lang/jexl.mjs +0 -26
- package/dist/es/node_modules/refractor/lang/jolie.mjs +0 -51
- package/dist/es/node_modules/refractor/lang/jq.mjs +0 -71
- package/dist/es/node_modules/refractor/lang/js-extras.mjs +0 -104
- package/dist/es/node_modules/refractor/lang/js-templates.mjs +0 -153
- package/dist/es/node_modules/refractor/lang/jsdoc.mjs +0 -83
- package/dist/es/node_modules/refractor/lang/json.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/json5.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/jsonp.mjs +0 -20
- package/dist/es/node_modules/refractor/lang/jsstacktrace.mjs +0 -53
- package/dist/es/node_modules/refractor/lang/jsx.mjs +0 -61
- package/dist/es/node_modules/refractor/lang/julia.mjs +0 -47
- package/dist/es/node_modules/refractor/lang/keepalived.mjs +0 -54
- package/dist/es/node_modules/refractor/lang/keyman.mjs +0 -55
- package/dist/es/node_modules/refractor/lang/kotlin.mjs +0 -81
- package/dist/es/node_modules/refractor/lang/kumir.mjs +0 -85
- package/dist/es/node_modules/refractor/lang/kusto.mjs +0 -47
- package/dist/es/node_modules/refractor/lang/latex.mjs +0 -68
- package/dist/es/node_modules/refractor/lang/latte.mjs +0 -68
- package/dist/es/node_modules/refractor/lang/less.mjs +0 -51
- package/dist/es/node_modules/refractor/lang/lilypond.mjs +0 -77
- package/dist/es/node_modules/refractor/lang/liquid.mjs +0 -68
- package/dist/es/node_modules/refractor/lang/lisp.mjs +0 -158
- package/dist/es/node_modules/refractor/lang/livescript.mjs +0 -119
- package/dist/es/node_modules/refractor/lang/llvm.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/log.mjs +0 -103
- package/dist/es/node_modules/refractor/lang/lolcode.mjs +0 -57
- package/dist/es/node_modules/refractor/lang/lua.mjs +0 -29
- package/dist/es/node_modules/refractor/lang/magma.mjs +0 -42
- package/dist/es/node_modules/refractor/lang/makefile.mjs +0 -42
- package/dist/es/node_modules/refractor/lang/markdown.mjs +0 -306
- package/dist/es/node_modules/refractor/lang/markup-templating.mjs +0 -74
- package/dist/es/node_modules/refractor/lang/markup.mjs +0 -154
- package/dist/es/node_modules/refractor/lang/matlab.mjs +0 -25
- package/dist/es/node_modules/refractor/lang/maxscript.mjs +0 -70
- package/dist/es/node_modules/refractor/lang/mel.mjs +0 -49
- package/dist/es/node_modules/refractor/lang/mermaid.mjs +0 -116
- package/dist/es/node_modules/refractor/lang/mizar.mjs +0 -24
- package/dist/es/node_modules/refractor/lang/mongodb.mjs +0 -287
- package/dist/es/node_modules/refractor/lang/monkey.mjs +0 -40
- package/dist/es/node_modules/refractor/lang/moonscript.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/n1ql.mjs +0 -34
- package/dist/es/node_modules/refractor/lang/n4js.mjs +0 -22
- package/dist/es/node_modules/refractor/lang/nand2tetris-hdl.mjs +0 -21
- package/dist/es/node_modules/refractor/lang/naniscript.mjs +0 -140
- package/dist/es/node_modules/refractor/lang/nasm.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/neon.mjs +0 -52
- package/dist/es/node_modules/refractor/lang/nevod.mjs +0 -125
- package/dist/es/node_modules/refractor/lang/nginx.mjs +0 -61
- package/dist/es/node_modules/refractor/lang/nim.mjs +0 -54
- package/dist/es/node_modules/refractor/lang/nix.mjs +0 -45
- package/dist/es/node_modules/refractor/lang/nsis.mjs +0 -37
- package/dist/es/node_modules/refractor/lang/objectivec.mjs +0 -23
- package/dist/es/node_modules/refractor/lang/ocaml.mjs +0 -64
- package/dist/es/node_modules/refractor/lang/opencl.mjs +0 -62
- package/dist/es/node_modules/refractor/lang/openqasm.mjs +0 -29
- package/dist/es/node_modules/refractor/lang/oz.mjs +0 -37
- package/dist/es/node_modules/refractor/lang/parigp.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/parser.mjs +0 -80
- package/dist/es/node_modules/refractor/lang/pascal.mjs +0 -66
- package/dist/es/node_modules/refractor/lang/pascaligo.mjs +0 -70
- package/dist/es/node_modules/refractor/lang/pcaxis.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/peoplecode.mjs +0 -51
- package/dist/es/node_modules/refractor/lang/perl.mjs +0 -134
- package/dist/es/node_modules/refractor/lang/php-extras.mjs +0 -29
- package/dist/es/node_modules/refractor/lang/php.mjs +0 -301
- package/dist/es/node_modules/refractor/lang/phpdoc.mjs +0 -34
- package/dist/es/node_modules/refractor/lang/plsql.mjs +0 -30
- package/dist/es/node_modules/refractor/lang/powerquery.mjs +0 -44
- package/dist/es/node_modules/refractor/lang/powershell.mjs +0 -58
- package/dist/es/node_modules/refractor/lang/processing.mjs +0 -25
- package/dist/es/node_modules/refractor/lang/prolog.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/promql.mjs +0 -74
- package/dist/es/node_modules/refractor/lang/properties.mjs +0 -21
- package/dist/es/node_modules/refractor/lang/protobuf.mjs +0 -47
- package/dist/es/node_modules/refractor/lang/psl.mjs +0 -47
- package/dist/es/node_modules/refractor/lang/pug.mjs +0 -173
- package/dist/es/node_modules/refractor/lang/puppet.mjs +0 -140
- package/dist/es/node_modules/refractor/lang/pure.mjs +0 -72
- package/dist/es/node_modules/refractor/lang/purebasic.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/purescript.mjs +0 -41
- package/dist/es/node_modules/refractor/lang/python.mjs +0 -73
- package/dist/es/node_modules/refractor/lang/q.mjs +0 -62
- package/dist/es/node_modules/refractor/lang/qml.mjs +0 -67
- package/dist/es/node_modules/refractor/lang/qore.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/qsharp.mjs +0 -93
- package/dist/es/node_modules/refractor/lang/r.mjs +0 -31
- package/dist/es/node_modules/refractor/lang/racket.mjs +0 -29
- package/dist/es/node_modules/refractor/lang/reason.mjs +0 -33
- package/dist/es/node_modules/refractor/lang/regex.mjs +0 -97
- package/dist/es/node_modules/refractor/lang/rego.mjs +0 -37
- package/dist/es/node_modules/refractor/lang/renpy.mjs +0 -30
- package/dist/es/node_modules/refractor/lang/rest.mjs +0 -199
- package/dist/es/node_modules/refractor/lang/rip.mjs +0 -41
- package/dist/es/node_modules/refractor/lang/roboconf.mjs +0 -39
- package/dist/es/node_modules/refractor/lang/robotframework.mjs +0 -95
- package/dist/es/node_modules/refractor/lang/ruby.mjs +0 -159
- package/dist/es/node_modules/refractor/lang/rust.mjs +0 -122
- package/dist/es/node_modules/refractor/lang/sas.mjs +0 -305
- package/dist/es/node_modules/refractor/lang/sass.mjs +0 -69
- package/dist/es/node_modules/refractor/lang/scala.mjs +0 -59
- package/dist/es/node_modules/refractor/lang/scheme.mjs +0 -120
- package/dist/es/node_modules/refractor/lang/scss.mjs +0 -82
- package/dist/es/node_modules/refractor/lang/shell-session.mjs +0 -69
- package/dist/es/node_modules/refractor/lang/smali.mjs +0 -84
- package/dist/es/node_modules/refractor/lang/smalltalk.mjs +0 -47
- package/dist/es/node_modules/refractor/lang/smarty.mjs +0 -106
- package/dist/es/node_modules/refractor/lang/sml.mjs +0 -64
- package/dist/es/node_modules/refractor/lang/solidity.mjs +0 -28
- package/dist/es/node_modules/refractor/lang/solution-file.mjs +0 -58
- package/dist/es/node_modules/refractor/lang/soy.mjs +0 -77
- package/dist/es/node_modules/refractor/lang/sparql.mjs +0 -24
- package/dist/es/node_modules/refractor/lang/splunk-spl.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/sqf.mjs +0 -42
- package/dist/es/node_modules/refractor/lang/sql.mjs +0 -42
- package/dist/es/node_modules/refractor/lang/squirrel.mjs +0 -50
- package/dist/es/node_modules/refractor/lang/stan.mjs +0 -63
- package/dist/es/node_modules/refractor/lang/stylus.mjs +0 -141
- package/dist/es/node_modules/refractor/lang/swift.mjs +0 -125
- package/dist/es/node_modules/refractor/lang/systemd.mjs +0 -65
- package/dist/es/node_modules/refractor/lang/t4-cs.mjs +0 -17
- package/dist/es/node_modules/refractor/lang/t4-templating.mjs +0 -57
- package/dist/es/node_modules/refractor/lang/t4-vb.mjs +0 -17
- package/dist/es/node_modules/refractor/lang/tap.mjs +0 -35
- package/dist/es/node_modules/refractor/lang/tcl.mjs +0 -51
- package/dist/es/node_modules/refractor/lang/textile.mjs +0 -248
- package/dist/es/node_modules/refractor/lang/toml.mjs +0 -54
- package/dist/es/node_modules/refractor/lang/tremor.mjs +0 -67
- package/dist/es/node_modules/refractor/lang/tsx.mjs +0 -22
- package/dist/es/node_modules/refractor/lang/tt2.mjs +0 -53
- package/dist/es/node_modules/refractor/lang/turtle.mjs +0 -62
- package/dist/es/node_modules/refractor/lang/twig.mjs +0 -48
- package/dist/es/node_modules/refractor/lang/typescript.mjs +0 -57
- package/dist/es/node_modules/refractor/lang/typoscript.mjs +0 -81
- package/dist/es/node_modules/refractor/lang/unrealscript.mjs +0 -50
- package/dist/es/node_modules/refractor/lang/uorazor.mjs +0 -57
- package/dist/es/node_modules/refractor/lang/uri.mjs +0 -92
- package/dist/es/node_modules/refractor/lang/v.mjs +0 -85
- package/dist/es/node_modules/refractor/lang/vala.mjs +0 -87
- package/dist/es/node_modules/refractor/lang/vbnet.mjs +0 -34
- package/dist/es/node_modules/refractor/lang/velocity.mjs +0 -75
- package/dist/es/node_modules/refractor/lang/verilog.mjs +0 -38
- package/dist/es/node_modules/refractor/lang/vhdl.mjs +0 -35
- package/dist/es/node_modules/refractor/lang/vim.mjs +0 -22
- package/dist/es/node_modules/refractor/lang/visual-basic.mjs +0 -38
- package/dist/es/node_modules/refractor/lang/warpscript.mjs +0 -33
- package/dist/es/node_modules/refractor/lang/wasm.mjs +0 -36
- package/dist/es/node_modules/refractor/lang/web-idl.mjs +0 -89
- package/dist/es/node_modules/refractor/lang/wiki.mjs +0 -86
- package/dist/es/node_modules/refractor/lang/wolfram.mjs +0 -37
- package/dist/es/node_modules/refractor/lang/wren.mjs +0 -97
- package/dist/es/node_modules/refractor/lang/xeora.mjs +0 -121
- package/dist/es/node_modules/refractor/lang/xml-doc.mjs +0 -35
- package/dist/es/node_modules/refractor/lang/xojo.mjs +0 -30
- package/dist/es/node_modules/refractor/lang/xquery.mjs +0 -89
- package/dist/es/node_modules/refractor/lang/yaml.mjs +0 -78
- package/dist/es/node_modules/refractor/lang/yang.mjs +0 -32
- package/dist/es/node_modules/refractor/lang/zig.mjs +0 -80
- package/dist/es/node_modules/refractor/node_modules/comma-separated-tokens/index.mjs +0 -16
- package/dist/es/node_modules/refractor/node_modules/hastscript/factory.mjs +0 -77
- package/dist/es/node_modules/refractor/node_modules/hastscript/html.mjs +0 -8
- package/dist/es/node_modules/refractor/node_modules/hastscript/index.mjs +0 -5
- package/dist/es/node_modules/refractor/node_modules/prismjs/components/prism-core.mjs +0 -720
- package/dist/es/node_modules/refractor/node_modules/space-separated-tokens/index.mjs +0 -14
- package/dist/es/node_modules/tslib/tslib.es6.mjs +0 -30
- package/dist/es/node_modules/ua-parser-js/dist/ua-parser.min.mjs +0 -123
- package/dist/es/node_modules/xtend/immutable.mjs +0 -12
|
@@ -1,908 +0,0 @@
|
|
|
1
|
-
import { V as c, c as Q } from "./maths-0ab39ae9.esm.mjs";
|
|
2
|
-
function Z(s, t) {
|
|
3
|
-
if (typeof s != "object" || s === null)
|
|
4
|
-
return s;
|
|
5
|
-
var e = s[Symbol.toPrimitive];
|
|
6
|
-
if (e !== void 0) {
|
|
7
|
-
var i = e.call(s, t || "default");
|
|
8
|
-
if (typeof i != "object")
|
|
9
|
-
return i;
|
|
10
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
11
|
-
}
|
|
12
|
-
return (t === "string" ? String : Number)(s);
|
|
13
|
-
}
|
|
14
|
-
function tt(s) {
|
|
15
|
-
var t = Z(s, "string");
|
|
16
|
-
return typeof t == "symbol" ? t : String(t);
|
|
17
|
-
}
|
|
18
|
-
function _(s, t, e) {
|
|
19
|
-
return t = tt(t), t in s ? Object.defineProperty(s, t, {
|
|
20
|
-
value: e,
|
|
21
|
-
enumerable: !0,
|
|
22
|
-
configurable: !0,
|
|
23
|
-
writable: !0
|
|
24
|
-
}) : s[t] = e, s;
|
|
25
|
-
}
|
|
26
|
-
function O(s, t) {
|
|
27
|
-
var e = Object.keys(s);
|
|
28
|
-
if (Object.getOwnPropertySymbols) {
|
|
29
|
-
var i = Object.getOwnPropertySymbols(s);
|
|
30
|
-
t && (i = i.filter(function(n) {
|
|
31
|
-
return Object.getOwnPropertyDescriptor(s, n).enumerable;
|
|
32
|
-
})), e.push.apply(e, i);
|
|
33
|
-
}
|
|
34
|
-
return e;
|
|
35
|
-
}
|
|
36
|
-
function u(s) {
|
|
37
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
38
|
-
var e = arguments[t] != null ? arguments[t] : {};
|
|
39
|
-
t % 2 ? O(Object(e), !0).forEach(function(i) {
|
|
40
|
-
_(s, i, e[i]);
|
|
41
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(e)) : O(Object(e)).forEach(function(i) {
|
|
42
|
-
Object.defineProperty(s, i, Object.getOwnPropertyDescriptor(e, i));
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return s;
|
|
46
|
-
}
|
|
47
|
-
const Y = {
|
|
48
|
-
pointer: {
|
|
49
|
-
start: "down",
|
|
50
|
-
change: "move",
|
|
51
|
-
end: "up"
|
|
52
|
-
},
|
|
53
|
-
mouse: {
|
|
54
|
-
start: "down",
|
|
55
|
-
change: "move",
|
|
56
|
-
end: "up"
|
|
57
|
-
},
|
|
58
|
-
touch: {
|
|
59
|
-
start: "start",
|
|
60
|
-
change: "move",
|
|
61
|
-
end: "end"
|
|
62
|
-
},
|
|
63
|
-
gesture: {
|
|
64
|
-
start: "start",
|
|
65
|
-
change: "change",
|
|
66
|
-
end: "end"
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
function P(s) {
|
|
70
|
-
return s ? s[0].toUpperCase() + s.slice(1) : "";
|
|
71
|
-
}
|
|
72
|
-
const et = ["enter", "leave"];
|
|
73
|
-
function st(s = !1, t) {
|
|
74
|
-
return s && !et.includes(t);
|
|
75
|
-
}
|
|
76
|
-
function Mt(s, t = "", e = !1) {
|
|
77
|
-
const i = Y[s], n = i && i[t] || t;
|
|
78
|
-
return "on" + P(s) + P(n) + (st(e, n) ? "Capture" : "");
|
|
79
|
-
}
|
|
80
|
-
const it = ["gotpointercapture", "lostpointercapture"];
|
|
81
|
-
function Lt(s) {
|
|
82
|
-
let t = s.substring(2).toLowerCase();
|
|
83
|
-
const e = !!~t.indexOf("passive");
|
|
84
|
-
e && (t = t.replace("passive", ""));
|
|
85
|
-
const i = it.includes(t) ? "capturecapture" : "capture", n = !!~t.indexOf(i);
|
|
86
|
-
return n && (t = t.replace("capture", "")), {
|
|
87
|
-
device: t,
|
|
88
|
-
capture: n,
|
|
89
|
-
passive: e
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function Nt(s, t = "") {
|
|
93
|
-
const e = Y[s], i = e && e[t] || t;
|
|
94
|
-
return s + i;
|
|
95
|
-
}
|
|
96
|
-
function x(s) {
|
|
97
|
-
return "touches" in s;
|
|
98
|
-
}
|
|
99
|
-
function j(s) {
|
|
100
|
-
return x(s) ? "touch" : "pointerType" in s ? s.pointerType : "mouse";
|
|
101
|
-
}
|
|
102
|
-
function nt(s) {
|
|
103
|
-
return Array.from(s.touches).filter((t) => {
|
|
104
|
-
var e, i;
|
|
105
|
-
return t.target === s.currentTarget || ((e = s.currentTarget) === null || e === void 0 || (i = e.contains) === null || i === void 0 ? void 0 : i.call(e, t.target));
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
function rt(s) {
|
|
109
|
-
return s.type === "touchend" || s.type === "touchcancel" ? s.changedTouches : s.targetTouches;
|
|
110
|
-
}
|
|
111
|
-
function H(s) {
|
|
112
|
-
return x(s) ? rt(s)[0] : s;
|
|
113
|
-
}
|
|
114
|
-
function k(s, t) {
|
|
115
|
-
try {
|
|
116
|
-
const e = t.clientX - s.clientX, i = t.clientY - s.clientY, n = (t.clientX + s.clientX) / 2, r = (t.clientY + s.clientY) / 2, o = Math.hypot(e, i);
|
|
117
|
-
return {
|
|
118
|
-
angle: -(Math.atan2(e, i) * 180) / Math.PI,
|
|
119
|
-
distance: o,
|
|
120
|
-
origin: [n, r]
|
|
121
|
-
};
|
|
122
|
-
} catch (e) {
|
|
123
|
-
}
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
function Vt(s) {
|
|
127
|
-
return nt(s).map((t) => t.identifier);
|
|
128
|
-
}
|
|
129
|
-
function C(s, t) {
|
|
130
|
-
const [e, i] = Array.from(s.touches).filter((n) => t.includes(n.identifier));
|
|
131
|
-
return k(e, i);
|
|
132
|
-
}
|
|
133
|
-
function A(s) {
|
|
134
|
-
const t = H(s);
|
|
135
|
-
return x(s) ? t.identifier : t.pointerId;
|
|
136
|
-
}
|
|
137
|
-
function M(s) {
|
|
138
|
-
const t = H(s);
|
|
139
|
-
return [t.clientX, t.clientY];
|
|
140
|
-
}
|
|
141
|
-
const L = 40, N = 800;
|
|
142
|
-
function ot(s) {
|
|
143
|
-
let {
|
|
144
|
-
deltaX: t,
|
|
145
|
-
deltaY: e,
|
|
146
|
-
deltaMode: i
|
|
147
|
-
} = s;
|
|
148
|
-
return i === 1 ? (t *= L, e *= L) : i === 2 && (t *= N, e *= N), [t, e];
|
|
149
|
-
}
|
|
150
|
-
function at(s) {
|
|
151
|
-
const t = {};
|
|
152
|
-
if ("buttons" in s && (t.buttons = s.buttons), "shiftKey" in s) {
|
|
153
|
-
const {
|
|
154
|
-
shiftKey: e,
|
|
155
|
-
altKey: i,
|
|
156
|
-
metaKey: n,
|
|
157
|
-
ctrlKey: r
|
|
158
|
-
} = s;
|
|
159
|
-
Object.assign(t, {
|
|
160
|
-
shiftKey: e,
|
|
161
|
-
altKey: i,
|
|
162
|
-
metaKey: n,
|
|
163
|
-
ctrlKey: r
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
return t;
|
|
167
|
-
}
|
|
168
|
-
function D(s, ...t) {
|
|
169
|
-
return typeof s == "function" ? s(...t) : s;
|
|
170
|
-
}
|
|
171
|
-
function ct() {
|
|
172
|
-
}
|
|
173
|
-
function Kt(...s) {
|
|
174
|
-
return s.length === 0 ? ct : s.length === 1 ? s[0] : function() {
|
|
175
|
-
let t;
|
|
176
|
-
for (const e of s)
|
|
177
|
-
t = e.apply(this, arguments) || t;
|
|
178
|
-
return t;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
function V(s, t) {
|
|
182
|
-
return Object.assign({}, t, s || {});
|
|
183
|
-
}
|
|
184
|
-
const ut = 32;
|
|
185
|
-
class X {
|
|
186
|
-
constructor(t, e, i) {
|
|
187
|
-
this.ctrl = t, this.args = e, this.key = i, this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
|
|
188
|
-
}
|
|
189
|
-
get state() {
|
|
190
|
-
return this.ctrl.state[this.key];
|
|
191
|
-
}
|
|
192
|
-
set state(t) {
|
|
193
|
-
this.ctrl.state[this.key] = t;
|
|
194
|
-
}
|
|
195
|
-
get shared() {
|
|
196
|
-
return this.ctrl.state.shared;
|
|
197
|
-
}
|
|
198
|
-
get eventStore() {
|
|
199
|
-
return this.ctrl.gestureEventStores[this.key];
|
|
200
|
-
}
|
|
201
|
-
get timeoutStore() {
|
|
202
|
-
return this.ctrl.gestureTimeoutStores[this.key];
|
|
203
|
-
}
|
|
204
|
-
get config() {
|
|
205
|
-
return this.ctrl.config[this.key];
|
|
206
|
-
}
|
|
207
|
-
get sharedConfig() {
|
|
208
|
-
return this.ctrl.config.shared;
|
|
209
|
-
}
|
|
210
|
-
get handler() {
|
|
211
|
-
return this.ctrl.handlers[this.key];
|
|
212
|
-
}
|
|
213
|
-
reset() {
|
|
214
|
-
const {
|
|
215
|
-
state: t,
|
|
216
|
-
shared: e,
|
|
217
|
-
ingKey: i,
|
|
218
|
-
args: n
|
|
219
|
-
} = this;
|
|
220
|
-
e[i] = t._active = t.active = t._blocked = t._force = !1, t._step = [!1, !1], t.intentional = !1, t._movement = [0, 0], t._distance = [0, 0], t._direction = [0, 0], t._delta = [0, 0], t._bounds = [[-1 / 0, 1 / 0], [-1 / 0, 1 / 0]], t.args = n, t.axis = void 0, t.memo = void 0, t.elapsedTime = t.timeDelta = 0, t.direction = [0, 0], t.distance = [0, 0], t.overflow = [0, 0], t._movementBound = [!1, !1], t.velocity = [0, 0], t.movement = [0, 0], t.delta = [0, 0], t.timeStamp = 0;
|
|
221
|
-
}
|
|
222
|
-
start(t) {
|
|
223
|
-
const e = this.state, i = this.config;
|
|
224
|
-
e._active || (this.reset(), this.computeInitial(), e._active = !0, e.target = t.target, e.currentTarget = t.currentTarget, e.lastOffset = i.from ? D(i.from, e) : e.offset, e.offset = e.lastOffset, e.startTime = e.timeStamp = t.timeStamp);
|
|
225
|
-
}
|
|
226
|
-
computeValues(t) {
|
|
227
|
-
const e = this.state;
|
|
228
|
-
e._values = t, e.values = this.config.transform(t);
|
|
229
|
-
}
|
|
230
|
-
computeInitial() {
|
|
231
|
-
const t = this.state;
|
|
232
|
-
t._initial = t._values, t.initial = t.values;
|
|
233
|
-
}
|
|
234
|
-
compute(t) {
|
|
235
|
-
const {
|
|
236
|
-
state: e,
|
|
237
|
-
config: i,
|
|
238
|
-
shared: n
|
|
239
|
-
} = this;
|
|
240
|
-
e.args = this.args;
|
|
241
|
-
let r = 0;
|
|
242
|
-
if (t && (e.event = t, i.preventDefault && t.cancelable && e.event.preventDefault(), e.type = t.type, n.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, n.locked = !!document.pointerLockElement, Object.assign(n, at(t)), n.down = n.pressed = n.buttons % 2 === 1 || n.touches > 0, r = t.timeStamp - e.timeStamp, e.timeStamp = t.timeStamp, e.elapsedTime = e.timeStamp - e.startTime), e._active) {
|
|
243
|
-
const p = e._delta.map(Math.abs);
|
|
244
|
-
c.addTo(e._distance, p);
|
|
245
|
-
}
|
|
246
|
-
this.axisIntent && this.axisIntent(t);
|
|
247
|
-
const [o, h] = e._movement, [d, m] = i.threshold, {
|
|
248
|
-
_step: a,
|
|
249
|
-
values: g
|
|
250
|
-
} = e;
|
|
251
|
-
if (i.hasCustomTransform ? (a[0] === !1 && (a[0] = Math.abs(o) >= d && g[0]), a[1] === !1 && (a[1] = Math.abs(h) >= m && g[1])) : (a[0] === !1 && (a[0] = Math.abs(o) >= d && Math.sign(o) * d), a[1] === !1 && (a[1] = Math.abs(h) >= m && Math.sign(h) * m)), e.intentional = a[0] !== !1 || a[1] !== !1, !e.intentional)
|
|
252
|
-
return;
|
|
253
|
-
const l = [0, 0];
|
|
254
|
-
if (i.hasCustomTransform) {
|
|
255
|
-
const [p, J] = g;
|
|
256
|
-
l[0] = a[0] !== !1 ? p - a[0] : 0, l[1] = a[1] !== !1 ? J - a[1] : 0;
|
|
257
|
-
} else
|
|
258
|
-
l[0] = a[0] !== !1 ? o - a[0] : 0, l[1] = a[1] !== !1 ? h - a[1] : 0;
|
|
259
|
-
this.restrictToAxis && !e._blocked && this.restrictToAxis(l);
|
|
260
|
-
const b = e.offset, E = e._active && !e._blocked || e.active;
|
|
261
|
-
E && (e.first = e._active && !e.active, e.last = !e._active && e.active, e.active = n[this.ingKey] = e._active, t && (e.first && ("bounds" in i && (e._bounds = D(i.bounds, e)), this.setup && this.setup()), e.movement = l, this.computeOffset()));
|
|
262
|
-
const [w, T] = e.offset, [[I, W], [$, F]] = e._bounds;
|
|
263
|
-
e.overflow = [w < I ? -1 : w > W ? 1 : 0, T < $ ? -1 : T > F ? 1 : 0], e._movementBound[0] = e.overflow[0] ? e._movementBound[0] === !1 ? e._movement[0] : e._movementBound[0] : !1, e._movementBound[1] = e.overflow[1] ? e._movementBound[1] === !1 ? e._movement[1] : e._movementBound[1] : !1;
|
|
264
|
-
const q = e._active ? i.rubberband || [0, 0] : [0, 0];
|
|
265
|
-
if (e.offset = Q(e._bounds, e.offset, q), e.delta = c.sub(e.offset, b), this.computeMovement(), E && (!e.last || r > ut)) {
|
|
266
|
-
e.delta = c.sub(e.offset, b);
|
|
267
|
-
const p = e.delta.map(Math.abs);
|
|
268
|
-
c.addTo(e.distance, p), e.direction = e.delta.map(Math.sign), e._direction = e._delta.map(Math.sign), !e.first && r > 0 && (e.velocity = [p[0] / r, p[1] / r], e.timeDelta = r);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
emit() {
|
|
272
|
-
const t = this.state, e = this.shared, i = this.config;
|
|
273
|
-
if (t._active || this.clean(), (t._blocked || !t.intentional) && !t._force && !i.triggerAllEvents)
|
|
274
|
-
return;
|
|
275
|
-
const n = this.handler(u(u(u({}, e), t), {}, {
|
|
276
|
-
[this.aliasKey]: t.values
|
|
277
|
-
}));
|
|
278
|
-
n !== void 0 && (t.memo = n);
|
|
279
|
-
}
|
|
280
|
-
clean() {
|
|
281
|
-
this.eventStore.clean(), this.timeoutStore.clean();
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
function ht([s, t], e) {
|
|
285
|
-
const i = Math.abs(s), n = Math.abs(t);
|
|
286
|
-
if (i > n && i > e)
|
|
287
|
-
return "x";
|
|
288
|
-
if (n > i && n > e)
|
|
289
|
-
return "y";
|
|
290
|
-
}
|
|
291
|
-
class ft extends X {
|
|
292
|
-
constructor(...t) {
|
|
293
|
-
super(...t), _(this, "aliasKey", "xy");
|
|
294
|
-
}
|
|
295
|
-
reset() {
|
|
296
|
-
super.reset(), this.state.axis = void 0;
|
|
297
|
-
}
|
|
298
|
-
init() {
|
|
299
|
-
this.state.offset = [0, 0], this.state.lastOffset = [0, 0];
|
|
300
|
-
}
|
|
301
|
-
computeOffset() {
|
|
302
|
-
this.state.offset = c.add(this.state.lastOffset, this.state.movement);
|
|
303
|
-
}
|
|
304
|
-
computeMovement() {
|
|
305
|
-
this.state.movement = c.sub(this.state.offset, this.state.lastOffset);
|
|
306
|
-
}
|
|
307
|
-
axisIntent(t) {
|
|
308
|
-
const e = this.state, i = this.config;
|
|
309
|
-
if (!e.axis && t) {
|
|
310
|
-
const n = typeof i.axisThreshold == "object" ? i.axisThreshold[j(t)] : i.axisThreshold;
|
|
311
|
-
e.axis = ht(e._movement, n);
|
|
312
|
-
}
|
|
313
|
-
e._blocked = (i.lockDirection || !!i.axis) && !e.axis || !!i.axis && i.axis !== e.axis;
|
|
314
|
-
}
|
|
315
|
-
restrictToAxis(t) {
|
|
316
|
-
if (this.config.axis || this.config.lockDirection)
|
|
317
|
-
switch (this.state.axis) {
|
|
318
|
-
case "x":
|
|
319
|
-
t[1] = 0;
|
|
320
|
-
break;
|
|
321
|
-
case "y":
|
|
322
|
-
t[0] = 0;
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
const K = (s) => s, R = 0.15, S = {
|
|
328
|
-
enabled(s = !0) {
|
|
329
|
-
return s;
|
|
330
|
-
},
|
|
331
|
-
eventOptions(s, t, e) {
|
|
332
|
-
return u(u({}, e.shared.eventOptions), s);
|
|
333
|
-
},
|
|
334
|
-
preventDefault(s = !1) {
|
|
335
|
-
return s;
|
|
336
|
-
},
|
|
337
|
-
triggerAllEvents(s = !1) {
|
|
338
|
-
return s;
|
|
339
|
-
},
|
|
340
|
-
rubberband(s = 0) {
|
|
341
|
-
switch (s) {
|
|
342
|
-
case !0:
|
|
343
|
-
return [R, R];
|
|
344
|
-
case !1:
|
|
345
|
-
return [0, 0];
|
|
346
|
-
default:
|
|
347
|
-
return c.toVector(s);
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
from(s) {
|
|
351
|
-
if (typeof s == "function")
|
|
352
|
-
return s;
|
|
353
|
-
if (s != null)
|
|
354
|
-
return c.toVector(s);
|
|
355
|
-
},
|
|
356
|
-
transform(s, t, e) {
|
|
357
|
-
const i = s || e.shared.transform;
|
|
358
|
-
if (this.hasCustomTransform = !!i, process.env.NODE_ENV === "development") {
|
|
359
|
-
const n = i || K;
|
|
360
|
-
return (r) => {
|
|
361
|
-
const o = n(r);
|
|
362
|
-
return (!isFinite(o[0]) || !isFinite(o[1])) && console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${o[0]},${[1]}]`), o;
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
return i || K;
|
|
366
|
-
},
|
|
367
|
-
threshold(s) {
|
|
368
|
-
return c.toVector(s, 0);
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
process.env.NODE_ENV === "development" && Object.assign(S, {
|
|
372
|
-
domTarget(s) {
|
|
373
|
-
if (s !== void 0)
|
|
374
|
-
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
375
|
-
return NaN;
|
|
376
|
-
},
|
|
377
|
-
lockDirection(s) {
|
|
378
|
-
if (s !== void 0)
|
|
379
|
-
throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");
|
|
380
|
-
return NaN;
|
|
381
|
-
},
|
|
382
|
-
initial(s) {
|
|
383
|
-
if (s !== void 0)
|
|
384
|
-
throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");
|
|
385
|
-
return NaN;
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
const lt = 0, y = u(u({}, S), {}, {
|
|
389
|
-
axis(s, t, {
|
|
390
|
-
axis: e
|
|
391
|
-
}) {
|
|
392
|
-
if (this.lockDirection = e === "lock", !this.lockDirection)
|
|
393
|
-
return e;
|
|
394
|
-
},
|
|
395
|
-
axisThreshold(s = lt) {
|
|
396
|
-
return s;
|
|
397
|
-
},
|
|
398
|
-
bounds(s = {}) {
|
|
399
|
-
if (typeof s == "function")
|
|
400
|
-
return (r) => y.bounds(s(r));
|
|
401
|
-
if ("current" in s)
|
|
402
|
-
return () => s.current;
|
|
403
|
-
if (typeof HTMLElement == "function" && s instanceof HTMLElement)
|
|
404
|
-
return s;
|
|
405
|
-
const {
|
|
406
|
-
left: t = -1 / 0,
|
|
407
|
-
right: e = 1 / 0,
|
|
408
|
-
top: i = -1 / 0,
|
|
409
|
-
bottom: n = 1 / 0
|
|
410
|
-
} = s;
|
|
411
|
-
return [[t, e], [i, n]];
|
|
412
|
-
}
|
|
413
|
-
}), U = {
|
|
414
|
-
ArrowRight: (s, t = 1) => [s * t, 0],
|
|
415
|
-
ArrowLeft: (s, t = 1) => [-1 * s * t, 0],
|
|
416
|
-
ArrowUp: (s, t = 1) => [0, -1 * s * t],
|
|
417
|
-
ArrowDown: (s, t = 1) => [0, s * t]
|
|
418
|
-
};
|
|
419
|
-
class dt extends ft {
|
|
420
|
-
constructor(...t) {
|
|
421
|
-
super(...t), _(this, "ingKey", "dragging");
|
|
422
|
-
}
|
|
423
|
-
reset() {
|
|
424
|
-
super.reset();
|
|
425
|
-
const t = this.state;
|
|
426
|
-
t._pointerId = void 0, t._pointerActive = !1, t._keyboardActive = !1, t._preventScroll = !1, t._delayed = !1, t.swipe = [0, 0], t.tap = !1, t.canceled = !1, t.cancel = this.cancel.bind(this);
|
|
427
|
-
}
|
|
428
|
-
setup() {
|
|
429
|
-
const t = this.state;
|
|
430
|
-
if (t._bounds instanceof HTMLElement) {
|
|
431
|
-
const e = t._bounds.getBoundingClientRect(), i = t.currentTarget.getBoundingClientRect(), n = {
|
|
432
|
-
left: e.left - i.left + t.offset[0],
|
|
433
|
-
right: e.right - i.right + t.offset[0],
|
|
434
|
-
top: e.top - i.top + t.offset[1],
|
|
435
|
-
bottom: e.bottom - i.bottom + t.offset[1]
|
|
436
|
-
};
|
|
437
|
-
t._bounds = y.bounds(n);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
cancel() {
|
|
441
|
-
const t = this.state;
|
|
442
|
-
t.canceled || (t.canceled = !0, t._active = !1, setTimeout(() => {
|
|
443
|
-
this.compute(), this.emit();
|
|
444
|
-
}, 0));
|
|
445
|
-
}
|
|
446
|
-
setActive() {
|
|
447
|
-
this.state._active = this.state._pointerActive || this.state._keyboardActive;
|
|
448
|
-
}
|
|
449
|
-
clean() {
|
|
450
|
-
this.pointerClean(), this.state._pointerActive = !1, this.state._keyboardActive = !1, super.clean();
|
|
451
|
-
}
|
|
452
|
-
pointerDown(t) {
|
|
453
|
-
const e = this.config, i = this.state;
|
|
454
|
-
if (t.buttons != null && (Array.isArray(e.pointerButtons) ? !e.pointerButtons.includes(t.buttons) : e.pointerButtons !== -1 && e.pointerButtons !== t.buttons))
|
|
455
|
-
return;
|
|
456
|
-
const n = this.ctrl.setEventIds(t);
|
|
457
|
-
e.pointerCapture && t.target.setPointerCapture(t.pointerId), !(n && n.size > 1 && i._pointerActive) && (this.start(t), this.setupPointer(t), i._pointerId = A(t), i._pointerActive = !0, this.computeValues(M(t)), this.computeInitial(), e.preventScrollAxis && j(t) !== "mouse" ? (i._active = !1, this.setupScrollPrevention(t)) : e.delay > 0 ? (this.setupDelayTrigger(t), e.triggerAllEvents && (this.compute(t), this.emit())) : this.startPointerDrag(t));
|
|
458
|
-
}
|
|
459
|
-
startPointerDrag(t) {
|
|
460
|
-
const e = this.state;
|
|
461
|
-
e._active = !0, e._preventScroll = !0, e._delayed = !1, this.compute(t), this.emit();
|
|
462
|
-
}
|
|
463
|
-
pointerMove(t) {
|
|
464
|
-
const e = this.state, i = this.config;
|
|
465
|
-
if (!e._pointerActive)
|
|
466
|
-
return;
|
|
467
|
-
const n = A(t);
|
|
468
|
-
if (e._pointerId !== void 0 && n !== e._pointerId)
|
|
469
|
-
return;
|
|
470
|
-
const r = M(t);
|
|
471
|
-
if (document.pointerLockElement === t.target ? e._delta = [t.movementX, t.movementY] : (e._delta = c.sub(r, e._values), this.computeValues(r)), c.addTo(e._movement, e._delta), this.compute(t), e._delayed && e.intentional) {
|
|
472
|
-
this.timeoutStore.remove("dragDelay"), e.active = !1, this.startPointerDrag(t);
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
if (i.preventScrollAxis && !e._preventScroll)
|
|
476
|
-
if (e.axis)
|
|
477
|
-
if (e.axis === i.preventScrollAxis || i.preventScrollAxis === "xy") {
|
|
478
|
-
e._active = !1, this.clean();
|
|
479
|
-
return;
|
|
480
|
-
} else {
|
|
481
|
-
this.timeoutStore.remove("startPointerDrag"), this.startPointerDrag(t);
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
else
|
|
485
|
-
return;
|
|
486
|
-
this.emit();
|
|
487
|
-
}
|
|
488
|
-
pointerUp(t) {
|
|
489
|
-
this.ctrl.setEventIds(t);
|
|
490
|
-
try {
|
|
491
|
-
this.config.pointerCapture && t.target.hasPointerCapture(t.pointerId) && t.target.releasePointerCapture(t.pointerId);
|
|
492
|
-
} catch (h) {
|
|
493
|
-
process.env.NODE_ENV === "development" && console.warn("[@use-gesture]: If you see this message, it's likely that you're using an outdated version of `@react-three/fiber`. \n\nPlease upgrade to the latest version.");
|
|
494
|
-
}
|
|
495
|
-
const e = this.state, i = this.config;
|
|
496
|
-
if (!e._active || !e._pointerActive)
|
|
497
|
-
return;
|
|
498
|
-
const n = A(t);
|
|
499
|
-
if (e._pointerId !== void 0 && n !== e._pointerId)
|
|
500
|
-
return;
|
|
501
|
-
this.state._pointerActive = !1, this.setActive(), this.compute(t);
|
|
502
|
-
const [r, o] = e._distance;
|
|
503
|
-
if (e.tap = r <= i.tapsThreshold && o <= i.tapsThreshold, e.tap && i.filterTaps)
|
|
504
|
-
e._force = !0;
|
|
505
|
-
else {
|
|
506
|
-
const [h, d] = e._delta, [m, a] = e._movement, [g, l] = i.swipe.velocity, [b, E] = i.swipe.distance, w = i.swipe.duration;
|
|
507
|
-
if (e.elapsedTime < w) {
|
|
508
|
-
const T = Math.abs(h / e.timeDelta), I = Math.abs(d / e.timeDelta);
|
|
509
|
-
T > g && Math.abs(m) > b && (e.swipe[0] = Math.sign(h)), I > l && Math.abs(a) > E && (e.swipe[1] = Math.sign(d));
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
this.emit();
|
|
513
|
-
}
|
|
514
|
-
pointerClick(t) {
|
|
515
|
-
!this.state.tap && t.detail > 0 && (t.preventDefault(), t.stopPropagation());
|
|
516
|
-
}
|
|
517
|
-
setupPointer(t) {
|
|
518
|
-
const e = this.config, i = e.device;
|
|
519
|
-
if (process.env.NODE_ENV === "development")
|
|
520
|
-
try {
|
|
521
|
-
if (i === "pointer" && e.preventScrollDelay === void 0) {
|
|
522
|
-
const n = "uv" in t ? t.sourceEvent.currentTarget : t.currentTarget;
|
|
523
|
-
window.getComputedStyle(n).touchAction === "auto" && console.warn("[@use-gesture]: The drag target has its `touch-action` style property set to `auto`. It is recommended to add `touch-action: 'none'` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\n\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.", n);
|
|
524
|
-
}
|
|
525
|
-
} catch (n) {
|
|
526
|
-
}
|
|
527
|
-
e.pointerLock && t.currentTarget.requestPointerLock(), e.pointerCapture || (this.eventStore.add(this.sharedConfig.window, i, "change", this.pointerMove.bind(this)), this.eventStore.add(this.sharedConfig.window, i, "end", this.pointerUp.bind(this)), this.eventStore.add(this.sharedConfig.window, i, "cancel", this.pointerUp.bind(this)));
|
|
528
|
-
}
|
|
529
|
-
pointerClean() {
|
|
530
|
-
this.config.pointerLock && document.pointerLockElement === this.state.currentTarget && document.exitPointerLock();
|
|
531
|
-
}
|
|
532
|
-
preventScroll(t) {
|
|
533
|
-
this.state._preventScroll && t.cancelable && t.preventDefault();
|
|
534
|
-
}
|
|
535
|
-
setupScrollPrevention(t) {
|
|
536
|
-
this.state._preventScroll = !1, pt(t);
|
|
537
|
-
const e = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
|
|
538
|
-
passive: !1
|
|
539
|
-
});
|
|
540
|
-
this.eventStore.add(this.sharedConfig.window, "touch", "end", e), this.eventStore.add(this.sharedConfig.window, "touch", "cancel", e), this.timeoutStore.add("startPointerDrag", this.startPointerDrag.bind(this), this.config.preventScrollDelay, t);
|
|
541
|
-
}
|
|
542
|
-
setupDelayTrigger(t) {
|
|
543
|
-
this.state._delayed = !0, this.timeoutStore.add("dragDelay", () => {
|
|
544
|
-
this.state._step = [0, 0], this.startPointerDrag(t);
|
|
545
|
-
}, this.config.delay);
|
|
546
|
-
}
|
|
547
|
-
keyDown(t) {
|
|
548
|
-
const e = U[t.key];
|
|
549
|
-
if (e) {
|
|
550
|
-
const i = this.state, n = t.shiftKey ? 10 : t.altKey ? 0.1 : 1;
|
|
551
|
-
this.start(t), i._delta = e(this.config.keyboardDisplacement, n), i._keyboardActive = !0, c.addTo(i._movement, i._delta), this.compute(t), this.emit();
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
keyUp(t) {
|
|
555
|
-
t.key in U && (this.state._keyboardActive = !1, this.setActive(), this.compute(t), this.emit());
|
|
556
|
-
}
|
|
557
|
-
bind(t) {
|
|
558
|
-
const e = this.config.device;
|
|
559
|
-
t(e, "start", this.pointerDown.bind(this)), this.config.pointerCapture && (t(e, "change", this.pointerMove.bind(this)), t(e, "end", this.pointerUp.bind(this)), t(e, "cancel", this.pointerUp.bind(this)), t("lostPointerCapture", "", this.pointerUp.bind(this))), this.config.keys && (t("key", "down", this.keyDown.bind(this)), t("key", "up", this.keyUp.bind(this))), this.config.filterTaps && t("click", "", this.pointerClick.bind(this), {
|
|
560
|
-
capture: !0,
|
|
561
|
-
passive: !1
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
function pt(s) {
|
|
566
|
-
"persist" in s && typeof s.persist == "function" && s.persist();
|
|
567
|
-
}
|
|
568
|
-
const v = typeof window != "undefined" && window.document && window.document.createElement;
|
|
569
|
-
function z() {
|
|
570
|
-
return v && "ontouchstart" in window;
|
|
571
|
-
}
|
|
572
|
-
function mt() {
|
|
573
|
-
return z() || v && window.navigator.maxTouchPoints > 1;
|
|
574
|
-
}
|
|
575
|
-
function gt() {
|
|
576
|
-
return v && "onpointerdown" in window;
|
|
577
|
-
}
|
|
578
|
-
function _t() {
|
|
579
|
-
return v && "exitPointerLock" in window.document;
|
|
580
|
-
}
|
|
581
|
-
function yt() {
|
|
582
|
-
try {
|
|
583
|
-
return "constructor" in GestureEvent;
|
|
584
|
-
} catch (s) {
|
|
585
|
-
return !1;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
const f = {
|
|
589
|
-
isBrowser: v,
|
|
590
|
-
gesture: yt(),
|
|
591
|
-
touch: z(),
|
|
592
|
-
touchscreen: mt(),
|
|
593
|
-
pointer: gt(),
|
|
594
|
-
pointerLock: _t()
|
|
595
|
-
}, vt = 250, bt = 180, Et = 0.5, wt = 50, Tt = 250, Dt = 10, B = {
|
|
596
|
-
mouse: 0,
|
|
597
|
-
touch: 0,
|
|
598
|
-
pen: 8
|
|
599
|
-
}, G = u(u({}, y), {}, {
|
|
600
|
-
device(s, t, {
|
|
601
|
-
pointer: {
|
|
602
|
-
touch: e = !1,
|
|
603
|
-
lock: i = !1,
|
|
604
|
-
mouse: n = !1
|
|
605
|
-
} = {}
|
|
606
|
-
}) {
|
|
607
|
-
return this.pointerLock = i && f.pointerLock, f.touch && e ? "touch" : this.pointerLock ? "mouse" : f.pointer && !n ? "pointer" : f.touch ? "touch" : "mouse";
|
|
608
|
-
},
|
|
609
|
-
preventScrollAxis(s, t, {
|
|
610
|
-
preventScroll: e
|
|
611
|
-
}) {
|
|
612
|
-
if (this.preventScrollDelay = typeof e == "number" ? e : e || e === void 0 && s ? vt : void 0, !(!f.touchscreen || e === !1))
|
|
613
|
-
return s || (e !== void 0 ? "y" : void 0);
|
|
614
|
-
},
|
|
615
|
-
pointerCapture(s, t, {
|
|
616
|
-
pointer: {
|
|
617
|
-
capture: e = !0,
|
|
618
|
-
buttons: i = 1,
|
|
619
|
-
keys: n = !0
|
|
620
|
-
} = {}
|
|
621
|
-
}) {
|
|
622
|
-
return this.pointerButtons = i, this.keys = n, !this.pointerLock && this.device === "pointer" && e;
|
|
623
|
-
},
|
|
624
|
-
threshold(s, t, {
|
|
625
|
-
filterTaps: e = !1,
|
|
626
|
-
tapsThreshold: i = 3,
|
|
627
|
-
axis: n = void 0
|
|
628
|
-
}) {
|
|
629
|
-
const r = c.toVector(s, e ? i : n ? 1 : 0);
|
|
630
|
-
return this.filterTaps = e, this.tapsThreshold = i, r;
|
|
631
|
-
},
|
|
632
|
-
swipe({
|
|
633
|
-
velocity: s = Et,
|
|
634
|
-
distance: t = wt,
|
|
635
|
-
duration: e = Tt
|
|
636
|
-
} = {}) {
|
|
637
|
-
return {
|
|
638
|
-
velocity: this.transform(c.toVector(s)),
|
|
639
|
-
distance: this.transform(c.toVector(t)),
|
|
640
|
-
duration: e
|
|
641
|
-
};
|
|
642
|
-
},
|
|
643
|
-
delay(s = 0) {
|
|
644
|
-
switch (s) {
|
|
645
|
-
case !0:
|
|
646
|
-
return bt;
|
|
647
|
-
case !1:
|
|
648
|
-
return 0;
|
|
649
|
-
default:
|
|
650
|
-
return s;
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
axisThreshold(s) {
|
|
654
|
-
return s ? u(u({}, B), s) : B;
|
|
655
|
-
},
|
|
656
|
-
keyboardDisplacement(s = Dt) {
|
|
657
|
-
return s;
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
process.env.NODE_ENV === "development" && Object.assign(G, {
|
|
661
|
-
useTouch(s) {
|
|
662
|
-
if (s !== void 0)
|
|
663
|
-
throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
|
|
664
|
-
return NaN;
|
|
665
|
-
},
|
|
666
|
-
experimental_preventWindowScrollY(s) {
|
|
667
|
-
if (s !== void 0)
|
|
668
|
-
throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");
|
|
669
|
-
return NaN;
|
|
670
|
-
},
|
|
671
|
-
swipeVelocity(s) {
|
|
672
|
-
if (s !== void 0)
|
|
673
|
-
throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");
|
|
674
|
-
return NaN;
|
|
675
|
-
},
|
|
676
|
-
swipeDistance(s) {
|
|
677
|
-
if (s !== void 0)
|
|
678
|
-
throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");
|
|
679
|
-
return NaN;
|
|
680
|
-
},
|
|
681
|
-
swipeDuration(s) {
|
|
682
|
-
if (s !== void 0)
|
|
683
|
-
throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");
|
|
684
|
-
return NaN;
|
|
685
|
-
}
|
|
686
|
-
});
|
|
687
|
-
function It(s) {
|
|
688
|
-
const [t, e] = s.overflow, [i, n] = s._delta, [r, o] = s._direction;
|
|
689
|
-
(t < 0 && i > 0 && r < 0 || t > 0 && i < 0 && r > 0) && (s._movement[0] = s._movementBound[0]), (e < 0 && n > 0 && o < 0 || e > 0 && n < 0 && o > 0) && (s._movement[1] = s._movementBound[1]);
|
|
690
|
-
}
|
|
691
|
-
const At = 30, kt = 100;
|
|
692
|
-
class xt extends X {
|
|
693
|
-
constructor(...t) {
|
|
694
|
-
super(...t), _(this, "ingKey", "pinching"), _(this, "aliasKey", "da");
|
|
695
|
-
}
|
|
696
|
-
init() {
|
|
697
|
-
this.state.offset = [1, 0], this.state.lastOffset = [1, 0], this.state._pointerEvents = /* @__PURE__ */ new Map();
|
|
698
|
-
}
|
|
699
|
-
reset() {
|
|
700
|
-
super.reset();
|
|
701
|
-
const t = this.state;
|
|
702
|
-
t._touchIds = [], t.canceled = !1, t.cancel = this.cancel.bind(this), t.turns = 0;
|
|
703
|
-
}
|
|
704
|
-
computeOffset() {
|
|
705
|
-
const {
|
|
706
|
-
type: t,
|
|
707
|
-
movement: e,
|
|
708
|
-
lastOffset: i
|
|
709
|
-
} = this.state;
|
|
710
|
-
t === "wheel" ? this.state.offset = c.add(e, i) : this.state.offset = [(1 + e[0]) * i[0], e[1] + i[1]];
|
|
711
|
-
}
|
|
712
|
-
computeMovement() {
|
|
713
|
-
const {
|
|
714
|
-
offset: t,
|
|
715
|
-
lastOffset: e
|
|
716
|
-
} = this.state;
|
|
717
|
-
this.state.movement = [t[0] / e[0], t[1] - e[1]];
|
|
718
|
-
}
|
|
719
|
-
axisIntent() {
|
|
720
|
-
const t = this.state, [e, i] = t._movement;
|
|
721
|
-
if (!t.axis) {
|
|
722
|
-
const n = Math.abs(e) * At - Math.abs(i);
|
|
723
|
-
n < 0 ? t.axis = "angle" : n > 0 && (t.axis = "scale");
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
restrictToAxis(t) {
|
|
727
|
-
this.config.lockDirection && (this.state.axis === "scale" ? t[1] = 0 : this.state.axis === "angle" && (t[0] = 0));
|
|
728
|
-
}
|
|
729
|
-
cancel() {
|
|
730
|
-
const t = this.state;
|
|
731
|
-
t.canceled || setTimeout(() => {
|
|
732
|
-
t.canceled = !0, t._active = !1, this.compute(), this.emit();
|
|
733
|
-
}, 0);
|
|
734
|
-
}
|
|
735
|
-
touchStart(t) {
|
|
736
|
-
this.ctrl.setEventIds(t);
|
|
737
|
-
const e = this.state, i = this.ctrl.touchIds;
|
|
738
|
-
if (e._active && e._touchIds.every((r) => i.has(r)) || i.size < 2)
|
|
739
|
-
return;
|
|
740
|
-
this.start(t), e._touchIds = Array.from(i).slice(0, 2);
|
|
741
|
-
const n = C(t, e._touchIds);
|
|
742
|
-
n && this.pinchStart(t, n);
|
|
743
|
-
}
|
|
744
|
-
pointerStart(t) {
|
|
745
|
-
if (t.buttons != null && t.buttons % 2 !== 1)
|
|
746
|
-
return;
|
|
747
|
-
this.ctrl.setEventIds(t), t.target.setPointerCapture(t.pointerId);
|
|
748
|
-
const e = this.state, i = e._pointerEvents, n = this.ctrl.pointerIds;
|
|
749
|
-
if (e._active && Array.from(i.keys()).every((o) => n.has(o)) || (i.size < 2 && i.set(t.pointerId, t), e._pointerEvents.size < 2))
|
|
750
|
-
return;
|
|
751
|
-
this.start(t);
|
|
752
|
-
const r = k(...Array.from(i.values()));
|
|
753
|
-
r && this.pinchStart(t, r);
|
|
754
|
-
}
|
|
755
|
-
pinchStart(t, e) {
|
|
756
|
-
const i = this.state;
|
|
757
|
-
i.origin = e.origin, this.computeValues([e.distance, e.angle]), this.computeInitial(), this.compute(t), this.emit();
|
|
758
|
-
}
|
|
759
|
-
touchMove(t) {
|
|
760
|
-
if (!this.state._active)
|
|
761
|
-
return;
|
|
762
|
-
const e = C(t, this.state._touchIds);
|
|
763
|
-
e && this.pinchMove(t, e);
|
|
764
|
-
}
|
|
765
|
-
pointerMove(t) {
|
|
766
|
-
const e = this.state._pointerEvents;
|
|
767
|
-
if (e.has(t.pointerId) && e.set(t.pointerId, t), !this.state._active)
|
|
768
|
-
return;
|
|
769
|
-
const i = k(...Array.from(e.values()));
|
|
770
|
-
i && this.pinchMove(t, i);
|
|
771
|
-
}
|
|
772
|
-
pinchMove(t, e) {
|
|
773
|
-
const i = this.state, n = i._values[1], r = e.angle - n;
|
|
774
|
-
let o = 0;
|
|
775
|
-
Math.abs(r) > 270 && (o += Math.sign(r)), this.computeValues([e.distance, e.angle - 360 * o]), i.origin = e.origin, i.turns = o, i._movement = [i._values[0] / i._initial[0] - 1, i._values[1] - i._initial[1]], this.compute(t), this.emit();
|
|
776
|
-
}
|
|
777
|
-
touchEnd(t) {
|
|
778
|
-
this.ctrl.setEventIds(t), this.state._active && this.state._touchIds.some((e) => !this.ctrl.touchIds.has(e)) && (this.state._active = !1, this.compute(t), this.emit());
|
|
779
|
-
}
|
|
780
|
-
pointerEnd(t) {
|
|
781
|
-
const e = this.state;
|
|
782
|
-
this.ctrl.setEventIds(t);
|
|
783
|
-
try {
|
|
784
|
-
t.target.releasePointerCapture(t.pointerId);
|
|
785
|
-
} catch (i) {
|
|
786
|
-
}
|
|
787
|
-
e._pointerEvents.has(t.pointerId) && e._pointerEvents.delete(t.pointerId), e._active && e._pointerEvents.size < 2 && (e._active = !1, this.compute(t), this.emit());
|
|
788
|
-
}
|
|
789
|
-
gestureStart(t) {
|
|
790
|
-
t.cancelable && t.preventDefault();
|
|
791
|
-
const e = this.state;
|
|
792
|
-
e._active || (this.start(t), this.computeValues([t.scale, t.rotation]), e.origin = [t.clientX, t.clientY], this.compute(t), this.emit());
|
|
793
|
-
}
|
|
794
|
-
gestureMove(t) {
|
|
795
|
-
if (t.cancelable && t.preventDefault(), !this.state._active)
|
|
796
|
-
return;
|
|
797
|
-
const e = this.state;
|
|
798
|
-
this.computeValues([t.scale, t.rotation]), e.origin = [t.clientX, t.clientY];
|
|
799
|
-
const i = e._movement;
|
|
800
|
-
e._movement = [t.scale - 1, t.rotation], e._delta = c.sub(e._movement, i), this.compute(t), this.emit();
|
|
801
|
-
}
|
|
802
|
-
gestureEnd(t) {
|
|
803
|
-
this.state._active && (this.state._active = !1, this.compute(t), this.emit());
|
|
804
|
-
}
|
|
805
|
-
wheel(t) {
|
|
806
|
-
const e = this.config.modifierKey;
|
|
807
|
-
e && (Array.isArray(e) ? !e.find((i) => t[i]) : !t[e]) || (this.state._active ? this.wheelChange(t) : this.wheelStart(t), this.timeoutStore.add("wheelEnd", this.wheelEnd.bind(this)));
|
|
808
|
-
}
|
|
809
|
-
wheelStart(t) {
|
|
810
|
-
this.start(t), this.wheelChange(t);
|
|
811
|
-
}
|
|
812
|
-
wheelChange(t) {
|
|
813
|
-
"uv" in t || (t.cancelable && t.preventDefault(), process.env.NODE_ENV === "development" && !t.defaultPrevented && console.warn("[@use-gesture]: To properly support zoom on trackpads, try using the `target` option.\n\nThis message will only appear in development mode."));
|
|
814
|
-
const i = this.state;
|
|
815
|
-
i._delta = [-ot(t)[1] / kt * i.offset[0], 0], c.addTo(i._movement, i._delta), It(i), this.state.origin = [t.clientX, t.clientY], this.compute(t), this.emit();
|
|
816
|
-
}
|
|
817
|
-
wheelEnd() {
|
|
818
|
-
this.state._active && (this.state._active = !1, this.compute(), this.emit());
|
|
819
|
-
}
|
|
820
|
-
bind(t) {
|
|
821
|
-
const e = this.config.device;
|
|
822
|
-
e && (t(e, "start", this[e + "Start"].bind(this)), t(e, "change", this[e + "Move"].bind(this)), t(e, "end", this[e + "End"].bind(this)), t(e, "cancel", this[e + "End"].bind(this)), t("lostPointerCapture", "", this[e + "End"].bind(this))), this.config.pinchOnWheel && t("wheel", "", this.wheel.bind(this), {
|
|
823
|
-
passive: !1
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
const St = u(u({}, S), {}, {
|
|
828
|
-
device(s, t, {
|
|
829
|
-
shared: e,
|
|
830
|
-
pointer: {
|
|
831
|
-
touch: i = !1
|
|
832
|
-
} = {}
|
|
833
|
-
}) {
|
|
834
|
-
if (e.target && !f.touch && f.gesture)
|
|
835
|
-
return "gesture";
|
|
836
|
-
if (f.touch && i)
|
|
837
|
-
return "touch";
|
|
838
|
-
if (f.touchscreen) {
|
|
839
|
-
if (f.pointer)
|
|
840
|
-
return "pointer";
|
|
841
|
-
if (f.touch)
|
|
842
|
-
return "touch";
|
|
843
|
-
}
|
|
844
|
-
},
|
|
845
|
-
bounds(s, t, {
|
|
846
|
-
scaleBounds: e = {},
|
|
847
|
-
angleBounds: i = {}
|
|
848
|
-
}) {
|
|
849
|
-
const n = (o) => {
|
|
850
|
-
const h = V(D(e, o), {
|
|
851
|
-
min: -1 / 0,
|
|
852
|
-
max: 1 / 0
|
|
853
|
-
});
|
|
854
|
-
return [h.min, h.max];
|
|
855
|
-
}, r = (o) => {
|
|
856
|
-
const h = V(D(i, o), {
|
|
857
|
-
min: -1 / 0,
|
|
858
|
-
max: 1 / 0
|
|
859
|
-
});
|
|
860
|
-
return [h.min, h.max];
|
|
861
|
-
};
|
|
862
|
-
return typeof e != "function" && typeof i != "function" ? [n(), r()] : (o) => [n(o), r(o)];
|
|
863
|
-
},
|
|
864
|
-
threshold(s, t, e) {
|
|
865
|
-
return this.lockDirection = e.axis === "lock", c.toVector(s, this.lockDirection ? [0.1, 3] : 0);
|
|
866
|
-
},
|
|
867
|
-
modifierKey(s) {
|
|
868
|
-
return s === void 0 ? "ctrlKey" : s;
|
|
869
|
-
},
|
|
870
|
-
pinchOnWheel(s = !0) {
|
|
871
|
-
return s;
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
u(u({}, y), {}, {
|
|
875
|
-
mouseOnly: (s = !0) => s
|
|
876
|
-
});
|
|
877
|
-
u(u({}, y), {}, {
|
|
878
|
-
mouseOnly: (s = !0) => s
|
|
879
|
-
});
|
|
880
|
-
const Ot = /* @__PURE__ */ new Map(), Pt = /* @__PURE__ */ new Map();
|
|
881
|
-
function Rt(s) {
|
|
882
|
-
Ot.set(s.key, s.engine), Pt.set(s.key, s.resolver);
|
|
883
|
-
}
|
|
884
|
-
const Ut = {
|
|
885
|
-
key: "drag",
|
|
886
|
-
engine: dt,
|
|
887
|
-
resolver: G
|
|
888
|
-
}, Bt = {
|
|
889
|
-
key: "pinch",
|
|
890
|
-
engine: xt,
|
|
891
|
-
resolver: St
|
|
892
|
-
};
|
|
893
|
-
export {
|
|
894
|
-
Pt as C,
|
|
895
|
-
Ot as E,
|
|
896
|
-
f as S,
|
|
897
|
-
u as _,
|
|
898
|
-
_ as a,
|
|
899
|
-
Vt as b,
|
|
900
|
-
Kt as c,
|
|
901
|
-
Mt as d,
|
|
902
|
-
Ut as e,
|
|
903
|
-
Bt as f,
|
|
904
|
-
x as i,
|
|
905
|
-
Lt as p,
|
|
906
|
-
Rt as r,
|
|
907
|
-
Nt as t
|
|
908
|
-
};
|