Skip to content

Commit d471dfe

Browse files
authored
Merge pull request #71 from bcdev/forman-x-tiny_renaming
Tiny renaming
2 parents 3a479bc + 1b9f289 commit d471dfe

File tree

10 files changed

+14
-12
lines changed

10 files changed

+14
-12
lines changed

chartlets.js/CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
Using monorepo layout for `chartlets.js` with workspaces `lib` and `demo`
55
that host the packages for `chartlets` and `chartlets-demo`.
66

7+
* Other code reorganisations:
8+
- moved `component/Registry` into `store`
9+
- renamed module `component` into `components`
10+
- no longer exposing `Registry` type
11+
712
* Chartlets now allows for plugins that can provide individual component
813
implementations.
914
The Vega-based chart and MUI components are now optional and have been

chartlets.js/packages/lib/src/actions/configureFramework.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
FrameworkOptions,
55
PluginLike,
66
} from "@/types/state/options";
7-
import { registry } from "@/component/Registry";
7+
import { registry } from "@/components/registry";
88
import { isPromise } from "@/utils/isPromise";
99
import { isFunction } from "@/utils/isFunction";
1010
import { isObject } from "@/utils/isObject";

chartlets.js/packages/lib/src/component/Children.test.tsx renamed to chartlets.js/packages/lib/src/components/Children.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { FC } from "react";
22
import { describe, it, expect, beforeEach, afterEach } from "vitest";
33
import { render, screen } from "@testing-library/react";
4-
import { registry } from "@/component/Registry";
4+
import { registry } from "@/components/registry";
55
import { type ComponentProps } from "./Component";
66
import { Children } from "./Children";
77

File renamed without changes.

chartlets.js/packages/lib/src/component/Component.test.tsx renamed to chartlets.js/packages/lib/src/components/Component.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, it, expect, beforeEach, afterEach } from "vitest";
22
import { render, screen } from "@testing-library/react";
33
import { Component, type ComponentProps } from "./Component";
4-
import { registry } from "@/component/Registry";
4+
import { registry } from "@/components/registry";
55
import type { FC } from "react";
66

77
describe("Component", () => {

chartlets.js/packages/lib/src/component/Component.tsx renamed to chartlets.js/packages/lib/src/components/Component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type ComponentChangeHandler } from "@/types/state/event";
2-
import { registry } from "@/component/Registry";
2+
import { registry } from "@/components/registry";
33

44
export interface ComponentProps {
55
type: string;

chartlets.js/packages/lib/src/component/Registry.test.ts renamed to chartlets.js/packages/lib/src/components/registry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, it, expect } from "vitest";
22

3-
import { RegistryImpl } from "@/component/Registry";
3+
import { RegistryImpl } from "@/components/registry";
44

55
describe("Test that RegistryImpl", () => {
66
it("works", () => {

chartlets.js/packages/lib/src/component/Registry.ts renamed to chartlets.js/packages/lib/src/components/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { ComponentType } from "react";
22

3-
import type { ComponentProps } from "@/component/Component";
3+
import type { ComponentProps } from "@/components/Component";
44

55
/**
66
* A registry for Chartlets components.

chartlets.js/packages/lib/src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@ export { initializeContributions } from "@/actions/initializeContributions";
1313
export { handleComponentChange } from "@/actions/handleComponentChange";
1414
export { updateContributionContainer } from "@/actions/updateContributionContainer";
1515

16-
// Component registry
17-
export type { Registry } from "@/component/Registry";
18-
1916
// React components
20-
export { Component, type ComponentProps } from "@/component/Component";
21-
export { Children } from "@/component/Children";
17+
export { Component, type ComponentProps } from "@/components/Component";
18+
export { Children, type ChildrenProps } from "@/components/Children";
2219

2320
// React hooks
2421
export {

chartlets.js/packages/lib/src/types/state/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ComponentType } from "react";
22

33
import type { ApiOptions } from "@/types/api";
44
import type { LoggingOptions } from "@/actions/helpers/configureLogging";
5-
import type { ComponentProps } from "@/component/Component";
5+
import type { ComponentProps } from "@/components/Component";
66
import { isObject } from "@/utils/isObject";
77
import { isFunction } from "@/utils/isFunction";
88

0 commit comments

Comments
 (0)