feat: add changeset and changed package name

This commit is contained in:
iandxssxx 2024-04-09 03:28:10 -04:00
parent ef4126b767
commit 2f9d3737db
52 changed files with 240 additions and 109 deletions

8
.changeset/README.md Normal file
View File

@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

11
.changeset/config.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}

View File

@ -0,0 +1,5 @@
---
"babel-preset-inula-next": patch
---
feat: change babel import

View File

@ -2,8 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Dlight.JS</title>
<link rel="stylesheet" href="/src/App.css"/>
<title>Inula-next</title>
</head>
<body>
<div id="main"></div>

View File

@ -10,7 +10,7 @@
},
"dependencies": {
"@babel/standalone": "^7.22.4",
"@inula/next": "workspace:*",
"@openinula/next": "workspace:*",
"@iandx/easy-css": "^0.10.14",
"babel-preset-inula-next": "workspace:*"
},

View File

@ -1,22 +1,22 @@
import { createSignal, createSelector, batch } from 'solid-js';
import { render } from 'solid-js/web';
import { render, View } from '@openinula/next';
let idCounter = 1;
const adjectives = ['pretty', 'large', 'big', 'small', 'tall', 'short', 'long', 'handsome', 'plain', 'quaint', 'clean', 'elegant', 'easy', 'angry', 'crazy', 'helpful', 'mushy', 'odd', 'unsightly', 'adorable', 'important', 'inexpensive', 'cheap', 'expensive', 'fancy'],
colours = ['red', 'yellow', 'blue', 'green', 'pink', 'brown', 'purple', 'brown', 'white', 'black', 'orange'],
nouns = ['table', 'chair', 'house', 'bbq', 'desk', 'car', 'pony', 'cookie', 'sandwich', 'burger', 'pizza', 'mouse', 'keyboard'];
function _random (max) {
const adjectives = ['pretty', 'large', 'big', 'small', 'tall', 'short', 'long', 'handsome', 'plain', 'quaint', 'clean', 'elegant', 'easy', 'angry', 'crazy', 'helpful', 'mushy', 'odd', 'unsightly', 'adorable', 'important', 'inexpensive', 'cheap', 'expensive', 'fancy'];
const colours = ['red', 'yellow', 'blue', 'green', 'pink', 'brown', 'purple', 'brown', 'white', 'black', 'orange'];
const nouns = ['table', 'chair', 'house', 'bbq', 'desk', 'car', 'pony', 'cookie', 'sandwich', 'burger', 'pizza', 'mouse', 'keyboard'];
function _random(max) {
return Math.round(Math.random() * 1000) % max;
}
function buildData(count) {
let data = new Array(count);
const data = new Array(count);
for (let i = 0; i < count; i++) {
const [label, setLabel] = createSignal(`${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}`);
data[i] = {
id: idCounter++,
label, setLabel
label: `${adjectives[_random(adjectives.length)]} ${colours[_random(colours.length)]} ${nouns[_random(nouns.length)]}`
};
}
return data;
@ -65,7 +65,7 @@ function App () {
return (
<div class='container'>
<div class='jumbotron'><div class='row'>
<div class='col-md-6'><h1>SolidJS Keyed</h1></div>
<div class='col-md-6'><h1>Inula-next Keyed</h1></div>
<div class='col-md-6'><div class='row'>
<Button id='run' text='Create 1,000 rows' fn={ run } />
<Button id='runlots' text='Create 10,000 rows' fn={ runLots } />
@ -84,15 +84,6 @@ function App () {
<td class='col-md-6'/>
</tr>
</for>
{/*for const { id, label } of data*/}
<for array={ data } item={ { id, label } } key={ id }>
<tr class={ selected === id ? 'danger': '' }>
<td class='col-md-1' textContent={ id } />
<td class='col-md-4'><a onClick={select.bind(this, id)} textContent={ label } /></td>
<td class='col-md-1'><a onClick={remove.bind(this, id)}><span class='glyphicon glyphicon-remove' aria-hidden="true" /></a></td>
<td class='col-md-6'/>
</tr>
</for>
</tbody></table>
<span class='preloadicon glyphicon glyphicon-remove' aria-hidden="true" />
</div>

View File

@ -10,7 +10,7 @@
},
"dependencies": {
"@babel/standalone": "^7.22.4",
"@inula/next": "workspace:*",
"@openinula/next": "workspace:*",
"@iandx/easy-css": "^0.10.14",
"babel-preset-inula-next": "workspace:*"
},

35
demos/v2/src/App.tsx Normal file
View File

@ -0,0 +1,35 @@
// @ts-nocheck
import {
Children,
Content,
Main,
Model,
Prop,
View,
Watch,
button,
div,
input,
insertChildren,
use,
render,
} from '@openinula/next';
function MyComp() {
let count = 0;
const db = count * 2;
return (
<>
<h1 className="123">Hello dlight fn comp</h1>
<section>
count: {count}, double is: {db}
<button onClick={() => (count += 1)}>Add</button>
</section>
</>
);
}
render('main', MyComp);

View File

@ -13,7 +13,7 @@ import {
insertChildren,
use,
render,
} from '@inula/next';
} from '@openinula/next';
// @ts-ignore
function Button({ children, onClick }) {
@ -35,7 +35,7 @@ function Button({ children, onClick }) {
}
function ArrayModification() {
let arr = [];
const arr = [];
willMount(() => {});
return (
<section>
@ -46,9 +46,75 @@ function ArrayModification() {
);
}
function Counter() {
let count = 0;
const doubleCount = count * 2; // 当count变化时doubleCount自动更新
// 当count变化时watch会自动执行
watch(() => {
uploadToServer(count);
console.log(`count has changed: ${count}`);
});
// 只有在init的时候执行一次
console.log(`Counter willMount with count ${count}`);
// 在elements被挂载到DOM之后执行
didMount(() => {
console.log(`Counter didMount with count ${count}`);
});
return (
<section>
count: {count}, double is: {doubleCount}
<button onClick={() => (count ++)}>Add</button>
</section>
);
}
function Counter() {
let count = 0;
const doubleCount = count * 2; // 当count变化时doubleCount自动更新
uploadToServer(count); // 当count变化时uploadToServer会自动执行
console.log(`count has changed: ${count}`); // 当count变化时console.log会自动执行
// 只有在init的时候执行一次
willMount(() => {
console.log(`Counter willMount with count ${count}`);
});
// 在elements被挂载到DOM之后执行
didMount(() => {
console.log(`Counter didMount with count ${count}`);
});
return (
<section>
count: {count}, double is: {doubleCount}
<button onClick={() => (count ++)}>Add</button>
</section>
);
}
function MyComp() {
let count = 0;
let db = count * 2;
{
console.log(count);
const i = count * 2;
console.log(i);
}
console.log(count);
const i = count * 2;
console.log(i);
const XX = () => {
};
return (
<>
<h1 className="123">Hello dlight fn comp</h1>

View File

@ -81,5 +81,9 @@
"engines": {
"node": ">=10.x",
"npm": ">=7.x"
},
"dependencies": {
"@changesets/cli": "^2.27.1",
"changeset": "^0.2.6"
}
}

View File

@ -178,10 +178,10 @@ inula-cli的所有功能都围绕插件展开插件可以很方便地让用
inula-cli支持用户集成已发布在npm仓库的插件用户可以按需安装并运行这些插件。
安装可以通过npm安装这里以插件@inula/add为例
安装可以通过npm安装这里以插件@openinula/add为例
```shell
npm i --save-dev @inula/add
npm i --save-dev @openinula/add
```
如果需要运行插件,需要在配置文件中配置对应的插件路径
@ -191,7 +191,7 @@ npm i --save-dev @inula/add
export default {
...
plugins:["@inula/add"]
plugins:["@openinula/add"]
}
```

View File

@ -1,5 +1,5 @@
{
"name": "@inula/store",
"name": "@openinula/store",
"version": "0.0.0",
"description": "DLight shared store",
"author": {

View File

@ -1,12 +1,12 @@
{
"name": "@inula/next",
"version": "1.0.0-next.9",
"name": "@openinula/next",
"version": "0.0.1",
"author": {
"name": "IanDx",
"email": "iandxssxx@gmail.com"
},
"keywords": [
"dlight.js"
"inula"
],
"license": "MIT",
"files": [
@ -22,7 +22,7 @@
},
"dependencies": {
"csstype": "^3.1.3",
"@inula/store": "workspace:*"
"@openinula/store": "workspace:*"
},
"devDependencies": {
"tsup": "^6.5.0"

View File

@ -1,4 +1,4 @@
import { Store } from '@inula/store';
import { Store } from '@openinula/store';
// ---- Using external Store to store global and document
// Because Store is a singleton, it is safe to use it as a global variable

View File

@ -1,4 +1,5 @@
{
"name": "inula-router-config",
"module": "./esm/connectRouter.js",
"main": "./cjs/connectRouter.js",
"types": "./@types/index.d.ts",

View File

@ -27,7 +27,16 @@ This is a experimental package to implement [API2.0](https://gitee.com/openInula
- [x] fragment
- [ ] ref (to validate)
- [ ] snippet
- [ ] for
- [x] for
# 4.8 TODO
@YH
* Benchmark(result + comparison)
* Playground(@HQ publish) deploy
* PPT
* DEMO
* api2.1 compiled code
# function component syntax

View File

@ -32,10 +32,10 @@
"@babel/core": "^7.23.3",
"@babel/plugin-syntax-jsx": "7.16.7",
"@babel/plugin-syntax-typescript": "^7.23.3",
"@inula/reactivity-parser": "workspace:*",
"@inula/view-generator": "workspace:*",
"@inula/view-parser": "workspace:*",
"@inula/class-transformer": "workspace:*",
"@openinula/reactivity-parser": "workspace:*",
"@openinula/view-generator": "workspace:*",
"@openinula/view-parser": "workspace:*",
"@openinula/class-transformer": "workspace:*",
"jsx-view-parser": "workspace:*",
"minimatch": "^9.0.3",
"vitest": "^1.4.0"

View File

@ -227,7 +227,7 @@ export const defaultHTMLTags = [
];
export const availableDecoNames = ['Static', 'Prop', 'Env', 'Content', 'Children'];
export const dlightDefaultPackageName = '@inula/next';
export const dlightDefaultPackageName = '@openinula/next';
export const importMap = Object.fromEntries(
[

View File

@ -1,2 +1,4 @@
declare module '@babel/plugin-syntax-do-expressions';
declare module '@babel/plugin-syntax-decorators';
declare module '@babel/plugin-syntax-jsx';
declare module '@babel/plugin-syntax-typescript';

View File

@ -1,14 +1,16 @@
import syntaxDecorators from '@babel/plugin-syntax-decorators';
import syntaxJSX from '@babel/plugin-syntax-jsx';
import syntaxTypescript from '@babel/plugin-syntax-typescript';
import dlight from './plugin';
import { type DLightOption } from './types';
import { type ConfigAPI, type TransformOptions } from '@babel/core';
import { plugin as fn2Class } from '@inula/class-transformer';
import { plugin as fn2Class } from '@openinula/class-transformer';
export default function (_: ConfigAPI, options: DLightOption): TransformOptions {
return {
plugins: [
['@babel/plugin-syntax-jsx'],
['@babel/plugin-syntax-typescript', { isTSX: true }],
syntaxJSX.default ?? syntaxJSX,
[syntaxTypescript.default ?? syntaxTypescript, { isTSX: true }],
[syntaxDecorators.default ?? syntaxDecorators, { legacy: true }],
fn2Class,
[dlight, options],

View File

@ -2,10 +2,10 @@ import type babel from '@babel/core';
import { type types as t, type NodePath } from '@babel/core';
import { type PropertyContainer, type HTMLTags, type SnippetPropSubDepMap } from './types';
import { minimatch } from 'minimatch';
import { parseView, ViewUnit } from '@inula/view-parser';
import { parseView, ViewUnit } from '@openinula/view-parser';
import { parseView as parseJSX } from 'jsx-view-parser';
import { parseReactivity } from '@inula/reactivity-parser';
import { generateSnippet, generateView } from '@inula/view-generator';
import { parseReactivity } from '@openinula/reactivity-parser';
import { generateSnippet, generateView } from '@openinula/view-generator';
import {
alterAttributeMap,
availableDecoNames,

View File

@ -1,6 +1,6 @@
{
"name": "@inula/class-transformer",
"version": "0.0.0",
"name": "@openinula/class-transformer",
"version": "0.0.1",
"description": "Inula view generator",
"keywords": [
"inula"

View File

@ -19,7 +19,7 @@ export class ThisPatcher {
(def): def is Exclude<t.ClassBody['body'][number], t.TSIndexSignature | t.StaticBlock> =>
!this.t.isTSIndexSignature(def) && !this.t.isStaticBlock(def)
)
.map(def => ('name' in def.key ? def.key.name : null));
.map(def => (def?.key?.name ? def.key.name : null));
for (const memberOrMethod of classBodyNode.body) {
classPath.scope.traverse(memberOrMethod, {

View File

@ -1,6 +1,6 @@
{
"name": "@inula/error-handler",
"version": "1.0.0-alpha.0",
"name": "@openinula/error-handler",
"version": "0.0.1",
"author": {
"name": "IanDx",
"email": "iandxssxx@gmail.com"

View File

@ -1,6 +1,6 @@
{
"name": "jsx-view-parser",
"version": "0.0.0",
"version": "0.0.1",
"description": "Inula jsx parser",
"author": {
"name": "IanDx",

View File

@ -537,48 +537,46 @@ export class ViewParser {
private pareFor(node: t.JSXElement) {
// ---- Get array
const arrayContainer = this.findProp(node, "array")
if (!arrayContainer) throw new Error("Missing [array] prop in for loop")
if (!this.t.isJSXExpressionContainer(arrayContainer.value)) throw new Error("Expected expression container for [array] prop")
const array = arrayContainer.value.expression
if (this.t.isJSXEmptyExpression(array)) throw new Error("Expected [array] expression not empty")
const arrayContainer = this.findProp(node, 'array');
if (!arrayContainer) throw new Error('Missing [array] prop in for loop');
if (!this.t.isJSXExpressionContainer(arrayContainer.value)) throw new Error('Expected expression container for [array] prop');
const array = arrayContainer.value.expression;
if (this.t.isJSXEmptyExpression(array)) throw new Error('Expected [array] expression not empty');
// ---- Get key
const keyProp = this.findProp(node, "key")
let key: t.Expression = this.t.nullLiteral()
const keyProp = this.findProp(node, 'key');
let key: t.Expression = this.t.nullLiteral();
if (keyProp) {
if (!(
this.t.isJSXExpressionContainer(keyProp.value) &&
this.t.isFunction(keyProp.value.expression)
)) throw new Error("Expected expression container")
key = keyProp.value.expression
if (!this.t.isJSXExpressionContainer(keyProp.value)) throw new Error('Expected expression container');
if (this.t.isJSXEmptyExpression(keyProp.value.expression)) throw new Error('Expected expression not empty');
key = keyProp.value.expression;
}
// ---- Get Item
const itemProp = this.findProp(node, "item")
if (!itemProp) throw new Error("Missing [item] prop in for loop")
if (!this.t.isJSXExpressionContainer(itemProp.value)) throw new Error("Expected expression container for [item] prop")
const item = itemProp.value.expression
if (this.t.isJSXEmptyExpression(item)) throw new Error("Expected [item] expression not empty")
const itemProp = this.findProp(node, 'item');
if (!itemProp) throw new Error('Missing [item] prop in for loop');
if (!this.t.isJSXExpressionContainer(itemProp.value)) throw new Error('Expected expression container for [item] prop');
const item = itemProp.value.expression;
if (this.t.isJSXEmptyExpression(item)) throw new Error('Expected [item] expression not empty');
// ---- ObjectExpression to ObjectPattern / ArrayExpression to ArrayPattern
this.traverse(this.wrapWithFile(item), {
ObjectExpression: (path) => {
path.type = "ObjectPattern" as any
path.node.type = 'ObjectPattern' as any;
},
ArrayExpression: (path) => {
path.type = "ArrayPattern" as any
path.node.type = 'ArrayPattern' as any;
}
})
});
// ---- Get children
const children = this.t.jsxFragment(this.t.jsxOpeningFragment(), this.t.jsxClosingFragment(), node.children)
const children = this.t.jsxFragment(this.t.jsxOpeningFragment(), this.t.jsxClosingFragment(), node.children);
this.viewUnits.push({
type: "for",
type: 'for',
key,
item: item as t.LVal,
array,
children: this.parseView(children)
})
});
}
}

View File

@ -1,5 +1,5 @@
{
"name": "@inula/reactivity-parser",
"name": "@openinula/reactivity-parser",
"version": "0.0.1",
"author": {
"name": "IanDx",
@ -29,8 +29,8 @@
"vitest": "^0.34.5"
},
"dependencies": {
"@inula/error-handler": "workspace:*",
"@inula/view-parser": "workspace:*"
"@openinula/error-handler": "workspace:*",
"@openinula/view-parser": "workspace:*"
},
"tsup": {
"entry": [

View File

@ -1,4 +1,4 @@
import { createErrorHandler } from '@inula/error-handler';
import { createErrorHandler } from '@openinula/error-handler';
export const DLError = createErrorHandler('ReactivityParser', {
1: 'Invalid ViewUnit type',

View File

@ -1,4 +1,4 @@
import { type ViewUnit } from '@inula/view-parser';
import { type ViewUnit } from '@openinula/view-parser';
import { ReactivityParser } from './parser';
import { type ViewParticle, type ReactivityParserConfig } from './types';

View File

@ -30,7 +30,7 @@ import {
type SnippetUnit,
SwitchUnit,
TryUnit,
} from '@inula/view-parser';
} from '@openinula/view-parser';
import { DLError } from './error';
export class ReactivityParser {

View File

@ -1,6 +1,6 @@
import babelApi, { parseSync, type types as t } from '@babel/core';
import { type ReactivityParserConfig } from '../types';
import { parseView as pV, type ViewParserConfig } from '@inula/view-parser';
import { parseView as pV, type ViewParserConfig } from '@openinula/view-parser';
import { parseReactivity as pR } from '../index';
const htmlTags = [

View File

@ -1,5 +1,5 @@
{
"name": "@inula/view-generator",
"name": "@openinula/view-generator",
"version": "0.0.1",
"author": {
"name": "IanDx",
@ -25,10 +25,10 @@
"@types/node": "^20.10.5",
"tsup": "^6.7.0",
"typescript": "^5.3.2",
"@inula/reactivity-parser": "workspace:*"
"@openinula/reactivity-parser": "workspace:*"
},
"dependencies": {
"@inula/error-handler": "workspace:*"
"@openinula/error-handler": "workspace:*"
},
"tsup": {
"entry": [

View File

@ -1,5 +1,5 @@
import { type types as t, type traverse } from '@babel/core';
import { type ViewParticle } from '@inula/reactivity-parser';
import { type ViewParticle } from '@openinula/reactivity-parser';
import { type SnippetPropMap, type ViewGeneratorConfig } from '../types';
import ViewGenerator from '../ViewGenerator';

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type DependencyProp, type ViewParticle } from '@inula/reactivity-parser';
import { type DependencyProp, type ViewParticle } from '@openinula/reactivity-parser';
import LifecycleGenerator from './LifecycleGenerator';
export default class PropViewGenerator extends LifecycleGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type ViewParticle } from '@inula/reactivity-parser';
import { type ViewParticle } from '@openinula/reactivity-parser';
import ViewGenerator from './ViewGenerator';
export default class MainViewGenerator extends ViewGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type DependencyProp, type CompParticle, type ViewParticle } from '@inula/reactivity-parser';
import { type DependencyProp, type CompParticle, type ViewParticle } from '@openinula/reactivity-parser';
import ForwardPropGenerator from '../HelperGenerators/ForwardPropGenerator';
export default class CompGenerator extends ForwardPropGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type ViewParticle, type DependencyProp, type EnvParticle } from '@inula/reactivity-parser';
import { type ViewParticle, type DependencyProp, type EnvParticle } from '@openinula/reactivity-parser';
import PropViewGenerator from '../HelperGenerators/PropViewGenerator';
export default class EnvGenerator extends PropViewGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type ExpParticle } from '@inula/reactivity-parser';
import { type ExpParticle } from '@openinula/reactivity-parser';
import ElementGenerator from '../HelperGenerators/ElementGenerator';
import { DLError } from '../error';

View File

@ -1,6 +1,6 @@
import { type types as t } from '@babel/core';
import BaseGenerator from '../HelperGenerators/BaseGenerator';
import { type ForParticle, type ViewParticle } from '@inula/reactivity-parser';
import { type ForParticle, type ViewParticle } from '@openinula/reactivity-parser';
export default class ForGenerator extends BaseGenerator {
run() {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type HTMLParticle } from '@inula/reactivity-parser';
import { type HTMLParticle } from '@openinula/reactivity-parser';
import HTMLPropGenerator from '../HelperGenerators/HTMLPropGenerator';
export default class HTMLGenerator extends HTMLPropGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type IfParticle, type IfBranch } from '@inula/reactivity-parser';
import { type IfParticle, type IfBranch } from '@openinula/reactivity-parser';
import CondGenerator from '../HelperGenerators/CondGenerator';
export default class IfGenerator extends CondGenerator {

View File

@ -1,4 +1,4 @@
import { type DependencyProp, type SnippetParticle } from '@inula/reactivity-parser';
import { type DependencyProp, type SnippetParticle } from '@openinula/reactivity-parser';
import type { types as t } from '@babel/core';
import PropViewGenerator from '../HelperGenerators/PropViewGenerator';

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { SwitchBranch, SwitchParticle } from '@inula/reactivity-parser';
import { SwitchBranch, SwitchParticle } from '@openinula/reactivity-parser';
import CondGenerator from '../HelperGenerators/CondGenerator';
export default class SwitchGenerator extends CondGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type HTMLParticle, type TemplateParticle } from '@inula/reactivity-parser';
import { type HTMLParticle, type TemplateParticle } from '@openinula/reactivity-parser';
import HTMLPropGenerator from '../HelperGenerators/HTMLPropGenerator';
export default class TemplateGenerator extends HTMLPropGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type TextParticle } from '@inula/reactivity-parser';
import { type TextParticle } from '@openinula/reactivity-parser';
import BaseGenerator from '../HelperGenerators/BaseGenerator';
export default class TextGenerator extends BaseGenerator {

View File

@ -1,6 +1,6 @@
import { type types as t } from '@babel/core';
import BaseGenerator from '../HelperGenerators/BaseGenerator';
import { TryParticle, type ViewParticle } from '@inula/reactivity-parser';
import { TryParticle, type ViewParticle } from '@openinula/reactivity-parser';
export default class TryGenerator extends BaseGenerator {
run() {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type ViewParticle } from '@inula/reactivity-parser';
import { type ViewParticle } from '@openinula/reactivity-parser';
import ViewGenerator from './ViewGenerator';
export default class SnippetGenerator extends ViewGenerator {

View File

@ -1,5 +1,5 @@
import { type types as t } from '@babel/core';
import { type ViewParticle } from '@inula/reactivity-parser';
import { type ViewParticle } from '@openinula/reactivity-parser';
import { type ViewGeneratorConfig } from './types';
import BaseGenerator, { prefixMap } from './HelperGenerators/BaseGenerator';
import CompGenerator from './NodeGenerators/CompGenerator';

View File

@ -1,4 +1,4 @@
import { createErrorHandler } from '@inula/error-handler';
import { createErrorHandler } from '@openinula/error-handler';
export const DLError = createErrorHandler(
'ViewGenerator',

View File

@ -1,4 +1,4 @@
import { type ViewParticle } from '@inula/reactivity-parser';
import { type ViewParticle } from '@openinula/reactivity-parser';
import { type ViewGeneratorConfig } from './types';
import { type types as t } from '@babel/core';
import MainViewGenerator from './MainViewGenerator';

View File

@ -1,5 +1,5 @@
{
"name": "@inula/view-parser",
"name": "@openinula/view-parser",
"version": "0.0.1",
"author": {
"name": "IanDx",
@ -29,7 +29,7 @@
"vitest": "^0.34.5"
},
"dependencies": {
"@inula/error-handler": "workspace:*"
"@openinula/error-handler": "workspace:*"
},
"tsup": {
"entry": [

View File

@ -1,11 +1,11 @@
import { createErrorHandler } from '@inula/error-handler';
import { createErrorHandler } from '@openinula/error-handler';
export const DLError = createErrorHandler(
'ViewParser',
{
1: "Invalid syntax in DLight's View, only accepts dot chain call expression",
1: 'Invalid syntax in DLight\'s View, only accepts dot chain call expression',
2: 'First argument of $0() must be an expression',
3: "Invalid syntax in DLight's View, only accepts expression as props",
3: 'Invalid syntax in DLight\'s View, only accepts expression as props',
4: 'Invalid Snippet calling, only accepts static snippet calling like `this.Snippet()`',
},
{