Skip to content

Commit

Permalink
Merge branch 'release/0.7.0' into released
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Mar 3, 2020
2 parents aedeb20 + 926d45f commit df4b51f
Show file tree
Hide file tree
Showing 58 changed files with 1,532 additions and 907 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:11.0
- image: circleci/node:13.0
working_directory: ~/repo
steps:
# build holoflows-kit
Expand All @@ -23,6 +23,7 @@ jobs:
paths:
- node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}
- run: yarn eslint
- run: yarn build
- save_cache:
paths:
Expand All @@ -41,7 +42,7 @@ jobs:
destination: /esmodule.zip
test:
docker:
- image: circleci/node:11.0
- image: circleci/node:13.0
working_directory: ~/repo
steps:
- checkout
Expand Down
11 changes: 11 additions & 0 deletions .env-cmdrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"production": {
"NODE_ENV": "production"
},
"development": {
"NODE_ENV": "development"
},
"test": {
"TS_NODE_COMPILER_OPTIONS": "{\"module\":\"commonjs\"}"
}
}
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
es
doc
temp
*.spec.ts
*.test.ts
umd
37 changes: 37 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [],
"env": {},
"rules": {
"no-debugger": "error",
"no-plusplus": "error",
"no-bitwise": "error",
"no-new-wrappers": "error",
"constructor-super": "error",
"no-redeclare": "error",
"no-eval": "error",
"no-template-curly-in-string": "error",
"no-return-await": "error",
"no-sparse-arrays": "error",
"dot-notation": "error",
"no-fallthrough": "error",
"prefer-const": "error",
"eqeqeq": "error",
"no-extra-bind": "error",
"use-isnan": "error",
"@typescript-eslint/strict-boolean-expressions": [
2,
{
"allowNullable": true,
"allowSafe": true,
"ignoreRhs": true
}
]
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @holoflows/kit · ![GitHub license](https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square) [![npm version](https://img.shields.io/npm/v/@holoflows/kit.svg?style=flat-square)](https://www.npmjs.com/package/@holoflows/kit) ![Ciecle CI](https://img.shields.io/circleci/project/github/DimensionDev/holoflows-kit.svg?style=flat-square&logo=circleci)
# @holoflows/kit · ![GitHub license](https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square) [![npm version](https://img.shields.io/npm/v/@holoflows/kit.svg?style=flat-square)](https://www.npmjs.com/package/@holoflows/kit) [![Ciecle CI](https://img.shields.io/circleci/build/gh/DimensionDev/Holoflows-Kit.svg?logo=circleci&style=flat-square)](https://circleci.com/gh/DimensionDev/Holoflows-Kit)

Toolkit for modern Webflows development.
Toolkit for developing Augmented Virtuality.

## Documentation

Expand Down
28 changes: 0 additions & 28 deletions api-documents/kit.asynccall.md

This file was deleted.

28 changes: 0 additions & 28 deletions api-documents/kit.asyncgeneratorcall.md

This file was deleted.

13 changes: 0 additions & 13 deletions api-documents/kit.eventwatcher.enablesinglemode.md

This file was deleted.

1 change: 0 additions & 1 deletion api-documents/kit.eventwatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ document.addEventListener('event', e.eventListener)
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [enableSingleMode](./kit.eventwatcher.enablesinglemode.md) | | <code>() =&gt; EventWatcher&lt;T, Before, After, true&gt;</code> | Enable single mode. |
| [eventListener](./kit.eventwatcher.eventlistener.md) | | <code>() =&gt; void</code> | Use this function as event listener to invoke watcher. |
13 changes: 0 additions & 13 deletions api-documents/kit.intervalwatcher.enablesinglemode.md

This file was deleted.

6 changes: 0 additions & 6 deletions api-documents/kit.intervalwatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ new IntervalWatcher(ls)

```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [enableSingleMode](./kit.intervalwatcher.enablesinglemode.md) | | <code>() =&gt; IntervalWatcher&lt;T, Before, After, true&gt;</code> | Enable single mode. |
## Methods
| Method | Modifiers | Description |
Expand Down
22 changes: 0 additions & 22 deletions api-documents/kit.liveselector.evaluateonce.md

This file was deleted.

1 change: 0 additions & 1 deletion api-documents/kit.liveselector.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ ls.evaluate() // returns all urls at the current time.
| [enableSingleMode()](./kit.liveselector.enablesinglemode.md) | | Enable single mode. Only 1 result will be emitted. |
| [enhanceDebugger()](./kit.liveselector.enhancedebugger.md) | <code>static</code> | Call this function to enhance the debug experience in the Chrome DevTools<!-- -->You need to open "Enable custom formatters" in your DevTools settings. |
| [evaluate()](./kit.liveselector.evaluate.md) | | Evaluate selector expression |
| [evaluateOnce()](./kit.liveselector.evaluateonce.md) | | Evaluate selector expression |
| [filter(f)](./kit.liveselector.filter.md) | | Select the elements of a LiveSelector that meet the condition specified in a callback function. |
| [flat()](./kit.liveselector.flat.md) | | Flat T\[\]\[\] to T\[\] |
| [getElementsByClassName(className)](./kit.liveselector.getelementsbyclassname.md) | | Select all element base on the current result. |
Expand Down
6 changes: 1 addition & 5 deletions api-documents/kit.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ A toolkit for browser extension developing.

| Function | Description |
| --- | --- |
| [AsyncCall(implementation, options)](./kit.asynccall.md) | |
| [AsyncGeneratorCall(implementation, options)](./kit.asyncgeneratorcall.md) | |
| [AutomatedTabTask(taskImplements, options)](./kit.automatedtabtask.md) | Open a new page in the background, execute some task, then close it automatically. |
| [DomProxy(args)](./kit.domproxy.md) | DOMProxy provide an interface that be stable even dom is changed. |
| [DOMProxy(options)](./kit.domproxy.md) | DOMProxy provide an interface that be stable even dom is changed. |
| [GetContext()](./kit.getcontext.md) | Get current running context. |
| [OnlyRunInContext(context, name)](./kit.onlyrunincontext.md) | Make sure this file only run in wanted context |
Expand All @@ -38,10 +35,9 @@ A toolkit for browser extension developing.
| [AutomatedTabTaskDefineTimeOptions](./kit.automatedtabtaskdefinetimeoptions.md) | Define-time options for [AutomatedTabTask()](./kit.automatedtabtask.md) |
| [AutomatedTabTaskRuntimeOptions](./kit.automatedtabtaskruntimeoptions.md) | Runtime options for [AutomatedTabTask()](./kit.automatedtabtask.md) |
| [AutomatedTabTaskSharedOptions](./kit.automatedtabtasksharedoptions.md) | Shared options for AutomatedTabTask between the define-time and the runtime. |
| [DomProxy](./kit.domproxy.md) | DOMProxy provide an interface that be stable even dom is changed. |
| [DOMProxy](./kit.domproxy.md) | DOMProxy provide an interface that be stable even dom is changed. |
| [DomProxyOptions](./kit.domproxyoptions.md) | Options for DOMProxy |
| [DOMProxyOptions](./kit.domproxyoptions.md) | Options for DOMProxy |
| [Serialization](./kit.serialization.md) | Define how to do serialization and deserialization of remote procedure call |

## Namespaces

Expand Down
3 changes: 2 additions & 1 deletion api-documents/kit.messagecenter._constructor_.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Constructs a new instance of the `MessageCenter` class
<b>Signature:</b>

```typescript
constructor(instanceKey?: string);
constructor(sendToSelf: boolean, instanceKey?: string);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sendToSelf | <code>boolean</code> | If this MessageCenter will send message to this instance itself |
| instanceKey | <code>string</code> | Use this instanceKey to distinguish your messages and others. This option cannot make your message safe! |

3 changes: 1 addition & 2 deletions api-documents/kit.messagecenter.emit.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Send message to local or other instance of extension
<b>Signature:</b>

```typescript
emit<Key extends keyof ITypedMessages>(key: Key, data: ITypedMessages[Key], alsoSendToDocument?: boolean): Promise<void>;
emit<Key extends keyof ITypedMessages>(key: Key, data: ITypedMessages[Key]): Promise<void>;
```
## Parameters
Expand All @@ -18,7 +18,6 @@ emit<Key extends keyof ITypedMessages>(key: Key, data: ITypedMessages[Key], also
| --- | --- | --- |
| key | <code>Key</code> | Key of the message |
| data | <code>ITypedMessages[Key]</code> | Data of the message |
| alsoSendToDocument | <code>boolean</code> | ! Send message to document. This may leaks secret! Only open in localhost! |
<b>Returns:</b>
Expand Down
9 changes: 4 additions & 5 deletions api-documents/kit.messagecenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ export declare class MessageCenter<ITypedMessages>

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(instanceKey)](./kit.messagecenter._constructor_.md) | | Constructs a new instance of the <code>MessageCenter</code> class |
| [(constructor)(sendToSelf, instanceKey)](./kit.messagecenter._constructor_.md) | | Constructs a new instance of the <code>MessageCenter</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [serialization](./kit.messagecenter.serialization.md) | | <code>import(&quot;async-call-rpc/out/Async-Call&quot;).Serialization</code> | How should MessageCenter serialization the message |
| [writeToConsole](./kit.messagecenter.writetoconsole.md) | | <code>boolean</code> | Should MessageCenter prints all messages to console? |
| [serialization](./kit.messagecenter.serialization.md) | | <code>Serialization</code> | How should MessageCenter serialization the message |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [emit(key, data, alsoSendToDocument)](./kit.messagecenter.emit.md) | | Send message to local or other instance of extension |
| [emit(key, data)](./kit.messagecenter.emit.md) | | Send message to local or other instance of extension |
| [off(event, handler)](./kit.messagecenter.off.md) | | Remove the listener of an event |
| [on(event, handler)](./kit.messagecenter.on.md) | | Listen to an event |
| [send(args)](./kit.messagecenter.send.md) | | Send message to local or other instance of extension |
| [writeToConsole(on)](./kit.messagecenter.writetoconsole.md) | | Should MessageCenter prints all messages to console? |

24 changes: 0 additions & 24 deletions api-documents/kit.messagecenter.send.md

This file was deleted.

2 changes: 1 addition & 1 deletion api-documents/kit.messagecenter.serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ How should MessageCenter serialization the message
<b>Signature:</b>

```typescript
serialization: import("async-call-rpc/out/Async-Call").Serialization;
serialization: Serialization;
```
15 changes: 13 additions & 2 deletions api-documents/kit.messagecenter.writetoconsole.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@

[Home](./index.md) &gt; [@holoflows/kit](./kit.md) &gt; [MessageCenter](./kit.messagecenter.md) &gt; [writeToConsole](./kit.messagecenter.writetoconsole.md)

## MessageCenter.writeToConsole property
## MessageCenter.writeToConsole() method

Should MessageCenter prints all messages to console?

<b>Signature:</b>

```typescript
writeToConsole: boolean;
writeToConsole(on: boolean): this;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| on | <code>boolean</code> | |

<b>Returns:</b>

`this`

15 changes: 15 additions & 0 deletions api-documents/kit.mutationobserverwatcher.defaultstarterforthen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holoflows/kit](./kit.md) &gt; [MutationObserverWatcher](./kit.mutationobserverwatcher.md) &gt; [defaultStarterForThen](./kit.mutationobserverwatcher.defaultstarterforthen.md)

## MutationObserverWatcher.defaultStarterForThen() method

<b>Signature:</b>

```typescript
protected defaultStarterForThen(): void;
```
<b>Returns:</b>

`void`

13 changes: 0 additions & 13 deletions api-documents/kit.mutationobserverwatcher.enablesinglemode.md

This file was deleted.

Loading

0 comments on commit df4b51f

Please sign in to comment.