Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mobiledoc-dom-renderer

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobiledoc-dom-renderer - npm Package Compare versions

Comparing version 0.3.0-beta3 to 0.3.0

dist/amd/mobiledoc-dom-renderer.map

48

CHANGELOG.md

@@ -1,3 +0,3 @@

<a name="0.2.1"></a>
## 0.2.1 (2015-11-23)
<a name="0.3.0"></a>
# 0.3.0 (2016-02-04)

@@ -7,2 +7,46 @@

<a name="0.3.0"></a>
# 0.3.0 (2016-02-04)
* 0.3.0 ([c0f4364](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/c0f4364))
<a name="0.3.0-beta3"></a>
# 0.3.0-beta3 (2016-01-21)
* 0.3.0-beta3 ([5f2e60e](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/5f2e60e))
* Add sectionElementRenderer option ([fa2e9be](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/fa2e9be))
* Merge pull request #22 from bustlelabs/section-tags ([3cfa4f8](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/3cfa4f8))
<a name="0.3.0-beta2"></a>
# 0.3.0-beta2 (2015-12-17)
* 0.3.0-beta2 ([43e687c](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/43e687c))
<a name="0.3.0-beta1"></a>
# 0.3.0-beta1 (2015-12-17)
* 0.3.0-beta1 ([ba05d16](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/ba05d16))
* fix marker type util import ([3e11c33](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/3e11c33))
* implement support for mobiledoc 0.3.0 and atoms ([a62b288](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/a62b288))
* Merge pull request #19 from bustlelabs/whitelist-tag-names-xss ([1870c33](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/1870c33))
* Merge pull request #20 from rlivsey/mobiledoc-0.3.0 ([9b44c41](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/9b44c41))
* Merge pull request #21 from rlivsey/fix-marker-type-import ([5588e3e](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/5588e3e))
* rearrange tests ([12f7f2b](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/12f7f2b))
* Update changelog ([78b27a3](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/78b27a3))
* Update README.md ([60aa048](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/60aa048))
* Update README.md ([f26ee5d](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/f26ee5d))
* Whitelist tag names for sections, marker types ([c693ed8](https://github.com/bustlelabs/mobiledoc-dom-renderer/commit/c693ed8))
<a name="0.2.1"></a>

@@ -9,0 +53,0 @@ ## 0.2.1 (2015-11-23)

2

dist/amd/mobiledoc-dom-renderer.js

@@ -1015,2 +1015,2 @@ define('mobiledoc-dom-renderer/cards/image', ['exports', 'mobiledoc-dom-renderer/utils/dom', 'mobiledoc-dom-renderer/utils/render-type'], function (exports, _mobiledocDomRendererUtilsDom, _mobiledocDomRendererUtilsRenderType) {

}
});
});//# sourceMappingURL=mobiledoc-dom-renderer.map
;(function() {
var define, requireModule, require, requirejs;
(function() {
'use strict';

@@ -10,3 +10,3 @@ var _isArray;

_isArray = function (x) {
return Object.prototype.toString.call(x) === "[object Array]";
return Object.prototype.toString.call(x) === '[object Array]';
};

@@ -20,15 +20,9 @@ } else {

var FAILED = false;
var LOADED = true;
var uuid = 0;
function tryFinally(tryable, finalizer) {
try {
return tryable();
} finally {
finalizer();
}
}
function unsupportedModule(length) {
throw new Error("an unsupported module was defined, expected `define(name, deps, module)` instead got: `" + length + "` arguments to define`");
throw new Error('an unsupported module was defined, expected `define(name, deps, module)` instead got: `' +
length + '` arguments to define`');
}

@@ -38,13 +32,66 @@

function Module(name, deps, callback, exports) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.exports = exports || { };
this.callback = callback;
this.state = undefined;
function Module(name, deps, callback) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.module = { exports: {} };
this.callback = callback;
this.state = undefined;
this._require = undefined;
this.finalized = false;
this.hasExportsAsDep = false;
}
Module.prototype.makeDefaultExport = function() {
var exports = this.module.exports;
if (exports !== null &&
(typeof exports === 'object' || typeof exports === 'function') &&
exports['default'] === undefined) {
exports['default'] = exports;
}
};
Module.prototype.exports = function(reifiedDeps) {
if (this.finalized) {
return this.module.exports;
} else {
var result = this.callback.apply(this, reifiedDeps);
if (!(this.hasExportsAsDep && result === undefined)) {
this.module.exports = result;
}
this.makeDefaultExport();
this.finalized = true;
return this.module.exports;
}
};
Module.prototype.unsee = function() {
this.finalized = false;
this.state = undefined;
this.module = { exports: {}};
};
Module.prototype.reify = function() {
var deps = this.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
this.hasExportsAsDep = true;
reified[i] = this.module.exports;
} else if (dep === 'require') {
reified[i] = this.makeRequire();
} else if (dep === 'module') {
reified[i] = this.module;
} else {
reified[i] = findModule(resolve(dep, this.name), this.name).module.exports;
}
}
return reified;
};
Module.prototype.makeRequire = function() {

@@ -56,4 +103,11 @@ var name = this.name;

});
}
};
Module.prototype.build = function() {
if (this.state === FAILED) { return; }
this.state = FAILED;
this.exports(this.reify());
this.state = LOADED;
};
define = function(name, deps, callback) {

@@ -85,88 +139,24 @@ if (arguments.length < 2) {

function reify(mod, name, seen) {
var deps = mod.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
// TODO: new Module
// TODO: seen refactor
var module = { };
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
module.exports = reified[i] = seen;
} else if (dep === 'require') {
reified[i] = mod.makeRequire();
} else if (dep === 'module') {
mod.exports = seen;
module = reified[i] = mod;
} else {
reified[i] = requireFrom(resolve(dep, name), name);
}
}
return {
deps: reified,
module: module
};
function missingModule(name, referrer) {
throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`');
}
function requireFrom(name, origin) {
var mod = registry[name];
if (!mod) {
throw new Error('Could not find module `' + name + '` imported from `' + origin + '`');
}
return require(name);
}
requirejs = require = requireModule = function(name) {
return findModule(name, '(require)').module.exports;
};
function missingModule(name) {
throw new Error('Could not find module ' + name);
}
requirejs = require = requireModule = function(name) {
function findModule(name, referrer) {
var mod = registry[name];
if (mod && mod.callback instanceof Alias) {
mod = registry[mod.callback.name];
while (mod && mod.callback instanceof Alias) {
name = mod.callback.name;
mod = registry[name];
}
if (!mod) { missingModule(name); }
if (!mod) { missingModule(name, referrer); }
if (mod.state !== FAILED &&
seen.hasOwnProperty(name)) {
return seen[name];
}
mod.build();
return mod;
}
var reified;
var module;
var loaded = false;
seen[name] = { }; // placeholder for run-time cycles
tryFinally(function() {
reified = reify(mod, name, seen[name]);
module = mod.callback.apply(this, reified.deps);
loaded = true;
}, function() {
if (!loaded) {
mod.state = FAILED;
}
});
var obj;
if (module === undefined && reified.module.exports) {
obj = reified.module.exports;
} else {
obj = seen[name] = module;
}
if (obj !== null &&
(typeof obj === 'object' || typeof obj === 'function') &&
obj['default'] === undefined) {
obj['default'] = obj;
}
return (seen[name] = obj);
};
function resolve(child, name) {

@@ -197,3 +187,3 @@ if (child.charAt(0) !== '.') { return child; }

requirejs.unsee = function(moduleName) {
delete seen[moduleName];
findModule(moduleName, '(unsee)').unsee();
};

@@ -203,3 +193,3 @@

requirejs.entries = requirejs._eak_seen = registry = {};
seen = state = {};
seen = {};
};

@@ -1224,2 +1214,3 @@ })();

require("mobiledoc-dom-renderer")["registerGlobal"](window, document);
})();
})();
//# sourceMappingURL=mobiledoc-dom-renderer.map

@@ -1,59 +0,59 @@

module('JSHint - tests/jshint/cards');
test('tests/jshint/cards/image.js should pass jshint', function() {
ok(true, 'tests/jshint/cards/image.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/cards');
QUnit.test('tests/jshint/cards/image.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/cards/image.js should pass jshint.');
});
module('JSHint - tests/jshint');
test('tests/jshint/index.js should pass jshint', function() {
ok(true, 'tests/jshint/index.js should pass jshint.');
QUnit.module('JSHint - tests/jshint');
QUnit.test('tests/jshint/index.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/index.js should pass jshint.');
});
module('JSHint - tests/jshint');
test('tests/jshint/renderer-factory.js should pass jshint', function() {
ok(true, 'tests/jshint/renderer-factory.js should pass jshint.');
QUnit.module('JSHint - tests/jshint');
QUnit.test('tests/jshint/renderer-factory.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/renderer-factory.js should pass jshint.');
});
module('JSHint - tests/jshint/renderers');
test('tests/jshint/renderers/0-2.js should pass jshint', function() {
ok(true, 'tests/jshint/renderers/0-2.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/renderers');
QUnit.test('tests/jshint/renderers/0-2.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/renderers/0-2.js should pass jshint.');
});
module('JSHint - tests/jshint/renderers');
test('tests/jshint/renderers/0-3.js should pass jshint', function() {
ok(true, 'tests/jshint/renderers/0-3.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/renderers');
QUnit.test('tests/jshint/renderers/0-3.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/renderers/0-3.js should pass jshint.');
});
module('JSHint - tests/jshint/unit/renderers');
test('tests/jshint/unit/renderers/0-2-test.js should pass jshint', function() {
ok(true, 'tests/jshint/unit/renderers/0-2-test.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/unit/renderers');
QUnit.test('tests/jshint/unit/renderers/0-2-test.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/unit/renderers/0-2-test.js should pass jshint.');
});
module('JSHint - tests/jshint/unit/renderers');
test('tests/jshint/unit/renderers/0-3-test.js should pass jshint', function() {
ok(true, 'tests/jshint/unit/renderers/0-3-test.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/unit/renderers');
QUnit.test('tests/jshint/unit/renderers/0-3-test.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/unit/renderers/0-3-test.js should pass jshint.');
});
module('JSHint - tests/jshint/utils');
test('tests/jshint/utils/dom.js should pass jshint', function() {
ok(true, 'tests/jshint/utils/dom.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/utils');
QUnit.test('tests/jshint/utils/dom.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/utils/dom.js should pass jshint.');
});
module('JSHint - tests/jshint/utils');
test('tests/jshint/utils/marker-types.js should pass jshint', function() {
ok(true, 'tests/jshint/utils/marker-types.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/utils');
QUnit.test('tests/jshint/utils/marker-types.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/utils/marker-types.js should pass jshint.');
});
module('JSHint - tests/jshint/utils');
test('tests/jshint/utils/render-type.js should pass jshint', function() {
ok(true, 'tests/jshint/utils/render-type.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/utils');
QUnit.test('tests/jshint/utils/render-type.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/utils/render-type.js should pass jshint.');
});
module('JSHint - tests/jshint/utils');
test('tests/jshint/utils/section-types.js should pass jshint', function() {
ok(true, 'tests/jshint/utils/section-types.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/utils');
QUnit.test('tests/jshint/utils/section-types.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/utils/section-types.js should pass jshint.');
});
module('JSHint - tests/jshint/utils');
test('tests/jshint/utils/tag-names.js should pass jshint', function() {
ok(true, 'tests/jshint/utils/tag-names.js should pass jshint.');
QUnit.module('JSHint - tests/jshint/utils');
QUnit.test('tests/jshint/utils/tag-names.js should pass jshint', function(assert) {
assert.ok(true, 'tests/jshint/utils/tag-names.js should pass jshint.');
});

@@ -60,0 +60,0 @@

var define, requireModule, require, requirejs;
(function() {
'use strict';

@@ -8,3 +9,3 @@ var _isArray;

_isArray = function (x) {
return Object.prototype.toString.call(x) === "[object Array]";
return Object.prototype.toString.call(x) === '[object Array]';
};

@@ -18,15 +19,9 @@ } else {

var FAILED = false;
var LOADED = true;
var uuid = 0;
function tryFinally(tryable, finalizer) {
try {
return tryable();
} finally {
finalizer();
}
}
function unsupportedModule(length) {
throw new Error("an unsupported module was defined, expected `define(name, deps, module)` instead got: `" + length + "` arguments to define`");
throw new Error('an unsupported module was defined, expected `define(name, deps, module)` instead got: `' +
length + '` arguments to define`');
}

@@ -36,13 +31,66 @@

function Module(name, deps, callback, exports) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.exports = exports || { };
this.callback = callback;
this.state = undefined;
function Module(name, deps, callback) {
this.id = uuid++;
this.name = name;
this.deps = !deps.length && callback.length ? defaultDeps : deps;
this.module = { exports: {} };
this.callback = callback;
this.state = undefined;
this._require = undefined;
this.finalized = false;
this.hasExportsAsDep = false;
}
Module.prototype.makeDefaultExport = function() {
var exports = this.module.exports;
if (exports !== null &&
(typeof exports === 'object' || typeof exports === 'function') &&
exports['default'] === undefined) {
exports['default'] = exports;
}
};
Module.prototype.exports = function(reifiedDeps) {
if (this.finalized) {
return this.module.exports;
} else {
var result = this.callback.apply(this, reifiedDeps);
if (!(this.hasExportsAsDep && result === undefined)) {
this.module.exports = result;
}
this.makeDefaultExport();
this.finalized = true;
return this.module.exports;
}
};
Module.prototype.unsee = function() {
this.finalized = false;
this.state = undefined;
this.module = { exports: {}};
};
Module.prototype.reify = function() {
var deps = this.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
this.hasExportsAsDep = true;
reified[i] = this.module.exports;
} else if (dep === 'require') {
reified[i] = this.makeRequire();
} else if (dep === 'module') {
reified[i] = this.module;
} else {
reified[i] = findModule(resolve(dep, this.name), this.name).module.exports;
}
}
return reified;
};
Module.prototype.makeRequire = function() {

@@ -54,4 +102,11 @@ var name = this.name;

});
}
};
Module.prototype.build = function() {
if (this.state === FAILED) { return; }
this.state = FAILED;
this.exports(this.reify());
this.state = LOADED;
};
define = function(name, deps, callback) {

@@ -83,88 +138,24 @@ if (arguments.length < 2) {

function reify(mod, name, seen) {
var deps = mod.deps;
var length = deps.length;
var reified = new Array(length);
var dep;
// TODO: new Module
// TODO: seen refactor
var module = { };
for (var i = 0, l = length; i < l; i++) {
dep = deps[i];
if (dep === 'exports') {
module.exports = reified[i] = seen;
} else if (dep === 'require') {
reified[i] = mod.makeRequire();
} else if (dep === 'module') {
mod.exports = seen;
module = reified[i] = mod;
} else {
reified[i] = requireFrom(resolve(dep, name), name);
}
}
return {
deps: reified,
module: module
};
function missingModule(name, referrer) {
throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`');
}
function requireFrom(name, origin) {
var mod = registry[name];
if (!mod) {
throw new Error('Could not find module `' + name + '` imported from `' + origin + '`');
}
return require(name);
}
requirejs = require = requireModule = function(name) {
return findModule(name, '(require)').module.exports;
};
function missingModule(name) {
throw new Error('Could not find module ' + name);
}
requirejs = require = requireModule = function(name) {
function findModule(name, referrer) {
var mod = registry[name];
if (mod && mod.callback instanceof Alias) {
mod = registry[mod.callback.name];
while (mod && mod.callback instanceof Alias) {
name = mod.callback.name;
mod = registry[name];
}
if (!mod) { missingModule(name); }
if (!mod) { missingModule(name, referrer); }
if (mod.state !== FAILED &&
seen.hasOwnProperty(name)) {
return seen[name];
}
mod.build();
return mod;
}
var reified;
var module;
var loaded = false;
seen[name] = { }; // placeholder for run-time cycles
tryFinally(function() {
reified = reify(mod, name, seen[name]);
module = mod.callback.apply(this, reified.deps);
loaded = true;
}, function() {
if (!loaded) {
mod.state = FAILED;
}
});
var obj;
if (module === undefined && reified.module.exports) {
obj = reified.module.exports;
} else {
obj = seen[name] = module;
}
if (obj !== null &&
(typeof obj === 'object' || typeof obj === 'function') &&
obj['default'] === undefined) {
obj['default'] = obj;
}
return (seen[name] = obj);
};
function resolve(child, name) {

@@ -195,3 +186,3 @@ if (child.charAt(0) !== '.') { return child; }

requirejs.unsee = function(moduleName) {
delete seen[moduleName];
findModule(moduleName, '(unsee)').unsee();
};

@@ -201,4 +192,4 @@

requirejs.entries = requirejs._eak_seen = registry = {};
seen = state = {};
seen = {};
};
})();
{
"name": "mobiledoc-dom-renderer",
"version": "0.3.0-beta3",
"version": "0.3.0",
"description": "Renders Mobiledoc input to DOM output",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc