svelte-asciiart 0.0.1 → 0.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.
Files changed (2) hide show
  1. package/README.md +14 -16
  2. package/package.json +15 -3
package/README.md CHANGED
@@ -27,28 +27,26 @@ npm install svelte-asciiart
27
27
 
28
28
  ## Props
29
29
 
30
- | Prop | Type | Default | Description |
31
- | ------------------- | ---------------------------------------------------------------- | -------------------- | ------------------------------------------------ |
32
- | `text` | `string` | required | The ASCII art text to render |
33
- | `rows` | `number` | auto | Number of rows (derived from text if not set) |
34
- | `cols` | `number` | auto | Number of columns (derived from text if not set) |
35
- | `grid` | `boolean` | `false` | Enable grid mode with cell-based layout |
36
- | `cellAspect` | `number` | `0.6` | Width/height ratio of grid cells |
37
- | `measureCellAspect` | `boolean` | `false` | Measure actual font aspect ratio |
38
- | `gridClass` | `string` | `''` | CSS class for grid lines |
39
- | `gridStyle` | `string` | `''` | Inline styles for grid lines |
40
- | `fontFamily` | `string` | `'Courier New', ...` | Font family for text |
41
- | `frame` | `boolean` | `false` | Show frame around content (grid mode only) |
42
- | `frameMargin` | `number \| [number, number] \| [number, number, number, number]` | `0` | Margin around frame in grid cells |
43
- | `frameClass` | `string` | `''` | CSS class for frame |
44
- | `frameStyle` | `string` | `''` | Inline styles for frame |
30
+ | Prop | Type | Default | Description |
31
+ | ------------ | ---------------------------------------------------------------- | -------- | ------------------------------------------------------------- |
32
+ | `text` | `string` | required | The ASCII art text to render |
33
+ | `rows` | `number` | auto | Frame rows (content can overflow into the margin) |
34
+ | `cols` | `number` | auto | Frame columns (content can overflow into the margin) |
35
+ | `grid` | `boolean` | `false` | Draw grid lines for the full viewBox (frame + margin) |
36
+ | `cellAspect` | `number` | `0.6` | Character cell width/height ratio |
37
+ | `gridClass` | `string` | `''` | CSS class for the grid lines `<path>` |
38
+ | `frame` | `boolean` | `false` | Draw a frame `<rect>` around the frame area |
39
+ | `margin` | `number \| [number, number] \| [number, number, number, number]` | `0` | Margin around the frame in grid cells (top/right/bottom/left) |
40
+ | `frameClass` | `string` | `''` | CSS class for the frame `<rect>` |
41
+ | `svg` | `SVGSVGElement \| null` | bindable | Optionally bind the underlying `<svg>` element |
42
+ | `...rest` | `SVGAttributes<SVGSVGElement>` | - | All other SVG attributes are forwarded to the `<svg>` element |
45
43
 
46
44
  ## Grid Mode
47
45
 
48
46
  Grid mode renders text character-by-character in a precise grid, useful for ASCII art that needs exact alignment:
49
47
 
50
48
  ```svelte
51
- <AsciiArt {text} grid frame frameMargin={[1, 2]} gridClass="ascii-grid" frameClass="ascii-frame" />
49
+ <AsciiArt {text} grid frame margin={[1, 2]} gridClass="ascii-grid" frameClass="ascii-frame" />
52
50
 
53
51
  <style>
54
52
  .ascii-grid {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-asciiart",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -53,6 +53,18 @@
53
53
  "vitest-browser-svelte": "^2.0.1"
54
54
  },
55
55
  "keywords": [
56
- "svelte"
57
- ]
56
+ "svelte",
57
+ "ascii",
58
+ "art",
59
+ "ascii-art"
60
+ ],
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "git+https://github.com/xl0/svelte-asciiart.git",
64
+ "directory": "packages/svelte-asciiart"
65
+ },
66
+ "bugs": {
67
+ "url": "https://github.com/xl0/svelte-asciiart/issues"
68
+ },
69
+ "homepage": "https://github.com/xl0/svelte-asciiart#readme"
58
70
  }