rumious 1.0.13 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/app.d.ts +10 -8
- package/dist/app/index.d.ts +0 -1
- package/dist/component/component.d.ts +15 -24
- package/dist/component/element.d.ts +10 -15
- package/dist/global.d.ts +15 -0
- package/dist/index.d.ts +7 -27
- package/dist/index.js +1042 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx/component.d.ts +3 -0
- package/dist/jsx/dynamic.d.ts +2 -0
- package/dist/jsx/element.d.ts +9 -0
- package/dist/jsx/index.d.ts +4 -4
- package/dist/jsx/template.d.ts +25 -0
- package/dist/{app/module.d.ts → module/index.d.ts} +1 -1
- package/dist/ref/index.d.ts +1 -2
- package/dist/ref/ref.d.ts +37 -0
- package/dist/render/context.d.ts +7 -9
- package/dist/render/index.d.ts +4 -3
- package/dist/render/list.d.ts +16 -0
- package/dist/render/render.d.ts +3 -2
- package/dist/render/view.d.ts +19 -0
- package/dist/state/index.d.ts +1 -2
- package/dist/state/list.d.ts +14 -0
- package/dist/state/reactor.d.ts +15 -16
- package/dist/state/state.d.ts +11 -8
- package/dist/types/component.d.ts +5 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/jsx.d.ts +16 -8
- package/dist/types/state.d.ts +8 -0
- package/dist/types/template.d.ts +5 -0
- package/dist/utils/checker.d.ts +2 -0
- package/package.json +34 -53
- package/rollup.config.js +21 -0
- package/src/app/app.ts +45 -0
- package/src/app/index.ts +1 -0
- package/src/component/component.ts +69 -0
- package/src/component/element.ts +76 -0
- package/src/component/index.ts +2 -0
- package/src/global.ts +20 -0
- package/src/index.ts +13 -0
- package/src/jsx/component.ts +17 -0
- package/src/jsx/dynamic.ts +87 -0
- package/src/jsx/element.ts +77 -0
- package/src/jsx/index.ts +7 -0
- package/src/jsx/template.ts +377 -0
- package/src/module/index.ts +7 -0
- package/src/ref/index.ts +1 -0
- package/src/ref/ref.ts +178 -0
- package/src/render/context.ts +11 -0
- package/src/render/index.ts +4 -0
- package/src/render/list.ts +115 -0
- package/src/render/render.ts +31 -0
- package/src/render/view.ts +101 -0
- package/src/state/index.ts +2 -0
- package/src/state/list.ts +96 -0
- package/src/state/reactor.ts +65 -0
- package/src/state/state.ts +68 -0
- package/src/types/component.ts +6 -0
- package/src/types/index.ts +3 -0
- package/src/types/state.ts +16 -0
- package/src/types/template.ts +7 -0
- package/src/utils/checker.ts +5 -0
- package/tsconfig.json +20 -0
- package/README.md +0 -7
- package/dist/context/context.d.ts +0 -12
- package/dist/context/index.d.ts +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.esm.js +0 -1
- package/dist/index.global.d.ts +0 -46
- package/dist/index.min.js +0 -1
- package/dist/performance/index.d.ts +0 -5
- package/dist/ref/children.d.ts +0 -23
- package/dist/ref/element.d.ts +0 -49
- package/dist/render/array.d.ts +0 -21
- package/dist/render/directives.d.ts +0 -1
- package/dist/render/dynamic.d.ts +0 -2
- package/dist/render/injector.d.ts +0 -15
- package/dist/render/struct.d.ts +0 -85
- package/dist/render/template.d.ts +0 -5
- package/dist/state/array.d.ts +0 -22
- package/dist/state/object.d.ts +0 -31
- package/dist/types/render.d.ts +0 -5
- package/dist/types/utils.d.ts +0 -1
- package/dist/types/warp.d.ts +0 -5
- package/dist/utils/checkers.d.ts +0 -1
- package/dist/utils/name.d.ts +0 -2
- package/dist/utils/oberve.d.ts +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/render/context.ts","../src/render/render.ts","../src/render/view.ts","../src/app/app.ts","../src/state/reactor.ts","../src/state/state.ts","../src/state/list.ts","../src/component/component.ts","../src/component/element.ts","../src/ref/ref.ts","../src/jsx/element.ts","../src/utils/checker.ts","../src/jsx/dynamic.ts","../src/jsx/template.ts","../src/jsx/component.ts","../src/module/index.ts","../src/index.ts"],"sourcesContent":["export class RumiousRenderContext {\n app;\n target;\n onRendered = [];\n constructor(app, target) {\n this.app = app;\n this.target = target;\n }\n}\n","export function render(content, container, context) {\n context.onRendered = [];\n let result = content(container, context);\n for (var i = 0; i < context.onRendered.length; i++) {\n context.onRendered[i]();\n }\n return result;\n}\n","import { render } from './render.js';\nexport class RumiousViewControl {\n targets = [];\n constructor() { }\n addTarget(target) {\n this.targets.push(target);\n }\n setView(template) {\n const targets = this.targets;\n if (targets.length === 0) {\n throw new Error(`RumiousRenderError: No target assigned to ViewControl`);\n }\n for (let i = 0; i < targets.length; i++) {\n render(template, targets[i].element, targets[i].context);\n }\n }\n each(callback) {\n for (let target of this.targets) {\n callback(target);\n }\n }\n emptyAll() {\n const targets = this.targets;\n for (let i = 0; i < targets.length; i++) {\n targets[i].element.textContent = '';\n }\n }\n empty(target) {\n const targets = this.targets;\n for (let i = 0; i < targets.length; i++) {\n if (targets[i].element === target) {\n target.textContent = '';\n return;\n }\n }\n }\n}\nexport function createViewControl() {\n return new RumiousViewControl();\n}\n","import { RumiousRenderContext, render } from '../render/index.js';\nexport class RumiousApp {\n config;\n modules = [];\n context = new RumiousRenderContext(this, this);\n constructor(config) {\n this.config = config;\n }\n addModule(ModuleClass, options) {\n const instance = ModuleClass.init(this, options);\n this.modules.push(instance);\n return instance;\n }\n render(content) {\n render(content, this.config.root, this.context);\n }\n}\nexport function createApp(config) {\n return new RumiousApp(config);\n}\n","export class RumiousReactor {\n target;\n bindings = [];\n internal = [];\n isUIBatch = true;\n scheduled = false;\n queuedCommits = [];\n constructor(target) {\n this.target = target;\n }\n addBinding(binding) {\n this.bindings.push(binding);\n }\n removeBinding(binding) {\n this.bindings = this.bindings.filter(b => b !== binding);\n }\n addInternalBinding(binding) {\n this.internal.push(binding);\n }\n removeInternalBinding(binding) {\n this.internal = this.internal.filter(b => b !== binding);\n }\n notify(commit) {\n for (const binding of this.bindings) {\n binding(commit);\n }\n if (this.isUIBatch) {\n this.scheduleInternalUpdate(commit);\n }\n else {\n for (const binding of this.internal) {\n binding(commit);\n }\n }\n }\n scheduleInternalUpdate(commit) {\n this.queuedCommits.push(commit);\n if (!this.scheduled) {\n this.scheduled = true;\n queueMicrotask(() => {\n this.flushInternal();\n });\n }\n }\n flushInternal() {\n const lastCommit = this.queuedCommits[this.queuedCommits.length - 1];\n for (const binding of this.internal) {\n binding(lastCommit); // chỉ gửi commit cuối cùng\n }\n this.queuedCommits = [];\n this.scheduled = false;\n }\n}\n","import { RumiousReactor } from './reactor.js';\nexport class RumiousState {\n value;\n reactor;\n constructor(value, reactor) {\n this.value = value;\n this.reactor = reactor;\n if (!this.reactor) {\n this.reactor = new RumiousReactor(this);\n }\n }\n set(value) {\n this.value = value;\n this.reactor?.notify({\n type: 'set',\n value: value,\n state: this\n });\n }\n get() {\n return this.value;\n }\n slientUpdate(value) {\n this.value = value;\n }\n update(updater) {\n this.set(updater(this.value));\n }\n toJSON() {\n return JSON.stringify(this.value);\n }\n trigger() {\n this.reactor?.notify({\n type: 'set',\n value: this.value,\n state: this\n });\n }\n}\nexport function createState(value) {\n return new RumiousState(value);\n}\nexport function watch(state, callback) {\n if (state.reactor)\n state.reactor.addBinding(callback);\n}\nexport function unwatch(state, callback) {\n if (state.reactor)\n state.reactor.removeBinding(callback);\n}\n","import { RumiousState } from './state.js';\nexport class RumiousListState extends RumiousState {\n value;\n reactor;\n constructor(value = [], reactor) {\n super(value, reactor);\n this.value = value;\n this.reactor = reactor;\n }\n append(value) {\n this.value.push(value);\n this.reactor?.notify({\n type: 'append',\n state: this,\n value\n });\n }\n prepend(value) {\n this.value.unshift(value);\n this.reactor?.notify({\n type: 'prepend',\n state: this,\n value\n });\n }\n insert(pos, value) {\n this.value.splice(pos, 0, value);\n this.reactor?.notify({\n type: 'insert',\n state: this,\n value,\n key: pos\n });\n }\n updateAt(pos, value) {\n this.value[pos] = value;\n this.reactor?.notify({\n type: 'update',\n state: this,\n value,\n key: pos\n });\n }\n remove(pos) {\n this.value.splice(pos, 1);\n this.reactor?.notify({\n type: 'remove',\n state: this,\n value: null,\n key: pos\n });\n }\n clear() {\n this.value.length = 0;\n this.reactor?.notify({\n type: 'set',\n state: this,\n value: []\n });\n }\n reverse() {\n this.value.reverse();\n this.reactor?.notify({\n type: 'set',\n state: this,\n value: this.value\n });\n }\n filter(predicate) {\n this.value = this.value.filter(predicate);\n this.reactor?.notify({\n type: 'set',\n state: this,\n value: this.value\n });\n }\n}\n","import { RumiousRenderContext, render } from '../render/index.js';\nexport class RumiousComponent {\n props;\n app;\n element;\n context;\n static tagName = 'rumious-component';\n constructor() { }\n mountTo(template, target) {\n return render(template, target, this.context);\n }\n prepare(props, context, element) {\n this.app = context.app;\n this.element = element;\n this.props = props;\n this.context = new RumiousRenderContext(context.app, this);\n }\n template() {\n throw new Error(`RumiousRenderError: Cannot render empty component !`);\n }\n requestRender() {\n let template = this.template();\n render(template, this.element, this.context);\n }\n remove() {\n this.element.remove();\n }\n onCreate() { }\n onRender() { }\n onDestroy() { }\n beforeRender() { }\n}\n","export class RumiousComponentElement extends HTMLElement {\n component;\n props;\n context;\n instance;\n constructor() {\n super();\n }\n setContext(context) {\n this.context = context;\n }\n async connectedCallback() {\n let instance = new this.component();\n this.instance = instance;\n instance.prepare(this.props, this.context, this);\n instance.onCreate();\n await instance.beforeRender();\n instance.requestRender();\n instance.onRender();\n }\n disconnectedCallback() {\n this.instance.onDestroy();\n }\n}\nexport function createComponentElement(context, component, props) {\n if (!window.customElements.get(component.tagName)) {\n window.customElements.define(component.tagName, class extends RumiousComponentElement {\n constructor() {\n super();\n this.component = component;\n this.props = props;\n this.context = context;\n }\n });\n }\n let element = document.createElement(component.tagName);\n return element;\n}\nexport function renderComponent(component, props) {\n if (!window.customElements.get(component.tagName)) {\n window.customElements.define(component.tagName, class extends RumiousComponentElement {\n constructor() {\n super();\n this.component = component;\n this.props = props;\n }\n });\n }\n let element = document.createElement(component.tagName);\n return element;\n}\n","import { RumiousComponentElement } from '../component/index.js';\nexport class RumiousRef {\n element;\n _mounted = false;\n _onMountCallbacks = [];\n _onUnmountCallbacks = [];\n constructor() { }\n setTarget(element) {\n this.element = element;\n this._mounted = true;\n for (const cb of this._onMountCallbacks) {\n cb(element);\n }\n }\n reset() {\n if (this._mounted) {\n for (const cb of this._onUnmountCallbacks) {\n cb();\n }\n }\n this.element = undefined;\n this._mounted = false;\n }\n get() {\n return this._mounted ? this.element : undefined;\n }\n isMounted() {\n return this._mounted;\n }\n has() {\n return this.isMounted();\n }\n onMount(cb) {\n this._onMountCallbacks.push(cb);\n if (this._mounted)\n cb(this.element);\n }\n onUnmount(cb) {\n this._onUnmountCallbacks.push(cb);\n }\n toString() {\n return `[RumiousRef ${this._mounted ? \"mounted\" : \"not mounted\"}]`;\n }\n focus() {\n this.assertMounted();\n this.element.focus();\n }\n addClass(className) {\n this.assertMounted();\n this.element.classList.add(className);\n }\n removeClass(className) {\n this.assertMounted();\n this.element.classList.remove(className);\n }\n toggleClass(className) {\n this.assertMounted();\n this.element.classList.toggle(className);\n }\n setAttr(key, value) {\n this.assertMounted();\n this.element.setAttribute(key, value);\n }\n removeAttr(key) {\n this.assertMounted();\n this.element.removeAttribute(key);\n }\n query(selector) {\n this.assertMounted();\n return this.element.querySelector(selector);\n }\n queryAll(selector) {\n this.assertMounted();\n return this.element.querySelectorAll(selector);\n }\n get value() {\n this.assertMounted();\n return 'value' in this.element ? this.element.value : undefined;\n }\n set value(val) {\n this.assertMounted();\n if ('value' in this.element) {\n this.element.value = val;\n }\n else {\n throw new Error(\"RumiousRefError: Element has no 'value' property.\");\n }\n }\n get text() {\n this.assertMounted();\n return this.element.textContent;\n }\n set text(val) {\n this.assertMounted();\n this.element.textContent = val;\n }\n get html() {\n this.assertMounted();\n return this.element.innerHTML;\n }\n set html(val) {\n this.assertMounted();\n this.element.innerHTML = val;\n }\n get checked() {\n this.assertMounted();\n return 'checked' in this.element ? Boolean(this.element.checked) : false;\n }\n set checked(val) {\n this.assertMounted();\n if ('checked' in this.element) {\n this.element.checked = val;\n }\n else {\n throw new Error(\"RumiousRefError: Element has no 'checked' property.\");\n }\n }\n get disabled() {\n this.assertMounted();\n return 'disabled' in this.element ? Boolean(this.element.disabled) : false;\n }\n set disabled(val) {\n this.assertMounted();\n if ('disabled' in this.element) {\n this.element.disabled = val;\n }\n else {\n throw new Error(\"RumiousRefError: Element has no 'disabled' property.\");\n }\n }\n get component() {\n if (this.element instanceof RumiousComponentElement) {\n return this.element.instance;\n }\n else {\n return null;\n }\n }\n assertMounted() {\n if (!this._mounted) {\n throw new Error(\"RumiousRefError: Element is not mounted.\");\n }\n }\n}\nexport function createRef() {\n return new RumiousRef();\n}\n","const nodeCache = new WeakMap();\nexport function resolveNode(root, path) {\n const key = path.join('.');\n let rootCache = nodeCache.get(root);\n if (!rootCache) {\n rootCache = new Map();\n nodeCache.set(root, rootCache);\n }\n if (rootCache.has(key)) {\n return rootCache.get(key);\n }\n let node;\n if (root instanceof DocumentFragment) {\n node = root.childNodes[0];\n }\n else {\n node = root;\n }\n for (let idx of path) {\n node = node.childNodes[idx];\n }\n rootCache.set(key, node);\n return node;\n}\nexport function replaceNode(oldNode, newNode) {\n const parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n else {\n console.warn('replaceNode: oldNode has no parent. Cannot replace.');\n }\n}\nexport function createEvent(target, name, callback) {\n if (!target.__rumiousEvents) {\n target.__rumiousEvents = {};\n }\n target.__rumiousEvents[name] = callback;\n}\nfunction triggerEvent(name, event) {\n const path = (event.composedPath?.() ?? [event.target]);\n for (const target of path) {\n if (target instanceof HTMLElement &&\n '__rumiousEvents' in target) {\n const element = target;\n const handler = element.__rumiousEvents?.[name];\n if (handler) {\n handler(event);\n break;\n }\n }\n }\n}\nexport function delegateEvents(events) {\n for (const name of events) {\n window.addEventListener(name, (e) => triggerEvent(name, e));\n }\n}\n","export function isTemplate(fn) {\n return typeof fn === 'function' && fn.__isTemplate === true;\n}\n","import { isTemplate } from '../utils/checker.js';\nimport { RumiousState } from '../state/index.js';\nimport { RumiousComponentElement } from '../component/index.js';\nfunction handleReactiveNode(node, value, context) {\n let currentNode = node;\n const update = () => {\n if (!document.contains(currentNode) && value.reactor) {\n value.reactor.removeBinding(update);\n return;\n }\n const newNode = value.value;\n if (newNode instanceof RumiousComponentElement) {\n newNode.setContext(context);\n }\n currentNode.parentNode?.replaceChild(newNode, currentNode);\n currentNode = newNode;\n };\n context.onRendered.push(() => {\n update();\n if (!value.reactor)\n return;\n value.reactor.addBinding(update);\n });\n return node;\n}\nfunction isPrimitive(value) {\n return value === null || (typeof value !== 'object' && typeof value !== 'function');\n}\nexport function createDynamicValue(context, value) {\n if (Array.isArray(value)) {\n const fragment = document.createDocumentFragment();\n for (const item of value) {\n if (isTemplate(item)) {\n const rendered = item(document.createDocumentFragment(), context);\n fragment.appendChild(rendered);\n }\n else if (isPrimitive(item)) {\n if (item !== null && item !== undefined && item !== false) {\n fragment.appendChild(document.createTextNode(String(item)));\n }\n }\n }\n return fragment;\n }\n if (isTemplate(value)) {\n return value(document.createDocumentFragment(), context);\n }\n if (value instanceof RumiousState && value.value instanceof Node) {\n return handleReactiveNode(document.createTextNode(''), value, context);\n }\n if (value instanceof RumiousState && value.reactor) {\n let node = document.createTextNode('');\n context.onRendered.push(() => {\n node.textContent = String(value.get());\n if (!value.reactor)\n return;\n value.reactor.addBinding((commit) => node.textContent = String(commit.state.get()));\n });\n return node;\n }\n if (isPrimitive(value) && value !== null && value !== undefined && value !== false) {\n return document.createTextNode(String(value));\n }\n return document.createTextNode('');\n}\n","import { RumiousRef } from '../ref/index.js';\nimport { createEvent } from './element.js';\nexport function createTemplate(fn) {\n return Object.assign(fn, {\n __isTemplate: true\n });\n}\nexport function html(h) {\n let template = document.createElement('template');\n template.innerHTML = h;\n return template.content.cloneNode(true);\n}\nexport const directives = {\n ref(context, modifier, target, value) {\n if (value instanceof RumiousRef) {\n value.setTarget(target);\n }\n else {\n throw new Error(\"Cannot setup element reference for non-RumiousRef object !\");\n }\n },\n model(context, modifier, element, state) {\n const tag = element.tagName, type = element.type;\n if (tag === \"TEXTAREA\") {\n element.addEventListener(\"input\", () => state.set(element.value));\n }\n else if (tag === \"SELECT\") {\n element.addEventListener(\"change\", () => {\n const s = element;\n state.set(s.multiple ? Array.from(s.selectedOptions).map(o => o.value) : s.value);\n });\n }\n else if (tag === \"INPUT\") {\n if (type === \"checkbox\") {\n element.addEventListener(\"change\", () => state.set(element.checked));\n }\n else if (type === \"radio\") {\n element.addEventListener(\"change\", () => {\n const i = element;\n if (i.checked)\n state.set(i.value);\n });\n }\n else if (type === \"file\") {\n element.addEventListener(\"change\", () => {\n const f = element.files;\n state.set(element.hasAttribute(\"multiple\") ? f : f?.[0] ?? null);\n });\n }\n else {\n element.addEventListener(\"input\", () => {\n const val = element.value;\n state.set(type === \"number\" ? (val === \"\" ? null : +val) : val);\n });\n }\n }\n },\n on(context, event, element, callback) {\n createEvent(element, event, callback);\n },\n bind(context, modifier, element, state) {\n let reactive = () => { };\n switch (modifier) {\n case 'text':\n reactive = () => { element.textContent = String(state.get()); };\n break;\n case 'html':\n reactive = () => { element.innerHTML = String(state.get()); };\n break;\n case 'style':\n reactive = () => {\n const styles = state.get();\n if (typeof styles === 'string') {\n element.setAttribute('style', styles);\n }\n else if (typeof styles === 'object') {\n Object.assign(element.style, styles);\n }\n };\n break;\n case 'class':\n reactive = () => {\n const cls = state.get();\n if (typeof cls === 'string')\n element.className = cls;\n else if (Array.isArray(cls))\n element.className = cls.join(' ');\n else if (typeof cls === 'object') {\n element.className = Object.entries(cls)\n .filter(([_, active]) => active)\n .map(([name]) => name)\n .join(' ');\n }\n };\n break;\n case 'disabled':\n reactive = () => {\n if ('disabled' in element)\n element.disabled = Boolean(state.get());\n };\n break;\n case 'checked':\n reactive = () => {\n if (element instanceof HTMLInputElement || element instanceof HTMLInputElement) {\n element.checked = Boolean(state.get());\n }\n };\n break;\n case 'value':\n reactive = () => {\n if ('value' in element)\n element.value = String(state.get());\n };\n break;\n default:\n throw new Error(`Unknown bind directive modifier: ${modifier}`);\n }\n function onStateChange(commit) {\n if (!document.contains(element) && state.reactor) {\n state.reactor.removeInternalBinding(onStateChange);\n return;\n }\n reactive();\n }\n context.onRendered.push(() => {\n reactive();\n if (!state.reactor)\n return;\n state.reactor.addInternalBinding(onStateChange);\n });\n },\n attr(context, attrName, element, state) {\n function onStateChange(commit) {\n if (!document.contains(element) && state.reactor) {\n state.reactor.removeInternalBinding(onStateChange);\n return;\n }\n element.setAttribute(attrName, String(state.get()));\n }\n context.onRendered.push(() => {\n onStateChange();\n if (!state.reactor)\n return;\n state.reactor.addInternalBinding(onStateChange);\n });\n },\n prop(context, name, element, state) {\n function onStateChange(commit) {\n if (!document.contains(element) && state.reactor) {\n state.reactor.removeInternalBinding(onStateChange);\n return;\n }\n element[name] = state.get();\n }\n context.onRendered.push(() => {\n onStateChange();\n if (!state.reactor)\n return;\n state.reactor.addInternalBinding(onStateChange);\n });\n },\n html(context, modifier, element, state) {\n function onStateChange(commit) {\n if (!document.contains(element) && state.reactor) {\n state.reactor.removeInternalBinding(onStateChange);\n return;\n }\n element.innerHTML = String(state.get());\n }\n context.onRendered.push(() => {\n onStateChange();\n if (!state.reactor)\n return;\n state.reactor.addInternalBinding(onStateChange);\n });\n },\n show(context, modifier, element, state) {\n function onStateChange(commit) {\n if (!document.contains(element) && state.reactor) {\n state.reactor.removeInternalBinding(onStateChange);\n return;\n }\n element.style.display = Boolean(state.get()) ? 'block' : 'none';\n }\n context.onRendered.push(() => {\n onStateChange();\n if (!state.reactor)\n return;\n state.reactor.addInternalBinding(onStateChange);\n });\n },\n hide(context, modifier, element, state) {\n function onStateChange(commit) {\n if (!document.contains(element) && state.reactor) {\n state.reactor.removeInternalBinding(onStateChange);\n return;\n }\n element.style.display = !Boolean(state.get()) ? 'block' : 'none';\n }\n context.onRendered.push(() => {\n onStateChange();\n if (!state.reactor)\n return;\n state.reactor.addInternalBinding(onStateChange);\n });\n }\n};\n// This is just to satisfy TypeScript's JSX requirement.\n// Rumious doesn't use createElement — we do things differently.\nfunction createElement(...args) {\n console.log(args);\n throw Error(`Rumious doesn't use createElement !`);\n}\n","import { createComponentElement } from '../component/index.js';\nexport function createComponent(context, component, props) {\n let element = createComponentElement(context, component, props);\n return element;\n}\n","export class RumiousModule {\n}\n","import './global.js';\nexport const __version__ = \"2.x\";\nexport * from './app/index.js';\nexport * from './types/index.js';\nexport * from './render/index.js';\nexport * from './state/index.js';\nexport * from './component/index.js';\nexport * from './ref/index.js';\nexport * from './jsx/index.js';\nexport * from './module/index.js';\n"],"names":[],"mappings":"AAAO,MAAM,oBAAoB,CAAC;AAClC,IAAI,GAAG;AACP,IAAI,MAAM;AACV,IAAI,UAAU,GAAG,EAAE;AACnB,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE;AAC7B,QAAQ,IAAI,CAAC,GAAG,GAAG,GAAG;AACtB,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM;AAC5B;AACA;;ACRO,SAAS,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE;AACpD,IAAI,OAAO,CAAC,UAAU,GAAG,EAAE;AAC3B,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC;AAC5C,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACxD,QAAQ,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;AAC/B;AACA,IAAI,OAAO,MAAM;AACjB;;ACNO,MAAM,kBAAkB,CAAC;AAChC,IAAI,OAAO,GAAG,EAAE;AAChB,IAAI,WAAW,GAAG;AAClB,IAAI,SAAS,CAAC,MAAM,EAAE;AACtB,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AACjC;AACA,IAAI,OAAO,CAAC,QAAQ,EAAE;AACtB,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO;AACpC,QAAQ,IAAI,OAAO,CAAC,MAAM,KAA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O,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,GAAG,MAAM;AAC5E;AACA,QAAQ,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM;AACtC,YAAY,aAAa,EAAE;AAC3B,YAAY,IAAI,CAAC,KAAK,CAAC,OAAO;AAC9B,gBAAgB;AAChB,YAAY,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,aAAa,CAAC;AAC3D,SAAS,CAAC;AACV;AACA;;AC7MO,SAAS,eAAe,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE;AAC3D,IAAI,IAAI,OAAO,GAAG,sBAAsB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC;AACnE,IAAI,OAAO,OAAO;AAClB;;ACJO,MAAM,aAAa,CAAC;AAC3B;;ACAY,MAAC,WAAW,GAAG;;;;"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare function appendChild(parent: HTMLElement, node: Node | string): void;
|
2
|
+
export declare function element(parent: HTMLElement, tagName: string, attrs?: Record<string, any>): HTMLElement;
|
3
|
+
export declare function replaceNode(oldNode: Node, newNode: Node): void;
|
4
|
+
interface RumiousEventTarget extends HTMLElement {
|
5
|
+
__rumiousEvents?: Record<string, (e: Event) => void>;
|
6
|
+
}
|
7
|
+
export declare function createEvent(target: RumiousEventTarget, name: string, callback: (e: Event) => void): void;
|
8
|
+
export declare function delegateEvents(events: string[]): void;
|
9
|
+
export {};
|
package/dist/jsx/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export
|
4
|
-
export
|
1
|
+
export * from './element.js';
|
2
|
+
export * from './dynamic.js';
|
3
|
+
export * from './template.js';
|
4
|
+
export * from './component.js';
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { RumiousRenderContext, RumiousViewControl } from '../render/index.js';
|
2
|
+
import { RumiousTemplate } from '../types/index.js';
|
3
|
+
import { RumiousRef } from '../ref/index.js';
|
4
|
+
import { RumiousState, RumiousListState } from '../state/index.js';
|
5
|
+
export declare function createTemplate(fn: (root: HTMLElement | DocumentFragment, context: RumiousRenderContext) => HTMLElement): RumiousTemplate;
|
6
|
+
export declare function html(h: string): Node;
|
7
|
+
export declare const directives: {
|
8
|
+
ref(context: RumiousRenderContext, modifier: string, target: HTMLElement, value: RumiousRef): void;
|
9
|
+
model(context: RumiousRenderContext, modifier: string, element: HTMLElement, state: RumiousState<any>): void;
|
10
|
+
on(context: RumiousRenderContext, event: string, element: HTMLElement, callback: (e: Event) => void): void;
|
11
|
+
bind(context: RumiousRenderContext, modifier: string, element: HTMLElement, state: RumiousState<any>): void;
|
12
|
+
attr(context: RumiousRenderContext, attrName: string, element: HTMLElement, state: RumiousState<any>): void;
|
13
|
+
prop(context: RumiousRenderContext, name: string, element: HTMLElement, state: RumiousState<any>): void;
|
14
|
+
html(context: RumiousRenderContext, modifier: string, element: HTMLElement, state: RumiousState<any>): void;
|
15
|
+
show(context: RumiousRenderContext, modifier: string, element: HTMLElement, state: RumiousState<any>): void;
|
16
|
+
hide(context: RumiousRenderContext, modifier: string, element: HTMLElement, state: RumiousState<any>): void;
|
17
|
+
each<T>(context: RumiousRenderContext, modifier: string, element: HTMLElement, configs: EachDirectiveConfig<T>): void;
|
18
|
+
view(context: RumiousRenderContext, modifier: string, element: HTMLElement, configs: RumiousViewControl): void;
|
19
|
+
};
|
20
|
+
interface EachDirectiveConfig<T> {
|
21
|
+
value: RumiousListState<T>;
|
22
|
+
key: (item: T) => string;
|
23
|
+
templ: (item: T, key: string) => RumiousTemplate;
|
24
|
+
}
|
25
|
+
export {};
|
package/dist/ref/index.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './children.js';
|
1
|
+
export * from './ref.js';
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { RumiousComponent } from '../component/index.js';
|
2
|
+
export declare class RumiousRef {
|
3
|
+
element: HTMLElement;
|
4
|
+
private _mounted;
|
5
|
+
private _onMountCallbacks;
|
6
|
+
private _onUnmountCallbacks;
|
7
|
+
constructor();
|
8
|
+
setTarget(element: HTMLElement): void;
|
9
|
+
reset(): void;
|
10
|
+
get(): HTMLElement | undefined;
|
11
|
+
isMounted(): boolean;
|
12
|
+
has(): boolean;
|
13
|
+
onMount(cb: (el: HTMLElement) => void): void;
|
14
|
+
onUnmount(cb: () => void): void;
|
15
|
+
toString(): string;
|
16
|
+
focus(): void;
|
17
|
+
addClass(className: string): void;
|
18
|
+
removeClass(className: string): void;
|
19
|
+
toggleClass(className: string): void;
|
20
|
+
setAttr(key: string, value: string): void;
|
21
|
+
removeAttr(key: string): void;
|
22
|
+
query<T extends Element = Element>(selector: string): T | null;
|
23
|
+
queryAll<T extends Element = Element>(selector: string): NodeListOf<T>;
|
24
|
+
get value(): string | undefined;
|
25
|
+
set value(val: string | undefined);
|
26
|
+
get text(): string | null;
|
27
|
+
set text(val: string | null);
|
28
|
+
get html(): string;
|
29
|
+
set html(val: string);
|
30
|
+
get checked(): boolean;
|
31
|
+
set checked(val: boolean);
|
32
|
+
get disabled(): boolean;
|
33
|
+
set disabled(val: boolean);
|
34
|
+
get component(): RumiousComponent | null;
|
35
|
+
private assertMounted;
|
36
|
+
}
|
37
|
+
export declare function createRef(): RumiousRef;
|
package/dist/render/context.d.ts
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
import type { RumiousRenderTemplate } from './template.js';
|
1
|
+
import type { RumiousApp } from '../app/index.js';
|
2
|
+
type Callback = () => any;
|
4
3
|
export declare class RumiousRenderContext {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
constructor(target: RumiousRenderable, app?: RumiousApp);
|
10
|
-
findName(name: string): unknown;
|
4
|
+
app: RumiousApp;
|
5
|
+
target: any;
|
6
|
+
onRendered: Callback[];
|
7
|
+
constructor(app: RumiousApp, target: any);
|
11
8
|
}
|
9
|
+
export {};
|
package/dist/render/index.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './
|
3
|
-
export
|
1
|
+
export * from './context.js';
|
2
|
+
export * from './render.js';
|
3
|
+
export * from './view.js';
|
4
|
+
export * from './list.js';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { RumiousViewControl } from './view.js';
|
2
|
+
import { RumiousListState, RumiousState } from '../state/index.js';
|
3
|
+
import { RumiousTemplate, RumiousChangeCommit } from '../types/index.js';
|
4
|
+
export declare class RumiousPagination<T> {
|
5
|
+
view: RumiousViewControl;
|
6
|
+
data: RumiousListState<T>;
|
7
|
+
templFn: (data: T) => RumiousTemplate;
|
8
|
+
keyFn: (data: T) => string;
|
9
|
+
currentPage: number;
|
10
|
+
limit: number;
|
11
|
+
pos: number[];
|
12
|
+
constructor(view: RumiousViewControl, data: RumiousListState<T>, templFn: (data: T) => RumiousTemplate, keyFn: (data: T) => string);
|
13
|
+
show(): void;
|
14
|
+
calcPos(): [number, number];
|
15
|
+
onDataChange(commit: RumiousChangeCommit<RumiousState<T[]>>): void;
|
16
|
+
}
|
package/dist/render/render.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
import { RumiousRenderContext } from './context.js';
|
2
|
-
import {
|
3
|
-
export declare function render(
|
2
|
+
import { RumiousTemplate } from '../types/index.js';
|
3
|
+
export declare function render(content: RumiousTemplate, container: HTMLElement, context: RumiousRenderContext): HTMLElement;
|
4
|
+
export declare function renderFrag(content: RumiousTemplate, context: RumiousRenderContext): HTMLElement;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { RumiousTemplate } from '../types/index.js';
|
2
|
+
import { RumiousRenderContext } from './context.js';
|
3
|
+
export interface RumiousViewControlTarget {
|
4
|
+
element: HTMLElement;
|
5
|
+
context: RumiousRenderContext;
|
6
|
+
}
|
7
|
+
export declare class RumiousViewControl {
|
8
|
+
private targets;
|
9
|
+
constructor();
|
10
|
+
addTarget(target: RumiousViewControlTarget): void;
|
11
|
+
setView(template: RumiousTemplate): void;
|
12
|
+
removeChild(index: number): void;
|
13
|
+
addChild(template: RumiousTemplate, prepend?: boolean): void;
|
14
|
+
each(callback: (target: RumiousViewControlTarget) => any): void;
|
15
|
+
emptyAll(): void;
|
16
|
+
empty(target: HTMLElement): void;
|
17
|
+
updateChild(index: number, template: RumiousTemplate): void;
|
18
|
+
}
|
19
|
+
export declare function createViewControl(): RumiousViewControl;
|
package/dist/state/index.d.ts
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
import { RumiousState } from './state.js';
|
2
|
+
import { RumiousReactor } from './reactor.js';
|
3
|
+
export declare class RumiousListState<T> extends RumiousState<T[]> {
|
4
|
+
constructor(value?: T[], reactor?: RumiousReactor<RumiousState<T[]>>);
|
5
|
+
append(value: T): void;
|
6
|
+
prepend(value: T): void;
|
7
|
+
insert(pos: number, value: T): void;
|
8
|
+
updateAt(pos: number, value: T): void;
|
9
|
+
remove(pos: number): void;
|
10
|
+
clear(): void;
|
11
|
+
reverse(): void;
|
12
|
+
filter(predicate: (item: T, index: number, array: T[]) => boolean): void;
|
13
|
+
}
|
14
|
+
export declare function createListState<T>(values: T[]): RumiousListState<T>;
|
package/dist/state/reactor.d.ts
CHANGED
@@ -1,18 +1,17 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
type: RumiousStateCommitTypes;
|
5
|
-
target: RumiousState<T>;
|
6
|
-
value: unknown;
|
7
|
-
key?: string | number;
|
8
|
-
}
|
9
|
-
export type RumiousBinding<T> = (commit: RumiousStateCommit<T>) => void;
|
10
|
-
export declare class RumiousReactor<T> {
|
11
|
-
target: RumiousState<T>;
|
1
|
+
import { RumiousStateBind, RumiousChangeCommit } from '../types/index.js';
|
2
|
+
export declare class RumiousReactor<T = any> {
|
3
|
+
target: T;
|
12
4
|
private bindings;
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
private internal;
|
6
|
+
isUIBatch: boolean;
|
7
|
+
private scheduled;
|
8
|
+
private queuedCommits;
|
9
|
+
constructor(target: T);
|
10
|
+
addBinding(binding: RumiousStateBind<T>): void;
|
11
|
+
removeBinding(binding: RumiousStateBind<T>): void;
|
12
|
+
addInternalBinding(binding: RumiousStateBind<T>): void;
|
13
|
+
removeInternalBinding(binding: RumiousStateBind<T>): void;
|
14
|
+
notify(commit: RumiousChangeCommit<T>): void;
|
15
|
+
private scheduleInternalUpdate;
|
16
|
+
private flushInternal;
|
17
17
|
}
|
18
|
-
export {};
|
package/dist/state/state.d.ts
CHANGED
@@ -1,15 +1,18 @@
|
|
1
|
-
import { RumiousReactor
|
2
|
-
|
1
|
+
import { RumiousReactor } from './reactor.js';
|
2
|
+
import { RumiousStateBind } from '../types/index.js';
|
3
3
|
export declare class RumiousState<T> {
|
4
4
|
value: T;
|
5
|
-
reactor
|
6
|
-
constructor(value: T, reactor?: RumiousReactor<T
|
5
|
+
reactor?: RumiousReactor<RumiousState<T>> | undefined;
|
6
|
+
constructor(value: T, reactor?: RumiousReactor<RumiousState<T>> | undefined);
|
7
7
|
set(value: T): void;
|
8
8
|
get(): T;
|
9
|
-
|
10
|
-
|
9
|
+
slientUpdate(value: T): void;
|
10
|
+
update(updater: (value: T) => T): void;
|
11
|
+
toJSON(): string;
|
12
|
+
trigger(): void;
|
11
13
|
}
|
12
|
-
export declare function watch<T>(state: RumiousState<T>, fn: RumiousBinding<T>): void;
|
13
|
-
export declare function unwatch<T>(state: RumiousState<T>, fn: RumiousBinding<T>): void;
|
14
14
|
export declare function createState<T>(value: T): RumiousState<T>;
|
15
|
+
type StateBindFor<M> = RumiousStateBind<RumiousState<M>>;
|
16
|
+
export declare function watch<M>(state: RumiousState<M>, callback: StateBindFor<M>): void;
|
17
|
+
export declare function unwatch<M>(state: RumiousState<M>, callback: StateBindFor<M>): void;
|
15
18
|
export {};
|
package/dist/types/jsx.d.ts
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
-
import type {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
createElement(...args: any[]): RumiousRenderTemplate;
|
6
|
-
addDirective(...args: any[]): void;
|
7
|
-
dynamicValue(...args: any[]): void;
|
8
|
-
createComponent(...args: any[]): RumiousComponentElement;
|
1
|
+
import type { RumiousRenderContext } from '../render/index.js';
|
2
|
+
export interface RumiousTemplate {
|
3
|
+
(root: HTMLElement | DocumentFragment, context: RumiousRenderContext): HTMLElement;
|
4
|
+
__isTemplate: true;
|
9
5
|
}
|
6
|
+
|
7
|
+
declare global {
|
8
|
+
namespace JSX {
|
9
|
+
type Element = RumiousTemplate;
|
10
|
+
interface IntrinsicElements {
|
11
|
+
[tagName: string]: any;
|
12
|
+
}
|
13
|
+
interface ElementChildrenAttribute {
|
14
|
+
children: {};
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export type RumiousChangeCommitType = 'set' | 'append' | 'prepend' | 'insert' | 'update' | 'remove';
|
2
|
+
export interface RumiousChangeCommit<T> {
|
3
|
+
state: T;
|
4
|
+
type: RumiousChangeCommitType;
|
5
|
+
value: any;
|
6
|
+
key?: number;
|
7
|
+
}
|
8
|
+
export type RumiousStateBind<T = any> = (commit: RumiousChangeCommit<T>) => void;
|
package/package.json
CHANGED
@@ -1,55 +1,36 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
"type": "git",
|
37
|
-
"url": "https://github.com/smtdfc/rumious"
|
38
|
-
},
|
39
|
-
"bugs": {
|
40
|
-
"url": "https://github.com/smtdfc/rumious/issues"
|
41
|
-
},
|
42
|
-
"homepage": "https://github.com/smtdfc/rumious#readme",
|
43
|
-
"files": [
|
44
|
-
"dist/**",
|
45
|
-
"README.md",
|
46
|
-
"index.js",
|
47
|
-
"index.d.ts"
|
48
|
-
],
|
49
|
-
"engines": {
|
50
|
-
"node": ">=16"
|
51
|
-
},
|
52
|
-
"dependencies": {
|
53
|
-
"mutative": "^1.1.0"
|
54
|
-
}
|
2
|
+
"name": "rumious",
|
3
|
+
"version": "2.0.1",
|
4
|
+
"description": "",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"exports": {
|
8
|
+
".": {
|
9
|
+
"import": "./dist/index.js",
|
10
|
+
"default": "./dist/index.js"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
"scripts": {
|
14
|
+
"dec": "tsc --declaration --allowJs --emitDeclarationOnly",
|
15
|
+
"type": "tsc --noEmit",
|
16
|
+
"build": "NODE_ENV=production rollup -c --environment MINIFY:true",
|
17
|
+
"build:dev": "NODE_ENV=development rollup -c",
|
18
|
+
"start": "NODE_ENV=production node dist/index.js",
|
19
|
+
"dev": "NODE_ENV=development node dist/index.js",
|
20
|
+
"test": "echo \"No tests yet\"",
|
21
|
+
"prepublishOnly": "npm run dec && npm run build"
|
22
|
+
},
|
23
|
+
"keywords": [
|
24
|
+
"rumious",
|
25
|
+
"frontend",
|
26
|
+
"framework"
|
27
|
+
],
|
28
|
+
"author": "smtdfc",
|
29
|
+
"license": "MIT",
|
30
|
+
"devDependencies": {},
|
31
|
+
"dependencies": {},
|
32
|
+
"bugs": {
|
33
|
+
"url": "https://github.com/smtdfc/rumious/issues"
|
34
|
+
},
|
35
|
+
"homepage": "https://github.com/smtdfc/rumious#readme"
|
55
36
|
}
|
package/rollup.config.js
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
import typescript from '@rollup/plugin-typescript';
|
2
|
+
|
3
|
+
const isProduction = process.env.NODE_ENV === 'production';
|
4
|
+
|
5
|
+
export default {
|
6
|
+
input: 'src/index.ts',
|
7
|
+
external: ['rumious-compiler'],
|
8
|
+
output: {
|
9
|
+
file: './dist/index.js',
|
10
|
+
format: 'esm',
|
11
|
+
sourcemap: false,
|
12
|
+
paths: {
|
13
|
+
'rumious-compiler': !isProduction
|
14
|
+
? '../compiler/dist/index.js'
|
15
|
+
: 'rumious-compiler'
|
16
|
+
}
|
17
|
+
},
|
18
|
+
plugins: [
|
19
|
+
typescript({ tsconfig: './tsconfig.json' })
|
20
|
+
]
|
21
|
+
};
|
package/src/app/app.ts
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
import { RumiousRenderContext, render } from '../render/index.js';
|
2
|
+
import { RumiousTemplate } from '../types/index.js';
|
3
|
+
import { RumiousModule, RumiousModuleClass } from '../module/index.js';
|
4
|
+
|
5
|
+
export interface RumiousAppConfig {
|
6
|
+
root: HTMLElement;
|
7
|
+
}
|
8
|
+
|
9
|
+
export class RumiousApp {
|
10
|
+
public modules: any[] = [];
|
11
|
+
|
12
|
+
public context: RumiousRenderContext = new RumiousRenderContext(
|
13
|
+
this,
|
14
|
+
this
|
15
|
+
);
|
16
|
+
|
17
|
+
constructor(
|
18
|
+
public config: RumiousAppConfig
|
19
|
+
) {}
|
20
|
+
|
21
|
+
addModule < T extends RumiousModule, O > (
|
22
|
+
ModuleClass: RumiousModuleClass < T, O > ,
|
23
|
+
options ? : O
|
24
|
+
): T {
|
25
|
+
const instance = ModuleClass.init(this, options);
|
26
|
+
this.modules.push(instance);
|
27
|
+
return instance;
|
28
|
+
}
|
29
|
+
|
30
|
+
render(
|
31
|
+
content: RumiousTemplate
|
32
|
+
): void {
|
33
|
+
render(
|
34
|
+
content,
|
35
|
+
this.config.root,
|
36
|
+
this.context
|
37
|
+
);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
export function createApp(
|
42
|
+
config: RumiousAppConfig
|
43
|
+
): RumiousApp {
|
44
|
+
return new RumiousApp(config);
|
45
|
+
}
|
package/src/app/index.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './app.js';
|