Skip to content

Commit

Permalink
🦄 refactor: rename  base to foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangechen committed Mar 11, 2024
1 parent ec32314 commit 3f91102
Show file tree
Hide file tree
Showing 53 changed files with 44 additions and 37 deletions.
2 changes: 1 addition & 1 deletion packages/chili-core/src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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

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,7 +1,7 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IApplication } from "../application";
import { AsyncController, Observable, PubSub } from "../base";
import { AsyncController, Observable, PubSub } from "../foundation";
import { Property } from "../property";

export interface ICommand {
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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color, Lazy, PubSub } from "./base";
import { Color, Lazy, PubSub } from "./foundation";
import { ObjectSnapType } from "./snapType";

export class VisualConfig {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/converter/colorConverter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color, Result } from "../base";
import { Color, Result } from "../foundation";
import { IConverter } from "./converter";

export class ColorConverter implements IConverter<Color> {
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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

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

export interface IConverter<TFrom = any, TTo = string> {
convert(value: TFrom): Result<TTo>;
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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Result } from "../foundation";
import { IConverter } from "./converter";

export class NumberConverter implements IConverter<number> {
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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Result } from "../foundation";
import { Quaternion } from "../math";
import { IConverter } from "./converter";

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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Result } from "../foundation";
import { IConverter } from "./converter";

export class StringConverter implements IConverter<string> {
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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Result } from "../foundation";
import { XYZ } from "../math";
import { IConverter } from "./converter";

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,7 +1,7 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IApplication } from "./application";
import { History, IDisposable, IPropertyChanged } from "./base";
import { History, IDisposable, IPropertyChanged } from "./foundation";
import { INode, INodeLinkedList } from "./model/node";
import { ISelection } from "./selection";
import { ISerialize, Serialized } from "./serialize";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ export * from "./asyncController";
export * from "./collection";
export * from "./color";
export * from "./disposable";
export * from "./dto";
export * from "./equalityComparer";
export * from "./history";
export * from "./id";
export * from "./lazy";
export * from "./linkedList";
export * from "./logger";
Expand All @@ -16,3 +18,4 @@ export * from "./pubsub";
export * from "./result";
export * from "./storage";
export * from "./transaction";
export * from "./utils";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

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

export interface FileData {
fileName: string;
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,7 +1,7 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color, Colors } from "../base";
import { Config } from "../config";
import { Color, Colors } from "../foundation";
import { XYZ } from "../math";
import { LineType } from "./lineType";
import { IShape } from "./shape";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/geometry/shape.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Result } from "../foundation";
import { Matrix4, Ray, XYZ } from "../math";
import { ICurve } from "./geometry";
import { IShapeMeshData } from "./meshData";
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,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Result } from "../base";
import { Result } from "../foundation";
import { IShape } from "./shape";

export interface IShapeConverter {
Expand Down
5 changes: 1 addition & 4 deletions packages/chili-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

export * from "./application";
export * from "./base";
export * from "./command";
export * from "./config";
export * from "./constants";
export * from "./converter";
export * from "./document";
export * from "./dto";
export * from "./editor";
export * from "./foundation";
export * from "./geometry";
export * from "./i18n";
export * from "./id";
export * from "./math";
export * from "./model";
export * from "./property";
Expand All @@ -20,5 +18,4 @@ export * from "./selectionFilter";
export * from "./serialize";
export * from "./service";
export * from "./snapType";
export * from "./utils";
export * from "./visual";
2 changes: 1 addition & 1 deletion packages/chili-core/src/math/mathUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Precision } from "../base";
import { Precision } from "../foundation";

export class MathUtils {
static degToRad(degrees: number) {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/math/planeAngle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Precision } from "../base";
import { Precision } from "../foundation";
import { Plane } from "./plane";
import { XYZ } from "./xyz";

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

import { Precision } from "../base";
import { Precision } from "../foundation";
import { MathUtils } from "./mathUtils";

export class XY {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/math/xyz.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Precision } from "../base";
import { Precision } from "../foundation";
import { Serializer } from "../serialize";
import { MathUtils } from "./mathUtils";

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

import { HistoryObservable, IEqualityComparer, Result } from "../base";
import { HistoryObservable, IEqualityComparer, Result } from "../foundation";
import { IShape } from "../geometry";
import { I18nKeys } from "../i18n";

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

import { Color, Colors, Logger } from "../base";
import { IDocument } from "../document";
import { Color, Colors, Logger } from "../foundation";
import { Id } from "../foundation/id";
import { ICompound, IShape } from "../geometry";
import { Id } from "../id";
import { Matrix4 } from "../math";
import { Property } from "../property";
import { Serializer } from "../serialize";
Expand Down
4 changes: 2 additions & 2 deletions packages/chili-core/src/model/node.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color, HistoryObservable, IDisposable, IPropertyChanged } from "../base";
import { IDocument } from "../document";
import { Color, HistoryObservable, IDisposable, IPropertyChanged } from "../foundation";
import { Id } from "../foundation/id";
import { IShape } from "../geometry";
import { Id } from "../id";
import { Matrix4 } from "../math";
import { Property } from "../property";
import { Serialized, Serializer } from "../serialize";
Expand Down
11 changes: 9 additions & 2 deletions packages/chili-core/src/model/nodeLinkedList.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Logger, NodeAction, NodeLinkedListHistoryRecord, NodeRecord, PubSub, Transaction } from "../base";
import { IDocument } from "../document";
import { Id } from "../id";
import {
Logger,
NodeAction,
NodeLinkedListHistoryRecord,
NodeRecord,
PubSub,
Transaction,
} from "../foundation";
import { Id } from "../foundation/id";
import { Serializer } from "../serialize";
import { INode, INodeLinkedList, Node } from "./node";

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

import { AsyncController, IDisposable } from "./base";
import { AsyncController, IDisposable } from "./foundation";
import { ShapeType } from "./geometry";
import { I18nKeys } from "./i18n";
import { IModel, INode } from "./model";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/eventHandler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable } from "../base";
import { IDisposable } from "../foundation";
import { IView } from "./view";

export interface IEventHandler extends IDisposable {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/textGenerator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color } from "../base";
import { Color } from "../foundation";
import { IVisualObject } from "./visualObject";

export interface ITextGenerator {
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/view.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable, IPropertyChanged } from "../base";
import { IDisposable, IPropertyChanged } from "../foundation";
import { ShapeType } from "../geometry";
import { Plane, Ray, XY, XYZ } from "../math";
import { IShapeFilter } from "../selectionFilter";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/viewer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable } from "../base";
import { IDisposable } from "../foundation";
import { Plane } from "../math";
import { CursorType } from "./cursorType";
import { IView } from "./view";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/visual.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable } from "../base";
import { IDocument } from "../document";
import { IDisposable } from "../foundation";
import { IEventHandler } from "./eventHandler";
import { IHighlighter } from "./highlighter";
import { ITextGenerator } from "./textGenerator";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/visualContext.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { IDisposable } from "../base";
import { IDisposable } from "../foundation";
import { ShapeMeshData } from "../geometry";
import { IModel } from "../model";
import { IVisualObject } from "./visualObject";
Expand Down
2 changes: 1 addition & 1 deletion packages/chili-core/src/visual/visualShape.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Chili authors. All rights reserved. AGPL-3.0 license.

import { Color } from "../base";
import { Color } from "../foundation";
import { IShape, ShapeType } from "../geometry";
import { IVisualObject } from "./visualObject";

Expand Down

0 comments on commit 3f91102

Please sign in to comment.