lone-format 0.1.5 → 0.2.0
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/README.md +78 -1
- package/dist/lone-format.css +1 -1
- package/dist/lone-format.js +516 -505
- package/dist/lone-format.umd.cjs +3 -3
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,2 +1,79 @@
|
|
|
1
1
|
# lone-format
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
A Vue 3 component library for formatting with tree-shaking support.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **Multiple Themes**: GitHub Light, GitHub Dark, Min Light, Slack Ochin
|
|
8
|
+
- 🚀 **Performance Optimized**: Shallow copy strategy for better performance
|
|
9
|
+
- 📦 **Tree Shaking**: Import only what you need
|
|
10
|
+
- 🔧 **TypeScript**: Full TypeScript support with type definitions
|
|
11
|
+
- 📖 **VitePress Documentation**: Comprehensive documentation with examples
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install lone-format
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```vue
|
|
22
|
+
<template>
|
|
23
|
+
<JsonFormat
|
|
24
|
+
v-model="jsonData"
|
|
25
|
+
:readonly="false"
|
|
26
|
+
/>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { ref } from 'vue'
|
|
31
|
+
import { JsonFormat } from 'lone-format'
|
|
32
|
+
|
|
33
|
+
const jsonData = ref('{"hello": "world"}')
|
|
34
|
+
</script>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
Visit our [documentation site](https://lonisletend.github.io/lone-format/) for detailed guides and examples.
|
|
40
|
+
|
|
41
|
+
## Automated Publishing
|
|
42
|
+
|
|
43
|
+
This project uses an automated CI/CD pipeline that:
|
|
44
|
+
|
|
45
|
+
- 🔄 **Auto-versioning**: Bumps version based on commit messages
|
|
46
|
+
- 📦 **Auto-publishing**: Publishes to npm when code is pushed to `publish` branch
|
|
47
|
+
- 🔀 **Auto-merging**: Merges `publish` branch to `main` after successful publish
|
|
48
|
+
|
|
49
|
+
### Usage
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Create feature on publish branch
|
|
53
|
+
git checkout -b publish
|
|
54
|
+
git add .
|
|
55
|
+
git commit -m "feat: add new feature" # Will bump minor version
|
|
56
|
+
git push origin publish # Triggers auto-publish
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
See [PIPELINE.md](./PIPELINE.md) for detailed setup instructions.
|
|
60
|
+
|
|
61
|
+
## Development
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Install dependencies
|
|
65
|
+
npm install
|
|
66
|
+
|
|
67
|
+
# Start development server
|
|
68
|
+
npm run dev
|
|
69
|
+
|
|
70
|
+
# Build library
|
|
71
|
+
npm run build:lib
|
|
72
|
+
|
|
73
|
+
# Build documentation
|
|
74
|
+
npm run docs:build
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
MIT
|
package/dist/lone-format.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.json-node[data-v-
|
|
1
|
+
.json-node[data-v-f3f3cbc9]{position:relative}.json-node__line[data-v-f3f3cbc9],.json-node__primitive[data-v-f3f3cbc9]{display:flex;align-items:flex-start;margin-left:calc(var(--41b58a02) * 20px);line-height:1.5;min-height:20px}.json-node__key[data-v-f3f3cbc9]{color:var(--63accfe8);cursor:pointer;font-weight:500;padding:1px 3px;border-radius:3px;-webkit-user-select:text;user-select:text}.json-node__key[data-v-f3f3cbc9]:hover{background-color:var(--7a4b22f6)}.json-node__colon[data-v-f3f3cbc9]{color:var(--5865f1b1);margin:0 4px}.json-node__bracket[data-v-f3f3cbc9]{color:var(--5865f1b1);font-weight:500;margin:0 2px}.json-node__bracket--clickable[data-v-f3f3cbc9]{cursor:pointer;padding:1px 3px;border-radius:3px}.json-node__bracket--clickable[data-v-f3f3cbc9]:hover{background-color:var(--7a4b22f6)}.json-node__comma[data-v-f3f3cbc9]{color:var(--5865f1b1);margin-left:2px}.json-node__collapsed[data-v-f3f3cbc9]{color:var(--79c93d33);font-style:italic;margin:0 4px}.json-node__value[data-v-f3f3cbc9]{cursor:pointer;padding:1px 3px;border-radius:3px;-webkit-user-select:text;user-select:text;word-break:normal;overflow-wrap:break-word;white-space:pre-wrap;max-width:100%;display:inline-block;text-align:left}.json-node__value[data-v-f3f3cbc9]:hover{background-color:var(--7a4b22f6)}.json-node__value--string[data-v-f3f3cbc9]{color:var(--59ced5e8)}.json-node__value--number[data-v-f3f3cbc9]{color:var(--51525120)}.json-node__value--boolean[data-v-f3f3cbc9]{color:var(--5410b131);font-weight:600}.json-node__value--null[data-v-f3f3cbc9]{color:var(--11eec51e);font-style:italic}.json-node__key-input[data-v-f3f3cbc9],.json-node__value-input[data-v-f3f3cbc9]{border:1px solid var(--51525120);border-radius:3px;padding:1px 3px;font-family:inherit;font-size:inherit;color:inherit;background:var(--ac53437c);outline:none}.json-node__key-input[data-v-f3f3cbc9]{color:var(--63accfe8)}.json-node__children-content[data-v-f3f3cbc9]:before{content:"";position:absolute;left:calc(var(--41b58a02) * 20px);top:0;bottom:0;width:1px;background:var(--15cbe7d4);opacity:.5;pointer-events:none}.json-node__children[data-v-f3f3cbc9],.json-node__children-content[data-v-f3f3cbc9]{position:relative}@media (max-width: 768px){.json-node__line[data-v-f3f3cbc9],.json-node__primitive[data-v-f3f3cbc9]{margin-left:calc(var(--41b58a02) * 12px)}}.json-format[data-v-c6bbb1e1]{border:1px solid var(--dd679ea0);border-radius:6px;background:var(--0543a09c);font-family:Monaco,Consolas,Lucida Console,Courier New,ui-monospace,SFMono-Regular,SF Mono,Liberation Mono,Menlo,monospace;font-size:14px;line-height:1.45;color:var(--630352b1)}.json-format__toolbar[data-v-c6bbb1e1]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--be141a92);border-bottom:1px solid var(--dd679ea0);border-radius:6px 6px 0 0}.json-format__actions[data-v-c6bbb1e1]{display:flex;gap:8px}.json-format__btn[data-v-c6bbb1e1]{padding:4px 8px;border:1px solid var(--4e0b2382);border-radius:6px;background:var(--ee392cf8);color:var(--6224d203);font-size:12px;cursor:pointer;transition:all .2s ease}.json-format__btn[data-v-c6bbb1e1]:hover:not(:disabled){background:var(--c17e7bd0);border-color:var(--4e0b2382)}.json-format__btn[data-v-c6bbb1e1]:disabled{opacity:.5;cursor:not-allowed}.json-format__btn--primary[data-v-c6bbb1e1]{background:var(--5c94496c);color:#fff;border-color:var(--5c94496c)}.json-format__btn--primary[data-v-c6bbb1e1]:hover:not(:disabled){background:var(--a3b0d9a0)}.json-format__btn--secondary[data-v-c6bbb1e1]{background:var(--0543a09c);border-color:var(--dd679ea0)}.json-format__info[data-v-c6bbb1e1]{display:flex;align-items:center}.json-format__status[data-v-c6bbb1e1]{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.json-format__status--success[data-v-c6bbb1e1]{background:var(--1129928d);color:var(--24ed13ff)}.json-format__status--error[data-v-c6bbb1e1]{background:var(--5bef9d5c);color:var(--06cd15f8)}.json-format__content[data-v-c6bbb1e1]{padding:8px 16px;overflow:auto}.json-format__error[data-v-c6bbb1e1]{color:var(--06cd15f8);background:var(--5bef9d5c);border:1px solid var(--06cd15f8) + "66";border-radius:6px;padding:8px 16px}.json-format__error h4[data-v-c6bbb1e1]{margin:0 0 8px;font-size:14px;font-weight:600}.json-format__error pre[data-v-c6bbb1e1]{margin:0;font-size:12px;white-space:pre-wrap;word-break:break-word}.json-format__viewer[data-v-c6bbb1e1]{color:var(--630352b1)}.json-format__content[data-v-c6bbb1e1]::-webkit-scrollbar{width:4px;height:4px}.json-format__content[data-v-c6bbb1e1]::-webkit-scrollbar-track{background:var(--4bc6db49)}.json-format__content[data-v-c6bbb1e1]::-webkit-scrollbar-thumb{background:var(--4bc29bd4);border-radius:2px}.json-format__content[data-v-c6bbb1e1]::-webkit-scrollbar-thumb:hover{background:var(--aad6fc70)}
|