Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions chartlets.js/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
Using monorepo layout for `chartlets.js` with workspaces `lib` and `demo`
that host the packages for `chartlets` and `chartlets-demo`.

* Other code reorganisations:
- moved `component/Registry` into `store`
- renamed module `component` into `components`
- no longer exposing `Registry` type

* Chartlets now allows for plugins that can provide individual component
implementations.
The Vega-based chart and MUI components are now optional and have been
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
FrameworkOptions,
PluginLike,
} from "@/types/state/options";
import { registry } from "@/component/Registry";
import { registry } from "@/components/registry";
import { isPromise } from "@/utils/isPromise";
import { isFunction } from "@/utils/isFunction";
import { isObject } from "@/utils/isObject";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from "react";
import { describe, it, expect, beforeEach, afterEach } from "vitest";
import { render, screen } from "@testing-library/react";
import { registry } from "@/component/Registry";
import { registry } from "@/components/registry";
import { type ComponentProps } from "./Component";
import { Children } from "./Children";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach } from "vitest";
import { render, screen } from "@testing-library/react";
import { Component, type ComponentProps } from "./Component";
import { registry } from "@/component/Registry";
import { registry } from "@/components/registry";
import type { FC } from "react";

describe("Component", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ComponentChangeHandler } from "@/types/state/event";
import { registry } from "@/component/Registry";
import { registry } from "@/components/registry";

export interface ComponentProps {
type: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it, expect } from "vitest";

import { RegistryImpl } from "@/component/Registry";
import { RegistryImpl } from "@/components/registry";

describe("Test that RegistryImpl", () => {
it("works", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ComponentType } from "react";

import type { ComponentProps } from "@/component/Component";
import type { ComponentProps } from "@/components/Component";

/**
* A registry for Chartlets components.
Expand Down
7 changes: 2 additions & 5 deletions chartlets.js/packages/lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ export { initializeContributions } from "@/actions/initializeContributions";
export { handleComponentChange } from "@/actions/handleComponentChange";
export { updateContributionContainer } from "@/actions/updateContributionContainer";

// Component registry
export type { Registry } from "@/component/Registry";

// React components
export { Component, type ComponentProps } from "@/component/Component";
export { Children } from "@/component/Children";
export { Component, type ComponentProps } from "@/components/Component";
export { Children, type ChildrenProps } from "@/components/Children";

// React hooks
export {
Expand Down
2 changes: 1 addition & 1 deletion chartlets.js/packages/lib/src/types/state/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ComponentType } from "react";

import type { ApiOptions } from "@/types/api";
import type { LoggingOptions } from "@/actions/helpers/configureLogging";
import type { ComponentProps } from "@/component/Component";
import type { ComponentProps } from "@/components/Component";
import { isObject } from "@/utils/isObject";
import { isFunction } from "@/utils/isFunction";

Expand Down
Loading