Skip to content

Commit

Permalink
🌈 style: Change the licensing agreement for comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangechen committed Sep 14, 2023
1 parent d8eeae8 commit 71561c7
Show file tree
Hide file tree
Showing 276 changed files with 427 additions and 380 deletions.
4 changes: 2 additions & 2 deletions packages/chili-core/src/application.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IShapeFactory } from "chili-geo";
import { IVisualFactory } from "chili-vis";
import { IStorage } from "./base";
import { IDocument } from "./document";
import { IService } from "./service";
import { Serialized } from "./serialize";
import { IService } from "./service";

export interface IApplication {
readonly visualFactory: IVisualFactory;
Expand Down
4 changes: 2 additions & 2 deletions packages/chili-core/src/base/asyncController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable } from "./disposable";

Expand Down Expand Up @@ -35,7 +35,7 @@ export class AsyncController implements IDisposable {
private handle(
handlers: ((result: AsyncResult) => void)[],
status: "success" | "cancel" | "fail",
message?: string
message?: string,
) {
if (this.#result === undefined) {
this.#result = { status, message };
Expand Down
12 changes: 6 additions & 6 deletions packages/chili-core/src/base/collection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable } from "./disposable";

Expand Down Expand Up @@ -48,7 +48,7 @@ export class ObservableCollection<T> implements ICollectionChanged, IDisposable
callback({
action: CollectionAction.add,
items,
})
}),
);
}

Expand All @@ -58,7 +58,7 @@ export class ObservableCollection<T> implements ICollectionChanged, IDisposable
callback({
action: CollectionAction.remove,
items,
})
}),
);
}

Expand All @@ -72,7 +72,7 @@ export class ObservableCollection<T> implements ICollectionChanged, IDisposable
action: CollectionAction.move,
from,
to,
})
}),
);
}
}
Expand All @@ -84,7 +84,7 @@ export class ObservableCollection<T> implements ICollectionChanged, IDisposable
callback({
action: CollectionAction.remove,
items,
})
}),
);
}

Expand All @@ -101,7 +101,7 @@ export class ObservableCollection<T> implements ICollectionChanged, IDisposable
action: CollectionAction.replace,
item,
items,
})
}),
);
}
}
Expand Down
9 changes: 7 additions & 2 deletions packages/chili-core/src/base/color.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

/**
* Color, RGBA format.
* [0, 0, 0, 0] ~ [1, 1, 1, 1
*/
export class Color {
constructor(readonly r: number, readonly g: number, readonly b: number, readonly a: number) {}
constructor(
readonly r: number,
readonly g: number,
readonly b: number,
readonly a: number,
) {}

/**
*
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/disposable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export interface IDisposable {
dispose(): void;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/equalityComparer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export interface IEqualityComparer<T> {
equals(left: T, right: T): boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/chili-core/src/base/history.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { INode, INodeLinkedList } from "../model";
import { IDisposable } from "./disposable";
Expand Down Expand Up @@ -72,7 +72,7 @@ export class PropertyHistoryRecord implements IHistoryRecord {
readonly object: any,
readonly property: string | symbol | number,
readonly oldValue: any,
readonly newValue: any
readonly newValue: any,
) {
this.name = `change ${String(property)} property`;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./asyncController";
export * from "./collection";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/lazy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export class Lazy<T> {
private _value?: T;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/linkedList.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

interface LinkedListNode<T> {
data: T;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export class Logger {
static debug(message?: any, ...optionalParams: any[]) {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/messageType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export enum MessageType {
info,
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/observer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { EventEmitter } from "events";
import { IDocument } from "../document";
Expand Down
6 changes: 3 additions & 3 deletions packages/chili-core/src/base/pubsub.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { CommandKeys, ICommand } from "../command";
import { IDocument } from "../document";
Expand Down Expand Up @@ -53,7 +53,7 @@ export class PubSub implements IDisposable {

sub<T extends PubSubEventMap, K extends keyof T>(
event: K,
callback: T[K] extends (...args: any[]) => any ? T[K] : never
callback: T[K] extends (...args: any[]) => any ? T[K] : never,
) {
if (!this._events.has(event)) {
this._events.set(event, new Set<(...args: any[]) => void>());
Expand All @@ -72,7 +72,7 @@ export class PubSub implements IDisposable {

remove<T extends PubSubEventMap, K extends keyof T>(
event: K,
callback: T[K] extends (...args: any[]) => any ? T[K] : never
callback: T[K] extends (...args: any[]) => any ? T[K] : never,
) {
let callbacks = this._events.get(event);
if (callbacks?.has(callback)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/result.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export type Result<T, E = string> = {
unwrap(): T;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/storage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export interface IStorage {
readonly version: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/base/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDocument } from "../document";
import { ArrayRecord, IHistoryRecord } from "./history";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/command/command.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IApplication } from "../application";

Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/command/commandKeys.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export type CommandKeys =
| "doc.new"
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/command/decarator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { CommandKeys, ICommand } from ".";
import { I18nKeys } from "../i18n";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/command/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./command";
export * from "./commandKeys";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color, Lazy, PubSub } from "./base";
import { ObjectSnapType } from "./snapType";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export class Constants {
static readonly DBName = "chili3d-db";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/converter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";

Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./converter";
export * from "./numberConverter";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/numberConverter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { IConverter } from "./converter";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/quaternionConverter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Quaternion } from "../math";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/stringConverter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { IConverter } from "./converter";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/xyzConverter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { XYZ } from "../math";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

declare module "*.module.css" {
const classes: any;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/document.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IApplication } from "./application";
import { History, IDisposable, IPropertyChanged } from "./base";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/dto/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export interface RecentDocumentDTO {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/editor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IView } from "./visual";

Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/geometry/geometry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { XYZ } from "../math";
import { CurveType } from "./shape";
Expand Down
4 changes: 2 additions & 2 deletions packages/chili-core/src/geometry/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./geometry";
export * from "./lineType";
export * from "./meshData";
export * from "./shape";
export * from "./shapeType";
export * from "./shapeConverter";
export * from "./shapeType";
2 changes: 1 addition & 1 deletion packages/chili-core/src/geometry/lineType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export enum LineType {
Solid,
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/geometry/meshData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color } from "../base";
import { Config } from "../config";
Expand Down
6 changes: 3 additions & 3 deletions packages/chili-core/src/geometry/shape.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { ISerialize } from "../serialize";
import { Result } from "../base";
import { Matrix4, Ray, XYZ } from "../math";
import { ISerialize } from "../serialize";
import { ICurve } from "./geometry";
import { IShapeMeshData } from "./meshData";
import { ShapeType } from "./shapeType";
import { Result } from "../base";

export enum CurveType {
Line,
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/geometry/shapeConverter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { IShape } from "./shape";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/geometry/shapeType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export enum ShapeType {
Compound,
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/i18n/en.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Locale } from "./local";

Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/i18n/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import en from "./en";
import { I18nKeys } from "./local";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./i18n";
export * from "./local";
2 changes: 1 addition & 1 deletion packages/chili-core/src/i18n/local.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export type Locale = {
language: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/i18n/zh-cn.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Locale } from "./local";

Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/id.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { nanoid } from "nanoid";

Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. MPL-2.0 license.
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./application";
export * from "./base";
Expand Down
Loading

0 comments on commit 71561c7

Please sign in to comment.