MCPcopy Index your code
hub / github.com/AlloyTeam/AlloyFinger

github.com/AlloyTeam/AlloyFinger @main sqlite

repository ↗ · DeepWiki ↗
73 symbols 143 edges 7 files 0 documented · 0% 1 cross-repo links
README

Preview

You can touch this → http://alloyteam.github.io/AlloyFinger/

Install

You can install it via npm:

npm install alloyfinger

Usage

var af = new AlloyFinger(element, {
    touchStart: function () { },
    touchMove: function () { },
    touchEnd:  function () { },
    touchCancel: function () { },
    multipointStart: function () { },
    multipointEnd: function () { },
    tap: function () { },
    doubleTap: function () { },
    longTap: function () { },
    singleTap: function () { },
    rotate: function (evt) {
        console.log(evt.angle);
    },
    pinch: function (evt) {
        console.log(evt.zoom);
    },
    pressMove: function (evt) {
        console.log(evt.deltaX);
        console.log(evt.deltaY);
    },
    swipe: function (evt) {
        console.log("swipe" + evt.direction);
    }
});

/**
 * this method can also add or remove the event handler
 */
var onTap = function() {};

af.on('tap', onTap);
af.on('touchStart', function() {});

af.off('tap', onTap);

/**
 * this method can destroy the instance
 */
af = af.destroy();

Omi Version:

import { render, tag, WeElement } from 'omi'
import 'omi-finger'

@tag('my-app')
class MyApp extends WeElement {
  install() {
    this.data.wording = 'Tap or Swipe Me!'
  }

  handleTap = (evt) => {
    this.data.wording += '\r\nTap'
    this.update()
  }

  handleSwipe = (evt) => {
    this.data.wording += '\r\nSwipe-' + evt.direction
    this.update()
  }

  render() {
    return (



        <omi-finger onTap={this.handleTap} abc={{a:1}} onSwipe={this.handleSwipe}>



            {this.data.wording}



        </omi-finger>



    )
  }

  css() {
    return `.touchArea{
                  background-color: green;
                  width: 200px;
                  min-height: 200px;
                  text-align: center;
                  color:white;
                  height:auto;
                  white-space: pre-line;
              }`
  }
}

render(<my-app></my-app>, 'body')

Others

License

This content is released under the MIT License.

Core symbols most depended-on inside this repo

wrapFunc
called by 15
alloy_finger.js
_emitEvent
called by 14
react/AlloyFinger.jsx
parseKeyCombo
called by 7
asset/alloy_paper.js
_cancelLongTap
called by 6
react/AlloyFinger.jsx
getLen
called by 4
alloy_finger.js
getLen
called by 4
react/AlloyFinger.jsx
isSatisfiedCombo
called by 4
asset/alloy_paper.js
observe
called by 4
asset/alloy_paper.js

Shape

Function 55
Method 16
Class 2

Languages

TypeScript100%

Modules by API surface

asset/alloy_paper.js37 symbols
react/AlloyFinger.jsx18 symbols
alloy_finger.js9 symbols
transformjs/transform.js3 symbols
asset/transform.js3 symbols
asset/to.js2 symbols
asset/image_loaded.js1 symbols

Dependencies from manifests, versioned

babel-cli6.24.0 · 1×
babel-core6.24.0 · 1×
babel-plugin-add-module-exports0.2.1 · 1×
babel-plugin-transform-class-properties6.23.0 · 1×
babel-plugin-transform-decorators6.24.1 · 1×
babel-plugin-transform-function-bind6.22.0 · 1×
babel-plugin-transform-object-rest-spread6.23.0 · 1×
babel-polyfill6.23.0 · 1×
babel-preset-env1.3.2 · 1×
babel-preset-react6.24.1 · 1×
babel-runtime6.23.0 · 1×
fast-async6.2.2 · 1×

For agents

$ claude mcp add AlloyFinger \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact