Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
refactor(0%): playground
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepbox8646 committed Jun 22, 2024
1 parent fc6dda9 commit 792b62e
Show file tree
Hide file tree
Showing 16 changed files with 3,159 additions and 147 deletions.
1 change: 1 addition & 0 deletions mods/mod-math/src/utils/svg2path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
export function svg2path(svgString: string): string {
const path = []

// eslint-disable-next-line regexp/no-super-linear-backtracking
const svgRegex = /<(rect|circle|ellipse|line|polyline|polygon|path|text|image|use|symbol|g|defs)\s+([^>]+)>/g
let match
while ((match = svgRegex.exec(svgString)) !== null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/basic/src/widgets/arc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Canvas, CanvasKit, RRect } from 'canvaskit-wasm'
import type { CanvasKit, RRect } from 'canvaskit-wasm'
import type { Ref } from '@newcar/core'
import { changed, ref } from '@newcar/core'
import type { FigureOptions } from './figure'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/localApp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Canvas, CanvasKit, Surface } from 'canvaskit-wasm'
import type { Scene } from './scene'
import type { Widget } from './widget'
import type { GlobalPlugin } from './plugin'
import { type Config, defineConfig } from './config'

Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/physical.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { App } from './app'

export type LengthUnitType = 'raw' | 'percent'

export class Length {
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import type { Anim } from './animation'
import type { Event, EventInstance } from './event'
import { defineEvent } from './event'
import type { WidgetPlugin } from './plugin'
import type { ConvertToProp, Reactive, Ref } from './prop'
import type { App } from './app'
import { changed, reactive, ref } from './prop'
import type { ConvertToProp, Ref } from './prop'
import { changed, ref } from './prop'
import type { Position } from './physical'
import { rp } from './physical'
import { RootWidget } from './scene'
Expand Down
17 changes: 17 additions & 0 deletions playground/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://shadcn-vue.com/schema.json",
"style": "default",
"typescript": true,
"tsConfigPath": "./tsconfig.json",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/assets/index.css",
"baseColor": "slate",
"cssVariables": true
},
"framework": "vite",
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
Loading

0 comments on commit 792b62e

Please sign in to comment.