Skip to content
Open
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
940 changes: 940 additions & 0 deletions .yarn/releases/yarn-4.13.0.cjs

Large diffs are not rendered by default.

925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.5.0.cjs

This file was deleted.

7 changes: 6 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.0.cjs
npmMinimalAgeGate: 1440

npmPreapprovedPackages:
- "@lightsparkdev/*"

yarnPath: .yarn/releases/yarn-4.13.0.cjs
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build-sb": "turbo run build-sb",
"build": "turbo run build",
"build:watch": "turbo run build:watch",
"checks": "yarn deps:check && turbo gql-codegen && turbo run lint format circular-deps package:checks",
"checks": "yarn deps:check && turbo run gql-codegen lint format circular-deps package:checks",
"test-cmd": "turbo run test",
"circular-deps": "turbo run circular-deps",
"clean": "turbo run clean",
Expand Down Expand Up @@ -65,8 +65,11 @@
"built": false
}
},
"resolutions": {
"axios": "1.7.7"
},
"engines": {
"node": ">=18"
},
"packageManager": "yarn@4.5.0"
"packageManager": "yarn@4.13.0"
}
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"CHANGELOG.md"
],
"scripts": {
"build": "yarn tsc && tsup",
"build:watch": "yarn build --watch --clean=false",
"build": "yarn tsc && tsdown",
"build:watch": "tsdown --watch --no-clean",
"clean": "rm -rf dist",
"dev": "yarn build -- --watch",
"dev": "yarn build:watch",
"format:fix": "prettier src --write",
"format": "prettier src --check",
"lint:fix": "eslint --fix .",
Expand Down Expand Up @@ -89,7 +89,7 @@
"publint": "^0.3.9",
"ts-jest": "^29.1.1",
"tsc-absolute": "^1.0.1",
"tsup": "^8.2.4",
"tsdown": "^0.21.7",
"typescript": "^5.6.2"
},
"madge": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/auth/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

export { default as AuthProvider } from "./AuthProvider.js";
export type { default as AuthProvider } from "./AuthProvider.js";
export { default as LightsparkAuthException } from "./LightsparkAuthException.js";
export { default as StubAuthProvider } from "./StubAuthProvider.js";
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

export { DefaultRequester as Requester } from "./requester/DefaultRequester.js";
export { default as Query } from "./requester/Query.js";
export type { default as Query } from "./requester/Query.js";
export * from "./shared.js";
2 changes: 1 addition & 1 deletion packages/core/src/requester/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

export { default as Query } from "./Query.js";
export type { default as Query } from "./Query.js";
export { default as Requester } from "./Requester.js";
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from "tsup";
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["src/index.ts", "src/react-native/index.ts", "src/utils/index.ts"],
format: ["cjs", "esm"],
dts: true,
clean: true,
fixedExtension: false,
});
8 changes: 4 additions & 4 deletions packages/lightspark-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"CHANGELOG.md"
],
"scripts": {
"build": "yarn tsc && tsup",
"build:watch": "yarn build --watch --clean=false",
"build": "yarn tsc && tsdown",
"build:watch": "tsdown --watch --no-clean",
"clean": "rm -rf dist",
"dev": "yarn build -- --watch",
"dev": "yarn build:watch",
"docs": "typedoc src",
"format:fix": "prettier src --write",
"format": "prettier src --check",
Expand Down Expand Up @@ -97,7 +97,7 @@
"publint": "^0.3.9",
"ts-jest": "^29.1.1",
"tsc-absolute": "^1.0.1",
"tsup": "^8.2.4",
"tsdown": "^0.21.7",
"typedoc": "^0.24.7",
"typescript": "^5.6.2"
},
Expand Down
355 changes: 170 additions & 185 deletions packages/lightspark-sdk/src/objects/index.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from "tsup";
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["src/index.ts", "src/env.ts", "src/objects/index.ts"],
format: ["cjs", "esm"],
dts: true,
clean: true,
})
fixedExtension: false,
});
8 changes: 4 additions & 4 deletions packages/oauth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"CHANGELOG.md"
],
"scripts": {
"build": "yarn tsc && tsup src/index.ts --format cjs,esm --dts",
"build:watch": "yarn build --watch --clean=false",
"build": "yarn tsc && tsdown",
"build:watch": "tsdown --watch --no-clean",
"clean": "rm -rf dist",
"dev": "yarn build -- --watch",
"dev": "yarn build:watch",
"format:fix": "prettier src --write",
"format": "prettier src --check",
"lint:fix": "eslint --fix .",
Expand Down Expand Up @@ -72,7 +72,7 @@
"publint": "^0.3.9",
"ts-jest": "^29.1.1",
"tsc-absolute": "^1.0.1",
"tsup": "^8.2.4",
"tsdown": "^0.21.7",
"typescript": "^5.6.2"
},
"engines": {
Expand Down
9 changes: 9 additions & 0 deletions packages/oauth/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"],
dts: true,
clean: true,
fixedExtension: false,
});
6 changes: 0 additions & 6 deletions packages/origin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Changelog

## 0.14.2

### Patch Changes

- 5ef5b36: - Add initialWidth prop to Origin charts for SSR support

## 0.14.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/origin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/origin",
"version": "0.14.2",
"version": "0.14.1",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface InteractionInfo {
name: string;
component: string;
interaction: InteractionType;
metadata?: Record<string, unknown>;
metadata?: Record<string, unknown> | undefined;
}

export interface AnalyticsHandler {
Expand Down
16 changes: 8 additions & 8 deletions packages/origin/src/components/Chart/ChartWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ import { Skeleton } from "../Skeleton";
import styles from "./Chart.module.scss";

export interface ChartWrapperProps {
ref?: React.Ref<HTMLDivElement>;
loading?: boolean;
empty?: React.ReactNode;
ref?: React.Ref<HTMLDivElement> | undefined;
loading?: boolean | undefined;
empty?: React.ReactNode | undefined;
dataLength: number;
isEmpty?: boolean;
isEmpty?: boolean | undefined;
height: number;
legend?: boolean;
series?: ResolvedSeries[];
legend?: boolean | undefined;
series?: ResolvedSeries[] | undefined;
children: React.ReactNode;
className?: string;
ariaLiveContent?: string;
className?: string | undefined;
ariaLiveContent?: string | undefined;
}

export function ChartWrapper({
Expand Down
6 changes: 4 additions & 2 deletions packages/origin/src/components/Chart/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export interface ChartInteractionOptions {
tooltipMode: TooltipMode;
interpolatorsRef: React.RefObject<CurveInterpolator[]>;
data: ChartDatum[];
onActiveChange?: (index: number | null, datum: ChartDatum | null) => void;
onActivate?: (index: number, datum: ChartDatum) => void;
onActiveChange?:
| ((index: number | null, datum: ChartDatum | null) => void)
| undefined;
onActivate?: ((index: number, datum: ChartDatum) => void) | undefined;
}

export function useChartInteraction(opts: ChartInteractionOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/origin/src/components/Command/parts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface CommandGroup {

interface CommandContextValue {
onSelect: (item: CommandItem) => void;
renderItem?: (item: CommandItem) => React.ReactNode;
renderItem?: ((item: CommandItem) => React.ReactNode) | undefined;
}

const CommandContext = React.createContext<CommandContextValue | null>(null);
Expand Down
4 changes: 2 additions & 2 deletions packages/origin/src/components/DatePicker/parts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@
setDate: (which: "start" | "end", date: Date) => void;
setTime: (which: "start" | "end", hours: number, minutes: number) => void;
isDateDisabled: (date: Date) => boolean;
min?: Date;
max?: Date;
min?: Date | undefined;
max?: Date | undefined;

locale: string;
weekStartsOn: 0 | 1;
Expand Down Expand Up @@ -1234,7 +1234,7 @@
const isFocused = isSameDay(date, ctx.focusedDate);
return (
<td key={date.getTime()} className={styles.dayCell}>
<button

Check warning on line 1237 in packages/origin/src/components/DatePicker/parts.tsx

View workflow job for this annotation

GitHub Actions / checks

The attribute aria-selected is not supported by the role button. This role is implicit on the element button
type="button"
className={styles.dayButton}
tabIndex={isFocused ? 0 : -1}
Expand Down
2 changes: 1 addition & 1 deletion packages/origin/src/lib/base-ui-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface ChangeEventDetails<E = Event> {
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger?: HTMLElement;
trigger?: HTMLElement | undefined;
}

export function createChangeEventDetails<E = Event>(
Expand Down
2 changes: 1 addition & 1 deletion packages/origin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"target": "ES2017",
"isolatedModules": true,
"incremental": true,
"exactOptionalPropertyTypes": false,
"exactOptionalPropertyTypes": true,
"paths": {
"@/*": ["./src/*"],
"@test-utils": ["./test-utils"],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gql/generated/*
gql/*.graphql
dist/
.tsup/
.tsdown/
54 changes: 0 additions & 54 deletions packages/ui/esbuild-svgr-plugin.ts

This file was deleted.

9 changes: 5 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
"./src/router": "./src/router.js"
},
"scripts": {
"build-tsup": "tsup --dts",
"build": "yarn tsc && yarn build-tsup",
"build:watch": "yarn build-tsup --watch --clean=false",
"build:bundle": "tsdown",
"build": "yarn tsc && yarn build:bundle",
"build:watch": "tsdown --watch --no-clean",
"circular-deps": "madge --circular --extensions ts,tsx .",
"clean": "rm -rf .turbo",
"format:fix": "prettier . --write",
Expand Down Expand Up @@ -130,6 +130,7 @@
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@tsdown/css": "^0.21.7",
"@types/jest": "^29.5.3",
"@types/prismjs": "^1.26.0",
"esbuild": "0.19.1",
Expand All @@ -145,7 +146,7 @@
"prettier-plugin-organize-imports": "^3.2.4",
"ts-jest": "^29.1.1",
"tsc-absolute": "^1.0.1",
"tsup": "^8.2.4",
"tsdown": "^0.21.7",
"typescript": "^5.6.2"
},
"madge": {
Expand Down
44 changes: 44 additions & 0 deletions packages/ui/tsdown-svg-plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { transform as svgrTransform } from "@svgr/core";
import { transform as esbuildTransform } from "esbuild";
import { readFile } from "node:fs/promises";

function svgToDataUrl(svg: string): string {
return `data:image/svg+xml;base64,${Buffer.from(svg).toString("base64")}`;
}

export function svgr() {
return {
name: "lightspark-ui-svgr",
async load(id: string) {
const [filePath, query] = id.split("?", 2);
if (!filePath.endsWith(".svg")) {
return null;
}

const svg = await readFile(filePath, { encoding: "utf8" });
if (query === "url") {
return `export default ${JSON.stringify(svgToDataUrl(svg))};`;
}

const jsx = await svgrTransform(
svg,
{
jsxRuntime: "automatic",
plugins: ["@svgr/plugin-jsx"],
},
{ filePath },
);
const transformed = await esbuildTransform(jsx, {
format: "esm",
jsx: "automatic",
loader: "jsx",
sourcefile: filePath,
});

return {
code: transformed.code,
map: transformed.map,
};
},
};
}
Loading
Loading