file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
test/utils.js | JavaScript | // SETUP & INITIALIZE
// ---------------------------------
global.Logger = console;
// Chai
global.expect = require('chai').expect;
// CONSTS & HELPER FUNCTIONS
// ---------------------------------
let utils = {
// Helper Functions
};
module.exports = {
utils,
};
| zingchart/zingchart-react | 93 | Quickly create dynamic JavaScript charts with ZingChart & React. | JavaScript | zingchart | ZingChart | |
.configs/.mocharc.js | JavaScript | 'use strict';
// Here's a JavaScript-based config file.
// If you need conditional logic, you might want to use this type of config.
// Otherwise, JSON or YAML is recommended.
module.exports = {
diff: true,
extension: ['spec'],
opts: false,
exit: true, // end bash script when done
slow: 75,
timeout: 5000,... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
index.html | HTML | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.rawgit.com/Chalarangelo/mini.css/v3.0.1/dist/mini-default.min.css">
<title>ZingChart 2 Vue 3 Wrapper Demo</title>
</head>
<... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/App.vue | Vue | <script setup>
import {ref} from 'vue';
import MethodsView from './views/Methods.vue';
import EventsView from './views/Events.vue';
import DynamicView from './views/Dynamic.vue';
import SimpleView from './views/Simple.vue';
import LicenseView from './views/License.vue';
import ModulesView from './views/M... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/ZingChart.vue | Vue | <script setup>
import { computed, onMounted, onUnmounted, ref, useAttrs, watch } from 'vue';
// import constants that define methods, events and default rendering parameters
import constants from 'zingchart-constants';
import zingchart from 'zingchart';
// One time setup globally to handle all zingchart-vue ... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/main.js | JavaScript | import { createApp } from 'vue';
import App from './App.vue';
createApp(App).mount('#app'); | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/views/Dynamic.vue | Vue | <script setup>
import { onMounted, ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
// Random numbers from 0-100
function randomData(count) {
return Array.from(new Array(count)).map(() => {
return Math.floor(Math.random() * 10);
});
}
function randomColor() {
const PLOT_COL... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/views/Events.vue | Vue |
<script setup>
import { onMounted, ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
const chart = ref();
const output = ref(null);
const listOfEventListeners = ref([]);
const chartData = ref({
type: "line",
series: [
{
values: randomData(10)
}
]
});
funct... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/views/License.vue | Vue |
<script setup>
import { ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
// zingchart object for performance flags
zingchart.DEV.KEEPSOURCE = 0; // prevents lib from storing the original data package
zingchart.DEV.COPYDATA = 0; // prevents lib from creating a copy of the data package
// ZC... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/views/Methods.vue | Vue |
<script setup>
import { ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
const chart = ref();
const chartData = ref({
type: "line",
series: [
{
values: randomData(10)
}
]
});
// Random numbers from 0-100
function randomData(count) {
return Array.from(ne... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/views/Modules.vue | Vue |
<script setup>
import { ref } from 'vue';
import 'zingchart/es6';
import ZingChartVue from '../ZingChart.vue';
// import chart modules used on that page
import 'zingchart/modules-es6/zingchart-maps.min.js';
import 'zingchart/modules-es6/zingchart-maps-usa.min.js';
const chartData = ref({
shapes: [
... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
src/views/Simple.vue | Vue | <script setup>
import { ref } from 'vue';
import ZingChartVue from '../ZingChart.vue';
const chartData = {
type: "line",
series: [
{
values: [6,4,3,4,6,6,4]
}
]
};
</script>
<template>
<div>
<h3>A simple example with a line chart config</h3>
<ZingChartVue ref="chart... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
test/build.spec.js | JavaScript | const utils = require('./utils.js');
const chai = require('chai');
chai.use(require('chai-fs'));
// server/controllers/api/card.js
describe('Build', function() {
describe('dist/ files exist', function() {
// verify the ZingChart object exists
it(`zingchartVue.cjs.js file should exist`, async function() {
... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
test/utils.js | JavaScript | // SETUP & INITIALIZE
// ---------------------------------
global.Logger = console;
// Chai
global.expect = require('chai').expect;
// CONSTS & HELPER FUNCTIONS
// ---------------------------------
let utils = {
// Helper Functions
};
module.exports = {
utils,
};
| zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
vite.config.js | JavaScript | import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import path from 'path';
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, 'src/ZingChart.vue'),
name: 'ZingChart',
fi... | zingchart/zingchart-vue | 25 | A Vue component to create charts with ZingChart | Vue | zingchart | ZingChart | |
ZingChart.js | JavaScript | import {DEFAULT_HEIGHT, DEFAULT_WIDTH, METHOD_NAMES, EVENT_NAMES} from './constants.js';
// One time setup globally to handle all zingchart-react objects in the app space.
if (!window.ZCWC) {
window.ZCWC = {
instances: {},
count: 0
};
const wcStyle = document.createElement('style');
wcStyle.innerHTML =... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCArea.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCArea extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-area';
this.type ='area';
}
parse() {
super.parse();
}
}
export default ZCArea; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCBar.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCBar extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bar';
this.type ='bar';
}
parse() {
super.parse();
}
}
export default ZCBar; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCBoxplot.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCBoxplot extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-boxplot';
this.type ='boxplot';
}
parse() {
super.parse();
}
}
export default ZCBoxplot; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCBubble.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCBubble extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bubble';
this.type ='bubble';
}
parse() {
super.parse();
}
}
export default ZCBubble; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCBubblePie.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-bubble-pie.min.js';
class ZCBubblePie extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bubble-pie';
this.type ='bubble-pie';
}
parse() {
super.parse();
}
}
export default ZCBubble... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCBullet.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCBullet extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-bullet';
this.type ='bullet';
}
parse() {
super.parse();
}
}
export default ZCBullet; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCCalendar.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-calendar.min.js';
class ZCCalendar extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-calendar';
this.type ='calendar';
}
parse() {
super.parse();
}
}
export default ZCCalendar; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCChord.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-chord.min.js';
class ZCChord extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-chord';
this.type ='chord';
}
parse() {
super.parse();
}
}
export default ZCChord; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCColumn.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCColumn extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-column';
this.type ='column';
this.plot = {
vertical: true,
}
}
parse() {
super.parse();
}
}
export default ZCColumn; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCFunnel.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCFunnel extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-funnel';
this.type ='funnel';
}
parse() {
super.parse();
}
}
export default ZCFunnel; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCGauge.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCGauge extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-gauge';
this.type ='gauge';
}
parse() {
super.parse();
}
}
export default ZCGauge; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCHeatmap.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCHeatmap extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-heatmap';
this.type ='heatmap';
}
parse() {
super.parse();
}
}
export default ZCHeatmap; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCLine.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCLine extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-line';
this.type = 'line';
}
parse() {
super.parse();
}
}
export default ZCLine; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCMap.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-maps.min.js';
class ZCMap extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-map';
}
parse() {
super.parse();
}
render() {
// Load the current module
const name = this.getAttrib... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCNestedPie.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-nested-pie.min.js';
class ZCNestedPie extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-nested-pie';
this.type ='nested-pie';
}
parse() {
super.parse();
}
}
export default ZCNested... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCNetworkDiagram.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-tree.min.js';
class ZCChord extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-network-diagram';
this.type ='tree';
}
parse() {
super.parse();
}
}
export default ZCNetworkDiagram; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCPareto.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-pareto.min.js';
class ZCPareto extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-pareto';
this.type ='pareto';
}
parse() {
super.parse();
}
}
export default ZCPareto; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCPie.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCPie extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-pie';
this.type = 'pie';
}
parse() {
super.parse();
}
}
export default ZCPie; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCPopulationPyramid.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-pop-pyramid.min.js';
class ZCPopulationPyramid extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-population-pyramid';
this.type = 'pop-pyramid';
}
parse() {
super.parse();
}
}
expor... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCRadar.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCRadar extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-radar';
this.type = 'radar';
}
parse() {
super.parse();
}
}
export default ZCRadar; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCRankflow.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-rankflow.min.js';
class ZCRankflow extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-rankflow';
this.type = 'rankflow';
}
parse() {
super.parse();
}
}
export default ZCRankflow; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCScatter.js | JavaScript | import ZingChart from '../ZingChart.js';
class ZCScatter extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-scatter';
this.type = 'scatter';
}
parse() {
super.parse();
}
}
export default ZCScatter; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCStock.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-stock.min.js';
class ZCStock extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-stock';
this.type = 'stock';
}
parse() {
super.parse();
}
}
export default ZCStock; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCTreemap.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-treemap.min.js';
class ZCTreemap extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-treemap';
this.type = 'treemap';
}
parse() {
super.parse();
}
}
export default ZCTreemap; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCVenn.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-venn.min.js';
class ZCVenn extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-venn';
this.type = 'venn';
}
parse() {
super.parse();
}
}
export default ZCVenn; | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCWaterfall.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-waterfall.min.js';
class ZCWaterfall extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-waterfall';
this.type = 'waterfall';
}
parse() {
super.parse();
}
}
export default ZCWaterfall... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
charts/ZCWordcloud.js | JavaScript | import ZingChart from '../ZingChart.js';
import '../node_modules/zingchart/modules-es6/zingchart-wordcloud.min.js';
class ZCWordcloud extends ZingChart {
constructor() {
super();
this.ID_PREFIX = 'zc-wordcloud';
this.type = 'wordcloud';
}
parse() {
super.parse();
}
}
export default ZCWordcloud... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
constants.js | JavaScript | const EVENT_NAMES = [
'animation_end',
'animation_start',
'animation_step',
'modify',
'node_add',
'node_remove',
'plot_add',
'plot_modify',
'plot_remove',
'reload',
'setdata',
'data_export',
'image_save',
'print',
'feed_clear',
'feed_interval_modify',
'feed_start',
'feed_stop',
'be... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
example/index.html | HTML | <html>
<head>
<script type="module">
import '../node_modules/zingchart/es6.js';
import ZingChart from '../ZingChart.js';
customElements.define('zing-chart', ZingChart);
import ZCLine from '../charts/ZCLine.js';
customElements.define('zc-line', ZCLine);
import ZCMap from '../c... | zingchart/zingchart-web-component | 2 | A web component wrapper for ZingChart | JavaScript | zingchart | ZingChart | |
.eslintrc.js | JavaScript | module.exports = {
"extends": "google",
"installedESLint": true,
"env": {
"es6": true,
"browser": true
},
"ecmaFeatures": {
"modules": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"implicitStrict": false
}
}
};
| zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
index.js | JavaScript | const ZingTouch = require('./dist/zingtouch.min.js').default;
module.exports = ZingTouch;
| zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
karma.conf.js | JavaScript | let webpackConfig = require('./webpack.config');
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function(config) {
config.set({
basePath: './',
frameworks: ['mocha', 'chai', 'webpack'],
files: [
'./src/core/main.js',
'./test/**/*.js',
],
plugings: ['k... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/ZingTouch.js | JavaScript | /**
* @file ZingTouch.js
* Main object containing API methods and Gesture constructors
*/
import Region from './core/classes/Region.js';
import Gesture from './gestures/Gesture.js';
import Pan from './gestures/Pan.js';
import Distance from './gestures/Distance.js';
import Rotate from './gestures/Rotate.js';
import ... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/arbiter.js | JavaScript | /**
* @file arbiter.js
* Contains logic for the dispatcher
*/
import dispatcher from './dispatcher.js';
import interpreter from './interpreter.js';
import util from './util.js';
/**
* Function that handles event flow, negotiating with the interpreter,
* and dispatcher.
* 1. Receiving all touch events in the win... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/classes/Binder.js | JavaScript | /**
* @file Binder.js
*/
/**
* A chainable object that contains a single element to be bound upon.
* Called from ZingTouch.bind(), and is used to chain over gesture callbacks.
* @class
*/
class Binder {
/**
* Constructor function for the Binder class.
* @param {Element} element - The element to bind gest... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/classes/Binding.js | JavaScript | /**
* @file Binding.js
*/
/**
* Responsible for creating a binding between an element and a gesture.
* @class Binding
*/
class Binding {
/**
* Constructor function for the Binding class.
* @param {Element} element - The element to associate the gesture to.
* @param {Gesture} gesture - A instance of the... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/classes/Input.js | JavaScript | /**
* @file Input.js
*/
import ZingEvent from './ZingEvent.js';
/**
* Tracks a single input and contains information about the
* current, previous, and initial events.
* Contains the progress of each Input and it's associated gestures.
* @class Input
*/
class Input {
/**
* Constructor function for the In... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/classes/Region.js | JavaScript | /**
* @file Region.js
*/
import Binder from './Binder.js';
import Gesture from './../../gestures/Gesture.js';
import arbiter from './../arbiter.js';
import State from './State.js';
/**
* Allows the user to specify a region to capture all events to feed ZingTouch
* into. This can be as narrow as the element itself... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/classes/State.js | JavaScript | /**
* @file State.js
*/
import Gesture from './../../gestures/Gesture.js';
import Pan from './../../gestures/Pan.js';
import Distance from './../../gestures/Distance.js';
import Rotate from './../../gestures/Rotate.js';
import Swipe from './../../gestures/Swipe.js';
import Tap from './../../gestures/Tap.js';
import ... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/classes/ZingEvent.js | JavaScript | /**
* @file ZingEvent.js
* Contains logic for ZingEvents
*/
import util from '../util.js';
const INITIAL_COORDINATE = 0;
/**
* An event wrapper that normalizes events across browsers and input devices
* @class ZingEvent
*/
class ZingEvent {
/**
* @constructor
* @param {Event} event - The event object be... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/dispatcher.js | JavaScript | /**
* @file dispatcher.js
* Contains logic for the dispatcher
*/
/**
* Emits data at the target element if available, and bubbles up from
* the target to the parent until the document has been reached.
* Called from the arbiter.
* @param {Binding} binding - An object of type Binding
* @param {Object} data - Th... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/interpreter.js | JavaScript | /**
* @file interpreter.js
* Contains logic for the interpreter
*/
import util from './util.js';
/**
* Receives an event and an array of Bindings (element -> gesture handler)
* to determine what event will be emitted. Called from the arbiter.
* @param {Array} bindings - An array containing Binding objects
* th... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/main.js | JavaScript | /**
* @file main.js
* Main file to setup event listeners on the document,
* and to expose the ZingTouch object
*/
import ZingTouch from './../ZingTouch.js';
if (typeof window !== 'undefined') {
window.ZingTouch = ZingTouch;
}
export default ZingTouch;
| zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/core/util.js | JavaScript | /**
* @file util.js
* Various accessor and mutator functions to handle state and validation.
*/
/**
* Contains generic helper functions
* @type {Object}
* @namespace util
*/
let util = {
/**
* Normalizes window events to be either of type start, move, or end.
* @param {String} type - The event type em... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/gestures/Distance.js | JavaScript | /**
* @file Distance.js
* Contains the abstract Distance class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 2;
const DEFAULT_MIN_THRESHOLD = 1;
/**
* A Distance is defined as two inputs moving either together or apart.
* @class Distance
*/
class Distance e... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/gestures/Gesture.js | JavaScript | /**
* @file Gesture.js
* Contains the Gesture class
*/
import util from './../core/util.js';
/**
* The Gesture class that all gestures inherit from.
*/
class Gesture {
/**
* Constructor function for the Gesture class.
* @class Gesture
*/
constructor() {
/**
* The generic string type of gest... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/gestures/Pan.js | JavaScript | /**
* @file Pan.js
* Contains the Pan class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 1;
const DEFAULT_MIN_THRESHOLD = 1;
/**
* A Pan is defined as a normal movement in any direction on a screen.
* Pan gestures do not track start events and can interact ... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/gestures/Rotate.js | JavaScript | /**
* @file Rotate.js
* Contains the Rotate class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 2;
/**
* A Rotate is defined as two inputs moving about a circle,
* maintaining a relatively equal radius.
* @class Rotate
*/
class Rotate extends Gesture {
/... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/gestures/Swipe.js | JavaScript | /**
* @file Swipe.js
* Contains the Swipe class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_INPUTS = 1;
const DEFAULT_MAX_REST_TIME = 100;
const DEFAULT_ESCAPE_VELOCITY = 0.2;
const DEFAULT_TIME_DISTORTION = 100;
const DEFAULT_MAX_PROGRESS_STACK = 10;
/**
* A swipe ... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
src/gestures/Tap.js | JavaScript | /**
* @file Tap.js
* Contains the Tap class
*/
import Gesture from './Gesture.js';
import util from './../core/util.js';
const DEFAULT_MIN_DELAY_MS = 0;
const DEFAULT_MAX_DELAY_MS = 300;
const DEFAULT_INPUTS = 1;
const DEFAULT_MOVE_PX_TOLERANCE = 10;
/**
* A Tap is defined as a touchstart to touchend event in qu... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/ZingTouch.spec.js | JavaScript | import ZingTouch from './../src/ZingTouch.js';
/** @test {ZingTouch} */
describe('ZingTouch', function() {
it('should be instantiated', function() {
expect(ZingTouch).to.not.equal(null);
});
it('should have constructors for all of the gestures', function() {
let gestures = [
'Distance',
'Ges... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/core/classes/Binder.spec.js | JavaScript | 'use strict';
/**
* @file Binder.js
* Tests Binder class
*/
import Binder from './../../../src/core/classes/Binder.js';
import State from './../../../src/core/classes/State.js';
/** @test {Binder} */
describe('Binder', function() {
it('should be instantiated', function() {
expect(Binder).to.not.equal(null);
... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/core/classes/Binding.spec.js | JavaScript | 'use strict';
/**
* @file Binding.js
* Tests Binding class
*/
import Binding from './../../../src/core/classes/Binding.js';
import Gesture from './../../../src/gestures/Gesture.js';
/** @test {Binding} */
describe('Binding', function() {
let gesture = new Gesture();
let element = document.createElement('div');... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/core/classes/Input.spec.js | JavaScript | 'use strict';
/**
* @file Binding.js
* Tests Binding class
*/
import Input from './../../../src/core/classes/Input.js';
import ZingEvent from './../../../src/core/classes/ZingEvent.js';
/** @test {Input} */
describe('Input', function() {
let event = document.createEvent('Event');
let input = new Input(event, 12... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/core/classes/Region.spec.js | JavaScript | 'use strict';
/**
* @file Region.spec..js
* Tests Region class
*/
import Region from './../../../src/core/classes/Region.js';
import Binder from './../../../src/core/classes/Binder.js';
/** @test {Region} */
describe('Region', function() {
it('should be instantiated', function() {
expect(Region).to.not.equal... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/core/classes/state.spec.js | JavaScript | 'use strict';
import State from './../../../src/core/classes/State.js';
import Gesture from './../../../src/gestures/Gesture.js';
/** @test {State} */
describe('State', function() {
let state = new State();
it('should be instantiated', function() {
expect(state).to.not.equal(null);
});
it('should have no... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/core/util.spec.js | JavaScript | 'use strict';
/**
* @file utils.js
* Tests the user-facing API, ensuring the object functions
* while not exposing private members.
*/
import util from './../../src/core/util.js';
/** @test {util} */
describe('util', function() {
it('should be instantiated', function() {
expect(util).to.not.equal(null);
... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/gestures/Distance.spec.js | JavaScript | 'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Distance from './../../src/gestures/Distance.js';
/** @test {Distance} */
describe('Distance', function() {
it('should be instantiated', function() {
expect(Distance).to.not.equal(null);
});
it('should return a Tap object.', function() {
l... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/gestures/Gesture.spec.js | JavaScript | 'use strict';
/**
* @file Gesture.js
* Tests Gesture class
*/
import Gesture from './../../src/gestures/Gesture.js';
/** @test {Gesture} */
describe('Gesture', function() {
it('should be instantiated', function() {
expect(Gesture).to.not.equal(null);
});
});
/** @test {Gesture.getType} */
describe('Gestur... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/gestures/Pan.spec.js | JavaScript | 'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Pan from './../../src/gestures/Pan.js';
/** @test {Pan} */
describe('Pan', function() {
it('should be instantiated', function() {
expect(Pan).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _pan = new Pan();
... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/gestures/Rotate.spec.js | JavaScript | 'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Rotate from './../../src/gestures/Rotate.js';
/** @test {Rotate} */
describe('Rotate', function() {
it('should be instantiated', function() {
expect(Rotate).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _rotate... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/gestures/Swipe.spec.js | JavaScript | 'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Swipe from './../../src/gestures/Swipe.js';
/** @test {Swipe} */
describe('Swipe', function() {
it('should be instantiated', function() {
expect(Swipe).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _swipe = new... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
test/gestures/Tap.spec.js | JavaScript | 'use strict';
/**
* @file Tap.js
* Tests Tap class
*/
import Tap from './../../src/gestures/Tap.js';
/** @test {Tap} */
describe('Tap', function() {
it('should be instantiated', function() {
expect(Tap).to.not.equal(null);
});
it('should return a Tap object.', function() {
let _tap = new Tap();
... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
webpack.config.js | JavaScript | const webpack = require('webpack');
const minimize = process.argv.indexOf('--minimize') !== -1;
module.exports = (env, argv) => {
argv.mode = argv.mode || 'production';
const plugins = [];
const filename = (argv.mode === 'production') ? 'zingtouch.min.js' : 'zingtouch.js';
const config = {
mode: argv.mode,... | zingchart/zingtouch | 2,149 | A JavaScript touch gesture detection library for the modern web | JavaScript | zingchart | ZingChart | |
_data/campaigns.cjs | JavaScript | const stargazerCampaigns = require("./stargazerCampaigns.json");
module.exports = stargazerCampaigns;
| zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
_data/campaigns.d.ts | TypeScript | // Campaign
export interface ICampaign {
id: string;
name: string;
description?: string;
slugline?: string;
// TODO
//sharedAssets: ISGAsset[];
characters: ICharacter[];
// TODO
// progressTracks: IProgressTrack[];
journal: IJournalEntry[];
lore: ILoreEntry[];
// TODO
//truths: ITruths;
// T... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
_data/journal_entries.cjs | JavaScript | const campaigns = require("./campaigns.cjs");
module.exports = function () {
return campaigns.reduce((acc, campaign) => {
campaign.journal.forEach(journal => {
acc.push({
campaignId: campaign.id,
campaignName: campaign.name,
...journal
});
})
return acc;
}, []);
}
| zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
_data/lore_entries.cjs | JavaScript | const campaigns = require("./campaigns.cjs");
module.exports = function () {
return campaigns.reduce((acc, campaign) => {
campaign.lore.forEach(lore => {
acc.push({
campaignId: campaign.id,
campaignName: campaign.name,
...lore
});
})
return acc;
}, []);
}
| zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
_data/metadata.cjs | JavaScript | module.exports = {
title: "FOSS and Adventures",
url: "https://zkat.tech/",
language: "en",
description: "Personal site, blog, and portfolio of Kat Marchán. Also a place to post TTRPG campaign journals!",
author: {
name: "Kat Marchán",
email: "kzm@zkat.tech",
url: "https://zkat.tech/about-me/",
... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
content/blog/blog.11tydata.cjs | JavaScript | module.exports = {
tags: [
"posts",
],
"layout": "layouts/post.njk",
};
| zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
content/feed/feed.11tydata.cjs | JavaScript | module.exports = {
eleventyExcludeFromCollections: true,
};
| zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
eleventy.config.cjs | JavaScript | const { DateTime } = require("luxon");
const markdownItAnchor = require("markdown-it-anchor");
const pluginRss = require("@11ty/eleventy-plugin-rss");
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
const pluginNavigation = r... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
eleventy.config.drafts.cjs | JavaScript | function eleventyComputedPermalink() {
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
// `addGlobalData` acts like a global data file and runs the top level function it receives.
return (data) => {
// Always skip during non-watch/serve builds
if (data... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
eleventy.config.images.cjs | JavaScript | const path = require("path");
const eleventyImage = require("@11ty/eleventy-img");
function relativeToInputPath(inputPath, relativeFilePath) {
let split = inputPath.split("/");
split.pop();
return path.resolve(split.join(path.sep), relativeFilePath);
}
function isFullUrl(url) {
try {
new URL(url);
re... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
importers/crew_link.ts | TypeScript | import { writeFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import * as playwright from "playwright";
import inquirer from "inquirer";
import { ICampaign, ICharacter } from "../_data/campaigns";
const FILE_NAME = "crewLinkCampaigns.json";
const C... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
importers/stargazer.ts | TypeScript | import { createWriteStream } from "node:fs";
import { mkdir, readFile, writeFile } from "node:fs/promises";
import { basename, dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { Readable } from "node:stream";
import { finished } from "node:stream/promises";
import slugify from "slugify... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
importers/to_markdown.ts | TypeScript | import { mkdir, writeFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { JSDOM } from "jsdom";
import slugify from "slugify";
import { ICampaign, IImage, IJournalEntry } from "../_data/campaigns";
const WRAP_WIDTH = 100;
const DIRNAME = dirna... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
public/css/index.css | CSS | /* Defaults */
:root {
--font-family: -apple-system, system-ui, sans-serif;
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono,
Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New,
Courier, monospace;
... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
public/css/message-box.css | CSS | /* Message Box */
.message-box {
--color-message-box: #ffc;
display: block;
background-color: var(--color-message-box);
color: var(--color-gray-90);
padding: 1em 0.625em; /* 16px 10px /16 */
}
.message-box ol {
margin-top: 0;
}
@media (prefers-color-scheme: dark) {
.message-box {
--color-message-box: #082840... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
public/css/prism-diff.css | CSS | /*
* New diff- syntax
*/
pre[class*="language-diff-"] {
--eleventy-code-padding: 1.25em;
padding-left: var(--eleventy-code-padding);
padding-right: var(--eleventy-code-padding);
}
.token.deleted {
background-color: hsl(0, 51%, 37%);
color: inherit;
}
.token.inserted {
background-color: hsl(126, 31%, 39%);
col... | zkat/zkat.github.io | 2 | Web sight | TypeScript | zkat | Kat Marchán | Fastly, Inc |
babel.config.js | JavaScript | 'use strict';
module.exports = {
// use transforms which does not use ES5+ builtins
plugins: [
['@babel/transform-member-expression-literals'],
['@babel/transform-property-literals'],
['@babel/transform-arrow-functions'],
['@babel/transform-block-scoped-functions'],
['@babel/transform-block-scop... | zloirock/core-js | 25,418 | Standard Library | JavaScript | zloirock | Denis Pushkarev | |
deno/corejs/index.js | JavaScript | /**
* core-js 3.48.0
* © 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.
* license: https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE
* source: https://github.com/zloirock/core-js
*/
!function (undefined) { 'use strict'; /******/ (function(modules) { // w... | zloirock/core-js | 25,418 | Standard Library | JavaScript | zloirock | Denis Pushkarev | |
scripts/build-compat/data.mjs | JavaScript | /* https://github.com/import-js/eslint-plugin-import/issues/2181 */
import { dataWithIgnored as data, ignored, modules } from 'core-js-compat/src/data.mjs';
import external from 'core-js-compat/src/external.mjs';
import mappings from 'core-js-compat/src/mapping.mjs';
import helpers from 'core-js-compat/helpers.js';
co... | zloirock/core-js | 25,418 | Standard Library | JavaScript | zloirock | Denis Pushkarev | |
scripts/build-compat/entries.mjs | JavaScript | import konan from 'konan';
import { modules } from 'core-js-compat/src/data.mjs';
import helpers from 'core-js-compat/helpers.js';
async function getModulesForEntryPoint(path, parent) {
const entry = new URL(path, parent);
const match = entry.pathname.match(/[/\\]modules[/\\](?<module>[^/\\]+)$/);
if (match) re... | zloirock/core-js | 25,418 | Standard Library | JavaScript | zloirock | Denis Pushkarev |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.