Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/planning/design-analysis-self-describing-widget-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,20 @@ resolves those needs at construction time.

```javascript
export class UIToggleButton extends _BaseComponent {
// jshint ignore:start
static REQUIREMENTS = [
require('settings:internalPropertyName', 'boolean')
, require('classToken')
, require('label', val=>`turn ${val} off`)
, require('label', val=>`turn ${val} on`)
, require('label', val=>`Toggle ${val}`)
];
// jshint ignore:end

constructor(widgetBus, classToken, labelIsOn, labelIsOff, title) { ... }
}
```

```javascript
export class UIColorChooser extends _BaseContainerComponent {
// jshint ignore:start
static REQUIREMENTS = [
require('settings:rootPath')
, require('zones')
Expand All @@ -124,7 +121,6 @@ export class UIColorChooser extends _BaseContainerComponent {
, require('updateDefaultsDependencies')
, require('raw:requireUpdateDefaults')
];
// jshint ignore:end

constructor(widgetBus, zones, label, getDefault,
updateDefaultsDependencies, requireUpdateDefaults) { ... }
Expand Down
3 changes: 0 additions & 3 deletions lib/js/affixed-line-breaks.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true */


/**
* Setting the widest wdth/wght/opsz combination the font can handle.
*/
Expand Down
26 changes: 4 additions & 22 deletions lib/js/char-groups-data.mjs
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
/* jshint esversion: 11, module:true, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/

import {
deepFreeze
} from './util.mjs';
import { deepFreeze } from './util.mjs';

// NOTE: the glyph-groups name is historical, the data in fact defines
// character/char-codes that map to glyphs in the font and in text shaping,
// calling it "glyphs" is the wrog term.
const charGroupsURL = import.meta.resolve('../assets/glyph-groups.json')
// jsHint warns here:
// "Expected an identifier and instead saw 'await' (a reserved word)."
// this should be resolved in jshint in the future, maybe with the
// option "esversion: 13" when available. the "ignore:start/end" can be
// removed then.
// See: https://github.com/jshint/jshint/issues/3447
// Also waiting for: https://v8.dev/features/import-assertions
// import json from './foo.json' assert { type: 'json' };
// https://github.com/jshint/jshint/issues/3580
, charGroupsData = deepFreeze(
//jshint ignore:start
await
// jshint ignore:end
fetch(charGroupsURL).then(response=>response.json())
)
;
import json from '../assets/glyph-groups.json' with { type: 'json' };

const charGroupsData = deepFreeze(json);

export default charGroupsData;
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement
import {
Path
} from '../../metamodel.mjs';
Expand Down
4 changes: 0 additions & 4 deletions lib/js/components/actors/actors-base.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
ForeignKey
, CoherenceFunction
Expand Down
5 changes: 1 addition & 4 deletions lib/js/components/actors/actors-meta.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement
import {
Path
} from '../../metamodel.mjs';
Expand All @@ -20,7 +17,7 @@ import {
} from '../animation-animanion.mjs';

class ActorsMeta extends _BaseDynamicCollectionContainerComponent {
[HANDLE_CHANGED_AS_NEW] = true; // jshint ignore:line
[HANDLE_CHANGED_AS_NEW] = true;
constructor(widgetBus, zones, initAnimanionFn, isInheritingPropertyFn
, widgets=[]) {
super(widgetBus, zones, widgets);
Expand Down
4 changes: 0 additions & 4 deletions lib/js/components/actors/available-actors.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
_AbstractSimpleOrEmptyModel
} from '../../metamodel.mjs';
Expand Down
4 changes: 0 additions & 4 deletions lib/js/components/actors/layer.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
_BaseActorModel
, ActorsModel
Expand Down
6 changes: 0 additions & 6 deletions lib/js/components/actors/line-of-text.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
_BaseActorModel
, genericActorMixin
Expand Down Expand Up @@ -49,9 +45,7 @@ export const LineOfTextActorModel = _BaseActorModel.createClass(
);

export class LineOfTextActorRenderer extends _BaseComponent {
// jshint ignore:start
static TEMPLATE = `<span class="actor_renderer-line_of_text">(content not initialized)</span>`;
// jshint ignore:end
constructor(widgetBus) {
super(widgetBus);
[this.element] = this.initTemplate();
Expand Down
4 changes: 0 additions & 4 deletions lib/js/components/actors/models.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
ForeignKey
// , unwrapPotentialWriteProxy
Expand Down
4 changes: 0 additions & 4 deletions lib/js/components/actors/properties-util.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
validateOpenTypeTagString
} from '../../util.mjs';
Expand Down
8 changes: 0 additions & 8 deletions lib/js/components/actors/simple-svg.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
_BaseActorModel
, genericActorMixin
Expand Down Expand Up @@ -60,13 +56,11 @@ export const CircleActorModel = _BaseActorModel.createClass(
;

export class CircleActorRenderer extends _BaseComponent {
// jshint ignore:start
static TEMPLATE = `<svg
viewBox="0 0 0 0"
>
<circle cx="0" cy="0" r="0" />
</svg>`;
// jshint ignore:end
constructor(widgetBus) {
super(widgetBus);
[this.element, this.circle] = this.initTemplate();
Expand Down Expand Up @@ -129,13 +123,11 @@ export class CircleActorRenderer extends _BaseComponent {
}

export class RectangleActorRenderer extends _BaseComponent {
// jshint ignore:start
static TEMPLATE = `<svg
viewBox="0 0 0 0"
>
<rect width="0" height="0" />
</svg>`;
// jshint ignore:end
constructor(widgetBus) {
super(widgetBus);
[this.element, this.shape] = this.initTemplate();
Expand Down
4 changes: 0 additions & 4 deletions lib/js/components/actors/stage.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
StaticNode
} from '../generic.mjs';
Expand Down
10 changes: 0 additions & 10 deletions lib/js/components/actors/videoproof-array.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/* jshint esversion: 11, browser: true, module: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true, elision: true*/
/* jshint -W008 */ // leading dot in decimals...
/* jshint -W028 */ // labels on if statement

import {
zip
} from '../../util.mjs';
Expand Down Expand Up @@ -215,9 +211,7 @@ function _getCellContents(charGroupsData, fonts, propertyValuesMap, previousStat
}

export class VideoproofArrayActorRenderer extends _BaseComponent {
// jshint ignore:start
static TEMPLATE = `<div class="actor_renderer-videoproof_array fixed-line-breaks">(content not initialized)</div>`;
// jshint ignore:end
constructor(widgetBus, charGroupsData) {
super(widgetBus);
// This is attached to the ModelType, so we don't have to hard
Expand Down Expand Up @@ -411,9 +405,7 @@ export const VideoproofArrayV2ActorModel = _BaseActorModel.createClass(
);

export class VideoproofArrayV2CellActorRenderer extends _BaseComponent {
// jshint ignore:start
static TEMPLATE = `<div class="actor_renderer-videoproof_array_v2-cell">[?]</div>`;
// jshint ignore:end
constructor(widgetBus) {
super(widgetBus);
[this.element] = this.initTemplate();
Expand Down Expand Up @@ -629,9 +621,7 @@ export class Pointer32StackAlloc {
* also only defines those methods.
*/
export class VideoproofArrayV2ActorRenderer extends _BaseContainerComponent {
// jshint ignore:start
static TEMPLATE = `<div class="actor_renderer-videoproof_array_v2"></div>`;
// jshint ignore:end
constructor(widgetBus, _zones, charGroupsData) {
widgetBus.wrapper.setProtocolHandlerImplementation(
...SimpleProtocolHandler.create('cellContent@', {treatAdressAsRootPath: false}));
Expand Down
12 changes: 3 additions & 9 deletions lib/js/components/animation-animanion.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true */
/* jshint -W008 */ // leading dot in decimals...

import {
zip
, enumerate
Expand Down Expand Up @@ -467,7 +464,7 @@ const _NOTDEF = Symbol('_NOTDEF');
* innerAnimanion = new Animanion(outerAnimanion, axisLocationsGen, keyMoments, isLoop);
*/
export class LocalScopeAnimanion {
static _NOTDEF = _NOTDEF // jshint ignore:line
static _NOTDEF = _NOTDEF
constructor(propertiesGenerators, keyMoments, isLoop) {
this._propertiesGenerators = propertiesGenerators;
this.keyMoments = keyMoments;
Expand Down Expand Up @@ -713,13 +710,13 @@ export class LocalScopeAnimanion {
}

export class HierarchicalScopeAnimanion {
static _NOTDEF = Symbol('_NOTDEF'); // jshint ignore:line
static _NOTDEF = Symbol('_NOTDEF');

/**
* Can be used as an argument to getPropertiesFromGlobalT,
* getLocalTs, and getLocalT
*/
static LAST_T = Symbol('LAST_T'); // jshint ignore:line
static LAST_T = Symbol('LAST_T');
get LAST_T() {
return this.constructor.LAST_T;
}
Expand Down Expand Up @@ -903,7 +900,6 @@ export class AnimationLiveProperties extends _BaseComponent {
* (outerAnimanion, propertiesGenerator, keyMoments, isLoop);
*/
_initAnimanion(keyMoments, isLoop/*, parentProperties=null*/) {
// jshint unused:vars
throw new Error(`NOT IMPLEMENTED _initAnimanion(${keyMoments}, ${isLoop})`);
}

Expand Down Expand Up @@ -1076,15 +1072,13 @@ export class AnimationLiveProperties extends _BaseComponent {
* This is mainly for development/debugging.
*/
export class AnimationInfo extends _BaseComponent {
//jshint ignore:start
static TEMPLATE = `<div class="animation_info">
<h3>Animation Info</h3>
<h4>Basic Fields</h4>
<ol class="animation_info-basic_fields"></ol>
<h4>Animated Properties</h4>
<ol class="animation_info-properties"></ol>
</div>`;
//jshint ignore:end
constructor(widgetBus) {
super(widgetBus);
this._basicKeys = ['t', 'duration', 'isLoop', 'perpetual', 'playing'];
Expand Down
3 changes: 0 additions & 3 deletions lib/js/components/animation-fundamentals.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true */
/* jshint -W008 */ // leading dot in decimals...

import {
// Path
//, getEntry
Expand Down
5 changes: 1 addition & 4 deletions lib/js/components/animation-t-generator.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* jshint esversion: 11, browser: true, unused:true, undef:true, laxcomma: true, laxbreak: true, devel: true */
/* jshint -W008 */ // leading dot in decimals...

import {
_BaseComponent
} from './basics.mjs';
Expand Down Expand Up @@ -153,7 +150,7 @@ export class AnimationTGenerator extends _BaseComponent {
}

_setRunning(isRunning) {
if(this._running === !!isRunning) // jshint ignore:line
if(this._running === !!isRunning)
return;

// changed
Expand Down
6 changes: 0 additions & 6 deletions lib/js/components/axes-math.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@ export class UIAxesMathLocationValue extends _UIBaseList.UIItem {
static TYPE_CLASS_PART = null;
static ITEM_DATA_TRANSFER_TYPE_PATH = DATA_TRANSFER_TYPES.AXESMATH_LOCATION_VALUE_PATH;

// jshint ignore: start
static TEMPLATE = `<div
tabindex="0"
><!-- insert: label-element --><!-- insert: drag-handle --><select
Expand All @@ -515,7 +514,6 @@ export class UIAxesMathLocationValue extends _UIBaseList.UIItem {
step="0.01"
size="5"
/><output>(UNINITIALIZED)</output></div>`;
// jshint ignore: end
_initTemplate() {
const element = this._domTool.createFragmentFromHTML(this.constructor.TEMPLATE).firstElementChild
, selectLogicalValue = element.querySelector('select')
Expand Down Expand Up @@ -649,13 +647,11 @@ class UIAxesMathAxisTagChange extends _UIBaseMap.UIKeyChange /* is UIBaseMapKeyC
}

class _UIBaseAxesMap extends _UIBaseMap {
// jshint ignore: start
static ROOT_CLASS = `ui_axes_math-map`
static BASE_CLASSES = [...super.BASE_CLASSES, super.ROOT_CLASS]
static UIKeyCreate = UIAxesMathAxisTagCreate;
static UIKeyChange = UIAxesMathAxisTagChange;
static KEY_ADD_BUTTON_LABEL = 'add tag';
// jshint ignore: end
_validateKeyString(key) {
const [valid, message] = super._validateKeyString(key);
if(!valid)
Expand Down Expand Up @@ -905,15 +901,13 @@ class UIAxesMathLocationsSum extends _UIBaseList {
}

class UIKeyMomentsLinkNavigation extends _BaseComponent {
// jshint ignore: start
static TEMPLATE = `<div class="ui_key_moments_link_navigation">
<h4 class="ui_key_moments_link_navigation-label"><!-- insert: label --></h4>
<ol class="ui_key_moments_link_navigation-list"></ol>
</div>`;
static ITEM_TEMPLATE = `<li class="ui_key_moments_link_navigation-list_item"
><a class="ui_key_moments_link_navigation-list_item-input"
><!-- insert: label --></a></li>`;
// jshint ignore: end
constructor(widgetBus, label=null) {
super(widgetBus);
this._inputToKey = new Map();
Expand Down
Loading
Loading