Skip to content

Commit e8ecdac

Browse files
committed
1.1.2
* TS upgrade > typings * code coverage non-functional
1 parent 5088024 commit e8ecdac

File tree

6 files changed

+61
-49
lines changed

6 files changed

+61
-49
lines changed

ApiChain.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ setProp = ( refObj, k, ApiChainLocal )=>
77
if( typeof refObj[ k ] == 'function' )
88
{ ApiChainLocal.prototype[ k ] = function( ...args )
99
{ if( k.startsWith('get') )
10-
return this.length ? this[0][k](...args) : undefined;
10+
{
11+
if( this.length )
12+
return this[ 0 ][ k ]( ...args )
13+
else
14+
return;
15+
}
1116
this.forEach( el => el[ k ]( ...args ) );
1217
return this;
1318
}
1419
}else
1520
{ Object.defineProperty( ApiChainLocal.prototype, k,
16-
{ get : function(){ return this.length ? this[ 0 ][ k ] : undefined }
21+
{ get : function(){ if( this.length ) return this[ 0 ][ k ] }
1722
, set: function( v )
1823
{ this.forEach( el => el[ k ] = v );
1924
return v

CssChain.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { setProp } from './ApiChain.js';
22
export const map = (arr, ...args ) => Array.prototype.map.apply( arr, args );
33
export const csv = (arr, ...args ) => map( arr, ...args ).join(',');
44

5-
export const collectionText = arr=> map(arr, e=>getNodeText(e)).join('')
5+
export const collectionText = arr=> map(arr, e=>getNodeText(e)).join('');
66
const createEl = tag=> document.createElement(tag);
77
function nodeProp( tag, prop, val ){ const el = createEl(tag); el[prop]=val; return el; }
8+
export function isNode(n){ return !!n?.nodeType; }
89

910
const nop = ()=>''
1011
, isArr = a => Array.isArray(a) || (a && 'function' === typeof a.forEach)
1112
, isT = (a,t) => typeof a === t
1213
, isStr = a => isT(a, 'string')
1314
, isNum = a => isT(a, 'number')
1415
, isFn = a => isT(a, 'function')
15-
, isNode = n => n && n.nodeType
1616
, inWC = n => n.getRootNode().host
1717
, hasAssigned = n=> inWC(n) && n.assignedNodes
1818
, each = (arr, cb )=> (arr.forEach(cb),arr)

HTMLElementMixin.d.ts

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -547,112 +547,112 @@ The event listener is appended to target's event listener list and is not append
547547
removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean):CssChainT;
548548

549549

550-
ariaAtomic:string;
550+
ariaAtomic:string|null;
551551

552552

553-
ariaAutoComplete:string;
553+
ariaAutoComplete:string|null;
554554

555555

556-
ariaBusy:string;
556+
ariaBusy:string|null;
557557

558558

559-
ariaChecked:string;
559+
ariaChecked:string|null;
560560

561561

562-
ariaColCount:string;
562+
ariaColCount:string|null;
563563

564564

565-
ariaColIndex:string;
565+
ariaColIndex:string|null;
566566

567567

568-
ariaColSpan:string;
568+
ariaColSpan:string|null;
569569

570570

571-
ariaCurrent:string;
571+
ariaCurrent:string|null;
572572

573573

574-
ariaDisabled:string;
574+
ariaDisabled:string|null;
575575

576576

577-
ariaExpanded:string;
577+
ariaExpanded:string|null;
578578

579579

580-
ariaHasPopup:string;
580+
ariaHasPopup:string|null;
581581

582582

583-
ariaHidden:string;
583+
ariaHidden:string|null;
584584

585585

586-
ariaKeyShortcuts:string;
586+
ariaKeyShortcuts:string|null;
587587

588588

589-
ariaLabel:string;
589+
ariaLabel:string|null;
590590

591591

592-
ariaLevel:string;
592+
ariaLevel:string|null;
593593

594594

595-
ariaLive:string;
595+
ariaLive:string|null;
596596

597597

598-
ariaModal:string;
598+
ariaModal:string|null;
599599

600600

601-
ariaMultiLine:string;
601+
ariaMultiLine:string|null;
602602

603603

604-
ariaMultiSelectable:string;
604+
ariaMultiSelectable:string|null;
605605

606606

607-
ariaOrientation:string;
607+
ariaOrientation:string|null;
608608

609609

610-
ariaPlaceholder:string;
610+
ariaPlaceholder:string|null;
611611

612612

613-
ariaPosInSet:string;
613+
ariaPosInSet:string|null;
614614

615615

616-
ariaPressed:string;
616+
ariaPressed:string|null;
617617

618618

619-
ariaReadOnly:string;
619+
ariaReadOnly:string|null;
620620

621621

622-
ariaRequired:string;
622+
ariaRequired:string|null;
623623

624624

625-
ariaRoleDescription:string;
625+
ariaRoleDescription:string|null;
626626

627627

628-
ariaRowCount:string;
628+
ariaRowCount:string|null;
629629

630630

631-
ariaRowIndex:string;
631+
ariaRowIndex:string|null;
632632

633633

634-
ariaRowSpan:string;
634+
ariaRowSpan:string|null;
635635

636636

637-
ariaSelected:string;
637+
ariaSelected:string|null;
638638

639639

640-
ariaSetSize:string;
640+
ariaSetSize:string|null;
641641

642642

643-
ariaSort:string;
643+
ariaSort:string|null;
644644

645645

646-
ariaValueMax:string;
646+
ariaValueMax:string|null;
647647

648648

649-
ariaValueMin:string;
649+
ariaValueMin:string|null;
650650

651651

652-
ariaValueNow:string;
652+
ariaValueNow:string|null;
653653

654654

655-
ariaValueText:string;
655+
ariaValueText:string|null;
656656

657657

658658
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions):CssChainT;
@@ -994,6 +994,9 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
994994

995995
onscroll:((this: GlobalEventHandlers, ev: Event) => any)|null;
996996

997+
998+
onsecuritypolicyviolation:((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any)|null;
999+
9971000
/** Occurs when the seek operation ends. <br/>*/
9981001

9991002
onseeked:((this: GlobalEventHandlers, ev: Event) => any)|null;
@@ -1012,6 +1015,9 @@ Throws a "HierarchyRequestError" DOMException if the constraints of the node tre
10121015

10131016
onselectstart:((this: GlobalEventHandlers, ev: Event) => any)|null;
10141017

1018+
1019+
onslotchange:((this: GlobalEventHandlers, ev: Event) => any)|null;
1020+
10151021
/** Occurs when the download has stopped. <br/>*/
10161022

10171023
onstalled:((this: GlobalEventHandlers, ev: Event) => any)|null;
@@ -2028,8 +2034,9 @@ The event listener is appended to target's event listener list and is not append
20282034

20292035
isMap:boolean;
20302036

2037+
/** Sets or retrieves the policy for loading image elements that are outside the viewport. <br/>*/
20312038

2032-
loading:string;
2039+
loading:"eager"|"lazy";
20332040

20342041

20352042
lowsrc:string;

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ _HTML template/slot and DOM manipulation library_
44
_Collection API inherits the element API and Array._
55

66
[![git][github-image] GitHub](https://github.com/sashafirsov/css-chain)
7-
| Demo: [css-chain](https://unpkg.com/[email protected].1/dist/demo.html)
7+
| Demo: [css-chain](https://unpkg.com/[email protected].2/dist/demo.html)
88
| [tests project](https://github.com/sashafirsov/css-chain-test)
99

1010
[![NPM version][npm-image]][npm-url] [![coverage][coverage-image]][coverage-url]
@@ -212,10 +212,10 @@ ApiChain( [a,b] ).f1().f2() // would reuse API generated in previous call
212212
[github-image]: https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg
213213
[npm-image]: https://img.shields.io/npm/v/css-chain.svg
214214
[npm-url]: https://npmjs.org/package/css-chain
215-
[coverage-image]: https://unpkg.com/[email protected].1/coverage/coverage.svg
216-
[coverage-url]: https://unpkg.com/[email protected].1/coverage/lcov-report/index.html
217-
[PokeApi-explorer-image]: https://unpkg.com/[email protected].1/src/PokeApi-Explorer.png
218-
[PokeApi-explorer-url]: https://unpkg.com/[email protected].1/src/PokeApi-Explorer.html
215+
[coverage-image]: https://unpkg.com/[email protected].2/coverage/coverage.svg
216+
[coverage-url]: https://unpkg.com/[email protected].2/coverage/lcov-report/index.html
217+
[PokeApi-explorer-image]: https://unpkg.com/[email protected].2/src/PokeApi-Explorer.png
218+
[PokeApi-explorer-url]: https://unpkg.com/[email protected].2/src/PokeApi-Explorer.html
219219
[css-chain-image]: ChainedCalls.png
220220
[css-chain-link]: https://github.com/sashafirsov/css-chain-test/blob/9edc6edac6bc6c22c078e2fd987b37a7721947ee/src/PokeApi-Explorer.js#L140
221221
[element-api-image]: ElementAPI.png

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "css-chain",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "ApiChain and CssChain JS. Collection API inherits the Array and element API.",
55
"browser": "CssChain.js",
66
"module": "CssChain.js",

0 commit comments

Comments
 (0)