Aller au contenu

index

Ce contenu n’est pas encore disponible dans votre langue.

This package provides a set of frequently used utilities, types and svelte actions for building projects with Typescript and Svelte.

It is part of the Selenite initiative.

Be careful that some of the functions use WASM code from an associated package : selenite-commons-rs. Therefore, if you use tools like Vite or Rollup, you need to add a plugin to the configuration.

An example of such a plugin is : https://github.com/nshen/vite-plugin-wasm-pack. It is used like this :

vite.config.ts
import wasmPack from 'vite-plugin-wasm-pack'
export default defineConfig({
plugins: [
wasmPack([], ['@selenite/commons-rs']),
...

References

Action

Renames and re-exports actions

ActionReturn

Re-exports ActionReturn

affineFromPoints

Re-exports affineFromPoints

animationFrame

Re-exports animationFrame

Array

Renames and re-exports utils/array

ArrayKeys

Re-exports ArrayKeys

Attribute

Re-exports Attribute

autofocus

Re-exports autofocus

autosize

Re-exports autosize

BaseModalSettings

Re-exports BaseModalSettings

boxSelection

Re-exports boxSelection

BoxSelectionParams

Re-exports BoxSelectionParams

browser

Re-exports browser

Browser

Renames and re-exports DefaultItem

buildXml

Re-exports buildXml

Button

Renames and re-exports DefaultItem

camlelcaseize

Re-exports camlelcaseize

Canvas

Renames and re-exports canvas

capitalize

Re-exports capitalize

capitalizeWords

Re-exports capitalizeWords

checkbox

Re-exports checkbox

ChildProps

Re-exports ChildProps

Click

Renames and re-exports click

ClickDragOptions

Re-exports ClickDragOptions

clickIfDrag

Re-exports clickIfDrag

clickIfNoDrag

Re-exports clickIfNoDrag

ComplexType

Re-exports ComplexType

ComponentModalSettings

Re-exports ComponentModalSettings

Components

Renames and re-exports components

contextMenu

Re-exports contextMenu

ContextMenu

Renames and re-exports DefaultItem

ContextMenuState

Re-exports ContextMenuState

DataStructure

Renames and re-exports datastructure

distance

Re-exports distance

documentListener

Re-exports documentListener

DocumentParams

Re-exports DocumentParams

download

Re-exports download

downloadJSON

Re-exports downloadJSON

Drag

Renames and re-exports drag

DragAxis

Re-exports DragAxis

DragBounds

Re-exports DragBounds

DragBoundsCoords

Re-exports DragBoundsCoords

DragEventData

Re-exports DragEventData

draggable

Re-exports draggable

draggableItem

Re-exports draggableItem

DragItemOptions

Re-exports DragItemOptions

DragOptions

Re-exports DragOptions

EventModifier

Renames and re-exports utils/eventModifier

Filter

Re-exports Filter

FilterDefinition

Re-exports FilterDefinition

filterItems

Re-exports filterItems

findPossibleMergePositions

Re-exports findPossibleMergePositions

flattenTree

Re-exports flattenTree

focusTrap

Re-exports focusTrap

FocusTrap

Renames and re-exports focusTrap

formatComment

Re-exports formatComment

Formatter

Renames and re-exports DefaultItem

formatXml

Re-exports formatXml

formatXMLArray

Re-exports formatXMLArray

getActiveFilters

Re-exports getActiveFilters

getAlignBetweenOffsets

Re-exports getAlignBetweenOffsets

getAlignBottomOffsets

Re-exports getAlignBottomOffsets

getAlignMiddleOffsets

Re-exports getAlignMiddleOffsets

getAlignTopOffsets

Re-exports getAlignTopOffsets

getBounds

Re-exports getBounds

getBoundsIntersection

Re-exports getBoundsIntersection

getBoundsUnion

Re-exports getBoundsUnion

getClosestElement

Re-exports getClosestElement

getClosestElementIndex

Re-exports getClosestElementIndex

getDistance

Re-exports getDistance

getElementFromParsedXml

Re-exports getElementFromParsedXml

getJustifyBetweenOffsets

Re-exports getJustifyBetweenOffsets

getJustifyCenterOffsets

Re-exports getJustifyCenterOffsets

getJustifyLeftOffsets

Re-exports getJustifyLeftOffsets

getJustifyRightOffsets

Re-exports getJustifyRightOffsets

getQueriedItems

Re-exports getQueriedItems

getSharedString

Re-exports getSharedString

getVarsFromFormatString

Re-exports getVarsFromFormatString

getXmlAttributes

Re-exports getXmlAttributes

gridLines

Re-exports gridLines

handleFocusLeave

Re-exports handleFocusLeave

horizontalScroll

Re-exports horizontalScroll

HTML

Renames and re-exports utils/html.svelte

Ids

Renames and re-exports utils/ids

initials

Re-exports initials

Input

Renames and re-exports DefaultItem

Inputs

Renames and re-exports inputs

isAlphaNumChar

Re-exports isAlphaNumChar

isBrowser

Re-exports isBrowser

isComponentModalSettings

Re-exports isComponentModalSettings

isForest

Re-exports isForest

isIterable

Re-exports isIterable

isOverflowing

Re-exports isOverflowing

isPlural

Re-exports isPlural

isPromptModalSettings

Re-exports isPromptModalSettings

isSingular

Re-exports isSingular

isSnippetModalSettings

Re-exports isSnippetModalSettings

Keyboard

Renames and re-exports keyboard

keyboardNavigation

Re-exports keyboardNavigation

KeyboardShortcut

Re-exports KeyboardShortcut

keys

Re-exports keys

Layout

Renames and re-exports utils/layout

LayoutBetweenOptions

Re-exports LayoutBetweenOptions

LayoutOptions

Re-exports LayoutOptions

LayoutRect

Re-exports LayoutRect

lerp

Re-exports lerp

localId

Re-exports localId

makeTree

Re-exports makeTree

MatchHighlighter

Renames and re-exports DefaultItem

matchingParts

Re-exports matchingParts

Math

Renames and re-exports utils/math

Renames and re-exports DefaultItem

Renames and re-exports menu

Re-exports MenuItem

mergeParsedXml

Re-exports mergeParsedXml

Re-exports Modal

ModalButton

Re-exports ModalButton

ModalButtonSettings

Re-exports ModalButtonSettings

ModalButtonType

Re-exports ModalButtonType

modalButtonTypes

Re-exports modalButtonTypes

modalButtonTypeToButton

Re-exports modalButtonTypeToButton

ModalComponent

Renames and re-exports DefaultItem

modals

Re-exports modals

ModalSettings

Re-exports ModalSettings

newLocalId

Re-exports newLocalId

newUuid

Re-exports newUuid

OptimizedDiv

Renames and re-exports DefaultItem

padBounds

Re-exports padBounds

ParsedXmlAttribute

Re-exports ParsedXmlAttribute

parsedXmlComment

Re-exports parsedXmlComment

ParsedXmlNode

Re-exports ParsedXmlNode

ParsedXmlNodes

Re-exports ParsedXmlNodes

parseXml

Re-exports parseXml

parseXMLArray

Re-exports parseXMLArray

parseXsd

Re-exports parseXsd

parseXsdFromUrl

Re-exports parseXsdFromUrl

PartialBy

Re-exports PartialBy

PathGenerator

Renames and re-exports DefaultItem

plural

Re-exports plural

pluralize

Re-exports pluralize

Point

Re-exports Point

PointerDownWatcher

Re-exports PointerDownWatcher

Portal

Re-exports Portal

posFromClient

Re-exports posFromClient

Position

Re-exports Position

preventDefault

Re-exports preventDefault

Promise

Renames and re-exports utils/promise

PromptModalSettings

Re-exports PromptModalSettings

Queue

Re-exports Queue

Rect

Re-exports Rect

resizable

Re-exports resizable

ResizeHandleParams

Re-exports ResizeHandleParams

ResizeSide

Re-exports ResizeSide

SaveData

Re-exports SaveData

Scroll

Renames and re-exports scroll

scrollIntoView

Re-exports scrollIntoView

Renames and re-exports DefaultItem

Renames and re-exports DefaultItem

shortcut

Re-exports shortcut

Shortcut

Renames and re-exports shortcut

ShortcutSettings

Re-exports ShortcutSettings

shortcutToString

Re-exports shortcutToString

showContextMenu

Re-exports showContextMenu

ShowContextMenu

Re-exports ShowContextMenu

SimpleType

Re-exports SimpleType

singular

Re-exports singular

sleep

Re-exports sleep

SnippetModalSettings

Re-exports SnippetModalSettings

sortedByIndex

Re-exports sortedByIndex

splitCamelCase

Re-exports splitCamelCase

stopPropagation

Re-exports stopPropagation

Storage

Renames and re-exports utils/storage

String

Renames and re-exports utils/string

StringArrayKeys

Re-exports StringArrayKeys

StringKeys

Re-exports StringKeys

Tags

Renames and re-exports DefaultItem

takeFocus

Re-exports takeFocus

Textarea

Renames and re-exports DefaultItem

titlelize

Re-exports titlelize

Transform

Re-exports Transform

Tree

Re-exports Tree

Tree_

Renames and re-exports tree

TreeComponent

Renames and re-exports DefaultItem

Types

Renames and re-exports type

unCamelCase

Re-exports unCamelCase

Utils

Renames and re-exports utils

uuid

Re-exports uuid

Vector2D

Re-exports Vector2D

WindowBounds

Re-exports WindowBounds

WindowState

Re-exports WindowState

words

Re-exports words

XML

Renames and re-exports utils/xml

XmlSchema

Re-exports XmlSchema

XMLTypeName

Re-exports XMLTypeName

XMLTypeTree

Re-exports XMLTypeTree

XSD

Renames and re-exports utils/xsd

Functions

persisted()

function persisted<StoreType, SerializerType>(
key,
initialValue,
options?): Persisted<StoreType>

Type Parameters

StoreType

SerializerType = StoreType

Parameters

key: string

initialValue: StoreType

options?: Options<StoreType, SerializerType>

Returns

Persisted<StoreType>

Defined in

tmp/commons/node_modules/svelte-persisted-store/dist/index.d.ts:23


uuidv3()

uuidv3(name, namespace, buffer, offset)

function uuidv3<T>(
name,
namespace,
buffer,
offset?): T
Type Parameters

T extends OutputBuffer

Parameters

name: string | InputBuffer

namespace: string | InputBuffer

buffer: T

offset?: number

Returns

T

Defined in

tmp/commons/node_modules/@types/uuid/index.d.ts:106

uuidv3(name, namespace)

function uuidv3(name, namespace): string
Parameters

name: string | InputBuffer

namespace: string | InputBuffer

Returns

string

Defined in

tmp/commons/node_modules/@types/uuid/index.d.ts:106


uuidv4()

uuidv4(options, buffer, offset)

function uuidv4<T>(
options,
buffer,
offset?): T
Type Parameters

T extends OutputBuffer

Parameters

options: undefined | null | V4Options

buffer: T

offset?: number

Returns

T

Defined in

tmp/commons/node_modules/@types/uuid/index.d.ts:107

uuidv4(options)

function uuidv4(options?): string
Parameters

options?: V4Options

Returns

string

Defined in

tmp/commons/node_modules/@types/uuid/index.d.ts:107


uuidv5()

uuidv5(name, namespace, buffer, offset)

function uuidv5<T>(
name,
namespace,
buffer,
offset?): T
Type Parameters

T extends OutputBuffer

Parameters

name: string | InputBuffer

namespace: string | InputBuffer

buffer: T

offset?: number

Returns

T

Defined in

tmp/commons/node_modules/@types/uuid/index.d.ts:108

uuidv5(name, namespace)

function uuidv5(name, namespace): string
Parameters

name: string | InputBuffer

namespace: string | InputBuffer

Returns

string

Defined in

tmp/commons/node_modules/@types/uuid/index.d.ts:108