Skip to content

Commit

Permalink
feat: export all constants and types
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Dec 31, 2024
1 parent 1dabb18 commit a22d5af
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 24 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
> [!IMPORTANT]
> Status: Work In Progress, not ready for production.
>
> Api may change every release, Use at your own risk.
> API is not stale now, Use at your own risk.
## Install

Expand All @@ -27,6 +27,12 @@ yarn add svg-eslint-parser -D
pnpm add svg-eslint-parser -D
```

## Playground

You can try the parser in [playground](https://svg-eslint-parser.ntnyq.com/play).

Feel free to open an issue if you have any suggestions or find any bugs.

## Links

- [Scalable Vector Graphics (SVG) 2](https://www.w3.org/TR/SVG2/)
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/components/Playground/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Panel, PanelGroup, PanelResizeHandle } from 'vue-resizable-panels'
</script>

<template>
<div class="page-playground-core relative p-4">
<div class="page-playground-core relative px-4">
<ClientOnly>
<PanelGroup
direction="horizontal"
Expand Down
18 changes: 7 additions & 11 deletions docs/.vitepress/components/Playground/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,37 @@
}

.panel {
display: flex;
flex-direction: row;
font-size: 2rem;
--at-apply: "flex flex-row text-2rem";
}

.panel-row,
.panel-column {
display: flex;
--at-apply: "flex";
}

.panel-row {
flex-direction: row;
--at-apply: "flex-row";
}

.panel-column {
flex-direction: column;
--at-apply: "flex-col";
}

.panel-resize-handle {
--resize-border-color: #fff;
--resize-border-color: var(--vp-c-bg);
--resize-background-color: var(--vp-c-divider);

flex: 0 0 11px;
background-clip: padding-box;
display: flex;
justify-content: stretch;
align-items: stretch;
outline: none;
transition:
border-color 0.2s linear,
background-color 0.2s linear;
background-color: var(--resize-background-color);
border-color: var(--resize-border-color);
border-style: solid;
border-width: 0 5px;

--at-apply: "flex outline-none justify-stretch items-stretch";
}

.panel-resize-handle[data-panel-group-direction="vertical"] {
Expand Down
21 changes: 11 additions & 10 deletions docs/.vitepress/theme/app.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#package_status {
position: relative;
--at-apply: "relative";
}

#package_status p {
position: relative;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 0;
--at-apply: "mb-0 flex relative flex-wrap gap-2";
}

/* reset max-width in playground page */
.page-playground .VPNavBar.top .container {
max-width: unset;
--at-apply: "max-w-unset";
}

/* hide search in playground page */
.page-playground .VPNavBarSearch {
--at-apply: "hidden";
}

/* set height for playground core */
@media screen and (min-width: 960px) {
.page-playground .page-playground-core {
height: calc(100vh - var(--vp-nav-height));
/* max-width: calc(var(--vp-layout-max-width) - 64px);
margin: 0 auto; */
--at-apply: "h-[calc(100vh-var(--vp-nav-height))]";
}
}

Expand Down
4 changes: 3 additions & 1 deletion docs/uno.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineConfig, presetIcons, presetUno } from 'unocss'
import { defineConfig, presetIcons, presetUno, transformerDirectives } from 'unocss'

export default defineConfig({
transformers: [transformerDirectives()],

presets: [
presetUno(),
presetIcons({
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ export function parseSVG(code: string, options: Options = {}) {
export const name = meta.name
export const VisitorKeys = visitorKeys

export const parse = parseSVG

export { meta }
export { ParseError }
export { parseForESLint }

export type { AST }

export * from './types'
export * from './constants'

0 comments on commit a22d5af

Please sign in to comment.