@tlenexkoyotl/xamix-element 1.0.2 → 2.0.1
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 +268 -29
- package/dist/types.d.ts +50 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/xamix-element-styles.d.ts +3 -0
- package/dist/xamix-element-styles.d.ts.map +1 -0
- package/dist/xamix-element.d.ts +60 -0
- package/dist/xamix-element.d.ts.map +1 -0
- package/dist/xamix-element.js +343 -243
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -2,38 +2,217 @@
|
|
|
2
2
|
# <xamix-element>
|
|
3
3
|
|
|
4
4
|

|
|
5
|
+

|
|
6
|
+

|
|
5
7
|
|
|
6
|
-
> A Lit Web Component
|
|
8
|
+
> A Lit Web Component for rendering the Xamix writing system in web applications
|
|
9
|
+
|
|
10
|
+
## About Xamix
|
|
11
|
+
|
|
12
|
+
**Xamix** is a modern syllabic writing system developed starting in 2019 for writing Nahuatl. Unlike traditional Latin-based orthographies, Xamix uses a unique glyph for each syllable, providing a visually distinct as well as phonetically and grammatically accurate representation of the language.
|
|
13
|
+
|
|
14
|
+
### Key Features of Xamix
|
|
15
|
+
|
|
16
|
+
- **7,770+ unique syllable glyphs** - Each syllable has its own distinct character
|
|
17
|
+
- **Syllabic structure** - Represents complete syllables (CV, CCV, CVV, etc.)
|
|
18
|
+
- **Dual rendering modes** - Supports both horizontal (right-to-left) and vertical (top-to-bottom) text layouts
|
|
19
|
+
- **Visual distinctiveness** - Designed to be visually distinct from Latin characters
|
|
20
|
+
- **Phonetic accuracy** - Accurately represents syllable boundaries and phonetic distinctions
|
|
21
|
+
|
|
22
|
+
## About This Component
|
|
23
|
+
|
|
24
|
+
`xamix-element` is a production-ready Lit Web Component that renders Xamix text by dynamically loading and displaying SVG syllable glyphs. It's designed for use in web applications, educational software, digital publications, and language learning resources.
|
|
25
|
+
|
|
26
|
+
### Component Features
|
|
27
|
+
|
|
28
|
+
- ✅ **Dynamic SVG loading** - Efficiently fetches and caches SVG syllable glyphs
|
|
29
|
+
- ✅ **Horizontal and vertical layouts** - Supports both text directions
|
|
30
|
+
- ✅ **Customizable styling** - CSS variables for colors, spacing, and layout
|
|
31
|
+
- ✅ **Link support** - Convert specific words into clickable links
|
|
32
|
+
- ✅ **Responsive sizing** - Flexible font size and unit system (vw, vh, em, etc.)
|
|
33
|
+
- ✅ **Bold variant** - Supports both regular and bold glyph styles
|
|
34
|
+
- ✅ **TypeScript** - Fully typed with TypeScript definitions
|
|
35
|
+
- ✅ **Well tested** - Comprehensive test suite with Vitest
|
|
36
|
+
- ✅ **Performance optimized** - SVG caching, batch fetching, and abort controllers
|
|
7
37
|
|
|
8
38
|
## Prerequisites
|
|
9
39
|
|
|
10
40
|
- **Node.js**: 20.19+ or 22.12+ (latest LTS recommended)
|
|
11
41
|
- **npm**: Latest version (update with `npm install -g npm@latest`)
|
|
12
42
|
|
|
13
|
-
##
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
### As a Package Dependency
|
|
14
46
|
|
|
15
47
|
```bash
|
|
16
48
|
npm install @tlenexkoyotl/xamix-element
|
|
17
49
|
```
|
|
18
50
|
|
|
19
|
-
For
|
|
51
|
+
### For Development
|
|
20
52
|
|
|
21
53
|
```bash
|
|
54
|
+
git clone https://gitlab.com/tlenexkoyotl/xamix-element.git
|
|
55
|
+
cd xamix-element
|
|
22
56
|
npm install
|
|
23
57
|
```
|
|
24
58
|
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### Basic Example
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<!DOCTYPE html>
|
|
65
|
+
<html>
|
|
66
|
+
<head>
|
|
67
|
+
<script type="module">
|
|
68
|
+
import '@tlenexkoyotl/xamix-element';
|
|
69
|
+
</script>
|
|
70
|
+
</head>
|
|
71
|
+
<body>
|
|
72
|
+
<xamix-element
|
|
73
|
+
text-input="ma-lin-zin _ i-tla'-tol"
|
|
74
|
+
root="node_modules/@tlenexkoyotl/xamix-element"
|
|
75
|
+
font-size="3.5">
|
|
76
|
+
</xamix-element>
|
|
77
|
+
</body>
|
|
78
|
+
</html>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Vertical Text Layout
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<xamix-element
|
|
85
|
+
text-input="i-ka _ i-nin _ a-mox-tli _ tik-pe-wal-ti-a'"
|
|
86
|
+
root="node_modules/@tlenexkoyotl/xamix-element"
|
|
87
|
+
vertical
|
|
88
|
+
font-size="2">
|
|
89
|
+
</xamix-element>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### With Links
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<xamix-element
|
|
96
|
+
text-input="ma-lin-zin _ i-tla'-tol"
|
|
97
|
+
root="node_modules/@tlenexkoyotl/xamix-element"
|
|
98
|
+
links='[{"wordsIndexes": [0, 1], "href": "https://example.com"}]'>
|
|
99
|
+
</xamix-element>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Styling with CSS Variables
|
|
103
|
+
|
|
104
|
+
```html
|
|
105
|
+
<style>
|
|
106
|
+
xamix-element {
|
|
107
|
+
--xamix-text-color: #333;
|
|
108
|
+
--xamix-link-color: #0066cc;
|
|
109
|
+
--xamix-vertical-writing-mode: vertical-rl;
|
|
110
|
+
}
|
|
111
|
+
</style>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Component Attributes
|
|
115
|
+
|
|
116
|
+
| Attribute | Type | Default | Description |
|
|
117
|
+
|-----------|------|---------|-------------|
|
|
118
|
+
| `text-input` | string | `''` | Syllable-based text input (hyphen-separated syllables, space-separated words) |
|
|
119
|
+
| `root` | string | `'.'` | Path to the package directory containing the `data/` folder |
|
|
120
|
+
| `font-size` | number | `3` | Font size in the specified unit |
|
|
121
|
+
| `unit` | string | `'vw'` | CSS unit for sizing (`vw`, `vh`, `em`, `px`, etc.) |
|
|
122
|
+
| `vertical` | boolean | `false` | Enable vertical text layout (top-to-bottom) |
|
|
123
|
+
| `bold` | boolean | `false` | Use bold variant glyphs |
|
|
124
|
+
| `adaptable` | boolean | `false` | Automatically switch between `vw` and `vh` based on aspect ratio |
|
|
125
|
+
| `links` | string | `''` | JSON array of link configurations (see below) |
|
|
126
|
+
|
|
127
|
+
### Link Configuration
|
|
128
|
+
|
|
129
|
+
The `links` attribute accepts a JSON array of link objects:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
[
|
|
133
|
+
{
|
|
134
|
+
"wordsIndexes": [0, 1, 2],
|
|
135
|
+
"href": "https://example.com"
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- `wordsIndexes`: Array of word indices (0-based) to convert into links
|
|
141
|
+
- `href`: URL for the link
|
|
142
|
+
|
|
143
|
+
## CSS Custom Properties
|
|
144
|
+
|
|
145
|
+
The component supports extensive CSS customization via CSS variables:
|
|
146
|
+
|
|
147
|
+
### Text Styling
|
|
148
|
+
- `--xamix-text-color`: Text color (default: `currentColor`)
|
|
149
|
+
- `--xamix-text-stroke`: Stroke color (default: `transparent`)
|
|
150
|
+
- `--xamix-text-stroke-width`: Stroke width (default: `0`)
|
|
151
|
+
- `--xamix-text-background-color`: Background color for text container
|
|
152
|
+
- `--xamix-text-align`: Text alignment (default: `justify`)
|
|
153
|
+
- `--xamix-text-line-height`: Line height (default: `0`)
|
|
154
|
+
|
|
155
|
+
### Link Styling
|
|
156
|
+
- `--xamix-link-color`: Default link color
|
|
157
|
+
- `--xamix-link-unvisited-color`: Unvisited link color
|
|
158
|
+
- `--xamix-link-visited-color`: Visited link color
|
|
159
|
+
- `--xamix-link-hover-color`: Hover state color
|
|
160
|
+
- `--xamix-link-active-color`: Active state color
|
|
161
|
+
- `--xamix-link-focused-color`: Focus state color
|
|
162
|
+
|
|
163
|
+
### Layout
|
|
164
|
+
- `--xamix-horizontal-direction`: Horizontal text direction (default: `rtl`)
|
|
165
|
+
- `--xamix-vertical-direction`: Vertical text direction (default: `ltr`)
|
|
166
|
+
- `--xamix-vertical-writing-mode`: Vertical writing mode (default: `vertical-rl`)
|
|
167
|
+
- `--xamix-columns-direction`: Column direction (default: `ltr`)
|
|
168
|
+
- `--xamix-word-display`: Word display type (default: `inline-block`)
|
|
169
|
+
- `--xamix-syllable-display`: Syllable display type (default: `inline-block`)
|
|
170
|
+
|
|
171
|
+
### Spacing
|
|
172
|
+
- `--xamix-vertical-syllable-spacing`: Spacing between syllables in vertical mode (default: `-0.15em`)
|
|
173
|
+
|
|
174
|
+
## Text Input Format
|
|
175
|
+
|
|
176
|
+
The component uses a syllable-based input format:
|
|
177
|
+
|
|
178
|
+
- **Syllables** are separated by hyphens: `ma-lin-zin`
|
|
179
|
+
- **Words** are separated by spaces: `ma-lin-zin _ i-tla'-tol`
|
|
180
|
+
- **Special markers** use underscores: `tlamilistli`, `zikoalistli1`, `nimanilistli`
|
|
181
|
+
|
|
182
|
+
### Examples
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
ma-lin-zin _ i-tla'-tol
|
|
186
|
+
→ "Malinzin's words"
|
|
187
|
+
|
|
188
|
+
re-fukh-yo _ na-va _ na-va
|
|
189
|
+
→ "Refugio Nava Nava"
|
|
190
|
+
|
|
191
|
+
i-ka _ i-nin _ a-mox-tli _ tik-pe-wal-ti-a'
|
|
192
|
+
→ "And in this book we present"
|
|
193
|
+
```
|
|
194
|
+
|
|
25
195
|
## Development
|
|
26
196
|
|
|
197
|
+
### Development Server
|
|
198
|
+
|
|
27
199
|
```bash
|
|
28
|
-
# Start development server
|
|
29
200
|
npm run dev
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Starts a development server with hot module replacement. Demo pages are available in the `demo/` directory.
|
|
30
204
|
|
|
31
|
-
|
|
205
|
+
### Building
|
|
206
|
+
|
|
207
|
+
```bash
|
|
32
208
|
npm run build
|
|
209
|
+
```
|
|
33
210
|
|
|
34
|
-
|
|
35
|
-
|
|
211
|
+
Builds the component for production and generates TypeScript declaration files.
|
|
212
|
+
|
|
213
|
+
### Testing
|
|
36
214
|
|
|
215
|
+
```bash
|
|
37
216
|
# Run tests
|
|
38
217
|
npm test
|
|
39
218
|
|
|
@@ -41,41 +220,101 @@ npm test
|
|
|
41
220
|
npm run test:ui
|
|
42
221
|
```
|
|
43
222
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```html
|
|
47
|
-
<script type="module">
|
|
48
|
-
import '@tlenexkoyotl/xamix-element';
|
|
49
|
-
</script>
|
|
223
|
+
### Preview Production Build
|
|
50
224
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
root="node_modules/@tlenexkoyotl/xamix-element"
|
|
54
|
-
vertical
|
|
55
|
-
font-size="3.5">
|
|
56
|
-
</xamix-element>
|
|
225
|
+
```bash
|
|
226
|
+
npm run preview
|
|
57
227
|
```
|
|
58
228
|
|
|
59
|
-
Set `root` to the path where the package is installed (e.g. `node_modules/@tlenexkoyotl/xamix-element`) so the component can load SVG data from the `data/` folder.
|
|
60
|
-
|
|
61
229
|
## Project Structure
|
|
62
230
|
|
|
63
231
|
```
|
|
64
232
|
xamix-element/
|
|
65
233
|
├── src/
|
|
66
|
-
│ ├── xamix-element.ts
|
|
67
|
-
│
|
|
68
|
-
|
|
69
|
-
├──
|
|
70
|
-
├──
|
|
71
|
-
|
|
72
|
-
|
|
234
|
+
│ ├── xamix-element.ts # Main component implementation
|
|
235
|
+
│ ├── xamix-element-styles.ts # Component styles
|
|
236
|
+
│ └── types.ts # TypeScript type definitions
|
|
237
|
+
├── data/
|
|
238
|
+
│ ├── regular/ # Regular variant SVG glyphs (7,770+ files)
|
|
239
|
+
│ └── bold/ # Bold variant SVG glyphs
|
|
240
|
+
├── demo/ # Demo pages
|
|
241
|
+
│ ├── index.html # Main demo
|
|
242
|
+
│ ├── index2.html # Numbers demo
|
|
243
|
+
│ ├── index3.html # Vertical layout demo
|
|
244
|
+
│ └── index4.html # Horizontal layout demo
|
|
245
|
+
├── test/ # Test files
|
|
246
|
+
│ └── xamix-element.spec.ts # Component tests
|
|
247
|
+
├── scripts/ # Utility scripts
|
|
248
|
+
│ ├── generate-unicode-mapping.ts
|
|
249
|
+
│ ├── generate-proposal-materials.ts
|
|
250
|
+
│ └── ...
|
|
251
|
+
├── proposal/ # Unicode proposal materials
|
|
252
|
+
├── dist/ # Build output
|
|
253
|
+
└── vite.config.ts # Vite configuration
|
|
73
254
|
```
|
|
74
255
|
|
|
256
|
+
## Technical Details
|
|
257
|
+
|
|
258
|
+
### Architecture
|
|
259
|
+
|
|
260
|
+
- **Framework**: Lit 3.2.0 (Web Components)
|
|
261
|
+
- **Language**: TypeScript 5.7
|
|
262
|
+
- **Build Tool**: Vite 6.0
|
|
263
|
+
- **Testing**: Vitest 2.1
|
|
264
|
+
|
|
265
|
+
### Performance Features
|
|
266
|
+
|
|
267
|
+
- **SVG Caching**: Static cache with size limit (1000 entries) to avoid redundant fetches
|
|
268
|
+
- **Batch Fetching**: Fetches SVGs in batches of 5 with 50ms delays
|
|
269
|
+
- **Abort Controllers**: Cancels ongoing fetches when text changes to prevent race conditions
|
|
270
|
+
- **Lazy Loading**: Only loads SVGs for syllables actually used in the text
|
|
271
|
+
|
|
272
|
+
### Browser Support
|
|
273
|
+
|
|
274
|
+
Works in all modern browsers that support:
|
|
275
|
+
- Web Components (Custom Elements v1)
|
|
276
|
+
- ES Modules
|
|
277
|
+
- Fetch API
|
|
278
|
+
- SVG rendering
|
|
279
|
+
|
|
280
|
+
## Unicode Proposal
|
|
281
|
+
|
|
282
|
+
This project is part of an ongoing effort to encode the Xamix writing system in Unicode. Materials for the Unicode proposal are available in the `proposal/` directory.
|
|
283
|
+
|
|
284
|
+
For more information about the Unicode proposal process, see:
|
|
285
|
+
- `proposal/README.md` - Proposal overview
|
|
286
|
+
- `proposal/PROPOSAL-TIMELINE.md` - Timeline and process
|
|
287
|
+
- `scripts/UNICODE-PROPOSAL-PROCESS.md` - Detailed process information
|
|
288
|
+
|
|
75
289
|
## Contributing
|
|
76
290
|
|
|
77
|
-
|
|
291
|
+
Contributions are welcome! Please feel free to submit pull requests or open issues.
|
|
292
|
+
|
|
293
|
+
### Areas for Contribution
|
|
294
|
+
|
|
295
|
+
- Additional demo examples
|
|
296
|
+
- Performance optimizations
|
|
297
|
+
- Documentation improvements
|
|
298
|
+
- Test coverage expansion
|
|
299
|
+
- Accessibility enhancements
|
|
78
300
|
|
|
79
301
|
## License
|
|
80
302
|
|
|
81
303
|
MIT
|
|
304
|
+
|
|
305
|
+
## Repository
|
|
306
|
+
|
|
307
|
+
- **GitLab**: https://gitlab.com/tlenexkoyotl/xamix-element
|
|
308
|
+
- **npm**: https://www.npmjs.com/package/@tlenexkoyotl/xamix-element
|
|
309
|
+
|
|
310
|
+
## Related Resources
|
|
311
|
+
|
|
312
|
+
- [Xamix Writing System Documentation](./proposal/documentation/writing-system-description.md)
|
|
313
|
+
- [Technical Specifications](./proposal/documentation/technical-specifications.md)
|
|
314
|
+
- [Unicode Proposal Draft](./proposal/proposal-draft.md)
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
**Version**: 2.0.0
|
|
319
|
+
**Author**: Tlenexkoyotl
|
|
320
|
+
**Status**: Production-ready, actively maintained
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for xamix-element
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Processing stage of the component
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ProcessingStage {
|
|
8
|
+
ON_CONSTRUCT = "on-construct",
|
|
9
|
+
WORDS_LOADING = "words-loading",
|
|
10
|
+
WORDS_LOADED = "words-loaded",
|
|
11
|
+
WORDS_RESIZING = "words-resizing",
|
|
12
|
+
WORDS_RESIZED = "words-resized"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* CSS unit types
|
|
16
|
+
*/
|
|
17
|
+
export type CSSUnit = 'vw' | 'vh' | 'px' | 'em' | 'rem';
|
|
18
|
+
/**
|
|
19
|
+
* Link configuration for word linking
|
|
20
|
+
*/
|
|
21
|
+
export interface Link {
|
|
22
|
+
readonly wordsIndexes: readonly number[];
|
|
23
|
+
readonly href: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Parsed word with components and output
|
|
27
|
+
*/
|
|
28
|
+
export interface ParsedWord {
|
|
29
|
+
readonly word: string;
|
|
30
|
+
readonly components: readonly string[];
|
|
31
|
+
textOutput?: (HTMLElement | SVGElement)[];
|
|
32
|
+
content?: HTMLElement | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Unique character/syllable with optional file content
|
|
36
|
+
*/
|
|
37
|
+
export interface UniqueCharacter {
|
|
38
|
+
readonly name: string;
|
|
39
|
+
file?: Promise<string> | string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Bounding box from SVG getBBox()
|
|
43
|
+
*/
|
|
44
|
+
export interface SVGBoundingBox {
|
|
45
|
+
readonly x: number;
|
|
46
|
+
readonly y: number;
|
|
47
|
+
readonly width: number;
|
|
48
|
+
readonly height: number;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,oBAAY,eAAe;IACzB,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,WAAW,GAAG,UAAU,CAAC,EAAE,CAAC;IAC1C,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xamix-element-styles.d.ts","sourceRoot":"","sources":["../src/xamix-element-styles.ts"],"names":[],"mappings":";AAEA,wBAuGE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import type { Link, ParsedWord, UniqueCharacter, CSSUnit } from './types.js';
|
|
3
|
+
import { ProcessingStage } from './types.js';
|
|
4
|
+
export declare class XamixElement extends LitElement {
|
|
5
|
+
fontSize: number;
|
|
6
|
+
root: string;
|
|
7
|
+
vertical: boolean;
|
|
8
|
+
adaptable: boolean;
|
|
9
|
+
bold: boolean;
|
|
10
|
+
unit: CSSUnit;
|
|
11
|
+
textInput: string;
|
|
12
|
+
parsedText: ParsedWord[];
|
|
13
|
+
textOutput: (HTMLElement | SVGElement)[];
|
|
14
|
+
links: Link[];
|
|
15
|
+
stage: ProcessingStage;
|
|
16
|
+
private static readonly svgCache;
|
|
17
|
+
private static readonly MAX_CACHE_SIZE;
|
|
18
|
+
private uniqueCharacters;
|
|
19
|
+
private lastProcessedTextInput;
|
|
20
|
+
private abortController;
|
|
21
|
+
constructor();
|
|
22
|
+
private setViewBox;
|
|
23
|
+
private formViewbox;
|
|
24
|
+
private formHorizontalViewbox;
|
|
25
|
+
private formVerticalViewbox;
|
|
26
|
+
private getAspectRatio;
|
|
27
|
+
private getUnit;
|
|
28
|
+
private horizontalResize;
|
|
29
|
+
private verticalResize;
|
|
30
|
+
private resizeSvg;
|
|
31
|
+
private appendSvg;
|
|
32
|
+
private fetchSvg;
|
|
33
|
+
private parseText;
|
|
34
|
+
private setUniqueCharactersContent;
|
|
35
|
+
private fetchSyllables;
|
|
36
|
+
private useWordAsLink;
|
|
37
|
+
private setWordContent;
|
|
38
|
+
private formWordOutput;
|
|
39
|
+
private finishTextOutput;
|
|
40
|
+
private formTextOutput;
|
|
41
|
+
private convertInput;
|
|
42
|
+
private dispatchStageEvent;
|
|
43
|
+
private dispatchCurrentStage;
|
|
44
|
+
private resizeSvgs;
|
|
45
|
+
static styles: import("lit").CSSResult;
|
|
46
|
+
firstUpdated(changedProperties: PropertyValues): void;
|
|
47
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
48
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
49
|
+
private insertTextOutput;
|
|
50
|
+
updated(changedProperties: PropertyValues): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
}
|
|
53
|
+
export type { Link, ParsedWord, UniqueCharacter, CSSUnit };
|
|
54
|
+
export { ProcessingStage };
|
|
55
|
+
declare global {
|
|
56
|
+
interface HTMLElementTagNameMap {
|
|
57
|
+
'xamix-element': XamixElement;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=xamix-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xamix-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