Finished support for new connector type

This commit is contained in:
DadaMonad 2014-11-25 15:51:30 +00:00
parent 03925ab32f
commit e1900e8561
170 changed files with 73970 additions and 8705 deletions

40
bower_components/connector/.bower.json vendored Normal file
View File

@ -0,0 +1,40 @@
{
"name": "connector",
"authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
],
"description": "Connect to other users via a generic connector. The interface is standardized, so you can use other connectors without changing your code.",
"main": [
"peerjs-connector/peerjs-connector.min.js",
"peerjs-connector/peerjs-connector.html"
],
"moduleType": [
"globals",
"node"
],
"keywords": [
"peerjs"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"polymer": "Polymer/polymer#~0.5.1"
},
"homepage": "https://github.com/DadaMonad/Connector",
"_release": "35f8d81ce7",
"_resolution": {
"type": "branch",
"branch": "master",
"commit": "35f8d81ce73ecac317b3dd7fabf32a871a4926a6"
},
"_source": "git://github.com/DadaMonad/Connector.git",
"_target": "*",
"_originalSource": "DadaMonad/Connector",
"_direct": true
}

13
bower_components/connector/README.md vendored Normal file
View File

@ -0,0 +1,13 @@
# Connector-Interface
The idea is, to create different implementations of the Connector interface that enable communication within a group.
It has a minimal interface and covers some frequently occuring problems thay you probably will encounter if you use communitcation protocols directly.
E.g. You can exchange the PeerJs-Connector with the XMPP-Connector only by changing few lines of code.
It is the communication interface used by [Yatta](https://github.com/DadaMonad/Yatta).
Currently we have interfaces for:
* PeerJs
More information about the Connector interface will follow. (Trust the update frequency, this could be a lie)

30
bower_components/connector/bower.json vendored Normal file
View File

@ -0,0 +1,30 @@
{
"name": "connector",
"version": "0.0.0",
"authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
],
"description": "Connect to other users via a generic connector. The interface is standardized, so you can use other connectors without changing your code.",
"main": [
"peerjs-connector/peerjs-connector.min.js",
"peerjs-connector/peerjs-connector.html"
],
"moduleType": [
"globals",
"node"
],
"keywords": [
"peerjs"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"polymer": "Polymer/polymer#~0.5.1"
}
}

View File

@ -0,0 +1,50 @@
gulp = require 'gulp'
coffee = require 'gulp-coffee'
concat = require 'gulp-concat'
uglify = require 'gulp-uglify'
sourcemaps = require 'gulp-sourcemaps'
plumber = require 'gulp-plumber'
browserify = require 'gulp-browserify'
rename = require 'gulp-rename'
paths =
peerjs: ['./lib/peerjs-connector/**/*.coffee']
test: ['./lib/test-connector/**/*.coffee']
buildConnector = (connector_name)->
()->
gulp.src(paths[connector_name], {read: false})
.pipe(plumber())
.pipe browserify
transform: ['coffeeify']
extensions: ['.coffee']
debug: true
.pipe rename
extname: ".js"
.pipe gulp.dest('./'+connector_name+'-connector')
.pipe uglify()
.pipe rename
extname: ".min.js"
.pipe gulp.dest('./'+connector_name+'-connector')
gulp.task 'peerjs', [], buildConnector 'peerjs'
gulp.task 'test', [], buildConnector 'test'
gulp.task 'build', ['peerjs','test']
# Rerun the task when a file changes
gulp.task 'watch', ()->
gulp.watch(paths.peerjs, ['peerjs'])
gulp.watch(paths.test, ['test'])
gulp.task('default', ['watch', 'build'])

View File

@ -0,0 +1,77 @@
class Connector
constructor: ()->
# is set to true when this is synced with all other connections
@is_synced = false
# compute all of these functions when all connections are synced.
@compute_when_synced = []
# Peerjs Connections: key: conn-id, value: conn
@connections = {}
# Connections, that have been initialized, but have not been (fully) synced yet.
@unsynced_connections = {}
# List of functions that shall process incoming data
@receive_handlers = []
# A list of functions that are executed (left to right) when syncing with a peer.
@sync_process_order = []
#
# Execute a function _when_ we are connected. If not connected, wait until connected.
# @param f {Function} Will be executed on the PeerJs-Connector context.
#
whenSynced: (args)->
if @is_synced
args[0].apply this, args[1..]
else
@compute_when_synced.push args
#
# Execute an function _when_ a message is received.
# @param f {Function} Will be executed on the PeerJs-Connector context. f will be called with (sender_id, broadcast {true|false}, message).
#
whenReceiving: (f)->
@receive_handlers.push f
#
# Send a message to a (sub)-set of all connected peers.
# @param peers {Array<connection_ids>} A set of ids.
# @param message {Object} The message to send.
#
multicast: (peers, message)->
@whenSynced [_send, peers, message]
#
# Send a message to one of the connected peers.
# @param peers {connection_id} A connection id.
# @param message {Object} The message to send.
#
unicast: (peer, message)->
@whenSynced [_send, peer, message]
#
# Broadcast a message to all connected peers.
# @param message {Object} The message to broadcast.
#
broadcast: (message)->
@whenSynced [()=>
for peerid,peer of @connections
@_send peerid, message]
#
# Define how you want to handle the sync process of two users.
# This is a synchronous handshake. Every user will perform exactly the same actions at the same time. E.g.
# @example
# whenSyncing(function(){ // first call must not have parameters!
# return this.id; // Send the id of this connector.
# },function(peerid){ // you receive the peerid of the other connections.
# // you can do something with the peerid
# // return "you are my friend"; // you could send another massage.
# }); // this is the end of the sync process.
#
whenSyncing: ()->
for i in [(arguments.length-1)..0]
@sync_process_order.unshift arguments[i]
module.exports = Connector

View File

@ -0,0 +1,29 @@
new Polymer 'peerjs-connector',
join: (id)->
idChanged: (old_val,new_val)->
if this.is_initialized
throw new Error "You must not set the user_id twice!"
else
this.initializeConnection()
initializeConnection: ()->
if this.conn_id?
console.log("now initializing")
options = {}
writeIfAvailable = (name, value)->
if value?
options[name] = value
writeIfAvailable 'key', this.key
writeIfAvailable 'host', this.host
writeIfAvailable 'port', this.port
writeIfAvailable 'path', this.path
writeIfAvailable 'secure', this.secure
writeIfAvailable 'debug', this.debug
this.is_initialized = true;
this.connector = new PeerJsConnector this.conn_id, options
ready: ()->
if this.conn_id != null
this.initializeConnection()

View File

@ -0,0 +1,108 @@
Connector = require '../connector'
window.PeerJsConnector = class PeerJsConnector extends Connector
constructor: (@id, options)->
super()
that = this
# The following two functions should be performed at the end of the syncing process.
# In peerjs all connection ids must be send.
@sync_process_order.push ()->
peers = for peerid,conn of that.connections
peerid
peers
# Then connect to the connection ids.
@sync_process_order.push (peers)->
for peerid in peers
that.join peerid
true
# Create the Peerjs instance
@conn = new Peer @id, options
# TODO: improve error handling, what happens if disconnected? provide feedback
@conn.on 'error', (err)->
throw new Error "Peerjs connector: #{err}"
@conn.on 'disconnected', ()->
throw new Error "Peerjs connector disconnected from signalling server. Cannot accept new connections. Not fatal, but not so good either.."
@conn.on 'disconnect', ()->
that.conn.reconnect()
@conn.on 'connection', @_addConnection
#
# Join a communication room. In case of peerjs, you just have to join to one other client. This connector will join to the other peers automatically.
# @param id {String} The connection id of another client.
#
join: (peerid)->
if not @unsynced_connections[peerid]? and not @connections[peerid]? and peerid isnt @id
peer = @conn.connect peerid, {reliable: true}
@unsynced_connections[peerid] = peer
@_addConnection peer
true
else
false
#
# Send a message to a peer or set of peers. This is peerjs specific.
# @overload _send(peerid, message)
# @param peerid {String} PeerJs connection id of _another_ peer
# @param message {Object} Some object that shall be send
# @overload _send(peerids, message)
# @param peerids {Array<String>} PeerJs connection ids of _other_ peers
# @param message {Object} Some object that shall be send
#
_send: (peer_s, message)->
if peer_s.constructor is [].constructor
# Throw errors _after_ the message has been send to all other peers.
# Just in case a connection is invalid.
errors = []
for peer in peer_s
try
@connection[peer].send message
catch error
errors.push(error+"")
if errors.length > 0
throw new Error errors
else
@connections[peer_s].send message
#
# @private
# This is a helper function that is only related to the peerjs connector.
# Connect to another peer.
_addConnection: (peer)=>
peer.on 'open', ()=>
that = @
peer.send that.sync_process_order[0]()
current_sync_i = 1
peer.on 'data', (data)->
console.log("receive data: #{JSON.stringify data}")
if current_sync_i < that.sync_process_order.length
peer.send that.sync_process_order[current_sync_i++].call that, data
else if current_sync_i is that.sync_process_order.length
# All sync functions have been called. Increment current_sync_i one last time
current_sync_i++
# add it to the connections object
delete that.unsynced_connections[peer.peer]
that.connections[peer.peer] = peer
# when the conn closes, delete it from the connections object
peer.on 'close', ()->
delete that.connections[peer.peer]
# helper fkt. true iff os is an object that does not hold enumerable properties
isEmpty = (os)->
for o of os
return false
return true
if isEmpty(that.unsynced_connections)
# there are no unsynced connections. we are now synced.
# therefore execute all fkts in this.compute_when_synced
that.is_synced = true
for comp in that.compute_when_synced
comp[0].apply that, comp[1..]
that.compute_when_synced = []
else
# you received a new message, that is not a sync message.
# notify the receive_handlers
for f in that.receive_handlers
f peer.peer, data

View File

@ -0,0 +1,98 @@
_ = require "underscore"
Connector = require '../connector'
#
# A trivial Connector that simulates network delay.
#
class TestConnector extends Connector
#
# @param id {String} Some unique id
# @param user_connectors {Array<TestConnector>} List of TestConnectors instances
#
constructor: (@id)->
super()
# If you think of operations, this will mirror the
# execiton order of operations (when a message is send, or received it is put into this)
@execution_order = []
# The messages are buffered under the name of teh sending user.
@receive_buffer = {}
@connections = {}
@whenReceiving (user, message)=>
@execution_order.push message
@is_synced = true
# join another user connector
join: (conn)->
@_addConnection conn.id, conn
for cid,c of conn.connections
@_addConnection cid, c
for comp in @compute_when_synced
comp[0].apply @, comp[1..]
#
# @private
# This is a helper function that is only related to the peerjs connector.
# Connect to another peer.
_addConnection: (id, user_connector)->
if not @connections[id]? and id isnt @id
data = null
user_data = null
for i in [0...@sync_process_order.length]
data_ = @sync_process_order[i].call @, user_data
user_data = user_connector.sync_process_order[i].call user_connector, data
data = data_
@connections[id]=user_connector
user_connector.connections[@id] = @
#
# Get the ops in the execution order.
#
getOpsInExecutionOrder: ()->
@execution_order
#
# Send a message to another peer
# @param {Operation} o The operation that was executed.
#
_send: (uid, message)->
rb = @connections[uid].receive_buffer
rb[@id] ?= []
rb[@id].push message
#
# Flush one operation from the line of a specific user.
#
flushOne: (uid)->
if @receive_buffer[uid]?.length > 0
message = @receive_buffer[uid].shift()
for f in @receive_handlers
f uid, message
#
# Flush one operation on a random line.
#
flushOneRandom: ()->
connlist = for cid,c of @receive_buffer
cid
@flushOne connlist[(_.random 0, (connlist.length-1))]
#
# Flush all operations on every line.
#
flushAll: ()->
for n,messages of @receive_buffer
for message in messages
for f in @receive_handlers
f n, message
@receive_buffer = {}
if window?
window.TestConnector = TestConnector
if module?
module.exports = TestConnector

29
bower_components/connector/package.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
"name": "connector",
"version": "0.0.0",
"description": "Connect to other users via a generic interface. The interface is standardized, so you can use other connectors without changing your code. ",
"main": "peerjs-connector/peerjs-connector.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"peerjs"
],
"author": "Kevin Jahns <kevin.jahns@rwth-aachen.de>",
"license": "MIT",
"dependencies": {
"peerjs": "~0.3.14"
},
"devDependencies": {
"gulp-sourcemaps": "~1.2.8",
"gulp-concat": "~2.4.1",
"gulp-coffee": "~2.2.0",
"gulp-uglify": "~1.0.1",
"gulp": "~3.8.10",
"coffee-script": "~1.8.0",
"gulp-plumber": "~0.6.6",
"gulp-browserify": "~0.5.0",
"coffeeify": "~1.0.0",
"underscore": "~1.7.0"
}
}

View File

@ -0,0 +1,41 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
new Polymer('peerjs-connector', {
join: function(id) {},
idChanged: function(old_val, new_val) {
if (this.is_initialized) {
throw new Error("You must not set the user_id twice!");
} else {
return this.initializeConnection();
}
},
initializeConnection: function() {
var options, writeIfAvailable;
if (this.conn_id != null) {
console.log("now initializing");
options = {};
writeIfAvailable = function(name, value) {
if (value != null) {
return options[name] = value;
}
};
writeIfAvailable('key', this.key);
writeIfAvailable('host', this.host);
writeIfAvailable('port', this.port);
writeIfAvailable('path', this.path);
writeIfAvailable('secure', this.secure);
writeIfAvailable('debug', this.debug);
this.is_initialized = true;
return this.connector = new PeerJsConnector(this.conn_id, options);
}
},
ready: function() {
if (this.conn_id !== null) {
return this.initializeConnection();
}
}
});
},{}]},{},[1])
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL2NvZGlvL3dvcmtzcGFjZS9ub2RlX21vZHVsZXMvZ3VscC1icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvaG9tZS9jb2Rpby93b3Jrc3BhY2UvbGliL3BlZXJqcy1jb25uZWN0b3IvcGVlcmpzLWNvbm5lY3Rvci1wb2x5bWVyLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0NBLElBQUksT0FBQSxDQUFRLGtCQUFSLEVBQ0Y7QUFBQSxFQUFBLElBQUEsRUFBTSxTQUFDLEVBQUQsR0FBQSxDQUFOO0FBQUEsRUFDQSxTQUFBLEVBQVcsU0FBQyxPQUFELEVBQVMsT0FBVCxHQUFBO0FBQ1QsSUFBQSxJQUFHLElBQUksQ0FBQyxjQUFSO0FBQ0UsWUFBVSxJQUFBLEtBQUEsQ0FBTSxxQ0FBTixDQUFWLENBREY7S0FBQSxNQUFBO2FBR0UsSUFBSSxDQUFDLG9CQUFMLENBQUEsRUFIRjtLQURTO0VBQUEsQ0FEWDtBQUFBLEVBT0Esb0JBQUEsRUFBc0IsU0FBQSxHQUFBO0FBQ3BCLFFBQUEseUJBQUE7QUFBQSxJQUFBLElBQUcsb0JBQUg7QUFDRSxNQUFBLE9BQU8sQ0FBQyxHQUFSLENBQVksa0JBQVosQ0FBQSxDQUFBO0FBQUEsTUFDQSxPQUFBLEdBQVUsRUFEVixDQUFBO0FBQUEsTUFFQSxnQkFBQSxHQUFtQixTQUFDLElBQUQsRUFBTyxLQUFQLEdBQUE7QUFDakIsUUFBQSxJQUFHLGFBQUg7aUJBQ0UsT0FBUSxDQUFBLElBQUEsQ0FBUixHQUFnQixNQURsQjtTQURpQjtNQUFBLENBRm5CLENBQUE7QUFBQSxNQUtBLGdCQUFBLENBQWlCLEtBQWpCLEVBQXdCLElBQUksQ0FBQyxHQUE3QixDQUxBLENBQUE7QUFBQSxNQU1BLGdCQUFBLENBQWlCLE1BQWpCLEVBQXlCLElBQUksQ0FBQyxJQUE5QixDQU5BLENBQUE7QUFBQSxNQU9BLGdCQUFBLENBQWlCLE1BQWpCLEVBQXlCLElBQUksQ0FBQyxJQUE5QixDQVBBLENBQUE7QUFBQSxNQVFBLGdCQUFBLENBQWlCLE1BQWpCLEVBQXlCLElBQUksQ0FBQyxJQUE5QixDQVJBLENBQUE7QUFBQSxNQVNBLGdCQUFBLENBQWlCLFFBQWpCLEVBQTJCLElBQUksQ0FBQyxNQUFoQyxDQVRBLENBQUE7QUFBQSxNQVVBLGdCQUFBLENBQWlCLE9BQWpCLEVBQTBCLElBQUksQ0FBQyxLQUEvQixDQVZBLENBQUE7QUFBQSxNQVdBLElBQUksQ0FBQyxjQUFMLEdBQXNCLElBWHRCLENBQUE7YUFZQSxJQUFJLENBQUMsU0FBTCxHQUFxQixJQUFBLGVBQUEsQ0FBZ0IsSUFBSSxDQUFDLE9BQXJCLEVBQThCLE9BQTlCLEVBYnZCO0tBRG9CO0VBQUEsQ0FQdEI7QUFBQSxFQXVCQSxLQUFBLEVBQU8sU0FBQSxHQUFBO0FBQ0wsSUFBQSxJQUFHLElBQUksQ0FBQyxPQUFMLEtBQWdCLElBQW5CO2FBQ0UsSUFBSSxDQUFDLG9CQUFMLENBQUEsRUFERjtLQURLO0VBQUEsQ0F2QlA7Q0FERSxDQUFKLENBQUEiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dGhyb3cgbmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKX12YXIgZj1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwoZi5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxmLGYuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXG5uZXcgUG9seW1lciAncGVlcmpzLWNvbm5lY3RvcicsXG4gIGpvaW46IChpZCktPlxuICBpZENoYW5nZWQ6IChvbGRfdmFsLG5ld192YWwpLT5cbiAgICBpZiB0aGlzLmlzX2luaXRpYWxpemVkXG4gICAgICB0aHJvdyBuZXcgRXJyb3IgXCJZb3UgbXVzdCBub3Qgc2V0IHRoZSB1c2VyX2lkIHR3aWNlIVwiXG4gICAgZWxzZVxuICAgICAgdGhpcy5pbml0aWFsaXplQ29ubmVjdGlvbigpICAgICAgICBcblxuICBpbml0aWFsaXplQ29ubmVjdGlvbjogKCktPiBcbiAgICBpZiB0aGlzLmNvbm5faWQ/XG4gICAgICBjb25zb2xlLmxvZyhcIm5vdyBpbml0aWFsaXppbmdcIilcbiAgICAgIG9wdGlvbnMgPSB7fVxuICAgICAgd3JpdGVJZkF2YWlsYWJsZSA9IChuYW1lLCB2YWx1ZSktPlxuICAgICAgICBpZiB2YWx1ZT9cbiAgICAgICAgICBvcHRpb25zW25hbWVdID0gdmFsdWVcbiAgICAgIHdyaXRlSWZBdmFpbGFibGUgJ2tleScsIHRoaXMua2V5XG4gICAgICB3cml0ZUlmQXZhaWxhYmxlICdob3N0JywgdGhpcy5ob3N0XG4gICAgICB3cml0ZUlmQXZhaWxhYmxlICdwb3J0JywgdGhpcy5wb3J0XG4gICAgICB3cml0ZUlmQXZhaWxhYmxlICdwYXRoJywgdGhpcy5wYXRoXG4gICAgICB3cml0ZUlmQXZhaWxhYmxlICdzZWN1cmUnLCB0aGlzLnNlY3VyZVxuICAgICAgd3JpdGVJZkF2YWlsYWJsZSAnZGVidWcnLCB0aGlzLmRlYnVnXG4gICAgICB0aGlzLmlzX2luaXRpYWxpemVkID0gdHJ1ZTtcbiAgICAgIHRoaXMuY29ubmVjdG9yID0gbmV3IFBlZXJKc0Nvbm5lY3RvciB0aGlzLmNvbm5faWQsIG9wdGlvbnNcbiAgICBcbiAgcmVhZHk6ICgpLT5cbiAgICBpZiB0aGlzLmNvbm5faWQgIT0gbnVsbFxuICAgICAgdGhpcy5pbml0aWFsaXplQ29ubmVjdGlvbigpXG4gIFxuIl19

View File

@ -0,0 +1 @@
!function i(n,t,e){function r(u,s){if(!t[u]){if(!n[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var h=t[u]={exports:{}};n[u][0].call(h.exports,function(i){var t=n[u][1][i];return r(t?t:i)},h,h.exports,i,n,t,e)}return t[u].exports}for(var o="function"==typeof require&&require,u=0;u<e.length;u++)r(e[u]);return r}({1:[function(){new Polymer("peerjs-connector",{join:function(){},idChanged:function(){if(this.is_initialized)throw new Error("You must not set the user_id twice!");return this.initializeConnection()},initializeConnection:function(){var i,n;return null!=this.conn_id?(console.log("now initializing"),i={},n=function(n,t){return null!=t?i[n]=t:void 0},n("key",this.key),n("host",this.host),n("port",this.port),n("path",this.path),n("secure",this.secure),n("debug",this.debug),this.is_initialized=!0,this.connector=new PeerJsConnector(this.conn_id,i)):void 0},ready:function(){return null!==this.conn_id?this.initializeConnection():void 0}})},{}]},{},[1]);

View File

@ -0,0 +1,10 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<polymer-element name="peerjs-connector" hidden attributes="conn_id connector key host port path secure debug">
<script src="../bower_components/peerjs/peer.min.js"></script>
<script src="./peerjs-connector.js"></script>
<template>
</template>
<script src="./peerjs-connector-polymer.min.js"></script>
</polymer-element>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function n(e,t,r){function o(i,s){if(!t[i]){if(!e[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(c)return c(i,!0);throw new Error("Cannot find module '"+i+"'")}var h=t[i]={exports:{}};e[i][0].call(h.exports,function(n){var t=e[i][1][n];return o(t?t:n)},h,h.exports,n,e,t,r)}return t[i].exports}for(var c="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(n,e){var t;t=function(){function n(){this.is_synced=!1,this.compute_when_synced=[],this.connections={},this.unsynced_connections={},this.receive_handlers=[],this.sync_process_order=[]}return n.prototype.whenSynced=function(n){return this.is_synced?n[0].apply(this,n.slice(1)):this.compute_when_synced.push(n)},n.prototype.whenReceiving=function(n){return this.receive_handlers.push(n)},n.prototype.multicast=function(n,e){return this.whenSynced([_send,n,e])},n.prototype.unicast=function(n,e){return this.whenSynced([_send,n,e])},n.prototype.broadcast=function(n){return this.whenSynced([function(e){return function(){var t,r,o,c;o=e.connections,c=[];for(r in o)t=o[r],c.push(e._send(r,n));return c}}(this)])},n.prototype.whenSyncing=function(){var n,e,t,r;for(r=[],n=e=t=arguments.length-1;0>=t?0>=e:e>=0;n=0>=t?++e:--e)r.push(this.sync_process_order.unshift(arguments[n]));return r},n}(),e.exports=t},{}],2:[function(n){var e,t,r=function(n,e){return function(){return n.apply(e,arguments)}},o={}.hasOwnProperty,c=function(n,e){function t(){this.constructor=n}for(var r in e)o.call(e,r)&&(n[r]=e[r]);return t.prototype=e.prototype,n.prototype=new t,n.__super__=e.prototype,n};e=n("../connector"),window.PeerJsConnector=t=function(n){function e(n,t){var o;this.id=n,this._addConnection=r(this._addConnection,this),e.__super__.constructor.call(this),o=this,this.sync_process_order.push(function(){var n,e,t;return t=function(){var t,r;t=o.connections,r=[];for(e in t)n=t[e],r.push(e);return r}()}),this.sync_process_order.push(function(n){var e,t,r;for(t=0,r=n.length;r>t;t++)e=n[t],o.join(e);return!0}),this.conn=new Peer(this.id,t),this.conn.on("error",function(n){throw new Error("Peerjs connector: "+n)}),this.conn.on("disconnected",function(){throw new Error("Peerjs connector disconnected from signalling server. Cannot accept new connections. Not fatal, but not so good either..")}),this.conn.on("disconnect",function(){return o.conn.reconnect()}),this.conn.on("connection",this._addConnection)}return c(e,n),e.prototype.join=function(n){var e;return null==this.unsynced_connections[n]&&null==this.connections[n]&&n!==this.id?(e=this.conn.connect(n,{reliable:!0}),this.unsynced_connections[n]=e,this._addConnection(e),!0):!1},e.prototype._send=function(n,e){var t,r,o,c,i;if(n.constructor!==[].constructor)return this.connections[n].send(e);for(r=[],c=0,i=n.length;i>c;c++){o=n[c];try{this.connection[o].send(e)}catch(s){t=s,r.push(t+"")}}if(r.length>0)throw new Error(r)},e.prototype._addConnection=function(n){return n.on("open",function(e){return function(){var t,r;return r=e,n.send(r.sync_process_order[0]()),t=1,n.on("data",function(e){var o,c,i,s,u,h,p,f,d,a;if(console.log("receive data: "+JSON.stringify(e)),t<r.sync_process_order.length)return n.send(r.sync_process_order[t++].call(r,e));if(t!==r.sync_process_order.length){for(d=r.receive_handlers,a=[],u=0,p=d.length;p>u;u++)c=d[u],a.push(c(n.peer,e));return a}if(t++,delete r.unsynced_connections[n.peer],r.connections[n.peer]=n,n.on("close",function(){return delete r.connections[n.peer]}),(i=function(n){var e;for(e in n)return!1;return!0})(r.unsynced_connections)){for(r.is_synced=!0,f=r.compute_when_synced,s=0,h=f.length;h>s;s++)o=f[s],o[0].apply(r,o.slice(1));return r.compute_when_synced=[]}})}}(this))},e}(e)},{"../connector":1}]},{},[2]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,19 @@
{
"name": "core-component-page",
"private": true,
"dependencies": {
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0",
"polymer": "Polymer/polymer#^0.5.0"
},
"version": "0.5.1",
"homepage": "https://github.com/Polymer/core-component-page",
"_release": "0.5.1",
"_resolution": {
"type": "version",
"tag": "0.5.1",
"commit": "ef1f86e659fd7498755e027d1561acc963d67807"
},
"_source": "git://github.com/Polymer/core-component-page.git",
"_target": "^0.5.0",
"_originalSource": "Polymer/core-component-page"
}

View File

@ -0,0 +1,6 @@
core-component-page
===================
See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-component-page) for more information.
Note: this is the vulcanized version of [`core-component-page-dev`](https://github.com/Polymer/core-component-page-dev) (the source).

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,9 @@
{
"name": "core-component-page",
"private": true,
"dependencies": {
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0",
"polymer": "Polymer/polymer#^0.5.0"
},
"version": "0.5.1"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
<!doctype html>
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
-->
<html>
<head>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="core-component-page.html">
</head>
<body unresolved>
<core-component-page></core-component-page>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!doctype html>
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
-->
<html>
<head>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
<body unresolved>
<core-component-page></core-component-page>
</body>
</html>

32
bower_components/polymer/.bower.json vendored Normal file
View File

@ -0,0 +1,32 @@
{
"name": "polymer",
"description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.",
"homepage": "http://www.polymer-project.org/",
"keywords": [
"util",
"client",
"browser",
"web components",
"web-components"
],
"author": "Polymer Authors <polymer-dev@googlegroups.com>",
"private": true,
"dependencies": {
"core-component-page": "Polymer/core-component-page#^0.5.0",
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0"
},
"devDependencies": {
"tools": "Polymer/tools#master",
"web-component-tester": "Polymer/web-component-tester#^1.4.2"
},
"version": "0.5.1",
"_release": "0.5.1",
"_resolution": {
"type": "version",
"tag": "0.5.1",
"commit": "c654b2b4996a643e79234ac624d7bc38179dfc2c"
},
"_source": "git://github.com/Polymer/polymer.git",
"_target": "~0.5.1",
"_originalSource": "Polymer/polymer"
}

21
bower_components/polymer/README.md vendored Normal file
View File

@ -0,0 +1,21 @@
# Polymer
[![Polymer build status](http://www.polymer-project.org/build/polymer-dev/status.png "Polymer build status")](http://build.chromium.org/p/client.polymer/waterfall)
## Brief Overview
For more detailed info goto [http://polymer-project.org/](http://polymer-project.org/).
Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries.
Polymer is based on a set of future technologies, including [Shadow DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html), [Custom Elements](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds.
## Tools & Testing
For running tests or building minified files, consult the [tooling information](http://polymer-project.org/resources/tooling-strategy.html).
## Releases
[Release (tagged) versions](https://github.com/Polymer/polymer/releases) of Polymer include concatenated and minified sources for your convenience.
[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/polymer/README)](https://github.com/igrigorik/ga-beacon)

23
bower_components/polymer/bower.json vendored Normal file
View File

@ -0,0 +1,23 @@
{
"name": "polymer",
"description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.",
"homepage": "http://www.polymer-project.org/",
"keywords": [
"util",
"client",
"browser",
"web components",
"web-components"
],
"author": "Polymer Authors <polymer-dev@googlegroups.com>",
"private": true,
"dependencies": {
"core-component-page": "Polymer/core-component-page#^0.5.0",
"webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0"
},
"devDependencies": {
"tools": "Polymer/tools#master",
"web-component-tester": "Polymer/web-component-tester#^1.4.2"
},
"version": "0.5.1"
}

26
bower_components/polymer/build.log vendored Normal file
View File

@ -0,0 +1,26 @@
BUILD LOG
---------
Build Time: 2014-11-12T14:32:18
NODEJS INFORMATION
==================
nodejs: v0.10.33
grunt: 0.4.5
grunt-audit: 1.0.0
grunt-contrib-concat: 0.5.0
grunt-contrib-copy: 0.7.0
grunt-contrib-uglify: 0.6.0
grunt-string-replace: 1.0.0
web-component-tester: 1.6.0
REPO REVISIONS
==============
polymer-expressions: 1288fe573dc57cde304f66f0833d0644c766158c
polymer-gestures: 94660a514772e182d27f79c3d8d1bb88796a2327
polymer: da75e633f39b7761494cc3139a60733c488b2215
BUILD HASHES
============
dist/polymer.js: 59e0d3e669a3a1d163d8337766aa63bf809bfe79
dist/polymer.min.js: a9145f911c5b9fecc0d4aa422ac658d1d462d15a
dist/layout.html: 348d358a91712ecc2f8811efa430fcd954b4590c

286
bower_components/polymer/layout.html vendored Normal file
View File

@ -0,0 +1,286 @@
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<style shim-shadowdom>
/*******************************
Flex Layout
*******************************/
html /deep/ [layout][horizontal], html /deep/ [layout][vertical] {
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
html /deep/ [layout][horizontal][inline], html /deep/ [layout][vertical][inline] {
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
display: inline-flex;
}
html /deep/ [layout][horizontal] {
-ms-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
}
html /deep/ [layout][horizontal][reverse] {
-ms-flex-direction: row-reverse;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
}
html /deep/ [layout][vertical] {
-ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
}
html /deep/ [layout][vertical][reverse] {
-ms-flex-direction: column-reverse;
-webkit-flex-direction: column-reverse;
flex-direction: column-reverse;
}
html /deep/ [layout][wrap] {
-ms-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
html /deep/ [layout][wrap-reverse] {
-ms-flex-wrap: wrap-reverse;
-webkit-flex-wrap: wrap-reverse;
flex-wrap: wrap-reverse;
}
html /deep/ [flex] {
-ms-flex: 1 1 0.000000001px;
-webkit-flex: 1;
flex: 1;
-webkit-flex-basis: 0.000000001px;
flex-basis: 0.000000001px;
}
html /deep/ [vertical][layout] > [flex][auto-vertical], html /deep/ [vertical][layout]::shadow [flex][auto-vertical] {
-ms-flex: 1 1 auto;
-webkit-flex-basis: auto;
flex-basis: auto;
}
html /deep/ [flex][auto] {
-ms-flex: 1 1 auto;
-webkit-flex-basis: auto;
flex-basis: auto;
}
html /deep/ [flex][none] {
-ms-flex: none;
-webkit-flex: none;
flex: none;
}
html /deep/ [flex][one] {
-ms-flex: 1;
-webkit-flex: 1;
flex: 1;
}
html /deep/ [flex][two] {
-ms-flex: 2;
-webkit-flex: 2;
flex: 2;
}
html /deep/ [flex][three] {
-ms-flex: 3;
-webkit-flex: 3;
flex: 3;
}
html /deep/ [flex][four] {
-ms-flex: 4;
-webkit-flex: 4;
flex: 4;
}
html /deep/ [flex][five] {
-ms-flex: 5;
-webkit-flex: 5;
flex: 5;
}
html /deep/ [flex][six] {
-ms-flex: 6;
-webkit-flex: 6;
flex: 6;
}
html /deep/ [flex][seven] {
-ms-flex: 7;
-webkit-flex: 7;
flex: 7;
}
html /deep/ [flex][eight] {
-ms-flex: 8;
-webkit-flex: 8;
flex: 8;
}
html /deep/ [flex][nine] {
-ms-flex: 9;
-webkit-flex: 9;
flex: 9;
}
html /deep/ [flex][ten] {
-ms-flex: 10;
-webkit-flex: 10;
flex: 10;
}
html /deep/ [flex][eleven] {
-ms-flex: 11;
-webkit-flex: 11;
flex: 11;
}
html /deep/ [flex][twelve] {
-ms-flex: 12;
-webkit-flex: 12;
flex: 12;
}
/* alignment in cross axis */
html /deep/ [layout][start] {
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
html /deep/ [layout][center], html /deep/ [layout][center-center] {
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
html /deep/ [layout][end] {
-ms-flex-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
/* alignment in main axis */
html /deep/ [layout][start-justified] {
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
html /deep/ [layout][center-justified], html /deep/ [layout][center-center] {
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
html /deep/ [layout][end-justified] {
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
html /deep/ [layout][around-justified] {
-ms-flex-pack: distribute;
-webkit-justify-content: space-around;
justify-content: space-around;
}
html /deep/ [layout][justified] {
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
/* self alignment */
html /deep/ [self-start] {
-ms-align-self: flex-start;
-webkit-align-self: flex-start;
align-self: flex-start;
}
html /deep/ [self-center] {
-ms-align-self: center;
-webkit-align-self: center;
align-self: center;
}
html /deep/ [self-end] {
-ms-align-self: flex-end;
-webkit-align-self: flex-end;
align-self: flex-end;
}
html /deep/ [self-stretch] {
-ms-align-self: stretch;
-webkit-align-self: stretch;
align-self: stretch;
}
/*******************************
Other Layout
*******************************/
html /deep/ [block] {
display: block;
}
/* ie support for hidden */
html /deep/ [hidden] {
display: none !important;
}
html /deep/ [relative] {
position: relative;
}
html /deep/ [fit] {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
body[fullbleed] {
margin: 0;
height: 100vh;
}
/*******************************
Other
*******************************/
html /deep/ [segment], html /deep/ segment {
display: block;
position: relative;
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
margin: 1em 0.5em;
padding: 1em;
background-color: white;
-webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
border-radius: 5px 5px 5px 5px;
}
</style>

12
bower_components/polymer/polymer.html vendored Normal file
View File

@ -0,0 +1,12 @@
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="layout.html">
<script src="polymer.js"></script>

11829
bower_components/polymer/polymer.js vendored Normal file

File diff suppressed because it is too large Load Diff

14
bower_components/polymer/polymer.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
{
"name": "webcomponentsjs",
"main": "webcomponents.js",
"version": "0.5.1",
"homepage": "http://webcomponents.org",
"authors": [
"The Polymer Authors"
],
"keywords": [
"webcomponents"
],
"license": "BSD",
"ignore": [],
"_release": "0.5.1",
"_resolution": {
"type": "version",
"tag": "0.5.1",
"commit": "89c466eb29642c3e5ba2594e9330eb62ade1dbab"
},
"_source": "git://github.com/Polymer/webcomponentsjs.git",
"_target": "^0.5.0",
"_originalSource": "Polymer/webcomponentsjs"
}

View File

@ -0,0 +1,931 @@
/**
* @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// @version 0.5.1
if (typeof WeakMap === "undefined") {
(function() {
var defineProperty = Object.defineProperty;
var counter = Date.now() % 1e9;
var WeakMap = function() {
this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
};
WeakMap.prototype = {
set: function(key, value) {
var entry = key[this.name];
if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
value: [ key, value ],
writable: true
});
return this;
},
get: function(key) {
var entry;
return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
},
"delete": function(key) {
var entry = key[this.name];
if (!entry || entry[0] !== key) return false;
entry[0] = entry[1] = undefined;
return true;
},
has: function(key) {
var entry = key[this.name];
if (!entry) return false;
return entry[0] === key;
}
};
window.WeakMap = WeakMap;
})();
}
(function(global) {
var registrationsTable = new WeakMap();
var setImmediate;
if (/Trident/.test(navigator.userAgent)) {
setImmediate = setTimeout;
} else if (window.setImmediate) {
setImmediate = window.setImmediate;
} else {
var setImmediateQueue = [];
var sentinel = String(Math.random());
window.addEventListener("message", function(e) {
if (e.data === sentinel) {
var queue = setImmediateQueue;
setImmediateQueue = [];
queue.forEach(function(func) {
func();
});
}
});
setImmediate = function(func) {
setImmediateQueue.push(func);
window.postMessage(sentinel, "*");
};
}
var isScheduled = false;
var scheduledObservers = [];
function scheduleCallback(observer) {
scheduledObservers.push(observer);
if (!isScheduled) {
isScheduled = true;
setImmediate(dispatchCallbacks);
}
}
function wrapIfNeeded(node) {
return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
}
function dispatchCallbacks() {
isScheduled = false;
var observers = scheduledObservers;
scheduledObservers = [];
observers.sort(function(o1, o2) {
return o1.uid_ - o2.uid_;
});
var anyNonEmpty = false;
observers.forEach(function(observer) {
var queue = observer.takeRecords();
removeTransientObserversFor(observer);
if (queue.length) {
observer.callback_(queue, observer);
anyNonEmpty = true;
}
});
if (anyNonEmpty) dispatchCallbacks();
}
function removeTransientObserversFor(observer) {
observer.nodes_.forEach(function(node) {
var registrations = registrationsTable.get(node);
if (!registrations) return;
registrations.forEach(function(registration) {
if (registration.observer === observer) registration.removeTransientObservers();
});
});
}
function forEachAncestorAndObserverEnqueueRecord(target, callback) {
for (var node = target; node; node = node.parentNode) {
var registrations = registrationsTable.get(node);
if (registrations) {
for (var j = 0; j < registrations.length; j++) {
var registration = registrations[j];
var options = registration.options;
if (node !== target && !options.subtree) continue;
var record = callback(options);
if (record) registration.enqueue(record);
}
}
}
}
var uidCounter = 0;
function JsMutationObserver(callback) {
this.callback_ = callback;
this.nodes_ = [];
this.records_ = [];
this.uid_ = ++uidCounter;
}
JsMutationObserver.prototype = {
observe: function(target, options) {
target = wrapIfNeeded(target);
if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
throw new SyntaxError();
}
var registrations = registrationsTable.get(target);
if (!registrations) registrationsTable.set(target, registrations = []);
var registration;
for (var i = 0; i < registrations.length; i++) {
if (registrations[i].observer === this) {
registration = registrations[i];
registration.removeListeners();
registration.options = options;
break;
}
}
if (!registration) {
registration = new Registration(this, target, options);
registrations.push(registration);
this.nodes_.push(target);
}
registration.addListeners();
},
disconnect: function() {
this.nodes_.forEach(function(node) {
var registrations = registrationsTable.get(node);
for (var i = 0; i < registrations.length; i++) {
var registration = registrations[i];
if (registration.observer === this) {
registration.removeListeners();
registrations.splice(i, 1);
break;
}
}
}, this);
this.records_ = [];
},
takeRecords: function() {
var copyOfRecords = this.records_;
this.records_ = [];
return copyOfRecords;
}
};
function MutationRecord(type, target) {
this.type = type;
this.target = target;
this.addedNodes = [];
this.removedNodes = [];
this.previousSibling = null;
this.nextSibling = null;
this.attributeName = null;
this.attributeNamespace = null;
this.oldValue = null;
}
function copyMutationRecord(original) {
var record = new MutationRecord(original.type, original.target);
record.addedNodes = original.addedNodes.slice();
record.removedNodes = original.removedNodes.slice();
record.previousSibling = original.previousSibling;
record.nextSibling = original.nextSibling;
record.attributeName = original.attributeName;
record.attributeNamespace = original.attributeNamespace;
record.oldValue = original.oldValue;
return record;
}
var currentRecord, recordWithOldValue;
function getRecord(type, target) {
return currentRecord = new MutationRecord(type, target);
}
function getRecordWithOldValue(oldValue) {
if (recordWithOldValue) return recordWithOldValue;
recordWithOldValue = copyMutationRecord(currentRecord);
recordWithOldValue.oldValue = oldValue;
return recordWithOldValue;
}
function clearRecords() {
currentRecord = recordWithOldValue = undefined;
}
function recordRepresentsCurrentMutation(record) {
return record === recordWithOldValue || record === currentRecord;
}
function selectRecord(lastRecord, newRecord) {
if (lastRecord === newRecord) return lastRecord;
if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
return null;
}
function Registration(observer, target, options) {
this.observer = observer;
this.target = target;
this.options = options;
this.transientObservedNodes = [];
}
Registration.prototype = {
enqueue: function(record) {
var records = this.observer.records_;
var length = records.length;
if (records.length > 0) {
var lastRecord = records[length - 1];
var recordToReplaceLast = selectRecord(lastRecord, record);
if (recordToReplaceLast) {
records[length - 1] = recordToReplaceLast;
return;
}
} else {
scheduleCallback(this.observer);
}
records[length] = record;
},
addListeners: function() {
this.addListeners_(this.target);
},
addListeners_: function(node) {
var options = this.options;
if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
},
removeListeners: function() {
this.removeListeners_(this.target);
},
removeListeners_: function(node) {
var options = this.options;
if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
},
addTransientObserver: function(node) {
if (node === this.target) return;
this.addListeners_(node);
this.transientObservedNodes.push(node);
var registrations = registrationsTable.get(node);
if (!registrations) registrationsTable.set(node, registrations = []);
registrations.push(this);
},
removeTransientObservers: function() {
var transientObservedNodes = this.transientObservedNodes;
this.transientObservedNodes = [];
transientObservedNodes.forEach(function(node) {
this.removeListeners_(node);
var registrations = registrationsTable.get(node);
for (var i = 0; i < registrations.length; i++) {
if (registrations[i] === this) {
registrations.splice(i, 1);
break;
}
}
}, this);
},
handleEvent: function(e) {
e.stopImmediatePropagation();
switch (e.type) {
case "DOMAttrModified":
var name = e.attrName;
var namespace = e.relatedNode.namespaceURI;
var target = e.target;
var record = new getRecord("attributes", target);
record.attributeName = name;
record.attributeNamespace = namespace;
var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
if (!options.attributes) return;
if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
return;
}
if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
return record;
});
break;
case "DOMCharacterDataModified":
var target = e.target;
var record = getRecord("characterData", target);
var oldValue = e.prevValue;
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
if (!options.characterData) return;
if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
return record;
});
break;
case "DOMNodeRemoved":
this.addTransientObserver(e.target);
case "DOMNodeInserted":
var target = e.relatedNode;
var changedNode = e.target;
var addedNodes, removedNodes;
if (e.type === "DOMNodeInserted") {
addedNodes = [ changedNode ];
removedNodes = [];
} else {
addedNodes = [];
removedNodes = [ changedNode ];
}
var previousSibling = changedNode.previousSibling;
var nextSibling = changedNode.nextSibling;
var record = getRecord("childList", target);
record.addedNodes = addedNodes;
record.removedNodes = removedNodes;
record.previousSibling = previousSibling;
record.nextSibling = nextSibling;
forEachAncestorAndObserverEnqueueRecord(target, function(options) {
if (!options.childList) return;
return record;
});
}
clearRecords();
}
};
global.JsMutationObserver = JsMutationObserver;
if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
})(this);
window.CustomElements = window.CustomElements || {
flags: {}
};
(function(scope) {
var flags = scope.flags;
var modules = [];
var addModule = function(module) {
modules.push(module);
};
var initializeModules = function() {
modules.forEach(function(module) {
module(scope);
});
};
scope.addModule = addModule;
scope.initializeModules = initializeModules;
scope.hasNative = Boolean(document.registerElement);
scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
})(CustomElements);
CustomElements.addModule(function(scope) {
var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
function forSubtree(node, cb) {
findAllElements(node, function(e) {
if (cb(e)) {
return true;
}
forRoots(e, cb);
});
forRoots(node, cb);
}
function findAllElements(node, find, data) {
var e = node.firstElementChild;
if (!e) {
e = node.firstChild;
while (e && e.nodeType !== Node.ELEMENT_NODE) {
e = e.nextSibling;
}
}
while (e) {
if (find(e, data) !== true) {
findAllElements(e, find, data);
}
e = e.nextElementSibling;
}
return null;
}
function forRoots(node, cb) {
var root = node.shadowRoot;
while (root) {
forSubtree(root, cb);
root = root.olderShadowRoot;
}
}
var processingDocuments;
function forDocumentTree(doc, cb) {
processingDocuments = [];
_forDocumentTree(doc, cb);
processingDocuments = null;
}
function _forDocumentTree(doc, cb) {
doc = wrap(doc);
if (processingDocuments.indexOf(doc) >= 0) {
return;
}
processingDocuments.push(doc);
var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
if (n.import) {
_forDocumentTree(n.import, cb);
}
}
cb(doc);
}
scope.forDocumentTree = forDocumentTree;
scope.forSubtree = forSubtree;
});
CustomElements.addModule(function(scope) {
var flags = scope.flags;
var forSubtree = scope.forSubtree;
var forDocumentTree = scope.forDocumentTree;
function addedNode(node) {
return added(node) || addedSubtree(node);
}
function added(node) {
if (scope.upgrade(node)) {
return true;
}
attached(node);
}
function addedSubtree(node) {
forSubtree(node, function(e) {
if (added(e)) {
return true;
}
});
}
function attachedNode(node) {
attached(node);
if (inDocument(node)) {
forSubtree(node, function(e) {
attached(e);
});
}
}
var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
scope.hasPolyfillMutations = hasPolyfillMutations;
var isPendingMutations = false;
var pendingMutations = [];
function deferMutation(fn) {
pendingMutations.push(fn);
if (!isPendingMutations) {
isPendingMutations = true;
setTimeout(takeMutations);
}
}
function takeMutations() {
isPendingMutations = false;
var $p = pendingMutations;
for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
p();
}
pendingMutations = [];
}
function attached(element) {
if (hasPolyfillMutations) {
deferMutation(function() {
_attached(element);
});
} else {
_attached(element);
}
}
function _attached(element) {
if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
if (!element.__attached && inDocument(element)) {
element.__attached = true;
if (element.attachedCallback) {
element.attachedCallback();
}
}
}
}
function detachedNode(node) {
detached(node);
forSubtree(node, function(e) {
detached(e);
});
}
function detached(element) {
if (hasPolyfillMutations) {
deferMutation(function() {
_detached(element);
});
} else {
_detached(element);
}
}
function _detached(element) {
if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
if (element.__attached && !inDocument(element)) {
element.__attached = false;
if (element.detachedCallback) {
element.detachedCallback();
}
}
}
}
function inDocument(element) {
var p = element;
var doc = wrap(document);
while (p) {
if (p == doc) {
return true;
}
p = p.parentNode || p.host;
}
}
function watchShadow(node) {
if (node.shadowRoot && !node.shadowRoot.__watched) {
flags.dom && console.log("watching shadow-root for: ", node.localName);
var root = node.shadowRoot;
while (root) {
observe(root);
root = root.olderShadowRoot;
}
}
}
function handler(mutations) {
if (flags.dom) {
var mx = mutations[0];
if (mx && mx.type === "childList" && mx.addedNodes) {
if (mx.addedNodes) {
var d = mx.addedNodes[0];
while (d && d !== document && !d.host) {
d = d.parentNode;
}
var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
u = u.split("/?").shift().split("/").pop();
}
}
console.group("mutations (%d) [%s]", mutations.length, u || "");
}
mutations.forEach(function(mx) {
if (mx.type === "childList") {
forEach(mx.addedNodes, function(n) {
if (!n.localName) {
return;
}
addedNode(n);
});
forEach(mx.removedNodes, function(n) {
if (!n.localName) {
return;
}
detachedNode(n);
});
}
});
flags.dom && console.groupEnd();
}
function takeRecords(node) {
node = wrap(node);
if (!node) {
node = wrap(document);
}
while (node.parentNode) {
node = node.parentNode;
}
var observer = node.__observer;
if (observer) {
handler(observer.takeRecords());
takeMutations();
}
}
var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
function observe(inRoot) {
if (inRoot.__observer) {
return;
}
var observer = new MutationObserver(handler);
observer.observe(inRoot, {
childList: true,
subtree: true
});
inRoot.__observer = observer;
}
function upgradeDocument(doc) {
doc = wrap(doc);
flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
addedNode(doc);
observe(doc);
flags.dom && console.groupEnd();
}
function upgradeDocumentTree(doc) {
forDocumentTree(doc, upgradeDocument);
}
var originalCreateShadowRoot = Element.prototype.createShadowRoot;
Element.prototype.createShadowRoot = function() {
var root = originalCreateShadowRoot.call(this);
CustomElements.watchShadow(this);
return root;
};
scope.watchShadow = watchShadow;
scope.upgradeDocumentTree = upgradeDocumentTree;
scope.upgradeSubtree = addedSubtree;
scope.upgradeAll = addedNode;
scope.attachedNode = attachedNode;
scope.takeRecords = takeRecords;
});
CustomElements.addModule(function(scope) {
var flags = scope.flags;
function upgrade(node) {
if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
var is = node.getAttribute("is");
var definition = scope.getRegisteredDefinition(is || node.localName);
if (definition) {
if (is && definition.tag == node.localName) {
return upgradeWithDefinition(node, definition);
} else if (!is && !definition.extends) {
return upgradeWithDefinition(node, definition);
}
}
}
}
function upgradeWithDefinition(element, definition) {
flags.upgrade && console.group("upgrade:", element.localName);
if (definition.is) {
element.setAttribute("is", definition.is);
}
implementPrototype(element, definition);
element.__upgraded__ = true;
created(element);
scope.attachedNode(element);
scope.upgradeSubtree(element);
flags.upgrade && console.groupEnd();
return element;
}
function implementPrototype(element, definition) {
if (Object.__proto__) {
element.__proto__ = definition.prototype;
} else {
customMixin(element, definition.prototype, definition.native);
element.__proto__ = definition.prototype;
}
}
function customMixin(inTarget, inSrc, inNative) {
var used = {};
var p = inSrc;
while (p !== inNative && p !== HTMLElement.prototype) {
var keys = Object.getOwnPropertyNames(p);
for (var i = 0, k; k = keys[i]; i++) {
if (!used[k]) {
Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
used[k] = 1;
}
}
p = Object.getPrototypeOf(p);
}
}
function created(element) {
if (element.createdCallback) {
element.createdCallback();
}
}
scope.upgrade = upgrade;
scope.upgradeWithDefinition = upgradeWithDefinition;
scope.implementPrototype = implementPrototype;
});
CustomElements.addModule(function(scope) {
var upgradeDocumentTree = scope.upgradeDocumentTree;
var upgrade = scope.upgrade;
var upgradeWithDefinition = scope.upgradeWithDefinition;
var implementPrototype = scope.implementPrototype;
var useNative = scope.useNative;
function register(name, options) {
var definition = options || {};
if (!name) {
throw new Error("document.registerElement: first argument `name` must not be empty");
}
if (name.indexOf("-") < 0) {
throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
}
if (isReservedTag(name)) {
throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
}
if (getRegisteredDefinition(name)) {
throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
}
if (!definition.prototype) {
definition.prototype = Object.create(HTMLElement.prototype);
}
definition.__name = name.toLowerCase();
definition.lifecycle = definition.lifecycle || {};
definition.ancestry = ancestry(definition.extends);
resolveTagName(definition);
resolvePrototypeChain(definition);
overrideAttributeApi(definition.prototype);
registerDefinition(definition.__name, definition);
definition.ctor = generateConstructor(definition);
definition.ctor.prototype = definition.prototype;
definition.prototype.constructor = definition.ctor;
if (scope.ready) {
upgradeDocumentTree(document);
}
return definition.ctor;
}
function overrideAttributeApi(prototype) {
if (prototype.setAttribute._polyfilled) {
return;
}
var setAttribute = prototype.setAttribute;
prototype.setAttribute = function(name, value) {
changeAttribute.call(this, name, value, setAttribute);
};
var removeAttribute = prototype.removeAttribute;
prototype.removeAttribute = function(name) {
changeAttribute.call(this, name, null, removeAttribute);
};
prototype.setAttribute._polyfilled = true;
}
function changeAttribute(name, value, operation) {
name = name.toLowerCase();
var oldValue = this.getAttribute(name);
operation.apply(this, arguments);
var newValue = this.getAttribute(name);
if (this.attributeChangedCallback && newValue !== oldValue) {
this.attributeChangedCallback(name, oldValue, newValue);
}
}
function isReservedTag(name) {
for (var i = 0; i < reservedTagList.length; i++) {
if (name === reservedTagList[i]) {
return true;
}
}
}
var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
function ancestry(extnds) {
var extendee = getRegisteredDefinition(extnds);
if (extendee) {
return ancestry(extendee.extends).concat([ extendee ]);
}
return [];
}
function resolveTagName(definition) {
var baseTag = definition.extends;
for (var i = 0, a; a = definition.ancestry[i]; i++) {
baseTag = a.is && a.tag;
}
definition.tag = baseTag || definition.__name;
if (baseTag) {
definition.is = definition.__name;
}
}
function resolvePrototypeChain(definition) {
if (!Object.__proto__) {
var nativePrototype = HTMLElement.prototype;
if (definition.is) {
var inst = document.createElement(definition.tag);
var expectedPrototype = Object.getPrototypeOf(inst);
if (expectedPrototype === definition.prototype) {
nativePrototype = expectedPrototype;
}
}
var proto = definition.prototype, ancestor;
while (proto && proto !== nativePrototype) {
ancestor = Object.getPrototypeOf(proto);
proto.__proto__ = ancestor;
proto = ancestor;
}
definition.native = nativePrototype;
}
}
function instantiate(definition) {
return upgradeWithDefinition(domCreateElement(definition.tag), definition);
}
var registry = {};
function getRegisteredDefinition(name) {
if (name) {
return registry[name.toLowerCase()];
}
}
function registerDefinition(name, definition) {
registry[name] = definition;
}
function generateConstructor(definition) {
return function() {
return instantiate(definition);
};
}
var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
function createElementNS(namespace, tag, typeExtension) {
if (namespace === HTML_NAMESPACE) {
return createElement(tag, typeExtension);
} else {
return domCreateElementNS(namespace, tag);
}
}
function createElement(tag, typeExtension) {
var definition = getRegisteredDefinition(typeExtension || tag);
if (definition) {
if (tag == definition.tag && typeExtension == definition.is) {
return new definition.ctor();
}
if (!typeExtension && !definition.is) {
return new definition.ctor();
}
}
var element;
if (typeExtension) {
element = createElement(tag);
element.setAttribute("is", typeExtension);
return element;
}
element = domCreateElement(tag);
if (tag.indexOf("-") >= 0) {
implementPrototype(element, HTMLElement);
}
return element;
}
function cloneNode(deep) {
var n = domCloneNode.call(this, deep);
upgrade(n);
return n;
}
var domCreateElement = document.createElement.bind(document);
var domCreateElementNS = document.createElementNS.bind(document);
var domCloneNode = Node.prototype.cloneNode;
var isInstance;
if (!Object.__proto__ && !useNative) {
isInstance = function(obj, ctor) {
var p = obj;
while (p) {
if (p === ctor.prototype) {
return true;
}
p = p.__proto__;
}
return false;
};
} else {
isInstance = function(obj, base) {
return obj instanceof base;
};
}
document.registerElement = register;
document.createElement = createElement;
document.createElementNS = createElementNS;
Node.prototype.cloneNode = cloneNode;
scope.registry = registry;
scope.instanceof = isInstance;
scope.reservedTagList = reservedTagList;
scope.getRegisteredDefinition = getRegisteredDefinition;
document.register = document.registerElement;
});
(function(scope) {
var useNative = scope.useNative;
var initializeModules = scope.initializeModules;
if (useNative) {
var nop = function() {};
scope.watchShadow = nop;
scope.upgrade = nop;
scope.upgradeAll = nop;
scope.upgradeDocumentTree = nop;
scope.upgradeSubtree = nop;
scope.takeRecords = nop;
scope.instanceof = function(obj, base) {
return obj instanceof base;
};
} else {
initializeModules();
}
var upgradeDocumentTree = scope.upgradeDocumentTree;
if (!window.wrap) {
if (window.ShadowDOMPolyfill) {
window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
} else {
window.wrap = window.unwrap = function(node) {
return node;
};
}
}
function bootstrap() {
upgradeDocumentTree(wrap(document));
if (window.HTMLImports) {
HTMLImports.__importsParsingHook = function(elt) {
upgradeDocumentTree(wrap(elt.import));
};
}
CustomElements.ready = true;
setTimeout(function() {
CustomElements.readyTime = Date.now();
if (window.HTMLImports) {
CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
}
document.dispatchEvent(new CustomEvent("WebComponentsReady", {
bubbles: true
}));
});
}
if (typeof window.CustomEvent !== "function") {
window.CustomEvent = function(inType, params) {
params = params || {};
var e = document.createEvent("CustomEvent");
e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
return e;
};
window.CustomEvent.prototype = window.Event.prototype;
}
if (document.readyState === "complete" || scope.flags.eager) {
bootstrap();
} else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
bootstrap();
} else {
var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
window.addEventListener(loadEvent, bootstrap);
}
})(window.CustomElements);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,38 @@
webcomponents.js
================
A suite of polyfills supporting the HTML web components specs:
**Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)).
**HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)).
**Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)).
This also folds in polyfills for `MutationObserver` and `WeakMap`.
## Releases
Pre-built (concatenated & minified) versions of the polyfills are maintained in the [tagged versions](https://github.com/Polymer/webcomponentsjs/releases) of this repo. There are two variants:
`webcomponents.js` includes all of the polyfills.
`webcomponents-lite.js` includes all polyfills except for shadow DOM.
### Manually Building
If you wish to build the polyfills yourself, you'll need `node` and `gulp` on your system:
* install [node.js](http://nodejs.org/) using the instructions on their website
* use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
Now you are ready to build the polyfills with:
# install dependencies
npm install
# build
gulp build
The builds will be placed into the `dist/` directory.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
{
"name": "webcomponentsjs",
"main": "webcomponents.js",
"version": "0.5.1",
"homepage": "http://webcomponents.org",
"authors": [
"The Polymer Authors"
],
"keywords": [
"webcomponents"
],
"license": "BSD",
"ignore": []
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,33 @@
(function() {
var adaptConnector;
adaptConnector = function(connector, engine, HB, execution_listener) {
var applyHb, sendHb, sendStateVector, send_;
send_ = function(o) {
if (o.uid.creator === HB.getUserId() && (typeof o.uid.op_number !== "string")) {
return connector.broadcast(o);
}
};
execution_listener.push(send_);
sendStateVector = function() {
return HB.getOperationCounter();
};
sendHb = function(state_vector) {
return HB._encode(state_vector);
};
applyHb = function(hb) {
return engine.applyOpsCheckDouble(hb);
};
connector.whenSyncing(sendStateVector, sendHb, applyHb);
return connector.whenReceiving(function(sender, op) {
if (op.uid.creator !== HB.getUserId()) {
return engine.applyOp(op);
}
});
};
module.exports = adaptConnector;
}).call(this);
//# sourceMappingURL=ConnectorAdapter.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["ConnectorAdapter.coffee"],"names":[],"mappings":"AAOA;AAAA,MAAA,cAAA;;AAAA,EAAA,cAAA,GAAiB,SAAC,SAAD,EAAY,MAAZ,EAAoB,EAApB,EAAwB,kBAAxB,GAAA;AACf,QAAA,uCAAA;AAAA,IAAA,KAAA,GAAQ,SAAC,CAAD,GAAA;AACN,MAAA,IAAG,CAAC,CAAC,GAAG,CAAC,OAAN,KAAiB,EAAE,CAAC,SAAH,CAAA,CAAjB,IAAoC,CAAC,MAAA,CAAA,CAAQ,CAAC,GAAG,CAAC,SAAb,KAA4B,QAA7B,CAAvC;eACE,SAAS,CAAC,SAAV,CAAoB,CAApB,EADF;OADM;IAAA,CAAR,CAAA;AAAA,IAIA,kBAAkB,CAAC,IAAnB,CAAwB,KAAxB,CAJA,CAAA;AAAA,IAKA,eAAA,GAAkB,SAAA,GAAA;aAChB,EAAE,CAAC,mBAAH,CAAA,EADgB;IAAA,CALlB,CAAA;AAAA,IAOA,MAAA,GAAS,SAAC,YAAD,GAAA;aACP,EAAE,CAAC,OAAH,CAAW,YAAX,EADO;IAAA,CAPT,CAAA;AAAA,IASA,OAAA,GAAU,SAAC,EAAD,GAAA;aACR,MAAM,CAAC,mBAAP,CAA2B,EAA3B,EADQ;IAAA,CATV,CAAA;AAAA,IAWA,SAAS,CAAC,WAAV,CAAsB,eAAtB,EAAuC,MAAvC,EAA+C,OAA/C,CAXA,CAAA;WAaA,SAAS,CAAC,aAAV,CAAwB,SAAC,MAAD,EAAS,EAAT,GAAA;AACtB,MAAA,IAAG,EAAE,CAAC,GAAG,CAAC,OAAP,KAAoB,EAAE,CAAC,SAAH,CAAA,CAAvB;eACE,MAAM,CAAC,OAAP,CAAe,EAAf,EADF;OADsB;IAAA,CAAxB,EAde;EAAA,CAAjB,CAAA;;AAAA,EAkBA,MAAM,CAAC,OAAP,GAAiB,cAlBjB,CAAA;AAAA","file":"ConnectorAdapter.js","sourceRoot":"/source/","sourcesContent":["\n\n#\n# @param {Engine} engine The transformation engine\n# @param {HistoryBuffer} HB\n# @param {Array<Function>} execution_listener You must ensure that whenever an operation is executed, every function in this Array is called.\n#\nadaptConnector = (connector, engine, HB, execution_listener)->\n send_ = (o)->\n if o.uid.creator is HB.getUserId() and (typeof o.uid.op_number isnt \"string\")\n connector.broadcast o\n \n execution_listener.push send_\n sendStateVector = ()->\n HB.getOperationCounter()\n sendHb = (state_vector)->\n HB._encode(state_vector)\n applyHb = (hb)->\n engine.applyOpsCheckDouble hb\n connector.whenSyncing sendStateVector, sendHb, applyHb\n \n connector.whenReceiving (sender, op)->\n if op.uid.creator isnt HB.getUserId()\n engine.applyOp op\n \nmodule.exports = adaptConnector"]}

View File

@ -0,0 +1,142 @@
(function() {
var createIwcConnector;
createIwcConnector = function(callback, options) {
var IwcConnector, duiClient, init, iwcHandler, received_HB, userIwcHandler;
userIwcHandler = null;
if (options != null) {
userIwcHandler = options.iwcHandler;
}
iwcHandler = {};
duiClient = new DUIClient();
duiClient.connect(function(intent) {
var _ref;
if ((_ref = iwcHandler[intent.action]) != null) {
_ref.map(function(f) {
return setTimeout(function() {
return f(intent);
}, 0);
});
}
if (userIwcHandler != null) {
return userIwcHandler(intent);
}
});
duiClient.initOK();
received_HB = null;
IwcConnector = (function() {
function IwcConnector(engine, HB, execution_listener, yatta) {
var receiveHB, receive_, sendHistoryBuffer, send_;
this.engine = engine;
this.HB = HB;
this.execution_listener = execution_listener;
this.yatta = yatta;
this.duiClient = duiClient;
this.iwcHandler = iwcHandler;
send_ = (function(_this) {
return function(o) {
if (Object.getOwnPropertyNames(_this.initialized).length !== 0) {
return _this.send(o);
}
};
})(this);
this.execution_listener.push(send_);
this.initialized = {};
receiveHB = (function(_this) {
return function(json) {
var him;
HB = json.extras.HB;
him = json.extras.user;
_this.engine.applyOpsCheckDouble(HB);
return _this.initialized[him] = true;
};
})(this);
iwcHandler["Yatta_push_HB_element"] = [receiveHB];
this.sendIwcIntent("Yatta_get_HB_element", this.HB.getOperationCounter());
receive_ = (function(_this) {
return function(intent) {
var o;
o = intent.extras;
if (_this.initialized[o.uid.creator] != null) {
return _this.receive(o);
}
};
})(this);
this.iwcHandler["Yatta_new_operation"] = [receive_];
if (received_HB != null) {
this.engine.applyOpsCheckDouble(received_HB);
}
sendHistoryBuffer = (function(_this) {
return function(intent) {
var json, state_vector;
state_vector = intent.extras;
console.log(state_vector);
json = {
HB: _this.yatta.getHistoryBuffer()._encode(state_vector),
user: _this.yatta.getUserId()
};
return _this.sendIwcIntent("Yatta_push_HB_element", json);
};
})(this);
this.iwcHandler["Yatta_get_HB_element"] = [sendHistoryBuffer];
}
IwcConnector.prototype.setIwcHandler = function(f) {
return userIwcHandler = f;
};
IwcConnector.prototype.sendIwcIntent = function(action_name, content) {
var intent;
intent = null;
if (arguments.length >= 2) {
action_name = arguments[0], content = arguments[1];
intent = {
action: action_name,
component: "",
data: "",
dataType: "",
flags: ["PUBLISH_GLOBAL"],
extras: content
};
} else {
intent = arguments[0];
}
return this.duiClient.sendIntent(intent);
};
IwcConnector.prototype.send = function(o) {
if (o.uid.creator === this.HB.getUserId() && (typeof o.uid.op_number !== "string")) {
return this.sendIwcIntent("Yatta_new_operation", o);
}
};
IwcConnector.prototype.receive = function(o) {
if (o.uid.creator !== this.HB.getUserId()) {
return this.engine.applyOp(o);
}
};
return IwcConnector;
})();
init = function() {
var proposed_user_id;
proposed_user_id = Math.floor(Math.random() * 1000000);
return callback(IwcConnector, proposed_user_id);
};
setTimeout(init, 5000);
return void 0;
};
module.exports = createIwcConnector;
if (typeof window !== "undefined" && window !== null) {
if (window.Y == null) {
window.Y = {};
}
window.Y.createIwcConnector = createIwcConnector;
}
}).call(this);
//# sourceMappingURL=../ConnectorsDeprecated/IwcConnector.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,169 @@
(function() {
var createPeerJsConnector;
createPeerJsConnector = function() {
var PeerJsConnector, callback, peer;
peer = null;
if (arguments.length === 2) {
peer = new Peer(arguments[0]);
callback = arguments[1];
} else {
peer = new Peer(arguments[0], arguments[1]);
peer.on('error', function(err) {
throw new Error("Peerjs connector: " + err);
});
peer.on('disconnected', function() {
throw new Error("Peerjs connector disconnected from signalling server. Cannot accept new connections. Not fatal, but not so good either..");
});
callback = arguments[2];
}
PeerJsConnector = (function() {
function PeerJsConnector(engine, HB, execution_listener, yatta) {
var send_, sync_every_collaborator;
this.engine = engine;
this.HB = HB;
this.execution_listener = execution_listener;
this.yatta = yatta;
this.peer = peer;
this.connections = {};
this.new_connection_listeners = [];
this.peer.on('connection', (function(_this) {
return function(conn) {
return _this.addConnection(conn);
};
})(this));
sync_every_collaborator = (function(_this) {
return function() {
var conn, conn_id, _ref, _results;
_ref = _this.connections;
_results = [];
for (conn_id in _ref) {
conn = _ref[conn_id];
_results.push(conn.send({
sync_state_vector: _this.HB.getOperationCounter()
}));
}
return _results;
};
})(this);
setInterval(sync_every_collaborator, 4000);
send_ = (function(_this) {
return function(o) {
var conn, conn_id, _ref, _results;
if (o.uid.creator === _this.HB.getUserId() && (typeof o.uid.op_number !== "string")) {
_ref = _this.connections;
_results = [];
for (conn_id in _ref) {
conn = _ref[conn_id];
_results.push(conn.send({
op: o
}));
}
return _results;
}
};
})(this);
this.execution_listener.push(send_);
}
PeerJsConnector.prototype.connectToPeer = function(id) {
if ((this.connections[id] == null) && id !== this.yatta.getUserId()) {
return this.addConnection(peer.connect(id));
}
};
PeerJsConnector.prototype.getAllConnectionIds = function() {
var conn_id, _results;
_results = [];
for (conn_id in this.connections) {
_results.push(conn_id);
}
return _results;
};
PeerJsConnector.prototype.onNewConnection = function(f) {
return this.new_connection_listeners.push(f);
};
PeerJsConnector.prototype.addConnection = function(conn) {
var initialized_him, initialized_me, sendStateVector;
this.connections[conn.peer] = conn;
initialized_me = false;
initialized_him = false;
conn.on('data', (function(_this) {
return function(data) {
var conn_id, _i, _len, _ref, _results;
if (data === "empty_message") {
} else if (data.HB != null) {
initialized_me = true;
_this.engine.applyOpsCheckDouble(data.HB);
if (!data.initialized) {
conn.send({
conns: _this.getAllConnectionIds()
});
return _this.new_connection_listeners.map(function(f) {
return f(conn);
});
}
} else if (data.op != null) {
return _this.engine.applyOp(data.op);
} else if (data.conns != null) {
_ref = data.conns;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
conn_id = _ref[_i];
_results.push(_this.connectToPeer(conn_id));
}
return _results;
} else if (data.sync_state_vector != null) {
return conn.send({
HB: _this.yatta.getHistoryBuffer()._encode(data.sync_state_vector),
initialized: true
});
} else if (data.state_vector != null) {
if (!initialized_him) {
conn.send({
HB: _this.yatta.getHistoryBuffer()._encode(data.state_vector),
initialized: false
});
return initialized_him = true;
}
} else {
throw new Error("Can't parse this operation: " + data);
}
};
})(this));
sendStateVector = (function(_this) {
return function() {
conn.send({
state_vector: _this.HB.getOperationCounter()
});
if (!initialized_me) {
return setTimeout(sendStateVector, 100);
}
};
})(this);
return sendStateVector();
};
return PeerJsConnector;
})();
return peer.on('open', function(id) {
return callback(PeerJsConnector, id);
});
};
module.exports = createPeerJsConnector;
if (typeof window !== "undefined" && window !== null) {
if (window.Y == null) {
window.Y = {};
}
window.Y.createPeerJsConnector = createPeerJsConnector;
}
}).call(this);
//# sourceMappingURL=../ConnectorsDeprecated/PeerJsConnector.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,90 @@
(function() {
var _;
_ = require("underscore");
module.exports = function(user_list) {
var TestConnector;
return TestConnector = (function() {
function TestConnector(engine, HB, execution_listener) {
var appliedOperationsListener, send_;
this.engine = engine;
this.HB = HB;
this.execution_listener = execution_listener;
send_ = (function(_this) {
return function(o) {
return _this.send(o);
};
})(this);
this.execution_listener.push(send_);
this.applied_operations = [];
appliedOperationsListener = (function(_this) {
return function(o) {
return _this.applied_operations.push(o);
};
})(this);
this.execution_listener.push(appliedOperationsListener);
if (!((user_list != null ? user_list.length : void 0) === 0)) {
this.engine.applyOps(user_list[0].getHistoryBuffer()._encode());
}
this.HB.setManualGarbageCollect();
this.unexecuted = {};
}
TestConnector.prototype.getOpsInExecutionOrder = function() {
return this.applied_operations;
};
TestConnector.prototype.send = function(o) {
var user, _i, _len, _results;
if ((o.uid.creator === this.HB.getUserId()) && (typeof o.uid.op_number !== "string")) {
_results = [];
for (_i = 0, _len = user_list.length; _i < _len; _i++) {
user = user_list[_i];
if (user.getUserId() !== this.HB.getUserId()) {
_results.push(user.getConnector().receive(o));
} else {
_results.push(void 0);
}
}
return _results;
}
};
TestConnector.prototype.receive = function(o) {
var _base, _name;
if ((_base = this.unexecuted)[_name = o.uid.creator] == null) {
_base[_name] = [];
}
return this.unexecuted[o.uid.creator].push(o);
};
TestConnector.prototype.flushOne = function(user) {
var _ref;
if (((_ref = this.unexecuted[user]) != null ? _ref.length : void 0) > 0) {
return this.engine.applyOp(this.unexecuted[user].shift());
}
};
TestConnector.prototype.flushOneRandom = function() {
return this.flushOne(_.random(0, user_list.length - 1));
};
TestConnector.prototype.flushAll = function() {
var n, ops, _ref;
_ref = this.unexecuted;
for (n in _ref) {
ops = _ref[n];
this.engine.applyOps(ops);
}
return this.unexecuted = {};
};
return TestConnector;
})();
};
}).call(this);
//# sourceMappingURL=../ConnectorsDeprecated/TestConnector.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["ConnectorsDeprecated/TestConnector.coffee"],"names":[],"mappings":"AACA;AAAA,MAAA,CAAA;;AAAA,EAAA,CAAA,GAAI,OAAA,CAAQ,YAAR,CAAJ,CAAA;;AAAA,EAEA,MAAM,CAAC,OAAP,GAAiB,SAAC,SAAD,GAAA;AAMf,QAAA,aAAA;WAAM;AAQS,MAAA,uBAAE,MAAF,EAAW,EAAX,EAAgB,kBAAhB,GAAA;AACX,YAAA,gCAAA;AAAA,QADY,IAAC,CAAA,SAAA,MACb,CAAA;AAAA,QADqB,IAAC,CAAA,KAAA,EACtB,CAAA;AAAA,QAD0B,IAAC,CAAA,qBAAA,kBAC3B,CAAA;AAAA,QAAA,KAAA,GAAQ,CAAA,SAAA,KAAA,GAAA;iBAAA,SAAC,CAAD,GAAA;mBACN,KAAC,CAAA,IAAD,CAAM,CAAN,EADM;UAAA,EAAA;QAAA,CAAA,CAAA,CAAA,IAAA,CAAR,CAAA;AAAA,QAEA,IAAC,CAAA,kBAAkB,CAAC,IAApB,CAAyB,KAAzB,CAFA,CAAA;AAAA,QAIA,IAAC,CAAA,kBAAD,GAAsB,EAJtB,CAAA;AAAA,QAKA,yBAAA,GAA4B,CAAA,SAAA,KAAA,GAAA;iBAAA,SAAC,CAAD,GAAA;mBAC1B,KAAC,CAAA,kBAAkB,CAAC,IAApB,CAAyB,CAAzB,EAD0B;UAAA,EAAA;QAAA,CAAA,CAAA,CAAA,IAAA,CAL5B,CAAA;AAAA,QAOA,IAAC,CAAA,kBAAkB,CAAC,IAApB,CAAyB,yBAAzB,CAPA,CAAA;AAQA,QAAA,IAAG,CAAA,sBAAK,SAAS,CAAE,gBAAX,KAAqB,CAAtB,CAAP;AACE,UAAA,IAAC,CAAA,MAAM,CAAC,QAAR,CAAiB,SAAU,CAAA,CAAA,CAAE,CAAC,gBAAb,CAAA,CAA+B,CAAC,OAAhC,CAAA,CAAjB,CAAA,CADF;SARA;AAAA,QAWA,IAAC,CAAA,EAAE,CAAC,uBAAJ,CAAA,CAXA,CAAA;AAAA,QAYA,IAAC,CAAA,UAAD,GAAc,EAZd,CADW;MAAA,CAAb;;AAAA,8BAmBA,sBAAA,GAAwB,SAAA,GAAA;eACtB,IAAC,CAAA,mBADqB;MAAA,CAnBxB,CAAA;;AAAA,8BA0BA,IAAA,GAAM,SAAC,CAAD,GAAA;AACJ,YAAA,wBAAA;AAAA,QAAA,IAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAN,KAAiB,IAAC,CAAA,EAAE,CAAC,SAAJ,CAAA,CAAlB,CAAA,IAAuC,CAAC,MAAA,CAAA,CAAQ,CAAC,GAAG,CAAC,SAAb,KAA4B,QAA7B,CAA1C;AACE;eAAA,gDAAA;iCAAA;AACE,YAAA,IAAG,IAAI,CAAC,SAAL,CAAA,CAAA,KAAsB,IAAC,CAAA,EAAE,CAAC,SAAJ,CAAA,CAAzB;4BACE,IAAI,CAAC,YAAL,CAAA,CAAmB,CAAC,OAApB,CAA4B,CAA5B,GADF;aAAA,MAAA;oCAAA;aADF;AAAA;0BADF;SADI;MAAA,CA1BN,CAAA;;AAAA,8BAoCA,OAAA,GAAS,SAAC,CAAD,GAAA;AACP,YAAA,YAAA;;yBAA8B;SAA9B;eACA,IAAC,CAAA,UAAW,CAAA,CAAC,CAAC,GAAG,CAAC,OAAN,CAAc,CAAC,IAA3B,CAAgC,CAAhC,EAFO;MAAA,CApCT,CAAA;;AAAA,8BA2CA,QAAA,GAAU,SAAC,IAAD,GAAA;AACR,YAAA,IAAA;AAAA,QAAA,kDAAoB,CAAE,gBAAnB,GAA4B,CAA/B;iBACE,IAAC,CAAA,MAAM,CAAC,OAAR,CAAgB,IAAC,CAAA,UAAW,CAAA,IAAA,CAAK,CAAC,KAAlB,CAAA,CAAhB,EADF;SADQ;MAAA,CA3CV,CAAA;;AAAA,8BAkDA,cAAA,GAAgB,SAAA,GAAA;eACd,IAAC,CAAA,QAAD,CAAW,CAAC,CAAC,MAAF,CAAS,CAAT,EAAa,SAAS,CAAC,MAAV,GAAiB,CAA9B,CAAX,EADc;MAAA,CAlDhB,CAAA;;AAAA,8BAwDA,QAAA,GAAU,SAAA,GAAA;AACR,YAAA,YAAA;AAAA;AAAA,aAAA,SAAA;wBAAA;AACE,UAAA,IAAC,CAAA,MAAM,CAAC,QAAR,CAAiB,GAAjB,CAAA,CADF;AAAA,SAAA;eAEA,IAAC,CAAA,UAAD,GAAc,GAHN;MAAA,CAxDV,CAAA;;2BAAA;;SAda;EAAA,CAFjB,CAAA;AAAA","file":"ConnectorsDeprecated/TestConnector.js","sourceRoot":"/source/","sourcesContent":["\n_ = require \"underscore\"\n\nmodule.exports = (user_list)->\n\n #\n # @nodoc\n # A trivial Connector that simulates network delay.\n #\n class TestConnector\n\n #\n # @param {Engine} engine The transformation engine\n # @param {HistoryBuffer} HB\n # @param {Array<Function>} execution_listener You must ensure that whenever an operation is executed, every function in this Array is called.\n # @param {Yatta} yatta The Yatta framework.\n #\n constructor: (@engine, @HB, @execution_listener)->\n send_ = (o)=>\n @send o\n @execution_listener.push send_\n\n @applied_operations = []\n appliedOperationsListener = (o)=>\n @applied_operations.push o\n @execution_listener.push appliedOperationsListener\n if not (user_list?.length is 0)\n @engine.applyOps user_list[0].getHistoryBuffer()._encode()\n\n @HB.setManualGarbageCollect()\n @unexecuted = {}\n\n #\n # This engine applied operations in a specific order.\n # Get the ops in the right order.\n #\n getOpsInExecutionOrder: ()->\n @applied_operations\n\n #\n # This function is called whenever an operation was executed.\n # @param {Operation} o The operation that was executed.\n #\n send: (o)->\n if (o.uid.creator is @HB.getUserId()) and (typeof o.uid.op_number isnt \"string\")\n for user in user_list\n if user.getUserId() isnt @HB.getUserId()\n user.getConnector().receive(o)\n\n #\n # This function is called whenever an operation was received from another peer.\n # @param {Operation} o The operation that was received.\n #\n receive: (o)->\n @unexecuted[o.uid.creator] ?= []\n @unexecuted[o.uid.creator].push o\n\n #\n # Flush one operation from the line of a specific user.\n #\n flushOne: (user)->\n if @unexecuted[user]?.length > 0\n @engine.applyOp @unexecuted[user].shift()\n\n #\n # Flush one operation on a random line.\n #\n flushOneRandom: ()->\n @flushOne (_.random 0, (user_list.length-1))\n\n #\n # Flush all operations on every line.\n #\n flushAll: ()->\n for n,ops of @unexecuted\n @engine.applyOps ops\n @unexecuted = {}\n\n"]}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
(function() {
var Engine, HistoryBuffer, JsonFramework, json_types_uninitialized;
var Engine, HistoryBuffer, JsonFramework, adaptConnector, json_types_uninitialized;
json_types_uninitialized = require("../Types/JsonTypes");
@ -7,15 +7,18 @@
Engine = require("../Engine");
adaptConnector = require("../ConnectorAdapter");
JsonFramework = (function() {
function JsonFramework(user_id, Connector) {
function JsonFramework(user_id, connector) {
var beg, end, first_word, type_manager, uid_beg, uid_end;
this.connector = connector;
this.HB = new HistoryBuffer(user_id);
type_manager = json_types_uninitialized(this.HB);
this.types = type_manager.types;
this.engine = new Engine(this.HB, type_manager.parser);
this.HB.engine = this.engine;
this.connector = new Connector(this.engine, this.HB, type_manager.execution_listener, this);
adaptConnector(this.connector, this.engine, this.HB, type_manager.execution_listener);
first_word = new this.types.JsonType(this.HB.getReservedUniqueIdentifier());
this.HB.addOperation(first_word).execute();
uid_beg = this.HB.getReservedUniqueIdentifier();

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
(function() {
var Engine, HistoryBuffer, TextFramework, text_types_uninitialized;
var Engine, HistoryBuffer, TextFramework, adaptConnector, text_types_uninitialized;
text_types_uninitialized = require("../Types/TextTypes");
@ -7,14 +7,17 @@
Engine = require("../Engine");
adaptConnector = require("../ConnectorAdapter");
TextFramework = (function() {
function TextFramework(user_id, Connector) {
function TextFramework(user_id, connector) {
var beg, beginning, end, first_word, text_types, uid_beg, uid_end, uid_r;
this.connector = connector;
this.HB = new HistoryBuffer(user_id);
text_types = text_types_uninitialized(this.HB);
this.types = text_types.types;
this.engine = new Engine(this.HB, text_types.parser);
this.connector = new Connector(this.engine, this.HB, text_types.execution_listener, this);
adaptConnector(this.connector, this.engine, this.HB, text_types.execution_listener);
beginning = this.HB.addOperation(new this.types.Delimiter({
creator: '_',
op_number: '_beginning'

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
(function() {
var Engine, HistoryBuffer, XmlFramework, json_types_uninitialized;
var Engine, HistoryBuffer, XmlFramework, adaptConnector, json_types_uninitialized;
json_types_uninitialized = require("../Types/XmlTypes");
@ -7,15 +7,18 @@
Engine = require("../Engine");
adaptConnector = require("../ConnectorAdapter");
XmlFramework = (function() {
function XmlFramework(user_id, Connector) {
function XmlFramework(user_id, connector) {
var beg, end, type_manager, uid_beg, uid_end;
this.connector = connector;
this.HB = new HistoryBuffer(user_id);
type_manager = json_types_uninitialized(this.HB);
this.types = type_manager.types;
this.engine = new Engine(this.HB, type_manager.parser);
this.HB.engine = this.engine;
this.connector = new Connector(this.engine, this.HB, type_manager.execution_listener, this);
adaptConnector(this.connector, this.engine, this.HB, type_manager.execution_listener);
uid_beg = this.HB.getReservedUniqueIdentifier();
uid_end = this.HB.getReservedUniqueIdentifier();
beg = this.HB.addOperation(new this.types.Delimiter(uid_beg, void 0, uid_end)).execute();

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,4 @@
(function() {
exports['IwcConnector'] = require('./Connectors/IwcConnector');
exports['TestConnector'] = require('./Connectors/TestConnector');
exports['JsonFramework'] = require('./Frameworks/JsonFramework');
exports['TextFramework'] = require('./Frameworks/TextFramework');

View File

@ -1 +1 @@
{"version":3,"sources":["index.coffee"],"names":[],"mappings":"AAEA;AAAA,EAAA,OAAQ,CAAA,cAAA,CAAR,GACE,OAAA,CAAQ,2BAAR,CADF,CAAA;;AAAA,EAEA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CAHF,CAAA;;AAAA,EAIA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CALF,CAAA;;AAAA,EAMA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CAPF,CAAA;;AAAA,EAQA,OAAQ,CAAA,cAAA,CAAR,GACE,OAAA,CAAQ,2BAAR,CATF,CAAA;AAAA","file":"index.js","sourceRoot":"/source/","sourcesContent":["\n\nexports['IwcConnector'] =\n require './Connectors/IwcConnector'\nexports['TestConnector'] =\n require './Connectors/TestConnector'\nexports['JsonFramework'] =\n require './Frameworks/JsonFramework'\nexports['TextFramework'] =\n require './Frameworks/TextFramework'\nexports['XmlFramework'] =\n require './Frameworks/XmlFramework'\n\n"]}
{"version":3,"sources":["index.coffee"],"names":[],"mappings":"AACA;AAAA,EAAA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CADF,CAAA;;AAAA,EAEA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CAHF,CAAA;;AAAA,EAIA,OAAQ,CAAA,cAAA,CAAR,GACE,OAAA,CAAQ,2BAAR,CALF,CAAA;AAAA","file":"index.js","sourceRoot":"/source/","sourcesContent":["\nexports['JsonFramework'] =\n require './Frameworks/JsonFramework'\nexports['TextFramework'] =\n require './Frameworks/TextFramework'\nexports['XmlFramework'] =\n require './Frameworks/XmlFramework'\n\n"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,9 +13,9 @@
mocha.ui('bdd');
mocha.reporter('html');
</script>
<!--script src="TextYatta_test.js"></script>
<script src="JsonYatta_test.js"></script-->
<script src="XmlYatta_test_browser.js"></script>
<script src="TextYatta_test.js"></script>
<script src="JsonYatta_test.js"></script>
<!--script src="XmlYatta_test_browser.js"></script-->
<script>
//mocha.checkLeaks();
//mocha.run();

View File

@ -118,6 +118,19 @@
</li>
</ul>
</ul>
<ul>
<li class='letter'>c</li>
<ul>
<li>
<a href='file/lib/ConnectorAdapter.coffee.html'>
ConnectorAdapter.coffee
</a>
<small>
(lib)
</small>
</li>
</ul>
</ul>
<ul>
<li class='letter'>e</li>
<ul>
@ -148,11 +161,11 @@
<li class='letter'>i</li>
<ul>
<li>
<a href='file/lib/Connectors/IwcConnector.coffee.html'>
<a href='file/lib/ConnectorsDeprecated/IwcConnector.coffee.html'>
IwcConnector.coffee
</a>
<small>
(lib&#47;Connectors)
(lib&#47;ConnectorsDeprecated)
</small>
</li>
<li>
@ -190,11 +203,11 @@
<li class='letter'>p</li>
<ul>
<li>
<a href='file/lib/Connectors/PeerJsConnector.coffee.html'>
<a href='file/lib/ConnectorsDeprecated/PeerJsConnector.coffee.html'>
PeerJsConnector.coffee
</a>
<small>
(lib&#47;Connectors)
(lib&#47;ConnectorsDeprecated)
</small>
</li>
</ul>
@ -216,11 +229,11 @@
<li class='letter'>t</li>
<ul>
<li>
<a href='file/lib/Connectors/TestConnector.coffee.html'>
<a href='file/lib/ConnectorsDeprecated/TestConnector.coffee.html'>
TestConnector.coffee
</a>
<small>
(lib&#47;Connectors)
(lib&#47;ConnectorsDeprecated)
</small>
</li>
<li>
@ -258,7 +271,7 @@
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -30,7 +30,7 @@
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;Connectors&#47;IwcConnector.coffee</td>
<td>lib&#47;ConnectorsDeprecated&#47;IwcConnector.coffee</td>
</tr>
</table>
<h2>Overview</h2>
@ -302,7 +302,7 @@ data from the received intent.</p>
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -155,7 +155,7 @@ Known values that are supported:</p><ul>
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>(user_id, Connector)</span>
<b>constructor</b><span>(user_id, connector)</span>
<br>
</p>
<div class='tags'>
@ -335,7 +335,7 @@ JsonFramework was initialized (Depending on the HistoryBuffer implementation).</
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -466,7 +466,7 @@ if (x.type === &quot;JsonType&quot;) {
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -139,7 +139,7 @@ console.log(w.newProperty == &quot;Awesome&quot;) # true!</code></pre>
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -30,7 +30,7 @@
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;Connectors&#47;PeerJsConnector.coffee</td>
<td>lib&#47;ConnectorsDeprecated&#47;PeerJsConnector.coffee</td>
</tr>
</table>
<h2>Overview</h2>
@ -242,7 +242,7 @@ on how to do that with urls.</p>
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -160,7 +160,7 @@
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>(user_id, Connector)</span>
<b>constructor</b><span>(user_id, connector)</span>
<br>
</p>
<div class='tags'>
@ -356,7 +356,7 @@ JsonFramework was initialized (Depending on the HistoryBuffer implementation).</
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -455,7 +455,7 @@ yatta.bind(textbox);</code></pre>
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -139,7 +139,7 @@ Known values that are supported:</p>
<p class='signature' id='constructor-dynamic'>
#
(void)
<b>constructor</b><span>(user_id, Connector)</span>
<b>constructor</b><span>(user_id, connector)</span>
<br>
</p>
<div class='tags'>
@ -303,7 +303,7 @@ JsonFramework was initialized (Depending on the HistoryBuffer implementation).</
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -38,7 +38,7 @@
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -76,7 +76,7 @@ But I would become really motivated if you gave me some feedback :) (<a href="ht
</ul>
<h2 id="support">Support</h2><p>Please report <em>any</em> issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!
I would appreciate if developers gave me feedback on how <em>convenient</em> the framework is, and if it is easy to use. Particularly the XML-support may not support every DOM-methods - if you encounter a method that does not cause any change on other peers,
please state function name, and sample parameters. However, there are browser-specific features, that Yatta won&#39;t support.</p><h2 id="license">License</h2><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p><a href="&#x6d;&#97;&#x69;&#108;&#116;&#x6f;&#x3a;&#x6b;&#101;&#118;&#105;&#110;&#46;&#x6a;&#97;&#104;&#110;&#115;&#x40;&#114;&#x77;&#x74;&#x68;&#x2d;&#x61;&#x61;&#99;&#104;&#x65;&#110;&#x2e;&#x64;&#101;">&#x6b;&#101;&#118;&#105;&#110;&#46;&#x6a;&#97;&#104;&#110;&#115;&#x40;&#114;&#x77;&#x74;&#x68;&#x2d;&#x61;&#x61;&#99;&#104;&#x65;&#110;&#x2e;&#x64;&#101;</a>
please state function name, and sample parameters. However, there are browser-specific features, that Yatta won&#39;t support.</p><h2 id="license">License</h2><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p><a href="&#109;&#97;&#105;&#108;&#116;&#x6f;&#58;&#x6b;&#101;&#118;&#x69;&#110;&#46;&#x6a;&#97;&#x68;&#110;&#x73;&#64;&#114;&#119;&#116;&#104;&#45;&#x61;&#97;&#99;&#104;&#101;&#x6e;&#x2e;&#x64;&#x65;">&#x6b;&#101;&#118;&#x69;&#110;&#46;&#x6a;&#97;&#x68;&#110;&#x73;&#64;&#114;&#119;&#116;&#104;&#45;&#x61;&#97;&#99;&#104;&#101;&#x6e;&#x2e;&#x64;&#x65;</a>
@ -85,7 +85,7 @@ please state function name, and sample parameters. However, there are browser-sp
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Yatta! API</title>
<script src='../../javascript/application.js'></script>
<script src='../../javascript/search.js'></script>
<link rel='stylesheet' href='../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../extra/README.md.html' title='Yatta!'>
Yatta!
</a>
&raquo;
<a href='../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>lib</span>
&raquo;
<span class='title'>ConnectorAdapter.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
ConnectorAdapter.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='module.exports-variable'>
module.exports
=
</dt>
<dd>
<pre><code class='coffeescript'>adaptConnector</code></pre>
</dd>
</dl>
<h2>Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#adaptConnector-'>
~
(void)
<b>adaptConnector</b><span>(connector, engine, HB, execution_listener)</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='adaptConnector-'>
~
(void)
<b>adaptConnector</b><span>(connector, engine, HB, execution_listener)</span>
<br>
</p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>engine</span>
<span class='type'>
(
<tt>Engine</tt>
)
</span>
&mdash;
<span class='desc'>The transformation engine </span>
</li>
<li>
<span class='name'>HB</span>
<span class='type'>
(
<tt>HistoryBuffer</tt>
)
</span>
</li>
<li>
<span class='name'>execution_listener</span>
<span class='type'>
(
<tt>Array&lt;Function&gt;</tt>
)
</span>
&mdash;
<span class='desc'>You must ensure that whenever an operation is executed, every function in this Array is called. </span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id='footer'>
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -100,7 +100,7 @@
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 20, 14 15:23:21 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -158,7 +158,7 @@
</div>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 20, 14 15:23:21 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 20, 14 15:23:21 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -0,0 +1,174 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Yatta! API</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Yatta!'>
Yatta!
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>lib</span>
&raquo;
<span class='title'>ConnectorsDeprecated</span>
&raquo;
<span class='title'>IwcConnector.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
IwcConnector.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;ConnectorsDeprecated</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='module.exports-variable'>
module.exports
=
</dt>
<dd>
<pre><code class='coffeescript'>createIwcConnector</code></pre>
</dd>
</dl>
<h2>Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#createIwcConnector-'>
~
(void)
<b>createIwcConnector</b><span>(callback, options)</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='createIwcConnector-'>
~
(void)
<b>createIwcConnector</b><span>(callback, options)</span>
<br>
</p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>The callback is called when the connector is initialized. </span>
</li>
<li>
<span class='name'>initial_user_id</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>Optional. You can set you own user_id (since the ids of duiclient are not always unique) </span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id='footer'>
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,232 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Yatta! API</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Yatta!'>
Yatta!
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>lib</span>
&raquo;
<span class='title'>ConnectorsDeprecated</span>
&raquo;
<span class='title'>PeerJsConnector.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
PeerJsConnector.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;ConnectorsDeprecated</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='module.exports-variable'>
module.exports
=
</dt>
<dd>
<pre><code class='coffeescript'>createPeerJsConnector</code></pre>
</dd>
</dl>
<h2>Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#createPeerJsConnector-'>
~
(void)
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='createPeerJsConnector-'>
~
(void)
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
<br>
~
(void)
<b>createPeerJsConnector peerjs_user_id, peerjs_options, callback</b><span>()</span>
<br>
</p>
<div class='tags'>
<div class='overloads'>
<h3>Overloads:</h3>
<div class='overload'>
<p class='signature'>
~
(void)
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
</p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>peerjs_options</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>Is the options object that is passed to PeerJs. </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>The callback is called when the connector is initialized. </span>
</li>
</ul>
</div>
</div>
<div class='overload'>
<p class='signature'>
~
(void)
<b>createPeerJsConnector peerjs_user_id, peerjs_options, callback</b><span>()</span>
</p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>peerjs_user_id</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>The user_id that is passed to PeerJs as the user_id and should be unique between all (also the unconnected) Peers. </span>
</li>
<li>
<span class='name'>peerjs_options</span>
<span class='type'>
(
<tt>Object</tt>
)
</span>
&mdash;
<span class='desc'>Is the options object that is passed to PeerJs. </span>
</li>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>The callback is called when the connector is initialized. </span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id='footer'>
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Yatta! API</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Yatta!'>
Yatta!
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>lib</span>
&raquo;
<span class='title'>ConnectorsDeprecated</span>
&raquo;
<span class='title'>TestConnector.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
TestConnector.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>lib&#47;ConnectorsDeprecated</td>
</tr>
</table>
</div>
<div id='footer'>
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.0.9
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -48,7 +48,7 @@
</dl>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -60,7 +60,7 @@
</dl>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -60,7 +60,7 @@
</dl>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -60,7 +60,7 @@
</dl>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -48,7 +48,7 @@
</dl>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

View File

@ -39,7 +39,7 @@
</table>
</div>
<div id='footer'>
October 20, 14 09:57:05 by
November 25, 14 15:50:22 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>

Some files were not shown because too many files have changed in this diff Show More