@rebasepro/plugin-insights 0.16.0 → 0.16.1-canary.g2d1aec8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { InsightDefinition } from "../types";
2
+ import type { InsightDefinition } from "../types/index.js";
3
3
  /**
4
4
  * Renders scorecard insight widgets inline within a collection's list view,
5
5
  * positioned below the title and above the main data list.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { InsightDefinition } from "../types";
2
+ import type { InsightDefinition } from "../types/index.js";
3
3
  /**
4
4
  * Renders compact insight widgets inline within a home page collection card.
5
5
  * Injected via the `home.card.widget` slot.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { InsightDefinition } from "../types";
2
+ import type { InsightDefinition } from "../types/index.js";
3
3
  /**
4
4
  * Scorecard insights panel rendered at the top of the home page.
5
5
  * Injected via the `home.children.start` slot.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { InsightDefinition } from "../types";
2
+ import type { InsightDefinition } from "../types/index.js";
3
3
  /**
4
4
  * Single insight widget orchestrator.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ScorecardConfig } from "../types";
2
+ import type { ScorecardConfig } from "../types/index.js";
3
3
  /**
4
4
  * Skeleton loader for scorecard insight widgets — displays animated
5
5
  * shimmer placeholders that exactly match the final rendered layout
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { DataRow, ScorecardConfig } from "../types";
2
+ import type { DataRow, ScorecardConfig } from "../types/index.js";
3
3
  /**
4
4
  * Scorecard widget for the Rebase design system.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { InsightDataResult } from "../types";
1
+ import type { InsightDataResult } from "../types/index.js";
2
2
  /**
3
3
  * In-memory cache for insight query results.
4
4
  * Supports TTL-based expiry and inflight request deduplication
@@ -1,5 +1,5 @@
1
1
  import React, { type PropsWithChildren } from "react";
2
- import { InsightsCache } from "./InsightsCache";
2
+ import { InsightsCache } from "./InsightsCache.js";
3
3
  interface InsightsContextValue {
4
4
  cache: InsightsCache;
5
5
  }
@@ -1,4 +1,4 @@
1
- import type { InsightDefinition, InsightDataResult, InsightContext } from "../types";
1
+ import type { InsightDefinition, InsightDataResult, InsightContext } from "../types/index.js";
2
2
  /**
3
3
  * Hook that fetches and caches data for a single insight definition.
4
4
  *
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export type { DataRow, ScorecardFormat, ScorecardConfig, InsightDataResult, InsightDefinition, InsightsPluginConfig } from "./types";
2
- export { useInsightsPlugin } from "./useInsightsPlugin";
3
- export { InsightsProvider, useInsightsEngine } from "./engine/InsightsProvider";
4
- export { InsightsCache } from "./engine/InsightsCache";
5
- export { useInsightsData } from "./engine/useInsightsData";
6
- export { InsightsScorecardView } from "./components/InsightsScorecardView";
7
- export { InsightWidget } from "./components/InsightWidget";
8
- export { InsightWidgetSkeleton } from "./components/InsightWidgetSkeleton";
1
+ export type { DataRow, ScorecardFormat, ScorecardConfig, InsightDataResult, InsightDefinition, InsightsPluginConfig } from "./types/index.js";
2
+ export { useInsightsPlugin } from "./useInsightsPlugin.js";
3
+ export { InsightsProvider, useInsightsEngine } from "./engine/InsightsProvider.js";
4
+ export { InsightsCache } from "./engine/InsightsCache.js";
5
+ export { useInsightsData } from "./engine/useInsightsData.js";
6
+ export { InsightsScorecardView } from "./components/InsightsScorecardView.js";
7
+ export { InsightWidget } from "./components/InsightWidget.js";
8
+ export { InsightWidgetSkeleton } from "./components/InsightWidgetSkeleton.js";
@@ -1,4 +1,4 @@
1
- import type { DataRow, ScorecardConfig } from "./widgets";
1
+ import type { DataRow, ScorecardConfig } from "./widgets.js";
2
2
  export interface InsightContext {
3
3
  /** The resolved path of the collection (e.g., "products/123/orders" or "orders") */
4
4
  path?: string;
@@ -1,2 +1,2 @@
1
- export * from "./engine";
2
- export * from "./widgets";
1
+ export * from "./engine.js";
2
+ export * from "./widgets.js";
@@ -1,5 +1,5 @@
1
1
  import type { RebasePlugin } from "@rebasepro/admin-types";
2
- import type { InsightsPluginConfig } from "./types";
2
+ import type { InsightsPluginConfig } from "./types/index.js";
3
3
  /**
4
4
  * Creates the Insights plugin for Rebase.
5
5
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/plugin-insights",
3
3
  "type": "module",
4
- "version": "0.16.0",
4
+ "version": "0.16.1-canary.g2d1aec8",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.es.js",
7
7
  "module": "./dist/index.es.js",
@@ -16,10 +16,10 @@
16
16
  "./package.json": "./package.json"
17
17
  },
18
18
  "dependencies": {
19
- "@rebasepro/app": "0.16.0",
20
- "@rebasepro/ui": "0.16.0",
21
- "@rebasepro/admin-types": "0.16.0",
22
- "@rebasepro/types": "0.16.0"
19
+ "@rebasepro/admin-types": "0.16.1-canary.g2d1aec8",
20
+ "@rebasepro/app": "0.16.1-canary.g2d1aec8",
21
+ "@rebasepro/types": "0.16.1-canary.g2d1aec8",
22
+ "@rebasepro/ui": "0.16.1-canary.g2d1aec8"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=19.0.0",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "scripts": {
86
86
  "dev": "vite",
87
- "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json && node ../../scripts/assert-build-output.mjs",
87
+ "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json && node ../../scripts/add-dts-extensions.mjs dist && node ../../scripts/assert-build-output.mjs",
88
88
  "test": "jest --passWithNoTests"
89
89
  }
90
90
  }