create-velto 1.0.1 → 1.0.2
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/package.json +1 -1
- package/templates/velto/node_modules/.modules.yaml +3 -3
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/LICENSE +21 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/README.md +2 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/ program.spec.ts +16 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/__snapshots__/ program.spec.ts.snap +11 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/__snapshots__/jsxElement.spec.ts.snap +518 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/jsxElement.spec.ts +16 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/jsxElement.ts +112 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/program.ts +6 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/constants/index.d.ts +6 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/constants/index.js +10 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/constants.d.ts +12 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/constants.js +16 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/index.d.ts +14 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/index.js +41 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/index.d.ts +13 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/index.js +14 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/index.d.ts +41 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/index.js +108 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/util.d.ts +4 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/util.js +41 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/index.d.ts +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/index.js +17 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSX.d.ts +2 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSX.js +62 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXChildren.d.ts +3 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXChildren.js +9 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXComponentProps.d.ts +2 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXComponentProps.js +56 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConditionalExpression.d.ts +8 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConditionalExpression.js +20 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConsequentExpression.d.ts +8 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConsequentExpression.js +53 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXElement.d.ts +3 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXElement.js +63 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXExpression.d.ts +3 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXExpression.js +12 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXLogicalExpression.d.ts +8 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXLogicalExpression.js +14 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/parentId.d.ts +4 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/parentId.js +22 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/tsconfig.tsbuildinfo +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/global.d.ts +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/global.js +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/index.d.ts +20 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/index.js +6 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/index.d.ts +5 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/index.js +18 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/stringCurrying.d.ts +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/stringCurrying.js +14 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/index.d.ts +11 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/index.js +13 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxElement.d.ts +3 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxElement.js +15 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxFragment.d.ts +3 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxFragment.js +15 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/program.d.ts +7 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/program.js +15 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/package.json +31 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/constants/index.ts +8 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/helper/constants.ts +13 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/helper/index.ts +34 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/index.ts +10 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/template/index.ts +317 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/template/util.ts +63 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/index.ts +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSX.ts +61 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXChildren.ts +17 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXComponentProps.ts +89 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXConditionalExpression.ts +26 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXConsequentExpression.ts +57 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXElement.ts +103 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXExpression.ts +15 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXLogicalExpression.ts +19 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/parentId.ts +22 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/types/global.ts +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/types/index.ts +24 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/utils/index.ts +40 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/utils/stringCurrying.ts +14 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/index.ts +9 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/jsxElement.ts +12 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/jsxFragment.ts +12 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/program.ts +17 -0
- package/templates/velto/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/tsconfig.json +110 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/LICENSE +21 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.d.mts +67 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.d.ts +67 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.js +197 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.js.map +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.mjs +189 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.mjs.map +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/package.json +22 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/computed.ts +65 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/constant.ts +4 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/dep.ts +8 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/effect.ts +31 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/index.ts +6 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/ref.ts +29 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/refEffect.ts +20 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/scheduler.ts +54 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/types.ts +4 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/utils.ts +6 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/watch.ts +57 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/tsconfig.json +110 -0
- package/templates/velto/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/tsup.config.ts +13 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/LICENSE +21 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/README.md +2 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.d.mts +130 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.d.ts +130 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.js +622 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.js.map +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.mjs +579 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.mjs.map +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/package.json +23 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/component/index.ts +117 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/component/lifecycle.ts +47 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/condition/index.ts +27 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/defineAsyncComponent/index.ts +110 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/dom/index.ts +47 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/attrs.ts +25 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/class.ts +9 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/events.ts +49 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/index.ts +6 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/style.ts +69 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/index.ts +53 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/expression/index.ts +42 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/index.ts +24 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/renderList/index.ts +130 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/types.ts +29 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/utils/index.ts +24 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/utils/toDisplayString.ts +39 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/tsconfig.json +110 -0
- package/templates/velto/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/tsup.config.ts +13 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/LICENSE +21 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.d.mts +28 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.d.ts +28 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.js +76 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.js.map +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.mjs +51 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.mjs.map +1 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/package.json +19 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/constants/index.ts +29 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/index.ts +2 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/utils/index.ts +40 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/utils/stringCurrying.ts +14 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/tsconfig.json +110 -0
- package/templates/velto/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/tsup.config.ts +13 -0
- package/templates/velto/node_modules/.pnpm/lock.yaml +16 -16
- package/templates/velto/package.json +2 -2
- package/templates/velto/pnpm-lock.yaml +16 -16
- package/templates/velto-ts/node_modules/.modules.yaml +3 -3
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/LICENSE +21 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/README.md +2 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/ program.spec.ts +16 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/__snapshots__/ program.spec.ts.snap +11 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/__snapshots__/jsxElement.spec.ts.snap +518 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/jsxElement.spec.ts +16 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/jsxElement.ts +112 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/__tests__/visitor/program.ts +6 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/constants/index.d.ts +6 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/constants/index.js +10 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/constants.d.ts +12 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/constants.js +16 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/index.d.ts +14 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/helper/index.js +41 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/index.d.ts +13 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/index.js +14 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/index.d.ts +41 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/index.js +108 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/util.d.ts +4 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/template/util.js +41 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/index.d.ts +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/index.js +17 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSX.d.ts +2 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSX.js +62 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXChildren.d.ts +3 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXChildren.js +9 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXComponentProps.d.ts +2 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXComponentProps.js +56 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConditionalExpression.d.ts +8 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConditionalExpression.js +20 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConsequentExpression.d.ts +8 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXConsequentExpression.js +53 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXElement.d.ts +3 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXElement.js +63 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXExpression.d.ts +3 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXExpression.js +12 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXLogicalExpression.d.ts +8 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/jsx/transformJSXLogicalExpression.js +14 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/parentId.d.ts +4 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/transform/parentId.js +22 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/tsconfig.tsbuildinfo +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/global.d.ts +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/global.js +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/index.d.ts +20 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/types/index.js +6 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/index.d.ts +5 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/index.js +18 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/stringCurrying.d.ts +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/utils/stringCurrying.js +14 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/index.d.ts +11 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/index.js +13 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxElement.d.ts +3 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxElement.js +15 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxFragment.d.ts +3 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/jsxFragment.js +15 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/program.d.ts +7 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/dist/visitor/program.js +15 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/package.json +31 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/constants/index.ts +8 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/helper/constants.ts +13 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/helper/index.ts +34 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/index.ts +10 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/template/index.ts +317 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/template/util.ts +63 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/index.ts +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSX.ts +61 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXChildren.ts +17 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXComponentProps.ts +89 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXConditionalExpression.ts +26 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXConsequentExpression.ts +57 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXElement.ts +103 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXExpression.ts +15 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/jsx/transformJSXLogicalExpression.ts +19 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/transform/parentId.ts +22 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/types/global.ts +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/types/index.ts +24 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/utils/index.ts +40 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/utils/stringCurrying.ts +14 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/index.ts +9 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/jsxElement.ts +12 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/jsxFragment.ts +12 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/src/visitor/program.ts +17 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+babel-plugin-velto@1.0.0-beta.2/node_modules/@velto/babel-plugin-velto/tsconfig.json +110 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/LICENSE +21 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.d.mts +67 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.d.ts +67 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.js +197 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.js.map +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.mjs +189 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/dist/index.mjs.map +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/package.json +22 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/computed.ts +65 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/constant.ts +4 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/dep.ts +8 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/effect.ts +31 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/index.ts +6 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/ref.ts +29 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/refEffect.ts +20 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/scheduler.ts +54 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/types.ts +4 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/utils.ts +6 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/src/watch.ts +57 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/tsconfig.json +110 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+reactive@1.0.0-beta.2/node_modules/@velto/reactive/tsup.config.ts +13 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/LICENSE +21 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/README.md +2 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.d.mts +130 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.d.ts +130 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.js +622 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.js.map +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.mjs +579 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/dist/index.mjs.map +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/package.json +23 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/component/index.ts +117 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/component/lifecycle.ts +47 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/condition/index.ts +27 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/defineAsyncComponent/index.ts +110 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/dom/index.ts +47 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/attrs.ts +25 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/class.ts +9 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/events.ts +49 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/index.ts +6 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/attribute/style.ts +69 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/element/index.ts +53 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/expression/index.ts +42 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/index.ts +24 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/renderList/index.ts +130 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/types.ts +29 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/utils/index.ts +24 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/src/utils/toDisplayString.ts +39 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/tsconfig.json +110 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+runtime@1.0.0-beta.2/node_modules/@velto/runtime/tsup.config.ts +13 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/LICENSE +21 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.d.mts +28 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.d.ts +28 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.js +76 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.js.map +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.mjs +51 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/dist/index.mjs.map +1 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/package.json +19 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/constants/index.ts +29 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/index.ts +2 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/utils/index.ts +40 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/src/utils/stringCurrying.ts +14 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/tsconfig.json +110 -0
- package/templates/velto-ts/node_modules/.pnpm/@velto+shared@1.0.0-beta.2/node_modules/@velto/shared/tsup.config.ts +13 -0
- package/templates/velto-ts/node_modules/.pnpm/lock.yaml +16 -16
- package/templates/velto-ts/package.json +2 -2
- package/templates/velto-ts/pnpm-lock.yaml +16 -16
@@ -0,0 +1,53 @@
|
|
1
|
+
import { isEvent } from "@velto/shared";
|
2
|
+
import { append, insert, remove, createElement } from "../dom";
|
3
|
+
import { classe, attr, event, style } from './attribute';
|
4
|
+
import type { Style } from "./attribute";
|
5
|
+
import type { ElementTemplate } from "../types";
|
6
|
+
|
7
|
+
export const setAttribute = (
|
8
|
+
el: Element,
|
9
|
+
key: string,
|
10
|
+
value: unknown,
|
11
|
+
isSVG = false,
|
12
|
+
) => {
|
13
|
+
if (key === 'ref') {
|
14
|
+
// @ts-expect-error
|
15
|
+
value?.setValue?.(el);
|
16
|
+
} else if (key === 'class') {
|
17
|
+
classe(el, value as string | null, isSVG);
|
18
|
+
} else if (key === 'style') {
|
19
|
+
style(el, value as Style);
|
20
|
+
} else if (isEvent(key)) {
|
21
|
+
event(el, key, value as EventListener);
|
22
|
+
} else {
|
23
|
+
attr(el, key, value, isSVG);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
export function element(
|
28
|
+
tag: string,
|
29
|
+
props: Record<string, unknown>,
|
30
|
+
): ElementTemplate {
|
31
|
+
const el = createElement(tag);
|
32
|
+
return {
|
33
|
+
el,
|
34
|
+
mount: (target: Element, anchor?: Element | Text) => {
|
35
|
+
append(target, el, anchor);
|
36
|
+
for (let attr in props) {
|
37
|
+
setAttribute(el, attr, props[attr]);
|
38
|
+
}
|
39
|
+
},
|
40
|
+
|
41
|
+
update(newProps: Record<string, unknown>) {
|
42
|
+
for (let attr in newProps) {
|
43
|
+
if (newProps[attr] !== props?.[attr]) {
|
44
|
+
setAttribute(el, attr, newProps[attr]);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
props = newProps;
|
48
|
+
},
|
49
|
+
destroy() {
|
50
|
+
remove(el);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
import { isRender, toDisplayString } from "../utils";
|
3
|
+
import { insert, remove, text } from "../dom";
|
4
|
+
import type { ExpressTemplate } from "../types";
|
5
|
+
|
6
|
+
export function expression(express: any): ExpressTemplate {
|
7
|
+
if (isRender(express)) return express();
|
8
|
+
|
9
|
+
let cacheTarget: Element;
|
10
|
+
let cacheAnchor: Element | Text | undefined;
|
11
|
+
let node: Text | undefined;
|
12
|
+
const update = (express: any) => {
|
13
|
+
const content = toDisplayString(express);
|
14
|
+
if (!node) {
|
15
|
+
node = text(content);
|
16
|
+
insert(cacheTarget, node, cacheAnchor);
|
17
|
+
} else {
|
18
|
+
node.nodeValue = content;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
return {
|
23
|
+
mount: (target: Element, anchor?: Element | Text) => {
|
24
|
+
cacheTarget = target;
|
25
|
+
cacheAnchor = anchor;
|
26
|
+
update(express);
|
27
|
+
},
|
28
|
+
update(newExpress: any) {
|
29
|
+
if (express !== newExpress) {
|
30
|
+
update(newExpress);
|
31
|
+
}
|
32
|
+
|
33
|
+
express = newExpress;
|
34
|
+
},
|
35
|
+
destroy: () => {
|
36
|
+
if (node) {
|
37
|
+
remove(node!);
|
38
|
+
node = undefined;
|
39
|
+
}
|
40
|
+
},
|
41
|
+
};
|
42
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { normalizeContainer } from "./utils";
|
2
|
+
import { Component, component, Props } from "./component";
|
3
|
+
|
4
|
+
export * from '@velto/reactive';
|
5
|
+
export * from './dom';
|
6
|
+
export * from './element/attribute';
|
7
|
+
export * from './component';
|
8
|
+
export * from './element';
|
9
|
+
export * from './expression';
|
10
|
+
export * from './renderList';
|
11
|
+
export * from './condition';
|
12
|
+
export * from './defineAsyncComponent';
|
13
|
+
export { markRender } from './utils';
|
14
|
+
|
15
|
+
export function createApp(type: Component, containerOrSelector: HTMLElement| Element | string | null, init: Props = {}) {
|
16
|
+
const container = normalizeContainer(containerOrSelector);
|
17
|
+
|
18
|
+
if (container) {
|
19
|
+
container.innerHTML = '';
|
20
|
+
component(type, init).mount(container);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
export type * from './types';
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import type { Render, CompileTemplate } from "../types";
|
2
|
+
import { markRender } from "../utils";
|
3
|
+
import { text, append, insert, remove } from "../dom";
|
4
|
+
|
5
|
+
interface cachedData {
|
6
|
+
template: CompileTemplate,
|
7
|
+
anchor: Text,
|
8
|
+
item: any,
|
9
|
+
}
|
10
|
+
|
11
|
+
export function renderList(list: unknown[] = [], renderCallback: (value: any, index: number, array: any[]) => Render): Render {
|
12
|
+
let cacheTarget: Element;
|
13
|
+
const cached: cachedData[] = [];
|
14
|
+
|
15
|
+
const create = (options: {
|
16
|
+
list: unknown[];
|
17
|
+
index: number;
|
18
|
+
anchor: Text;
|
19
|
+
}) => {
|
20
|
+
const { list, index, anchor } = options;
|
21
|
+
const item = list[index];
|
22
|
+
|
23
|
+
const render = renderCallback(item, index, list);
|
24
|
+
const template = render();
|
25
|
+
template.mount(cacheTarget, anchor);
|
26
|
+
cached[index] = {
|
27
|
+
template,
|
28
|
+
anchor,
|
29
|
+
item,
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
return markRender(() => ({
|
34
|
+
mount: (target: Element, anchor?: Element) => {
|
35
|
+
cacheTarget = target;
|
36
|
+
list.forEach((_, index) => {
|
37
|
+
const itemAnchor = text('');
|
38
|
+
append(target, itemAnchor, anchor);
|
39
|
+
create({ list, index, anchor: itemAnchor });
|
40
|
+
});
|
41
|
+
},
|
42
|
+
update(newList: unknown[]) {
|
43
|
+
const newLength = newList.length;
|
44
|
+
const cachedLength = cached.length;
|
45
|
+
const needAddCachedLength = newLength - cachedLength;
|
46
|
+
|
47
|
+
let i = 0;
|
48
|
+
let e = 0;
|
49
|
+
|
50
|
+
while(i < newLength && i < cachedLength) {
|
51
|
+
const cachedItem = cached[i];
|
52
|
+
const item = newList[i];
|
53
|
+
|
54
|
+
if (cachedItem.item === item) {
|
55
|
+
cachedItem.template.update();
|
56
|
+
i++;
|
57
|
+
} else {
|
58
|
+
break;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
while (e < newLength && e < cachedLength) {
|
63
|
+
const cachedItem = cached[cachedLength - e - 1];
|
64
|
+
const item = newList[newLength - e - 1];
|
65
|
+
if (cachedItem.item === item) {
|
66
|
+
cachedItem.template.update();
|
67
|
+
e++;
|
68
|
+
} else {
|
69
|
+
break;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
let newListPreIndex = i - 1;
|
74
|
+
let cachedPreIndex = i - 1;
|
75
|
+
let newListEndIndex = newLength - e;
|
76
|
+
let cachedEndIndex = cachedLength - e;
|
77
|
+
const newCached: (cachedData | undefined)[] = cached;
|
78
|
+
|
79
|
+
if (needAddCachedLength > 0) {
|
80
|
+
newCached.splice(cachedEndIndex, 0, ...(Array.from({ length: needAddCachedLength }) as undefined[]));
|
81
|
+
|
82
|
+
for (newListPreIndex++; newListPreIndex < newListEndIndex; newListPreIndex++) {
|
83
|
+
const cachedItem = newCached[newListPreIndex];
|
84
|
+
|
85
|
+
if (cachedItem) {
|
86
|
+
cachedItem.template.update();
|
87
|
+
} else {
|
88
|
+
const preItemCached = newCached[newListPreIndex - 1];
|
89
|
+
const itemAnchor = text('');
|
90
|
+
if (preItemCached) {
|
91
|
+
insert(cacheTarget, itemAnchor, preItemCached.anchor.nextSibling);
|
92
|
+
} else {
|
93
|
+
insert(cacheTarget, itemAnchor, cacheTarget.firstChild);
|
94
|
+
}
|
95
|
+
create({ list: newList, index: newListPreIndex, anchor: itemAnchor });
|
96
|
+
}
|
97
|
+
}
|
98
|
+
} else if (needAddCachedLength < 0) {
|
99
|
+
let startIndex = -1;
|
100
|
+
let destroyCount = 0;
|
101
|
+
|
102
|
+
for(cachedPreIndex++; cachedPreIndex < cachedEndIndex; cachedPreIndex++) {
|
103
|
+
const cachedItem = newCached[cachedPreIndex]!;
|
104
|
+
|
105
|
+
if (cachedPreIndex < newListEndIndex) {
|
106
|
+
cachedItem.template.update();
|
107
|
+
} else {
|
108
|
+
cachedItem.template.destroy();
|
109
|
+
remove(cachedItem.anchor);
|
110
|
+
|
111
|
+
if (startIndex === -1) {
|
112
|
+
startIndex = cachedPreIndex;
|
113
|
+
}
|
114
|
+
destroyCount++;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
if (destroyCount) {
|
119
|
+
newCached.splice(startIndex, destroyCount);
|
120
|
+
}
|
121
|
+
}
|
122
|
+
},
|
123
|
+
destroy() {
|
124
|
+
cached.forEach((item) => {
|
125
|
+
item.template.destroy();
|
126
|
+
});
|
127
|
+
cached.length = 0;
|
128
|
+
}
|
129
|
+
}));
|
130
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
interface Template {
|
2
|
+
mount: (target: Element, anchor?: Element | Text) => void;
|
3
|
+
destroy: () => void;
|
4
|
+
}
|
5
|
+
|
6
|
+
export interface CompileTemplate extends Template {
|
7
|
+
update: () => void;
|
8
|
+
}
|
9
|
+
|
10
|
+
export interface ConditionTemplate extends Template {
|
11
|
+
update: (newCondition: boolean, newExpress: any) => void;
|
12
|
+
}
|
13
|
+
|
14
|
+
export interface ExpressTemplate extends Template {
|
15
|
+
update: (newExpress: any) => void;
|
16
|
+
}
|
17
|
+
|
18
|
+
export interface ElementTemplate extends Template {
|
19
|
+
el: Element;
|
20
|
+
update: (newProps: Record<string, unknown>) => void;
|
21
|
+
}
|
22
|
+
|
23
|
+
export interface RenderListTemplate extends Template {
|
24
|
+
update: (newList: unknown[]) => void;
|
25
|
+
}
|
26
|
+
|
27
|
+
export type RenderFN = () => CompileTemplate;
|
28
|
+
|
29
|
+
export interface Render extends RenderFN { __isRender: boolean; }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { isFunction, isString } from "@velto/shared";
|
2
|
+
import { Render } from "../types";
|
3
|
+
|
4
|
+
export * from './toDisplayString';
|
5
|
+
|
6
|
+
export function markRender(fn: Function) {
|
7
|
+
const render = fn as Render;
|
8
|
+
render.__isRender = true;
|
9
|
+
return render;
|
10
|
+
}
|
11
|
+
|
12
|
+
export function isRender(express: any) {
|
13
|
+
return isFunction(express) && express.__isRender;
|
14
|
+
}
|
15
|
+
|
16
|
+
export function normalizeContainer(
|
17
|
+
container: Element | string | null
|
18
|
+
): Element | null {
|
19
|
+
if (isString(container)) {
|
20
|
+
return document.querySelector(container as string);
|
21
|
+
}
|
22
|
+
|
23
|
+
return container as Element;
|
24
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import {
|
2
|
+
isArray,
|
3
|
+
isMap,
|
4
|
+
isObject,
|
5
|
+
isFunction,
|
6
|
+
isPlainObject,
|
7
|
+
isSet,
|
8
|
+
isString
|
9
|
+
} from '@velto/shared';
|
10
|
+
|
11
|
+
export const toDisplayString = (val: unknown): string => {
|
12
|
+
return isString(val)
|
13
|
+
? val
|
14
|
+
: val == null
|
15
|
+
? ''
|
16
|
+
: isArray(val) ||
|
17
|
+
(isObject(val) &&
|
18
|
+
(val.toString === Object.prototype.toString || !isFunction(val.toString)))
|
19
|
+
? JSON.stringify(val, replacer, 2)
|
20
|
+
: String(val)
|
21
|
+
}
|
22
|
+
|
23
|
+
const replacer = (_key: string, val: any): any => {
|
24
|
+
if (isMap(val)) {
|
25
|
+
return {
|
26
|
+
[`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => {
|
27
|
+
;(entries as any)[`${key} =>`] = val
|
28
|
+
return entries
|
29
|
+
}, {})
|
30
|
+
}
|
31
|
+
} else if (isSet(val)) {
|
32
|
+
return {
|
33
|
+
[`Set(${val.size})`]: [...val.values()]
|
34
|
+
}
|
35
|
+
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
36
|
+
return String(val)
|
37
|
+
}
|
38
|
+
return val
|
39
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
4
|
+
|
5
|
+
/* Projects */
|
6
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
8
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
12
|
+
|
13
|
+
/* Language and Environment */
|
14
|
+
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
15
|
+
"lib": ["esnext", "dom"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
16
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
17
|
+
"experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
18
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
19
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
20
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
21
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
22
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
23
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
24
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
25
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
26
|
+
|
27
|
+
/* Modules */
|
28
|
+
"module": "CommonJS", /* Specify what module code is generated. */
|
29
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
30
|
+
// "moduleResolution": "bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
|
31
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
32
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
33
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
34
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
35
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
36
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
37
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
38
|
+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
39
|
+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
40
|
+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
41
|
+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
42
|
+
"resolveJsonModule": true, /* Enable importing .json files. */
|
43
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
44
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
45
|
+
|
46
|
+
/* JavaScript Support */
|
47
|
+
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
48
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
49
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
50
|
+
|
51
|
+
/* Emit */
|
52
|
+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
53
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
54
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
55
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
56
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
57
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
58
|
+
"outDir": "./dist", /* Specify an output folder for all emitted files. */
|
59
|
+
"removeComments": false, /* Disable emitting comments. */
|
60
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
61
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
62
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
63
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
64
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
65
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
66
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
67
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
68
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
69
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
70
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
71
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
72
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
73
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
74
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
75
|
+
|
76
|
+
/* Interop Constraints */
|
77
|
+
"isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
78
|
+
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
79
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
80
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
81
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
82
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
83
|
+
|
84
|
+
/* Type Checking */
|
85
|
+
"strict": true, /* Enable all strict type-checking options. */
|
86
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
87
|
+
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
88
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
89
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
90
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
91
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
92
|
+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
93
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
94
|
+
"noUnusedLocals": false, /* Enable error reporting when local variables aren't read. */
|
95
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
96
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
97
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
98
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
99
|
+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
100
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
101
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
102
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
103
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
104
|
+
|
105
|
+
/* Completeness */
|
106
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
107
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
108
|
+
},
|
109
|
+
"include": ["src"],
|
110
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 zebing
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,28 @@
|
|
1
|
+
declare const HTML_TAGS: string;
|
2
|
+
declare const SVG_TAGS: string;
|
3
|
+
declare const BOOLEAN_ATTRIBUTE: string;
|
4
|
+
|
5
|
+
declare function stringCurrying(str: string, lowerCase?: boolean): (key: string) => boolean;
|
6
|
+
|
7
|
+
declare const isHTMLTag: (key: string) => boolean;
|
8
|
+
declare const isSVGTag: (key: string) => boolean;
|
9
|
+
declare const isBooleanAttribute: (key: string) => boolean;
|
10
|
+
declare const isNativeTag: (name: string) => boolean;
|
11
|
+
declare const isString: (val: unknown) => val is string;
|
12
|
+
declare const isFunction: (val: unknown) => val is Function;
|
13
|
+
declare const isRenderFn: (fn: unknown) => fn is Function;
|
14
|
+
declare const isArray: (arg: any) => arg is any[];
|
15
|
+
declare const isObject: (val: unknown) => val is Record<any, any>;
|
16
|
+
declare const toTypeString: (value: unknown) => string;
|
17
|
+
declare const isMap: (val: unknown) => val is Map<any, any>;
|
18
|
+
declare const isSet: (val: unknown) => val is Set<any>;
|
19
|
+
declare const isPlainObject: (val: unknown) => val is object;
|
20
|
+
declare const camelize: (str: string) => string;
|
21
|
+
declare const capitalize: (str: string) => Capitalize<string>;
|
22
|
+
declare const hyphenate: (str: string) => string;
|
23
|
+
declare const hash: () => string;
|
24
|
+
declare const isEvent: (key: string) => boolean;
|
25
|
+
declare function callUnstableFunc<F extends Function, R = null>(fn: F, args?: unknown[]): R | null;
|
26
|
+
declare function omit<T extends Record<string, unknown>>(obj: T, keys: string[]): Partial<T>;
|
27
|
+
|
28
|
+
export { BOOLEAN_ATTRIBUTE, HTML_TAGS, SVG_TAGS, callUnstableFunc, camelize, capitalize, hash, hyphenate, isArray, isBooleanAttribute, isEvent, isFunction, isHTMLTag, isMap, isNativeTag, isObject, isPlainObject, isRenderFn, isSVGTag, isSet, isString, omit, stringCurrying, toTypeString };
|
@@ -0,0 +1,28 @@
|
|
1
|
+
declare const HTML_TAGS: string;
|
2
|
+
declare const SVG_TAGS: string;
|
3
|
+
declare const BOOLEAN_ATTRIBUTE: string;
|
4
|
+
|
5
|
+
declare function stringCurrying(str: string, lowerCase?: boolean): (key: string) => boolean;
|
6
|
+
|
7
|
+
declare const isHTMLTag: (key: string) => boolean;
|
8
|
+
declare const isSVGTag: (key: string) => boolean;
|
9
|
+
declare const isBooleanAttribute: (key: string) => boolean;
|
10
|
+
declare const isNativeTag: (name: string) => boolean;
|
11
|
+
declare const isString: (val: unknown) => val is string;
|
12
|
+
declare const isFunction: (val: unknown) => val is Function;
|
13
|
+
declare const isRenderFn: (fn: unknown) => fn is Function;
|
14
|
+
declare const isArray: (arg: any) => arg is any[];
|
15
|
+
declare const isObject: (val: unknown) => val is Record<any, any>;
|
16
|
+
declare const toTypeString: (value: unknown) => string;
|
17
|
+
declare const isMap: (val: unknown) => val is Map<any, any>;
|
18
|
+
declare const isSet: (val: unknown) => val is Set<any>;
|
19
|
+
declare const isPlainObject: (val: unknown) => val is object;
|
20
|
+
declare const camelize: (str: string) => string;
|
21
|
+
declare const capitalize: (str: string) => Capitalize<string>;
|
22
|
+
declare const hyphenate: (str: string) => string;
|
23
|
+
declare const hash: () => string;
|
24
|
+
declare const isEvent: (key: string) => boolean;
|
25
|
+
declare function callUnstableFunc<F extends Function, R = null>(fn: F, args?: unknown[]): R | null;
|
26
|
+
declare function omit<T extends Record<string, unknown>>(obj: T, keys: string[]): Partial<T>;
|
27
|
+
|
28
|
+
export { BOOLEAN_ATTRIBUTE, HTML_TAGS, SVG_TAGS, callUnstableFunc, camelize, capitalize, hash, hyphenate, isArray, isBooleanAttribute, isEvent, isFunction, isHTMLTag, isMap, isNativeTag, isObject, isPlainObject, isRenderFn, isSVGTag, isSet, isString, omit, stringCurrying, toTypeString };
|
@@ -0,0 +1,76 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
// src/constants/index.ts
|
4
|
+
var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
5
|
+
var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
6
|
+
var BOOLEAN_ATTRIBUTE = "checked,disabled,readonly,required,multiple,autofocus,selected,hidden,controls,loop,muted,autoplay,playsinline,novalidate,formnovalidate,open,itemscope,default,inert,nomodule,ismap,allowfullscreen";
|
7
|
+
|
8
|
+
// src/utils/stringCurrying.ts
|
9
|
+
function stringCurrying(str, lowerCase) {
|
10
|
+
const map = /* @__PURE__ */ Object.create(null);
|
11
|
+
const list = str.split(",");
|
12
|
+
for (let i = 0; i < list.length; i++) {
|
13
|
+
map[list[i]] = true;
|
14
|
+
}
|
15
|
+
return lowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
16
|
+
}
|
17
|
+
|
18
|
+
// src/utils/index.ts
|
19
|
+
var isHTMLTag = stringCurrying(HTML_TAGS, true);
|
20
|
+
var isSVGTag = stringCurrying(SVG_TAGS, true);
|
21
|
+
var isBooleanAttribute = stringCurrying(BOOLEAN_ATTRIBUTE, true);
|
22
|
+
var isNativeTag = (name) => isHTMLTag(name) || isSVGTag(name);
|
23
|
+
var isString = (val) => typeof val === "string";
|
24
|
+
var isFunction = (val) => typeof val === "function";
|
25
|
+
var isRenderFn = (fn) => isFunction(fn) && fn.name.indexOf("render") !== -1;
|
26
|
+
var isArray = Array.isArray;
|
27
|
+
var isObject = (val) => val !== null && typeof val === "object";
|
28
|
+
var toTypeString = (value) => Object.prototype.toString.call(value);
|
29
|
+
var isMap = (val) => toTypeString(val) === "[object Map]";
|
30
|
+
var isSet = (val) => toTypeString(val) === "[object Set]";
|
31
|
+
var isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
32
|
+
var camelize = (str) => str.replace(/-(\w)/g, (_, c) => c ? c.toUpperCase() : "");
|
33
|
+
var capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
34
|
+
var hyphenate = (str) => str.replace(/\B([A-Z])/g, "-$1").toLowerCase();
|
35
|
+
var hash = () => Math.random().toString(16).slice(2);
|
36
|
+
var isEvent = (key) => /^on[^a-z]/.test(key);
|
37
|
+
function callUnstableFunc(fn, args) {
|
38
|
+
try {
|
39
|
+
return fn(...args != null ? args : []);
|
40
|
+
} catch (err) {
|
41
|
+
console.log(err);
|
42
|
+
}
|
43
|
+
return null;
|
44
|
+
}
|
45
|
+
function omit(obj, keys) {
|
46
|
+
return Object.fromEntries(
|
47
|
+
Object.entries(obj).filter(([key]) => !keys.includes(key))
|
48
|
+
);
|
49
|
+
}
|
50
|
+
|
51
|
+
exports.BOOLEAN_ATTRIBUTE = BOOLEAN_ATTRIBUTE;
|
52
|
+
exports.HTML_TAGS = HTML_TAGS;
|
53
|
+
exports.SVG_TAGS = SVG_TAGS;
|
54
|
+
exports.callUnstableFunc = callUnstableFunc;
|
55
|
+
exports.camelize = camelize;
|
56
|
+
exports.capitalize = capitalize;
|
57
|
+
exports.hash = hash;
|
58
|
+
exports.hyphenate = hyphenate;
|
59
|
+
exports.isArray = isArray;
|
60
|
+
exports.isBooleanAttribute = isBooleanAttribute;
|
61
|
+
exports.isEvent = isEvent;
|
62
|
+
exports.isFunction = isFunction;
|
63
|
+
exports.isHTMLTag = isHTMLTag;
|
64
|
+
exports.isMap = isMap;
|
65
|
+
exports.isNativeTag = isNativeTag;
|
66
|
+
exports.isObject = isObject;
|
67
|
+
exports.isPlainObject = isPlainObject;
|
68
|
+
exports.isRenderFn = isRenderFn;
|
69
|
+
exports.isSVGTag = isSVGTag;
|
70
|
+
exports.isSet = isSet;
|
71
|
+
exports.isString = isString;
|
72
|
+
exports.omit = omit;
|
73
|
+
exports.stringCurrying = stringCurrying;
|
74
|
+
exports.toTypeString = toTypeString;
|
75
|
+
//# sourceMappingURL=index.js.map
|
76
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/constants/index.ts","../src/utils/stringCurrying.ts","../src/utils/index.ts"],"names":[],"mappings":";;;AACO,IAAM,SACX,GAAA;AAWK,IAAM,QACX,GAAA;AAWK,IAAM,iBACX,GAAA;;;ACvBK,SAAS,cAAA,CACd,KACA,SAC0B,EAAA;AAC1B,EAAM,MAAA,GAAA,mBAAsC,MAAA,CAAA,MAAA,CAAO,IAAI,CAAA;AACvD,EAAM,MAAA,IAAA,GAAsB,GAAI,CAAA,KAAA,CAAM,GAAG,CAAA;AACzC,EAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,IAAA,CAAK,QAAQ,CAAK,EAAA,EAAA;AACpC,IAAI,GAAA,CAAA,IAAA,CAAK,CAAC,CAAC,CAAI,GAAA,IAAA;AAAA;AAEjB,EAAA,OAAO,SAAY,GAAA,CAAA,GAAA,KAAO,CAAC,CAAC,GAAI,CAAA,GAAA,CAAI,WAAY,EAAC,CAAI,GAAA,CAAA,GAAA,KAAO,CAAC,CAAC,IAAI,GAAG,CAAA;AACvE;;;ACRa,IAAA,SAAA,GAAY,cAAe,CAAA,SAAA,EAAW,IAAI;AAC1C,IAAA,QAAA,GAAW,cAAe,CAAA,QAAA,EAAU,IAAI;AACxC,IAAA,kBAAA,GAAqB,cAAe,CAAA,iBAAA,EAAmB,IAAI;AACjE,IAAM,cAAc,CAAC,IAAA,KAAiB,UAAU,IAAI,CAAA,IAAK,SAAS,IAAI;AACtE,IAAM,QAAW,GAAA,CAAC,GAAgC,KAAA,OAAO,GAAQ,KAAA;AACjE,IAAM,UAAa,GAAA,CAAC,GAAkC,KAAA,OAAO,GAAQ,KAAA;AAC/D,IAAA,UAAA,GAAa,CAAC,EAAA,KAAgC,UAAW,CAAA,EAAE,KAAK,EAAG,CAAA,IAAA,CAAK,OAAQ,CAAA,QAAQ,CAAM,KAAA;AACpG,IAAM,UAAU,KAAM,CAAA;AACtB,IAAM,WAAW,CAAC,GAAA,KAA0C,GAAQ,KAAA,IAAA,IAAQ,OAAO,GAAQ,KAAA;AAC3F,IAAM,eAAe,CAAC,KAAA,KAA2B,OAAO,SAAU,CAAA,QAAA,CAAS,KAAK,KAAK;AACrF,IAAM,KAAQ,GAAA,CAAC,GAAuC,KAAA,YAAA,CAAa,GAAG,CAAM,KAAA;AAC5E,IAAM,KAAQ,GAAA,CAAC,GAAkC,KAAA,YAAA,CAAa,GAAG,CAAM,KAAA;AACvE,IAAM,aAAgB,GAAA,CAAC,GAAgC,KAAA,YAAA,CAAa,GAAG,CAAM,KAAA;AAC7E,IAAM,QAAW,GAAA,CAAC,GAAwB,KAAA,GAAA,CAAI,OAAQ,CAAA,QAAA,EAAU,CAAC,CAAA,EAAG,CAAO,KAAA,CAAA,GAAI,CAAE,CAAA,WAAA,KAAgB,EAAG;AAC9F,IAAA,UAAA,GAAa,CAAC,GAAA,KAAiB,GAAI,CAAA,MAAA,CAAO,CAAC,CAAA,CAAE,WAAY,EAAA,GAAI,GAAI,CAAA,KAAA,CAAM,CAAC;AACxE,IAAA,SAAA,GAAY,CAAC,GAAgB,KAAA,GAAA,CAAI,QAAQ,YAAc,EAAA,KAAK,EAAE,WAAY;AAC1E,IAAA,IAAA,GAAO,MAAM,IAAK,CAAA,MAAA,GAAS,QAAS,CAAA,EAAE,CAAE,CAAA,KAAA,CAAM,CAAC;AACrD,IAAM,OAAU,GAAA,CAAC,GAAgB,KAAA,WAAA,CAAY,KAAK,GAAG;AAErD,SAAS,gBAAA,CACd,IACA,IACA,EAAA;AACA,EAAI,IAAA;AACF,IAAA,OAAO,EAAG,CAAA,GAAI,IAAQ,IAAA,IAAA,GAAA,IAAA,GAAA,EAAG,CAAA;AAAA,WAClB,GAAK,EAAA;AACZ,IAAA,OAAA,CAAQ,IAAI,GAAG,CAAA;AAAA;AAEjB,EAAO,OAAA,IAAA;AACT;AACO,SAAS,IAAA,CAAwC,KAAQ,IAA4B,EAAA;AAC1F,EAAA,OAAO,MAAO,CAAA,WAAA;AAAA,IACZ,MAAO,CAAA,OAAA,CAAQ,GAAG,CAAA,CAAE,MAAO,CAAA,CAAC,CAAC,GAAG,CAAM,KAAA,CAAC,IAAK,CAAA,QAAA,CAAS,GAAG,CAAC;AAAA,GAC3D;AACF","file":"index.js","sourcesContent":["// https://developer.mozilla.org/en-US/docs/Web/HTML/Element\nexport const HTML_TAGS =\n 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +\n 'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +\n 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +\n 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +\n 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +\n 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +\n 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +\n 'option,output,progress,select,textarea,details,dialog,menu,' +\n 'summary,template,blockquote,iframe,tfoot';\n\n// https://developer.mozilla.org/en-US/docs/Web/SVG/Element\nexport const SVG_TAGS =\n 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +\n 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +\n 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +\n 'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +\n 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +\n 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +\n 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +\n 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +\n 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +\n 'text,textPath,title,tspan,unknown,use,view';\n\nexport const BOOLEAN_ATTRIBUTE = \n 'checked,disabled,readonly,required,multiple,autofocus,selected,hidden,'+\n 'controls,loop,muted,autoplay,playsinline,novalidate,formnovalidate,open,'+\n 'itemscope,default,inert,nomodule,ismap,allowfullscreen';\n","// input a,b,c\n// a,b,c => {a: true, b: true, c: true}\n// return val => map[val]\nexport function stringCurrying(\n str: string,\n lowerCase?: boolean\n): (key: string) => boolean {\n const map: Record<string, boolean> = Object.create(null)\n const list: Array<string> = str.split(',')\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true\n }\n return lowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]\n}","import { stringCurrying } from './stringCurrying';\nimport { HTML_TAGS, SVG_TAGS, BOOLEAN_ATTRIBUTE } from '../constants';\n\nexport * from './stringCurrying';\n\nexport const isHTMLTag = stringCurrying(HTML_TAGS, true);\nexport const isSVGTag = stringCurrying(SVG_TAGS, true);\nexport const isBooleanAttribute = stringCurrying(BOOLEAN_ATTRIBUTE, true);\nexport const isNativeTag = (name: string) => isHTMLTag(name) || isSVGTag(name);\nexport const isString = (val: unknown): val is string => typeof val === 'string';\nexport const isFunction = (val: unknown): val is Function => typeof val === 'function';\nexport const isRenderFn = (fn: unknown): fn is Function => isFunction(fn) && fn.name.indexOf('render') !== -1;\nexport const isArray = Array.isArray;\nexport const isObject = (val: unknown): val is Record<any, any> => val !== null && typeof val === 'object';\nexport const toTypeString = (value: unknown): string => Object.prototype.toString.call(value);\nexport const isMap = (val: unknown): val is Map<any, any> => toTypeString(val) === '[object Map]';\nexport const isSet = (val: unknown): val is Set<any> => toTypeString(val) === '[object Set]';\nexport const isPlainObject = (val: unknown): val is object => toTypeString(val) === '[object Object]';\nexport const camelize = (str: string): string => str.replace(/-(\\w)/g, (_, c) => (c ? c.toUpperCase() : ''));\nexport const capitalize = (str: string) => (str.charAt(0).toUpperCase() + str.slice(1)) as Capitalize<string>;\nexport const hyphenate = (str: string) => str.replace(/\\B([A-Z])/g, '-$1').toLowerCase();\nexport const hash = () => Math.random().toString(16).slice(2);\nexport const isEvent = (key: string) => /^on[^a-z]/.test(key);\n\nexport function callUnstableFunc<F extends Function, R = null>(\n fn: F,\n args?: unknown[],\n) {\n try {\n return fn(...(args ?? [])) as R;\n } catch (err) {\n console.log(err);\n }\n return null;\n}\nexport function omit<T extends Record<string, unknown>>(obj: T, keys: string[]): Partial<T> {\n return Object.fromEntries(\n Object.entries(obj).filter(([key]) => !keys.includes(key))\n ) as Partial<T>;\n}"]}
|