UNPKG

23.1 kBSource Map (JSON)View Raw
1{"version":3,"sources":["guh-core/node_modules/browser-pack/_prelude.js","src/node_modules/object-assign/index.js","src/node_modules/typescript/lib/lib.es6.d.ts","src/src/Component.ts","src/src/ComponentStore.ts","src/src/Decorators.ts","src/src/Properties.ts","src/src/UUID.ts","src/src/index.ts"],"names":[],"mappings":"AAAA;ACAA,YAAY,CAAC;AACb,mCAAmC;AACnC,IAAI,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACrD,IAAI,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AAE7D,kBAAkB,GAAG;IACpB,EAAE,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED;IACC,IAAI,CAAC;QACJ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC;QACd,CAAC;QAED,gEAAgE;QAEhE,uDAAuD;QACvD,IAAI,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAE,sBAAsB;QACtD,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QAChB,EAAE,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAClD,MAAM,CAAC,KAAK,CAAC;QACd,CAAC;QAED,uDAAuD;QACvD,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7B,KAAK,CAAC,GAAG,GAAG,MAAM,CAA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EH,MAAM,CAAC,KAAK,CAAC;IACd,CAAC;CACD,CAAC;AAEF;kBAAe,IAAI,CAAC;;;;;;;ACnCpB,iBAAc,aAAa,CAAC,EAAA;AAC5B,+BAA0C,kBAAkB,CAAC;AAApD,kDAAoD;AAC7D,qBAAgC,QAAQ,CAAC;AAAhC,8BAAgC;AACzC,iBAAc,cAAc,CAAC,EAAA;AAC7B,iBAAc,cAAc,CAAC,EAAA","file":"bundle.js","sourceRoot":"/source/","sourcesContent":["(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);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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})","'use strict';\n/* eslint-disable no-unused-vars */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (e) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n",null,"import UUID from \"./UUID\";\r\nimport { Template, TagName, ClassNames } from \"./Decorators\";\r\nimport ComponentStore from \"./ComponentStore\";\r\n\r\nimport assign = require(\"object-assign\");\r\n\r\nexport type ArmTemplate = (component: Component) => string;\r\n\r\n/**\r\n * A data structure representing one or more components.\r\n */\r\nexport interface DeflatedComponent {\r\n\ttype: string;\r\n\tdata: any;\r\n\tid: string;\r\n\tlabel: string;\r\n\tchildren?: DeflatedComponent[];\r\n}\r\n\r\n/**\r\n * The base for all Armature components.\r\n */\r\n@TagName(\"arm-component\")\r\n@Template(() => \"\")\r\nexport class Component {\r\n\t/**\r\n\t * A list of class names to apply to the component's root element.\r\n\t */\r\n\tstatic $classNames: string[] = [];\r\n\r\n\t/**\r\n\t * The HTML tag this component type will be using when reified.\r\n\t */\r\n\tstatic $tagName: string;\r\n\r\n\t/**\r\n\t * The template used to render this component.\r\n\t * Use @Template to specify the template for a component type.\r\n\t */\r\n\t$template: ArmTemplate;\r\n\r\n\t/**\r\n\t * The state backing this component.\r\n\t */\r\n\t$data: any;\r\n\r\n\t/**\r\n\t * The globally unique identifier for this component.\r\n\t */\r\n\t$id: string;\r\n\r\n\t/**\r\n\t * The label identifying this component.\r\n\t * This is unique among all siblings of this component.\r\n\t */\r\n\t$label: string;\r\n\r\n\t/**\r\n\t * The element representing this component, if one exists.\r\n\t */\r\n\t$element: HTMLElement;\r\n\r\n\t/**\r\n\t * The components this component contains.\r\n\t */\r\n\t$children: Component[] = [];\r\n\r\n\t/**\r\n\t * The component containing this component, if one exists.\r\n\t */\r\n\t$parent: Component;\r\n\r\n\t/**\r\n\t * Creates a new component with the given data.\r\n\t *\r\n\t * @param data The data to initialize the component with\r\n\t */\r\n\tconstructor(data: any) {\r\n\t\tthis.$data = data;\r\n\t\tthis.$id = UUID.get();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates or retrieves a component that is attached to another component.\r\n\t * Using the same parent and 'label' parameters will retrieve the same object.\r\n\t * Pass null to the data attribute to throw if a new component is created.\r\n\t *\r\n\t * @param parent The component to attach to\r\n\t * @param label The label to use when creating or retrieving the component\r\n\t * @param data The data to initialize the component with if it hasn't been created\r\n\t */\r\n\tstatic $for(parent: Component, label: string, data: any) {\r\n\t\tconst identifier = this.$getIdentifier(label);\r\n\r\n\t\tconst existing = parent.$children.find(v => v.$getIdentifier() === identifier);\r\n\r\n\t\tif (existing) {\r\n\t\t\treturn existing;\r\n\t\t}\r\n\r\n\t\tif (data === null) {\r\n\t\t\tthrow new Error(\"Subcomponent was created with no data!\");\r\n\t\t}\r\n\r\n\t\tconst inst = new this(data);\r\n\t\tinst.$label = label;\r\n\t\tinst.$parent = parent;\r\n\r\n\t\tparent.$children.push(inst);\r\n\r\n\t\treturn inst;\r\n\t}\r\n\r\n\t/**\r\n\t * Serializes the component's data for potential recreation.\r\n\t */\r\n\t$serializeData() {\r\n\t\treturn assign({}, this.$data);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a way to uniquely identify this component type.\r\n\t */\r\n\tstatic $getTypeName() {\r\n\t\tconst classString = this.$classNames.map(v => \".\" + v).join(\"\");\r\n\r\n\t\treturn this.$tagName + classString;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an object that can be used to recreate this component.\r\n\t */\r\n\t$deflate(): DeflatedComponent {\r\n\t\tconst thisClass = <typeof Component>this.constructor;\r\n\r\n\t\treturn {\r\n\t\t\ttype: thisClass.$getTypeName(),\r\n\t\t\tdata: this.$serializeData(),\r\n\t\t\tid: this.$id,\r\n\t\t\tlabel: this.$label,\r\n\t\t\tchildren: this.$children.map(v => v.$deflate())\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an instance of a component from data generated by $deflate.\r\n\t *\r\n\t * @param deflated The deflated component data to use\r\n\t * @param inst An optional existing object to inflate\r\n\t */\r\n\tstatic $inflate(deflated: DeflatedComponent, inst?: Component) {\r\n\t\tif (!inst) {\r\n\t\t\tinst = new this(deflated.data);\r\n\t\t}\r\n\r\n\t\tinst.$id = deflated.id;\r\n\t\tinst.$label = deflated.label;\r\n\r\n\t\tif (deflated.children) {\r\n\t\t\tfor (let child of deflated.children) {\r\n\t\t\t\tconst thatClass = ComponentStore.get(child.type);\r\n\r\n\t\t\t\tconst childInst = thatClass.$for(inst, child.label, child.data);\r\n\t\t\t\tthatClass.$inflate(child, childInst);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn inst;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an identifier that should be unique among a component's siblings.\r\n\t *\r\n\t * @param label The label of the component to create the label for\r\n\t */\r\n\tstatic $getIdentifier(label: string) {\r\n\t\treturn this.$getTypeName() + \"__\" + label;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an identifier that should be unique among a component's siblings.\r\n\t */\r\n\t$getIdentifier() {\r\n\t\tconst thisClass = <typeof Component>this.constructor;\r\n\r\n\t\treturn thisClass.$getIdentifier(this.$label);\r\n\t}\r\n\r\n\ttoString() {\r\n\t\treturn this.$getHTML();\r\n\t}\r\n\r\n\t/**\r\n\t * Builds the HTML associated with this component.\r\n\t */\r\n\t$getHTML() {\r\n\t\tconst thisClass = <typeof Component>this.constructor;\r\n\r\n\t\treturn `<${ thisClass.$tagName }\r\n\t\t\tclass=\"${ thisClass.$classNames.join(\" \") }\"\r\n\t\t\tdata-armid=\"${ this.$id }\"\r\n\t\t\t${ this.$label ? `data-label=\"${ this.$label }\"` : \"\" }\r\n\t\t\t>${ this.$template(this) }</${ thisClass.$tagName }>`;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an HTML element for this component if one does not exist.\r\n\t */\r\n\t$ensureElement() {\r\n\t\tif (!this.$element) {\r\n\t\t\tconst thisClass = <typeof Component>this.constructor;\r\n\r\n\t\t\tconst el = document.createElement(thisClass.$tagName);\r\n\t\t\tel.classList.add(...thisClass.$classNames);\r\n\r\n\t\t\tthis.$attachTo(el);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Attaches this component to an existing HTML element.\r\n\t *\r\n\t * @param element The element to attach to\r\n\t */\r\n\t$attachTo(element: HTMLElement) {\r\n\t\tthis.$element = element;\r\n\t\telement.setAttribute(\"data-armid\", this.$id.toString());\r\n\r\n\t\tif (this.$label) {\r\n\t\t\telement.setAttribute(\"data-label\", this.$label);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Attempts to locate this component's element from a parent element.\r\n\t *\r\n\t * @param parent The element to search in\r\n\t */\r\n\t$locate(parent: HTMLElement = document.body) {\r\n\t\tconst thisClass = <typeof Component>this.constructor;\r\n\r\n\t\tconst el = <HTMLElement>parent.querySelector(`${ thisClass.$tagName }[data-armid=\"${ this.$id }\"]`);\r\n\r\n\t\tif (el) {\r\n\t\t\tthis.$element = el;\r\n\r\n\t\t\tthis.$children.forEach(child => {\r\n\t\t\t\tchild.$locate(el);\r\n\t\t\t});\r\n\r\n\t\t\treturn el;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Evaluates the component's template and puts the result into the component's element\r\n\t */\r\n\t$render() {\r\n\t\tthis.$element.innerHTML = this.$template(this);\r\n\t}\r\n\r\n\t/**\r\n\t * Attaches event handlers for the component and its children.\r\n\t * Often used after $render, or as part of $reify.\r\n\t */\r\n\t$hydrate() {\r\n\t\tfor (let child of this.$children) {\r\n\t\t\tif (child.$locate(this.$element)) {\r\n\t\t\t\tchild.$hydrate();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Ensures this component's element exists, then renders and hydrates it.\r\n\t */\r\n\t$reify() {\r\n\t\tthis.$ensureElement();\r\n\t\tthis.$render();\r\n\t\tthis.$hydrate();\r\n\t}\r\n}","import { Component } from \"./Component\";\r\n\r\nconst ComponentStore = {\r\n\tstore: new Map<string, typeof Component>(),\r\n\r\n\tregister(componentType: typeof Component) {\r\n\t\tthis.store.set(componentType.$getTypeName(), componentType);\r\n\t},\r\n\r\n\tget(typeName: string) {\r\n\t\treturn this.store.get(typeName);\r\n\t}\r\n};\r\n\r\nexport default ComponentStore;","import { Component, ArmTemplate } from \"./Component\";\r\n\r\n/**\r\n * Attaches a template to a Component\r\n * @param template The template to attach\r\n */\r\nfunction Template(template: ArmTemplate): ClassDecorator {\r\n\treturn (target: typeof Component) => {\r\n\t\ttarget.prototype.$template = template;\r\n\t};\r\n}\r\n\r\nexport { Template };\r\n\r\n/**\r\n * Sets the HTML tag name of a Component\r\n * @param name The tag name to attach\r\n */\r\nfunction TagName(name: string): ClassDecorator {\r\n\treturn (target: typeof Component) => {\r\n\t\ttarget.$tagName = name;\r\n\t};\r\n}\r\n\r\nexport { TagName };\r\n\r\n/**\r\n * Attaches HTML class names to a Component's element\r\n * @param names The names to attach\r\n */\r\nfunction ClassNames (...names: string[]): ClassDecorator {\r\n\treturn (target: typeof Component) => {\r\n\t\ttarget.$classNames.push(...names);\r\n\t};\r\n}\r\n\r\nexport { ClassNames };","import { Component, ArmTemplate } from \"./Component\";\r\nimport ComponentStore from \"./ComponentStore\";\r\n\r\ninterface PropertyData {\r\n\ttag: string;\r\n\ttemplate: ArmTemplate;\r\n\tclasses?: string[];\r\n}\r\n\r\nexport { PropertyData };\r\n\r\nfunction Properties(data: PropertyData): ClassDecorator {\r\n\treturn (target: typeof Component) => {\r\n\t\ttarget.prototype.$template = data.template;\r\n\t\ttarget.$tagName = data.tag;\r\n\r\n\t\tif (data.classes) {\r\n\t\t\ttarget.$classNames = [...target.$classNames, ...data.classes];\r\n\t\t}\r\n\r\n\t\tComponentStore.register(target);\r\n\t};\r\n}\r\n\r\nexport { Properties };","const randomBuffer = new Uint16Array(1);\r\n\r\n/**\r\n * Returns a random number on [0, 1)\r\n * Uses window.crypto if available\r\n */\r\nfunction rand() {\r\n\tif (typeof crypto !== \"undefined\") {\r\n\t\tcrypto.getRandomValues(randomBuffer);\r\n\t\treturn randomBuffer[0] / 2**16;\r\n\t} else {\r\n\t\treturn Math.random();\r\n\t}\r\n}\r\n\r\nconst UUID = {\r\n\t/**\r\n\t * Generates a v4 UUID.\r\n\t */\r\n\tget() {\r\n\t\tconst template = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\";\r\n\t\tconst value = template.replace(/[xy]/g, c => {\r\n\t\t\tlet v = Math.floor(rand() * 16);\r\n\r\n\t\t\tif (c !== \"x\") {\r\n\t\t\t\tv = v & 0x3 | 0x8;\r\n\t\t\t}\r\n\r\n\t\t\treturn v.toString(16);\r\n\t\t});\r\n\r\n\t\treturn value;\r\n\t}\r\n};\r\n\r\nexport default UUID;","export * from \"./Component\";\r\nexport { default as ComponentStore } from \"./ComponentStore\";\r\nexport { default as UUID } from \"./UUID\";\r\nexport * from \"./Decorators\";\r\nexport * from \"./Properties\";"]}
\No newline at end of file