Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aurumjs

Package Overview
Dependencies
Maintainers
1
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurumjs - npm Package Compare versions

Comparing version 0.9.5 to 0.9.6

2

package.json
{
"name": "aurumjs",
"version": "0.9.5",
"version": "0.9.6",
"main": "prebuilt/esnext/aurumjs.js",

@@ -5,0 +5,0 @@ "type": "module",

@@ -49,3 +49,3 @@ import { ClassType, DataDrain, Callback, MapLike, AttributeValue, StyleType } from '../utilities/common.js';

export declare const defaultAttributes: string[];
export declare function DomNodeCreator<T extends HTMLNodeProps<any>>(nodeName: string, extraAttributes?: string[], extraEvents?: MapLike<string>, extraLogic?: (node: HTMLElement, props: T, cleanUp: CancellationToken) => void): (props: T, children: Renderable[], api: AurumComponentAPI) => HTMLElement;
export declare function DomNodeCreator<T extends HTMLNodeProps<any>>(nodeName: string, extraAttributes?: string[], extraEvents?: MapLike<string>, extraLogic?: (node: HTMLElement, props: T, cleanUp: CancellationToken) => void, svg?: boolean): (props: T, children: Renderable[], api: AurumComponentAPI) => HTMLElement;
export declare function processHTMLNode(node: HTMLElement, props: HTMLNodeProps<any>, cleanUp: CancellationToken, extraAttributes?: string[], extraEvents?: MapLike<string>): void;

@@ -52,0 +52,0 @@ export declare function createEventHandlers(node: HTMLElement, events: MapLike<string>, props: any): void;

@@ -39,5 +39,11 @@ import { ArrayDataSource, DataSource, MapDataSource } from '../stream/data_source.js';

export const defaultAttributes = ['id', 'name', 'draggable', 'tabindex', 'role', 'contenteditable', 'slot', 'title'];
export function DomNodeCreator(nodeName, extraAttributes, extraEvents, extraLogic) {
export function DomNodeCreator(nodeName, extraAttributes, extraEvents, extraLogic, svg = false) {
return function (props, children, api) {
const node = document.createElement(nodeName);
let node;
if (svg) {
node = document.createElementNS('http://www.w3.org/2000/svg', nodeName);
}
else {
node = document.createElement(nodeName);
}
if (props) {

@@ -44,0 +50,0 @@ processHTMLNode(node, props, api.cancellationToken, extraAttributes, extraEvents);

@@ -608,2 +608,4 @@ import { HTMLNodeProps } from '../builtin_components/dom_adapter.js';

preserveAspectRatio?: AttributeValue;
'xmlns:xlink'?: AttributeValue;
'xlink:space'?: AttributeValue;
}

@@ -610,0 +612,0 @@ /**

@@ -454,46 +454,28 @@ import { DomNodeCreator } from '../builtin_components/dom_adapter.js';

'preserveAspectRatio',
'xmlns:xlink',
'xlink:space',
...commonSvgProps
]);
export const Circle = DomNodeCreator('circle', ['cx', 'cy', 'r', ...commonSvgProps]);
export const Ellipse = DomNodeCreator('ellipse', ['cx', 'cy', 'rx', 'ry', ...commonSvgProps]);
export const Line = DomNodeCreator('line', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps]);
export const Polygon = DomNodeCreator('polygon', ['points', ...commonSvgProps]);
export const Polyline = DomNodeCreator('polyline', ['points', ...commonSvgProps]);
export const Path = DomNodeCreator('path', ['d', ...commonSvgProps]);
export const Rect = DomNodeCreator('rect', ['x', 'y', 'width', 'height', ...commonSvgProps]);
export const Text = DomNodeCreator('text', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps]);
export const Tspan = DomNodeCreator('tspan', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps]);
export const Image = DomNodeCreator('image', ['x', 'y', 'width', 'height', 'href', ...commonSvgProps]);
export const G = DomNodeCreator('g', [...commonSvgProps]);
export const Defs = DomNodeCreator('defs', [...commonSvgProps]);
export const Symbol = DomNodeCreator('symbol', ['viewBox', 'preserveAspectRatio', ...commonSvgProps]);
export const Use = DomNodeCreator('use', ['href', 'x', 'y', 'width', 'height', ...commonSvgProps]);
export const Marker = DomNodeCreator('marker', [
'viewBox',
'preserveAspectRatio',
'refX',
'refY',
'markerWidth',
'markerHeight',
'orient',
...commonSvgProps
]);
export const Mask = DomNodeCreator('mask', ['x', 'y', 'width', 'height', ...commonSvgProps]);
export const LinearGradient = DomNodeCreator('linearGradient', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps]);
export const RadialGradient = DomNodeCreator('radialGradient', ['cx', 'cy', 'r', 'fx', 'fy', 'fr', ...commonSvgProps]);
export const Stop = DomNodeCreator('stop', ['offset', 'stop-color', 'stop-opacity', ...commonSvgProps]);
export const ClipPath = DomNodeCreator('clipPath', ['clipPathUnits', ...commonSvgProps]);
export const ForeignObject = DomNodeCreator('foreignObject', ['x', 'y', 'width', 'height', ...commonSvgProps]);
export const Pattern = DomNodeCreator('pattern', [
'x',
'y',
'width',
'height',
'patternUnits',
'patternContentUnits',
'patternTransform',
'viewBox',
'preserveAspectRatio',
...commonSvgProps
]);
], undefined, undefined, true);
export const Circle = DomNodeCreator('circle', ['cx', 'cy', 'r', ...commonSvgProps], undefined, undefined, true);
export const Ellipse = DomNodeCreator('ellipse', ['cx', 'cy', 'rx', 'ry', ...commonSvgProps], undefined, undefined, true);
export const Line = DomNodeCreator('line', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps], undefined, undefined, true);
export const Polygon = DomNodeCreator('polygon', ['points', ...commonSvgProps], undefined, undefined, true);
export const Polyline = DomNodeCreator('polyline', ['points', ...commonSvgProps], undefined, undefined, true);
export const Path = DomNodeCreator('path', ['d', ...commonSvgProps], undefined, undefined, true);
export const Rect = DomNodeCreator('rect', ['x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);
export const Text = DomNodeCreator('text', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps], undefined, undefined, true);
export const Tspan = DomNodeCreator('tspan', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps], undefined, undefined, true);
export const Image = DomNodeCreator('image', ['x', 'y', 'width', 'height', 'href', ...commonSvgProps], undefined, undefined, true);
export const G = DomNodeCreator('g', [...commonSvgProps], undefined, undefined, true);
export const Defs = DomNodeCreator('defs', [...commonSvgProps], undefined, undefined, true);
export const Symbol = DomNodeCreator('symbol', ['viewBox', 'preserveAspectRatio', ...commonSvgProps], undefined, undefined, true);
export const Use = DomNodeCreator('use', ['href', 'x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);
export const Marker = DomNodeCreator('marker', ['viewBox', 'preserveAspectRatio', 'refX', 'refY', 'markerWidth', 'markerHeight', 'orient', ...commonSvgProps], undefined, undefined, true);
export const Mask = DomNodeCreator('mask', ['x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);
export const LinearGradient = DomNodeCreator('linearGradient', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps], undefined, undefined, true);
export const RadialGradient = DomNodeCreator('radialGradient', ['cx', 'cy', 'r', 'fx', 'fy', 'fr', ...commonSvgProps], undefined, undefined, true);
export const Stop = DomNodeCreator('stop', ['offset', 'stop-color', 'stop-opacity', ...commonSvgProps], undefined, undefined, true);
export const ClipPath = DomNodeCreator('clipPath', ['clipPathUnits', ...commonSvgProps], undefined, undefined, true);
export const ForeignObject = DomNodeCreator('foreignObject', ['x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);
export const Pattern = DomNodeCreator('pattern', ['x', 'y', 'width', 'height', 'patternUnits', 'patternContentUnits', 'patternTransform', 'viewBox', 'preserveAspectRatio', ...commonSvgProps], undefined, undefined, true);
/**

@@ -500,0 +482,0 @@ * @internal

@@ -87,6 +87,12 @@ import { StringSource, ClassType, DataDrain, Callback, MapLike, AttributeValue, StyleType } from '../utilities/common.js';

extraEvents?: MapLike<string>,
extraLogic?: (node: HTMLElement, props: T, cleanUp: CancellationToken) => void
extraLogic?: (node: HTMLElement, props: T, cleanUp: CancellationToken) => void,
svg: boolean = false
) {
return function (props: T, children: Renderable[], api: AurumComponentAPI): HTMLElement {
const node = document.createElement(nodeName);
let node;
if (svg) {
node = document.createElementNS('http://www.w3.org/2000/svg', nodeName);
} else {
node = document.createElement(nodeName);
}
if (props) {

@@ -93,0 +99,0 @@ processHTMLNode(node, props, api.cancellationToken, extraAttributes, extraEvents);

@@ -818,2 +818,4 @@ import { DomNodeCreator, HTMLNodeProps } from '../builtin_components/dom_adapter.js';

preserveAspectRatio?: AttributeValue;
'xmlns:xlink'?: AttributeValue;
'xlink:space'?: AttributeValue;
}

@@ -824,25 +826,33 @@

*/
export const Svg = DomNodeCreator<SvgProps>('svg', [
'width',
'height',
'xmlns',
'version',
'x',
'y',
'x1',
'y1',
'x2',
'y2',
'cx',
'cy',
'r',
'rx',
'ry',
'd',
'path',
'points',
'viewBox',
'preserveAspectRatio',
...commonSvgProps
]);
export const Svg = DomNodeCreator<SvgProps>(
'svg',
[
'width',
'height',
'xmlns',
'version',
'x',
'y',
'x1',
'y1',
'x2',
'y2',
'cx',
'cy',
'r',
'rx',
'ry',
'd',
'path',
'points',
'viewBox',
'preserveAspectRatio',
'xmlns:xlink',
'xlink:space',
...commonSvgProps
],
undefined,
undefined,
true
);

@@ -855,3 +865,3 @@ export interface CircleProps extends SVGNodeProps {

export const Circle = DomNodeCreator<CircleProps>('circle', ['cx', 'cy', 'r', ...commonSvgProps]);
export const Circle = DomNodeCreator<CircleProps>('circle', ['cx', 'cy', 'r', ...commonSvgProps], undefined, undefined, true);

@@ -865,3 +875,3 @@ export interface EllipseProps extends SVGNodeProps {

export const Ellipse = DomNodeCreator<EllipseProps>('ellipse', ['cx', 'cy', 'rx', 'ry', ...commonSvgProps]);
export const Ellipse = DomNodeCreator<EllipseProps>('ellipse', ['cx', 'cy', 'rx', 'ry', ...commonSvgProps], undefined, undefined, true);

@@ -875,3 +885,3 @@ export interface LineProps extends SVGNodeProps {

export const Line = DomNodeCreator<LineProps>('line', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps]);
export const Line = DomNodeCreator<LineProps>('line', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps], undefined, undefined, true);

@@ -882,3 +892,3 @@ export interface PolygonProps extends SVGNodeProps {

export const Polygon = DomNodeCreator<PolygonProps>('polygon', ['points', ...commonSvgProps]);
export const Polygon = DomNodeCreator<PolygonProps>('polygon', ['points', ...commonSvgProps], undefined, undefined, true);

@@ -889,3 +899,3 @@ export interface PolylineProps extends SVGNodeProps {

export const Polyline = DomNodeCreator<PolylineProps>('polyline', ['points', ...commonSvgProps]);
export const Polyline = DomNodeCreator<PolylineProps>('polyline', ['points', ...commonSvgProps], undefined, undefined, true);

@@ -896,3 +906,3 @@ export interface PathProps extends SVGNodeProps {

export const Path = DomNodeCreator<PathProps>('path', ['d', ...commonSvgProps]);
export const Path = DomNodeCreator<PathProps>('path', ['d', ...commonSvgProps], undefined, undefined, true);

@@ -906,3 +916,3 @@ export interface RectProps extends SVGNodeProps {

export const Rect = DomNodeCreator<RectProps>('rect', ['x', 'y', 'width', 'height', ...commonSvgProps]);
export const Rect = DomNodeCreator<RectProps>('rect', ['x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);

@@ -918,5 +928,5 @@ export interface TextProps extends SVGNodeProps {

export const Text = DomNodeCreator<TextProps>('text', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps]);
export const Text = DomNodeCreator<TextProps>('text', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps], undefined, undefined, true);
export const Tspan = DomNodeCreator<TextProps>('tspan', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps]);
export const Tspan = DomNodeCreator<TextProps>('tspan', ['dx', 'dy', 'rotate', 'textLength', 'x', 'y', ...commonSvgProps], undefined, undefined, true);

@@ -931,11 +941,11 @@ export interface ImageProps extends SVGNodeProps {

export const Image = DomNodeCreator<ImageProps>('image', ['x', 'y', 'width', 'height', 'href', ...commonSvgProps]);
export const Image = DomNodeCreator<ImageProps>('image', ['x', 'y', 'width', 'height', 'href', ...commonSvgProps], undefined, undefined, true);
export interface GProps extends SVGNodeProps {}
export const G = DomNodeCreator<GProps>('g', [...commonSvgProps]);
export const G = DomNodeCreator<GProps>('g', [...commonSvgProps], undefined, undefined, true);
export interface DefsProps extends SVGNodeProps {}
export const Defs = DomNodeCreator<DefsProps>('defs', [...commonSvgProps]);
export const Defs = DomNodeCreator<DefsProps>('defs', [...commonSvgProps], undefined, undefined, true);

@@ -947,3 +957,3 @@ export interface SymbolProps extends SVGNodeProps {

export const Symbol = DomNodeCreator<SymbolProps>('symbol', ['viewBox', 'preserveAspectRatio', ...commonSvgProps]);
export const Symbol = DomNodeCreator<SymbolProps>('symbol', ['viewBox', 'preserveAspectRatio', ...commonSvgProps], undefined, undefined, true);

@@ -958,3 +968,3 @@ export interface UseProps extends SVGNodeProps {

export const Use = DomNodeCreator<UseProps>('use', ['href', 'x', 'y', 'width', 'height', ...commonSvgProps]);
export const Use = DomNodeCreator<UseProps>('use', ['href', 'x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);

@@ -971,12 +981,9 @@ export interface MarkerProps extends SVGNodeProps {

export const Marker = DomNodeCreator<MarkerProps>('marker', [
'viewBox',
'preserveAspectRatio',
'refX',
'refY',
'markerWidth',
'markerHeight',
'orient',
...commonSvgProps
]);
export const Marker = DomNodeCreator<MarkerProps>(
'marker',
['viewBox', 'preserveAspectRatio', 'refX', 'refY', 'markerWidth', 'markerHeight', 'orient', ...commonSvgProps],
undefined,
undefined,
true
);

@@ -990,3 +997,3 @@ export interface MaskProps extends SVGNodeProps {

export const Mask = DomNodeCreator<MaskProps>('mask', ['x', 'y', 'width', 'height', ...commonSvgProps]);
export const Mask = DomNodeCreator<MaskProps>('mask', ['x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);

@@ -1000,3 +1007,3 @@ export interface LinearGradientProps extends SVGNodeProps {

export const LinearGradient = DomNodeCreator<LinearGradientProps>('linearGradient', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps]);
export const LinearGradient = DomNodeCreator<LinearGradientProps>('linearGradient', ['x1', 'y1', 'x2', 'y2', ...commonSvgProps], undefined, undefined, true);

@@ -1012,3 +1019,9 @@ export interface RadialGradientProps extends SVGNodeProps {

export const RadialGradient = DomNodeCreator<RadialGradientProps>('radialGradient', ['cx', 'cy', 'r', 'fx', 'fy', 'fr', ...commonSvgProps]);
export const RadialGradient = DomNodeCreator<RadialGradientProps>(
'radialGradient',
['cx', 'cy', 'r', 'fx', 'fy', 'fr', ...commonSvgProps],
undefined,
undefined,
true
);

@@ -1021,3 +1034,3 @@ export interface StopProps extends SVGNodeProps {

export const Stop = DomNodeCreator<StopProps>('stop', ['offset', 'stop-color', 'stop-opacity', ...commonSvgProps]);
export const Stop = DomNodeCreator<StopProps>('stop', ['offset', 'stop-color', 'stop-opacity', ...commonSvgProps], undefined, undefined, true);

@@ -1028,3 +1041,3 @@ export interface ClipPathProps extends SVGNodeProps {

export const ClipPath = DomNodeCreator<ClipPathProps>('clipPath', ['clipPathUnits', ...commonSvgProps]);
export const ClipPath = DomNodeCreator<ClipPathProps>('clipPath', ['clipPathUnits', ...commonSvgProps], undefined, undefined, true);

@@ -1038,3 +1051,3 @@ export interface ForeignObjectProps extends SVGNodeProps {

export const ForeignObject = DomNodeCreator<ForeignObjectProps>('foreignObject', ['x', 'y', 'width', 'height', ...commonSvgProps]);
export const ForeignObject = DomNodeCreator<ForeignObjectProps>('foreignObject', ['x', 'y', 'width', 'height', ...commonSvgProps], undefined, undefined, true);

@@ -1053,14 +1066,9 @@ export interface PatternProps extends SVGNodeProps {

export const Pattern = DomNodeCreator<PatternProps>('pattern', [
'x',
'y',
'width',
'height',
'patternUnits',
'patternContentUnits',
'patternTransform',
'viewBox',
'preserveAspectRatio',
...commonSvgProps
]);
export const Pattern = DomNodeCreator<PatternProps>(
'pattern',
['x', 'y', 'width', 'height', 'patternUnits', 'patternContentUnits', 'patternTransform', 'viewBox', 'preserveAspectRatio', ...commonSvgProps],
undefined,
undefined,
true
);

@@ -1067,0 +1075,0 @@ /**

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc