zimjs 18.2.8 → 19.0.0

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.
@@ -72,6 +72,7 @@ declare global {
72
72
  var END: string
73
73
  var TOP: string
74
74
  var BOTTOM: string
75
+ var BOT: string
75
76
  var HORIZONTAL: string
76
77
  var VERTICAL: string
77
78
  var BOTH: string
@@ -179,13 +180,14 @@ declare namespace zim {
179
180
  effect(effect: createjs.Filter, x?: number, y?: number, width?: number, height?: number): this
180
181
  updateEffects(): this
181
182
  noEffect(effects?: string, cache?: boolean): this
182
- wire(config_or_target: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string): this
183
- wire(config: { target: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string }): this
184
- noWire(config_or_target: DisplayObject, prop?: string, input?: string): this
185
- noWire(config: { target: DisplayObject, prop?: string, input?: string }): this
186
- wired(config_or_source: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string): this
187
- wired(config: { source: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string }): this
188
- noWired(): this
183
+ wire(config_or_target: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string, mID?: string): this
184
+ wire(config: { target: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string, mID?: string }): this
185
+ noWire(config_or_target: DisplayObject, prop?: string, input?: string, mID?: string): this
186
+ noWire(config: { target: DisplayObject, prop?: string, input?: string, mID?: string }): this
187
+ wired(config_or_source: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string, mID?: string): this
188
+ wired(config: { source: DisplayObject, prop: string, twoWay?: boolean, setSource?: boolean, filter?: Function, call?: Function, input?: string, mID?: string }): this
189
+ noWired(config_or_source: DisplayObject, prop?: string, input?: string, mID?: string): this
190
+ noWired(config: { source: DisplayObject, prop?: string, input?: string, mID?: string }): this
189
191
  bind(config_or_id: string, props?: [any] | {} | string, extra?: string | number, filter?: Function, bindObj?: Bind): this
190
192
  bind(config: { id: string, props?: [any] | {} | string, extra?: string | number, filter?: Function, bindObj?: Bind }): this
191
193
  noBind(config_or_props?: [any] | {} | string, removeConnectionData?: boolean, call?: Function, bindObj?: Bind): this
@@ -260,7 +262,7 @@ declare namespace zim {
260
262
  sca(scale: number, scaleY?: number): this
261
263
  scaleTo(boundObj?: DisplayObject, percentX?: number, percentY?: number, type?: string, boundsOnly?: boolean): this
262
264
  fit(left?: number, top?: number, width?: number, height?: number, inside?: boolean): {}
263
- outline(color?: color, size?: number): this
265
+ outline(color?: color, size?: number, boundsOnly?: boolean, reg?: boolean, origin?: boolean, whiteSize?: number): this
264
266
  addTo(config_or_container?: Container | Stage, index?: number, localToLocal?: boolean): this
265
267
  addTo(config: { container?: Container | Stage, index?: number, localToLocal?: boolean }): this
266
268
  removeFrom(container?: Container | Stage): this
@@ -377,6 +379,7 @@ declare namespace zim {
377
379
  setData(data: string | { x: number, y: number, points: any[][], color: color, borderColor: color, borderWidth: number, move: boolean, toggle: boolean, controls: boolean }, fromJSON?: boolean): this
378
380
  recordPoints(popup: boolean): any[][]
379
381
  setPoints(data: any[][]): this
382
+ selectPoint(index: number, state?: boolean, multiple?: boolean): this
380
383
  changeControl(config_or_index: number, type?: string, rect1X?: number, rect1Y?: number, rect2X?: number, rect2Y?: number, circleX?: number, circleY?: number, update?: boolean): this
381
384
  changeControl(config: { index: number, type?: string, rect1X?: number, rect1Y?: number, rect2X?: number, rect2Y?: number, circleX?: number, circleY?: number, update?: boolean }): this
382
385
  transformPoints(transformType: string, amount: number, x?: number, y?: number): this
@@ -402,6 +405,10 @@ declare namespace zim {
402
405
  readonly sticks: Container
403
406
  readonly lastSelected: Container
404
407
  readonly lastSelectedIndex: number
408
+ readonly selectionManager: SelectionManager
409
+ readonly selectedBalls: SelectionSet
410
+ readonly selectedRect1s: SelectionSet
411
+ readonly selectedRect2s: SelectionSet
405
412
  controlsVisible: boolean
406
413
  types: string[]
407
414
  lockControls: boolean
@@ -542,7 +549,7 @@ declare namespace zim {
542
549
  export function getTIME(time?: number, timeType?: string, minWarning?: number, maxWarning?: number, noWarning?: boolean): string
543
550
  export function checkTIME(time?: number, timeChar?: string, minWarning?: number, maxWarning?: number): void
544
551
  export function timeout(time: number | zimVee, call: Function): { pause: Function, clear: Function, time: number, paused: boolean, done: boolean }
545
- export function interval(time: number | zimVee, call: Function, total?: number, immediate?: boolean, pauseOnBlur?: boolean, timeUnit?: string, complete?: Function, completeParams?: any): { pause: Function, clear: Function, time: number, count: number, total: number, paused: boolean, pauseTimeLeft: number }
552
+ export function interval(time: number | zimVee, call: Function, total?: number, immediate?: boolean, pauseOnBlur?: boolean, timeUnit?: string, complete?: Function, completeParams?: any, timeout?: boolean, mID?: string, tether?: any): { pause: Function, clear: Function, time: number, count: number, total: number, paused: boolean, pauseTimeLeft: number }
546
553
  export function copy<T>(obj: T, clone?: boolean): T
547
554
  export function arraysEqual(a: [any], b: [any], strict?: boolean): boolean
548
555
  export function arrayMinMax(arr: [any]): {}
@@ -693,6 +700,7 @@ declare namespace zim {
693
700
  export function toAlpha(color: string, ratio?: number): void
694
701
  export function toBW(hex: string): string
695
702
  export function invertColor(hex: string): string
703
+ export function syntaxColor(text: string, theme?: string, darken?: number): string
696
704
  export function zimEase(points: [any], polynomials?: [any], reverse?: boolean, lockEnds?: boolean): Function
697
705
  export function spline(points: [any], tension?: number, close?: boolean, shape?: Shape, removeLast?: boolean): string
698
706
  export function getPointAtPercent(x1?:number, y1?:number, x2?:number, y2?:number, percent?:number): Point
@@ -1981,6 +1989,7 @@ declare namespace zim {
1981
1989
  recordPoints(popup: boolean): any[][]
1982
1990
  getPoints(popup: boolean): any[][]
1983
1991
  setPoints(data: any[][]): this
1992
+ selectPoint(index: number, state?: boolean, multiple?: boolean): this
1984
1993
  changeControl(config_or_index: number, type?: string, rect1X?: number, rect1Y?: number, rect2X?: number, rect2Y?: number, circleX?: number, circleY?: number, update?: boolean): this
1985
1994
  changeControl(config: { index: number, type?: string, rect1X?: number, rect1Y?: number, rect2X?: number, rect2Y?: number, circleX?: number, circleY?: number, update?: boolean }): this
1986
1995
  transformPoints(transformType: string, amount: number, x?: number, y?: number): this
@@ -1998,6 +2007,8 @@ declare namespace zim {
1998
2007
  points: any[]
1999
2008
  pointsAdjusted: any[]
2000
2009
  pointObjects: any[]
2010
+ addPointFactor: number
2011
+ addMinDistance: number
2001
2012
  readonly segmentPoints: any[]
2002
2013
  readonly segmentRatios: any[]
2003
2014
  getPointAngle(index: number): number
@@ -2013,9 +2024,16 @@ declare namespace zim {
2013
2024
  lockControlType: boolean
2014
2025
  allowToggle: boolean
2015
2026
  move: boolean
2027
+ onTop: boolean
2028
+ selectedPoints: boolean
2029
+ readonly selectionManager: SelectionManager
2030
+ readonly selectedBalls: SelectionSet
2031
+ readonly selectedRect1s: SelectionSet
2032
+ readonly selectedRect2s: SelectionSet
2033
+ interactive: boolean
2034
+ keyFocus: boolean
2035
+ veeObj: {}
2016
2036
  ctrlclick: boolean
2017
- addPointFactor: number
2018
- addMinDistance: number
2019
2037
  }
2020
2038
  // ZIM Blob is only available in the module using the zim namespace
2021
2039
 
@@ -2199,6 +2217,7 @@ declare namespace zim {
2199
2217
  color: color
2200
2218
  rollColor: color
2201
2219
  rollPersist: boolean
2220
+ borderWidth: number
2202
2221
  borderColor: color
2203
2222
  borderRollColor: color
2204
2223
  hitPadding: number
@@ -2292,7 +2311,7 @@ declare namespace zim {
2292
2311
  nextPanel(index?: number, event?: boolean): this
2293
2312
  collapsed: boolean
2294
2313
  readonly titleBar: Rectangle
2295
- readonly label: Label
2314
+ readonly titleBarLabel: Label
2296
2315
  readonly text: string
2297
2316
  readonly arrow: Shape
2298
2317
  readonly content: {} | DisplayObject
@@ -2837,19 +2856,20 @@ declare namespace zim {
2837
2856
  readonly orgItem: string | DisplayObject
2838
2857
  readonly orgType: string
2839
2858
  readonly removedItem: DisplayObject
2840
- }
2841
- export class Scrambler extends Container implements zimComponent {
2842
- constructor(config_or_tile?: Tile, keys?: [any], keyProperty?: string, scramble?: boolean, time?: number, wait?: number, num?: number, shadowColor?: string, shadowBlur?: number, swap?: boolean, swapLock?: boolean, style?: boolean, group?: string, inherit?: {})
2843
- constructor(config: { tile?: Tile, keys?: [any], keyProperty?: string, scramble?: boolean, time?: number, wait?: number, num?: number, shadowColor?: string, shadowBlur?: number, swap?: boolean, swapLock?: boolean, style?: boolean, group?: string, inherit?: {} })
2859
+ }
2860
+ export class Shuffler extends Container implements zimComponent {
2861
+ constructor(config_or_tile?: Tile, spacing?: number, offset?: number, vertical?: boolean, formatObj?: {}, damp?: number, keys?: [any], keyProperty?: string, shuffle?: boolean, time?: number, wait?: number, num?: number, shadowColor?: string, shadowBlur?: number, cache?: boolean, offsetOne?: number, offsetTwo?: number, style?: boolean, group?: string, inherit?: {})
2862
+ constructor(config: { tile?: Tile, spacing?: number, offset?: number, vertical?: boolean, formatObj?: {}, damp?: number, keys?: [any], keyProperty?: string, shuffle?: boolean, time?: number, wait?: number, num?: number, shadowColor?: string, shadowBlur?: number, cache?: boolean, offsetOne?: number, offsetTwo?: number, style?: boolean, group?: string, inherit?: {} })
2844
2863
  // ZIM Component Interface
2845
2864
  // dispose():boolean // now added to Container, etc.
2846
2865
  enabled: boolean
2847
2866
  // END ZIM Component Interface
2848
- scramble(time?: number, wait?: number, num?: number): this
2867
+ shuffle(time?: number, wait?: number, num?: number): this
2849
2868
  solve(time?: number, wait?: number, disable?: boolean): this
2850
2869
  test(): this
2851
2870
  update(): this
2852
2871
  testItem(item: DisplayObject, index?: number): this
2872
+ format(formatObj: {}): this
2853
2873
  readonly tile: Tile
2854
2874
  readonly complete: boolean
2855
2875
  readonly starts: [number]
@@ -3033,17 +3053,19 @@ declare namespace zim {
3033
3053
  export var POSREG: boolean
3034
3054
  export var DRAGALL: boolean
3035
3055
  export var Ticker: {
3036
- always: (stage?: Stage) => void,
3056
+ always: (stage?: Stage, mID?: string, tether?: any) => void,
3037
3057
  alwaysOff: (stage?: Stage) => void,
3038
- add: (f: Function, stage?: Stage) => void,
3039
- remove: (f: Function) => void,
3040
- removeAll: (stage?: Stage) => void,
3058
+ add: (f: Function, stage?: Stage, mID?: string, tether?: any) => void,
3059
+ addWire: (obj:DisplayObject, data?: [], mID?: string) => DisplayObject,
3060
+ remove: (f: Function, mID?: string, tether?: any) => void,
3061
+ removeWire: (obj?: DisplayObject, target?: DisplayObject, prop?: string, mID?: string, tether?: any) => void,
3062
+ removeAll: (stage?: Stage, mID?: string, tether?: any) => void,
3041
3063
  has: (f: Function, stage?: Stage) => boolean,
3042
3064
  setFPS: (mobile?: Function, pc?: Stage) => void,
3043
3065
  setTimingMode: (mode?: string) => void,
3044
- raw: (f: Function) => void,
3045
- removeRaw: (id: any) => void,
3046
- dispose: (stage?: Stage) => void,
3066
+ raw: (f: Function, mID?: string, tether?: any) => void,
3067
+ removeRaw: (id: any, mID?: string, tether?: any) => void,
3068
+ dispose: (stage?: Stage, mID?: string, tether?: any) => void,
3047
3069
  update: boolean,
3048
3070
  list: Dictionary,
3049
3071
  framerate: number,
@@ -3220,8 +3242,8 @@ declare namespace zim {
3220
3242
  constructor()
3221
3243
  }
3222
3244
  export class Grid extends Container {
3223
- constructor(config_or_obj?: Stage | Container, color?: color, percent?: boolean, hideKey?: string, pixelKey?: string, allowToggle?: boolean, cache?: boolean, numbers?: boolean, style?: boolean, group?: string, inherit?: {})
3224
- constructor(config: { obj?: Stage | Container, color?: color, percent?: boolean, hideKey?: string, pixelKey?: string, allowToggle?: boolean, cache?: boolean, numbers?: boolean, style?: boolean, group?: string, inherit?: {} })
3245
+ constructor(config_or_obj?: Stage | Container, color?: color, percent?: boolean, hideKey?: string, pixelKey?: string, allowToggle?: boolean, cache?: boolean, numbers?: boolean, mouseOutside?: boolean, cross?: boolean, style?: boolean, group?: string, inherit?: {})
3246
+ constructor(config: { obj?: Stage | Container, color?: color, percent?: boolean, hideKey?: string, pixelKey?: string, allowToggle?: boolean, cache?: boolean, numbers?: boolean, mouseOutside?: boolean, cross?: boolean, style?: boolean, group?: string, inherit?: {} })
3225
3247
  resize(): void
3226
3248
  readonly type: string
3227
3249
  pixels: boolean
@@ -3267,6 +3289,7 @@ declare namespace zim {
3267
3289
  readonly type: string
3268
3290
  sets: [SelectionSet]
3269
3291
  multipleKey: string
3292
+ enabled: boolean
3270
3293
  readonly multiple: boolean
3271
3294
  readonly ctrlKey: boolean
3272
3295
  readonly shiftKey: boolean
@@ -3470,6 +3493,33 @@ declare namespace zim {
3470
3493
  blur: number
3471
3494
  blurFactor: number
3472
3495
  }
3496
+ export class Perspective extends Container {
3497
+ constructor(config_or_obj?: DisplayObject|zimVee, points?: [{x:number,y:number}]|Point, interactive?: boolean, showControls?: boolean, allowToggle?: boolean, move?: boolean, borderColor?: color|zimVee, borderWidth?: number|zimVee, dashed?: number|[number]|zimVee, plane?: boolean, fade?: boolean, dynamic?: boolean, frame?: Frame, style?: boolean, group?: string, inherit?: {})
3498
+ constructor(config: { obj?: DisplayObject|zimVee, points?: [{x:number,y:number}]|Point, interactive?: boolean, showControls?: boolean, allowToggle?: boolean, move?: boolean, borderColor?: color|zimVee, borderWidth?: number|zimVee, dashed?: number|[number]|zimVee, plane?: boolean, fade?: boolean, dynamic?: boolean, frame?: Frame, style?: boolean, group?: string, inherit?: {} })
3499
+ selectCorner(index?: number, state?: boolean): Circle
3500
+ selectSide(index?: number, state?: boolean): Circle
3501
+ updateCorner(controlObj?: Circle, refresh?: boolean): Circle
3502
+ updateSide(controlObj?: Circle, refresh?: boolean): Circle
3503
+ update(): void
3504
+ toggle(state?: boolean): this
3505
+ deselectPoints(): this
3506
+ obj:DisplayObject
3507
+ readonly blob:Blob
3508
+ readonly sides:Container
3509
+ readonly shader:Shader
3510
+ readonly uniforms:Uniforms
3511
+ toggled:boolean
3512
+ }
3513
+ export class Glitch extends Container {
3514
+ constructor(config_or_obj?: DisplayObject, glitchType?: string, alpha?: number, timeOn?: number, timeOff?: number, variance?: number, strength?: number, modifier?: number, noise?: DisplayObject, margin?: number, marginH?: number, marginV?: number, onFirst?: boolean, blendMode?: string, style?: boolean, group?: string, inherit?: {})
3515
+ constructor(config: { obj?: DisplayObject, glitchType?: string, alpha?: number, timeOn?: number, timeOff?: number, variance?: number, strength?: number, modifier?: number, noise?: DisplayObject, margin?: number, marginH?: number, marginV?: number, onFirst?: boolean, blendMode?: string, style?: boolean, group?: string, inherit?: {} })
3516
+ obj: DisplayObject
3517
+ glitchType: String
3518
+ holder: Container
3519
+ shader: Shader
3520
+ uniforms: Uniforms
3521
+ varianceID: any
3522
+ }
3473
3523
  export class Parallax {
3474
3524
  constructor(config_or_layers?: { obj: DisplayObject, prop: string, propChange: number, input?: string, inMin?: number, inMax?: number, factor?: number, integer?: boolean }[], damp?: number, auto?: boolean, stage?: Stage, startPaused?: boolean, mouseMoveOutside?: boolean, style?: boolean, group?: string, inherit?: {})
3475
3525
  constructor(config: { layers?: { obj: DisplayObject, prop: string, propChange: number, input?: string, inMin?: number, inMax?: number, factor?: number, integer?: boolean }[], damp?: number, auto?: boolean, stage?: Stage, startPaused?: boolean, mouseMoveOutside?: boolean, style?: boolean, group?: string, inherit?: {} })
@@ -3997,13 +4047,14 @@ declare namespace zim {
3997
4047
  }
3998
4048
 
3999
4049
  export class Shader extends Bitmap implements zimComponent {
4000
- constructor(config_or_width?: number, height?: number, fragment?: string, uniforms?: Uniforms, vertex?: string, dynamic?: boolean, preCall?: Function, postCall?: Function, rate?: number | zimVee, version?: string, canvas?: HTMLCanvasElement, vertexPosition?: string, strip?: boolean, log?: boolean, style?: boolean, group?: string, inherit?: {})
4050
+ constructor(config_or_width?: number, height?: number, fragment?: string, uniforms?: Uniforms, vertex?: string, dynamic?: boolean, preCall?: Function, postCall?: Function, rate?: number | zimVee, version?: string, canvas?: HTMLCanvasElement, vertexPosition?: string, strip?: boolean, log?: boolean, channel0?: DisplayObject, channel1?: DisplayObject, channel2?: DisplayObject, channel3?: DisplayObject, dynamic0?: boolean, dynamic1?: boolean, dynamic2?: boolean, dynamic3?: boolean, style?: boolean, group?: string, inherit?: {})
4001
4051
  constructor(config: { width?: number, height?: number, fragment?: string, uniforms?: Uniforms, vertex?: string, dynamic?: boolean, preCall?: Function, postCall?: Function, rate?: number | zimVee, version?: string, canvas?: HTMLCanvasElement, vertexPosition?: string, strip?: boolean, log?: boolean, style?: boolean, group?: string, inherit?: {} })
4002
4052
  // ZIM Component Interface
4003
4053
  // dispose():boolean // now added to Container, etc.
4004
4054
  enabled: boolean
4005
4055
  // END ZIM Component Interface
4006
4056
  update(): this
4057
+ replaceChannel(obj: DisplayObject, i: number, dynamic?: boolean): void
4007
4058
  dynamic: boolean
4008
4059
  rate: number
4009
4060
  readonly canvas: HTMLCanvasElement
@@ -4045,6 +4096,17 @@ declare namespace zim {
4045
4096
 
4046
4097
  // ++++++++++++++++++++++++++++++++++++++
4047
4098
  // ZIM META
4099
+ export class Monitor {
4100
+ static add(config_or_widget?: boolean, level?: number, time?: number, APP?: boolean, ZIM?: boolean, CJS?: boolean, events?: boolean, tickers?: boolean, intervals?: boolean, on?: boolean, off?: boolean, offs?: boolean, redacted?: boolean, remember?: boolean, cache?: boolean): void
4101
+ static add(config: { widget?: boolean, level?: number, time?: number, APP?: boolean, ZIM?: boolean, CJS?: boolean, events?: boolean, tickers?: boolean, intervals?: boolean, on?: boolean, off?: boolean, offs?: boolean, redacted?: boolean, remember?: boolean, cache?: boolean }): void
4102
+ static redact(obj:any, prefix?: string): void
4103
+ static redactOff(obj:any): void
4104
+ static testRedact(obj:any): boolean
4105
+ static remove(): void
4106
+ readonly panel: Panel
4107
+ redacted: boolean
4108
+ level: number
4109
+ }
4048
4110
  export var DISTILL: boolean
4049
4111
  export function distill(): void
4050
4112
  export function parseAudioSprite(audioSpriteData: { resources: string[], spritemap: {} }, outputAudioSprite?: boolean): { src: string, data: {} }