@sutton-signwriting/sgnw-components
Version:
a javascript package of web components for use with the SignWriting script.
572 lines (409 loc) • 30.9 kB
Markdown
# `src/components/fsw-palette-symbol/fsw-palette-symbol.tsx`:
## class: `FswPaletteSymbol`, `fsw-palette-symbol`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | --------- | ------------- | ------- | ------------------ | -------------- |
| `el` | | `HTMLElement` | | | |
| `draggie` | protected | | | | |
| `symbol` | | `string` | | FSW key for symbol | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| --------------------------- | ------- | ----------- | ------------- | ------ | -------------- |
| `paletteSymbolClickHandler` | | | | | |
| `paletteSymbolDropHandler` | | | `{}, pointer` | | |
| `render` | | | | | |
### Events
| Name | Type | Description | Inherited From |
| -------------------- | ----------------------------------------------------------------- | --------------------------------------- | -------------- |
| `paletteSymbolClick` | `EventEmitter<string>` | click event for the symbol palette | |
| `paletteSymbolDrop` | `EventEmitter<{encoding:string,symbol:string,x:number,y:number}>` | drop event for the signbox and sequence | |
### Attributes
| Name | Field | Inherited From |
| -------- | ------ | -------------- |
| `symbol` | symbol | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | -------------------- | ---------------- | -------------------------------------------------------- | ------- |
| `js` | `FswPaletteSymbol` | FswPaletteSymbol | src/components/fsw-palette-symbol/fsw-palette-symbol.tsx | |
| `custom-element-definition` | `fsw-palette-symbol` | FswPaletteSymbol | src/components/fsw-palette-symbol/fsw-palette-symbol.tsx | |
# `src/components/fsw-button/fsw-button.tsx`:
## class: `FswButton`, `fsw-button`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| -------- | ------- | ------------- | ------- | ------------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `symbol` | | `string` | | FSW key for symbol | |
| `sign` | | `string` | | FSW string for sign | |
| `svg` | | `string` | | SVG icon | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| -------- | ------ | -------------- |
| `symbol` | symbol | |
| `sign` | sign | |
| `svg` | svg | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------ | ----------- | ---------------------------------------- | ------- |
| `js` | `FswButton` | FswButton | src/components/fsw-button/fsw-button.tsx | |
| `custom-element-definition` | `fsw-button` | FswButton | src/components/fsw-button/fsw-button.tsx | |
# `src/components/fsw-sign/fsw-sign.tsx`:
## class: `FswSign`, `fsw-sign`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | ------- | ------------- | ------- | --------------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `sign` | | `string` | | FSW string for sign | |
| `styling` | | `string` | | Style String for sign | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| --------- | ------- | -------------- |
| `sign` | sign | |
| `styling` | styling | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ---------- | ----------- | ------------------------------------ | ------- |
| `js` | `FswSign` | FswSign | src/components/fsw-sign/fsw-sign.tsx | |
| `custom-element-definition` | `fsw-sign` | FswSign | src/components/fsw-sign/fsw-sign.tsx | |
# `src/components/fsw-palette/fsw-palette.tsx`:
## class: `FswPalette`, `fsw-palette`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ------------- | ------- | -------------------------------- | ------------- | --------------------------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `orientation` | | `"horizontal" \| "vertical"` | `"vertical"` | orientation of palette | |
| `major` | | `number` | `10` | | |
| `minor` | | `number` | `3` | | |
| `total` | | `number` | `30` | | |
| `size` | | `"small" \| "medium" \| "large"` | `"small"` | size of palette | |
| `alphabet` | | `object \| string` | `iswa2010FSW` | set of symbols | |
| `group` | | `string` | `null` | top level symbol selection | |
| `base` | | `string` | `null` | mid level symbol selection | |
| `more` | | `boolean` | `false` | flag for small palette | |
| `hasMore` | | `boolean` | `false` | | |
| `lower` | | `boolean` | `false` | flag for small and medium palette | |
| `hasLower` | | `boolean` | `false` | | |
| `palette` | | `string[]` | `[]` | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| --------------------------- | ------- | ----------- | ---------------------------- | ------ | -------------- |
| `parseSizeProp` | | | `newValue: string` | | |
| `watchGroup` | | | | | |
| `watchBase` | | | | | |
| `watchMore` | | | | | |
| `watchLower` | | | | | |
| `getPaletteAll` | | | | | |
| `getPaletteGroup` | | | | | |
| `getPaletteBase` | | | | | |
| `setPalette` | | | | | |
| `paletteSymbolClickHandler` | | | `event: CustomEvent<string>` | | |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| ------------- | ----------- | -------------- |
| `orientation` | orientation | |
| `size` | size | |
| `alphabet` | alphabet | |
| `group` | group | |
| `base` | base | |
| `more` | more | |
| `lower` | lower | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------- | ----------- | ------------------------------------------ | ------- |
| `js` | `FswPalette` | FswPalette | src/components/fsw-palette/fsw-palette.tsx | |
| `custom-element-definition` | `fsw-palette` | FswPalette | src/components/fsw-palette/fsw-palette.tsx | |
# `src/components/fsw-signbox/fsw-signbox.tsx`:
## class: `FswSignbox`, `fsw-signbox`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ---- | ------- | ------------- | ------- | ----------- | -------------- |
| `el` | | `HTMLElement` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------------------------- | ------- | ----------- | ---------------------------- | ------ | -------------- |
| `paletteSymbolDropHandler` | | | `event: CustomEvent<Object>` | | |
| `render` | | | | | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------- | ----------- | ------------------------------------------ | ------- |
| `js` | `FswSignbox` | FswSignbox | src/components/fsw-signbox/fsw-signbox.tsx | |
| `custom-element-definition` | `fsw-signbox` | FswSignbox | src/components/fsw-signbox/fsw-signbox.tsx | |
# `src/components/fsw-spatial/fsw-spatial.tsx`:
## class: `FswSymbol`, `fsw-spatial`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | --------- | ------------- | ------- | ----------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `draggie` | protected | | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------- | ----------- | ------------------------------------------ | ------- |
| `js` | `FswSymbol` | FswSymbol | src/components/fsw-spatial/fsw-spatial.tsx | |
| `custom-element-definition` | `fsw-spatial` | FswSymbol | src/components/fsw-spatial/fsw-spatial.tsx | |
# `src/components/fsw-symbol/fsw-symbol.tsx`:
## class: `FswSymbol`, `fsw-symbol`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | ------- | ------------- | ------- | ----------------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `symbol` | | `string` | | FSW key for symbol | |
| `styling` | | `string` | | Style String for symbol | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| --------- | ------- | -------------- |
| `symbol` | symbol | |
| `styling` | styling | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------ | ----------- | ---------------------------------------- | ------- |
| `js` | `FswSymbol` | FswSymbol | src/components/fsw-symbol/fsw-symbol.tsx | |
| `custom-element-definition` | `fsw-symbol` | FswSymbol | src/components/fsw-symbol/fsw-symbol.tsx | |
# `src/components/fsw-vp/fsw-vp.tsx`:
## class: `FswVp`, `fsw-vp`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ---------- | ------- | ------------- | ------- | ------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `vp` | | `string` | | FSW text | |
| `colorize` | | `boolean` | | Colorize flag | |
| `sgnw` | | `boolean` | | | |
| `items` | | `object[]` | `[]` | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| ----------- | ------- | ----------- | ------------------ | ------ | -------------- |
| `parseText` | | | `newValue: string` | | |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| ---------- | -------- | -------------- |
| `vp` | vp | |
| `colorize` | colorize | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | -------- | ----------- | -------------------------------- | ------- |
| `js` | `FswVp` | FswVp | src/components/fsw-vp/fsw-vp.tsx | |
| `custom-element-definition` | `fsw-vp` | FswVp | src/components/fsw-vp/fsw-vp.tsx | |
# `src/components/sgnw-palette/sgnw-palette.tsx`:
## class: `SgnwPalette`, `sgnw-palette`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ------------- | ------- | -------------------------------- | ------------- | --------------------------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `orientation` | | `"horizontal" \| "vertical"` | `"vertical"` | orientation of palette | |
| `major` | | `number` | `10` | | |
| `minor` | | `number` | `3` | | |
| `total` | | `number` | `30` | | |
| `size` | | `"small" \| "medium" \| "large"` | `"small"` | size of palette | |
| `alphabet` | | `object \| string` | `iswa2010SWU` | set of symbols | |
| `group` | | `string` | `null` | top level symbol selection | |
| `base` | | `string` | `null` | mid level symbol selection | |
| `more` | | `boolean` | `false` | flag for small palette | |
| `hasMore` | | `boolean` | `false` | | |
| `lower` | | `boolean` | `false` | flag for small and medium palette | |
| `hasLower` | | `boolean` | `false` | | |
| `palette` | | `string[]` | `[]` | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| --------------------------- | ------- | ----------- | ---------------------------- | ------ | -------------- |
| `parseSizeProp` | | | `newValue: string` | | |
| `watchGroup` | | | | | |
| `watchBase` | | | | | |
| `watchMore` | | | | | |
| `watchLower` | | | | | |
| `getPaletteAll` | | | | | |
| `getPaletteGroup` | | | | | |
| `getPaletteBase` | | | | | |
| `setPalette` | | | | | |
| `paletteSymbolClickHandler` | | | `event: CustomEvent<string>` | | |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| ------------- | ----------- | -------------- |
| `orientation` | orientation | |
| `size` | size | |
| `alphabet` | alphabet | |
| `group` | group | |
| `base` | base | |
| `more` | more | |
| `lower` | lower | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | -------------- | ----------- | -------------------------------------------- | ------- |
| `js` | `SgnwPalette` | SgnwPalette | src/components/sgnw-palette/sgnw-palette.tsx | |
| `custom-element-definition` | `sgnw-palette` | SgnwPalette | src/components/sgnw-palette/sgnw-palette.tsx | |
# `src/components/sgnw-button/sgnw-button.tsx`:
## class: `SgnwButton`, `sgnw-button`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| -------- | ------- | ------------- | ------- | ------------------------ | -------------- |
| `el` | | `HTMLElement` | | | |
| `symbol` | | `string` | | SWU character for symbol | |
| `sign` | | `string` | | SWU string for sign | |
| `svg` | | `string` | | SVG icon | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| -------- | ------ | -------------- |
| `symbol` | symbol | |
| `sign` | sign | |
| `svg` | svg | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------- | ----------- | ------------------------------------------ | ------- |
| `js` | `SgnwButton` | SgnwButton | src/components/sgnw-button/sgnw-button.tsx | |
| `custom-element-definition` | `sgnw-button` | SgnwButton | src/components/sgnw-button/sgnw-button.tsx | |
# `src/components/sgnw-palette-symbol/sgnw-palette-symbol.tsx`:
## class: `SgnwPaletteSymbol`, `sgnw-palette-symbol`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | --------- | ------------- | ------- | ------------------------ | -------------- |
| `el` | | `HTMLElement` | | | |
| `draggie` | protected | | | | |
| `symbol` | | `string` | | SWU character for symbol | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| --------------------------- | ------- | ----------- | ------------- | ------ | -------------- |
| `paletteSymbolClickHandler` | | | | | |
| `paletteSymbolDropHandler` | | | `{}, pointer` | | |
| `render` | | | | | |
### Events
| Name | Type | Description | Inherited From |
| -------------------- | ----------------------------------------------------------------- | --------------------------------------- | -------------- |
| `paletteSymbolClick` | `EventEmitter<string>` | click event for the symbol palette | |
| `paletteSymbolDrop` | `EventEmitter<{encoding:string,symbol:string,x:number,y:number}>` | drop event for the signbox and sequence | |
### Attributes
| Name | Field | Inherited From |
| -------- | ------ | -------------- |
| `symbol` | symbol | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | --------------------- | ----------------- | ---------------------------------------------------------- | ------- |
| `js` | `SgnwPaletteSymbol` | SgnwPaletteSymbol | src/components/sgnw-palette-symbol/sgnw-palette-symbol.tsx | |
| `custom-element-definition` | `sgnw-palette-symbol` | SgnwPaletteSymbol | src/components/sgnw-palette-symbol/sgnw-palette-symbol.tsx | |
# `src/components/sgnw-sign/sgnw-sign.tsx`:
## class: `SgnwSign`, `sgnw-sign`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | ------- | ------------- | ------- | --------------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `sign` | | `string` | | SWU string for sign | |
| `styling` | | `string` | | Style String for sign | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| --------- | ------- | -------------- |
| `sign` | sign | |
| `styling` | styling | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ----------- | ----------- | -------------------------------------- | ------- |
| `js` | `SgnwSign` | SgnwSign | src/components/sgnw-sign/sgnw-sign.tsx | |
| `custom-element-definition` | `sgnw-sign` | SgnwSign | src/components/sgnw-sign/sgnw-sign.tsx | |
# `src/components/sgnw-symbol/sgnw-symbol.tsx`:
## class: `SgnwSymbol`, `sgnw-symbol`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| --------- | ------- | ------------- | ------- | ------------------------ | -------------- |
| `el` | | `HTMLElement` | | | |
| `symbol` | | `string` | | SWU character for symbol | |
| `styling` | | `string` | | Style String for symbol | |
| `sgnw` | | `boolean` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------- | ------- | ----------- | ---------- | ------ | -------------- |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| --------- | ------- | -------------- |
| `symbol` | symbol | |
| `styling` | styling | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | ------------- | ----------- | ------------------------------------------ | ------- |
| `js` | `SgnwSymbol` | SgnwSymbol | src/components/sgnw-symbol/sgnw-symbol.tsx | |
| `custom-element-definition` | `sgnw-symbol` | SgnwSymbol | src/components/sgnw-symbol/sgnw-symbol.tsx | |
# `src/components/sgnw-signbox/sgnw-signbox.tsx`:
## class: `SgnwSignbox`, `sgnw-signbox`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ---- | ------- | ------------- | ------- | ----------- | -------------- |
| `el` | | `HTMLElement` | | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| -------------------------- | ------- | ----------- | ---------------------------- | ------ | -------------- |
| `paletteSymbolDropHandler` | | | `event: CustomEvent<Object>` | | |
| `render` | | | | | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | -------------- | ----------- | -------------------------------------------- | ------- |
| `js` | `SgnwSignbox` | SgnwSignbox | src/components/sgnw-signbox/sgnw-signbox.tsx | |
| `custom-element-definition` | `sgnw-signbox` | SgnwSignbox | src/components/sgnw-signbox/sgnw-signbox.tsx | |
# `src/components/sgnw-vp/sgnw-vp.tsx`:
## class: `SgnwVp`, `sgnw-vp`
### Fields
| Name | Privacy | Type | Default | Description | Inherited From |
| ---------- | ------- | ------------- | ------- | ------------- | -------------- |
| `el` | | `HTMLElement` | | | |
| `vp` | | `string` | | SWU text | |
| `colorize` | | `boolean` | | Colorize flag | |
| `sgnw` | | `boolean` | | | |
| `items` | | `object[]` | `[]` | | |
### Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
| ----------- | ------- | ----------- | ------------------ | ------ | -------------- |
| `parseText` | | | `newValue: string` | | |
| `render` | | | | | |
### Attributes
| Name | Field | Inherited From |
| ---------- | -------- | -------------- |
| `vp` | vp | |
| `colorize` | colorize | |
<hr/>
## Exports
| Kind | Name | Declaration | Module | Package |
| --------------------------- | --------- | ----------- | ---------------------------------- | ------- |
| `js` | `SgnwVp` | SgnwVp | src/components/sgnw-vp/sgnw-vp.tsx | |
| `custom-element-definition` | `sgnw-vp` | SgnwVp | src/components/sgnw-vp/sgnw-vp.tsx | |