Options
All
  • Public
  • Public/Protected
  • All
Menu

@pluginsdotdev/plugin

TODO: description

Usage

const plugin = require('@pluginsdotdev/plugin');

// TODO: DEMONSTRATE API

Index

Type aliases

Cfg

Cfg: { queueHandlerUpdate: QueueHandlerUpdate }

Type declaration

EventKey

EventKey: string

ExposedComponents

ExposedComponents: Record<string, ExposedComponent>

FragAndEl

FragAndEl: { element: Element | null; fragment: ShadowRoot | null }

Type declaration

  • element: Element | null
  • fragment: ShadowRoot | null

GetNodeById

GetNodeById: (nodeId: NodeId) => Node | null

Type declaration

    • (nodeId: NodeId): Node | null
    • Parameters

      • nodeId: NodeId

      Returns Node | null

NodeHandle

NodeHandle: Node | ShadowRoot & { _NodeHandle: true }

Observe

Observe: (node: Node | null) => void

Type declaration

    • (node: Node | null): void
    • Parameters

      • node: Node | null

      Returns void

PartialReconciliationUpdate

PartialReconciliationUpdate: Omit<ReconciliationUpdate, "nodeId" | "type">

PluginFactory

PluginFactory: (pluginConfig: PluginConfig) => (props: Props, container: Element | DocumentFragment) => void

Type declaration

    • (pluginConfig: PluginConfig): (props: Props, container: Element | DocumentFragment) => void
    • Parameters

      Returns (props: Props, container: Element | DocumentFragment) => void

        • (props: Props, container: Element | DocumentFragment): void
        • Parameters

          • props: Props
          • container: Element | DocumentFragment

          Returns void

QueueHandlerUpdate

QueueHandlerUpdate: (node: Node, handlerUpdate: ReconciliationHandlerUpdate) => void

Type declaration

    • (node: Node, handlerUpdate: ReconciliationHandlerUpdate): void
    • Parameters

      • node: Node
      • handlerUpdate: ReconciliationHandlerUpdate

      Returns void

Reconcile

Reconcile: (updates: Array<ReconciliationUpdate>) => Promise<void>

Type declaration

    • (updates: Array<ReconciliationUpdate>): Promise<void>
    • Parameters

      • updates: Array<ReconciliationUpdate>

      Returns Promise<void>

Variables

InputDeviceCapabilities

InputDeviceCapabilities: any

Request

Request: { constructor: any; prototype: Request }

Type declaration

  • constructor: function
    • new __type(input: RequestInfo, init?: RequestInit): Request
    • Parameters

      • input: RequestInfo
      • Optional init: RequestInit

      Returns Request

  • prototype: Request

URL

URL: { constructor: any; prototype: URL; createObjectURL: any; revokeObjectURL: any }

Type declaration

  • constructor: function
    • new __type(url: string, base?: string | URL): URL
    • Parameters

      • url: string
      • Optional base: string | URL

      Returns URL

  • prototype: URL
  • createObjectURL: function
    • createObjectURL(object: any): string
    • Parameters

      • object: any

      Returns string

  • revokeObjectURL: function
    • revokeObjectURL(url: string): void
    • Parameters

      • url: string

      Returns void

Let allowedDomains

allowedDomains: Array<string> = []

Let cachedBrowserData

cachedBrowserData: BrowserData | null = null

customElements

customElements: CustomElementRegistry

fetch

fetch: fetch & fetch

Const globalEventHandlerQueue

globalEventHandlerQueue: WeakMap<Node, {}> = new WeakMap<Node,PartialReconciliationUpdate>()

Const hostComponentAttr

hostComponentAttr: string = `data-pluginsdotdev-host-component-${Math.floor(Math.random() * 10000)}`

Const hostComponentOldPropsAttr

hostComponentOldPropsAttr: string = `data-pluginsdotdev-host-component-old-props-${Math.floor(Math.random() * 10000)}`

Const hostComponentPropsAttr

hostComponentPropsAttr: string = `data-pluginsdotdev-host-component-props-${Math.floor(Math.random() * 10000)}`

Const ignoredAttrs

ignoredAttrs: Set<string> = new Set<string>([hostComponentAttr, nodeIdAttr, "is"])

Let nextId

nextId: number = 0

Const nodeIdAttr

nodeIdAttr: string = `data-pluginsdotdev-node-id-${Math.floor(Math.random() * 10000)}`

Const nodeIdContainers

nodeIdContainers: Set<NodeIdContainer> = new Set<NodeIdContainer>()

open

open: open

parse

parse: parse

Const renderRootById

renderRootById: Map<number, ShadowRoot> = new Map<RenderRootId, ShadowRoot>()

sendBeacon

sendBeacon: sendBeacon

Functions

Const browserData

Const calculateChildIdx

  • calculateChildIdx(node: Node): number

Const constructRenderRootIfNeeded

  • constructRenderRootIfNeeded(rootId: RenderRootId, pluginBridge: PluginBridge): Element | ShadowRoot

Const countNodeWidth

  • countNodeWidth(node: Node): number

Const disableExecFunctions

  • disableExecFunctions(): void

Const disableNavigationFunctions

  • disableNavigationFunctions(): void

Const ensureOpenShadowRoots

  • ensureOpenShadowRoots(): void

Const getEventKey

  • getEventKey(type: string, opts: EventOptions): EventKey

Const getEventProxyHandler

  • getEventProxyHandler(getNodeById: GetNodeById): ProxyHandler

Const getHostComponent

  • getHostComponent(el: HTMLElement): string | null

Const getHostComponentProps

  • getHostComponentProps(el: Element): Record<string, any>

Const getNodeById

  • getNodeById(nodeId: string): null | Element

Const getStyleUpdate

Const isCustomElement

  • isCustomElement(localName: string): boolean

Const isIgnoredNodeType

  • isIgnoredNodeType(nodeType: number): boolean

Const isSlotted

  • isSlotted(node: Node): boolean

Const isStyleNode

  • isStyleNode(node: Node | null): node is HTMLStyleElement

Const makeExposedComponents

Const mergePartialUpdates

Const mergeUpdates

  • mergeUpdates(a: ReconciliationUpdate | null | undefined, b: ReconciliationUpdate | null | undefined): ReconciliationUpdate

Const nodeHandle

Const propUpdatesForHostComponent

  • propUpdatesForHostComponent(el: Element): Array<ReconciliationPropUpdate>

Const queueHandlerUpdate

  • queueHandlerUpdate(node: Node, handlerUpdate: ReconciliationSetHandlerUpdate | ReconciliationDeleteHandlerUpdate): void

Const queueRemovedUpdates

  • queueRemovedUpdates(nodeIdContainer: NodeIdContainer, target: Node, child: Node): void

Const queueTreeUpdates

  • queueTreeUpdates(observe: Observe, nodeIdContainer: NodeIdContainer, target: Node, child: Node, parentIdContext?: NodeId, baseChildIdx?: number, processingSlot?: boolean): void

Const registerPlugin

Const safeId

  • safeId(id: string): string
  • safeId generates an id that is safe for use by a plugin as a name or id attribute.

    Parameters

    • id: string

    Returns string

Const setupPluginEnvironment

  • setupPluginEnvironment(__namedParameters: { queueHandlerUpdate: (node: Node, handlerUpdate: ReconciliationHandlerUpdate) => void }): void
  • Parameters

    • __namedParameters: { queueHandlerUpdate: (node: Node, handlerUpdate: ReconciliationHandlerUpdate) => void }
      • queueHandlerUpdate: (node: Node, handlerUpdate: ReconciliationHandlerUpdate) => void
          • (node: Node, handlerUpdate: ReconciliationHandlerUpdate): void
          • Parameters

            • node: Node
            • handlerUpdate: ReconciliationHandlerUpdate

            Returns void

    Returns void

Const shouldIgnoreNode

  • shouldIgnoreNode(node: Node, isProcessingSlot: boolean): boolean

Const urlAllowed

  • urlAllowed(allowedDomains: Array<string>, url: string): boolean

Const wrapEventTarget

Const wrapFetch

  • wrapFetch(): void

Const wrapSendBeacon

  • wrapSendBeacon(): void

Const wrapXMLHttpRequest

  • wrapXMLHttpRequest(): Promise<void>

Object literals

Const eventCtorMap

eventCtorMap: object

AnimationEvent

AnimationEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, animationEventInitDict?: AnimationEventInit): __type
    • Parameters

      • type: string
      • Optional animationEventInitDict: AnimationEventInit

      Returns __type

  • prototype: __type

ClipboardEvent

ClipboardEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: ClipboardEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: ClipboardEventInit

      Returns __type

  • prototype: __type

CompositionEvent

CompositionEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: CompositionEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: CompositionEventInit

      Returns __type

  • prototype: __type

DragEvent

DragEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: DragEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: DragEventInit

      Returns __type

  • prototype: __type

FocusEvent

FocusEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: FocusEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: FocusEventInit

      Returns __type

  • prototype: __type

InputEvent

InputEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: InputEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: InputEventInit

      Returns __type

  • prototype: __type

KeyboardEvent

KeyboardEvent: { constructor: any; DOM_KEY_LOCATION_LEFT: number; DOM_KEY_LOCATION_NUMPAD: number; DOM_KEY_LOCATION_RIGHT: number; DOM_KEY_LOCATION_STANDARD: number; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: KeyboardEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: KeyboardEventInit

      Returns __type

  • Readonly DOM_KEY_LOCATION_LEFT: number
  • Readonly DOM_KEY_LOCATION_NUMPAD: number
  • Readonly DOM_KEY_LOCATION_RIGHT: number
  • Readonly DOM_KEY_LOCATION_STANDARD: number
  • prototype: __type

MouseEvent

MouseEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: MouseEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: MouseEventInit

      Returns __type

  • prototype: __type

PointerEvent

PointerEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: PointerEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: PointerEventInit

      Returns __type

  • prototype: __type

TrackEvent

TrackEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: TrackEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: TrackEventInit

      Returns __type

  • prototype: __type

TransitionEvent

TransitionEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, transitionEventInitDict?: TransitionEventInit): __type
    • Parameters

      • type: string
      • Optional transitionEventInitDict: TransitionEventInit

      Returns __type

  • prototype: __type

UIEvent

UIEvent: { constructor: any; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: UIEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: UIEventInit

      Returns __type

  • prototype: __type

WheelEvent

WheelEvent: { constructor: any; DOM_DELTA_LINE: number; DOM_DELTA_PAGE: number; DOM_DELTA_PIXEL: number; prototype: __type }

Type declaration

  • constructor: function
    • new __type(type: string, eventInitDict?: WheelEventInit): __type
    • Parameters

      • type: string
      • Optional eventInitDict: WheelEventInit

      Returns __type

  • Readonly DOM_DELTA_LINE: number
  • Readonly DOM_DELTA_PAGE: number
  • Readonly DOM_DELTA_PIXEL: number
  • prototype: __type

Legend

  • Constructor
  • Property
  • Constructor
  • Method
  • Private property

Generated using TypeDoc