@epxing/dashboard 5.3.0-beta.1 → 5.3.0-beta.2

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.
package/API.md CHANGED
@@ -2,19 +2,18 @@
2
2
 
3
3
  看板根容器、分组标签、标题、内容区和挂件组件。
4
4
 
5
- 本页对应包版本 `5.3.0-beta.1`。导出名、子路径和签名从当前源码、package.json 与类型声明生成。
5
+ 本页对应包版本 `5.3.0-beta.2`。导出名、子路径和签名从当前源码、package.json 与类型声明生成。
6
6
 
7
7
  ## 安装与使用
8
8
 
9
9
 
10
10
  ```sh
11
- pnpm add @epxing/dashboard
11
+ pnpm add @epxing/dashboard@5.3.0-beta.2
12
12
  ```
13
13
 
14
14
 
15
15
  ```js
16
16
  import DashboardPlugin, { Dashboard, DashboardWidget } from '@epxing/dashboard'
17
- import '@epxing/dashboard/style.css'
18
17
 
19
18
  // app 已初始化 core 和基础组件
20
19
  app.use(DashboardPlugin)
@@ -25,6 +24,8 @@ app.component('ProductDashboard', Dashboard)
25
24
 
26
25
  default 与具名 Dashboard 是同一根组件;其 install 会注册配套组件、预览和网格兼容组件。布局、请求与保存依赖平台运行环境。Tabs/Title/Div/Widget 稳定子路径均为 default 组件导出。
27
26
 
27
+ 本版 JS 入口自动加载本包聚合样式,根导入和稳定子路径均无需手动 import style.css;保留显式样式入口以兼容旧代码。样式按包加载,产品覆盖样式放在框架导入之后。
28
+
28
29
  ## 根入口完整导出
29
30
 
30
31
  | 导出名 | 形态 | 用途 | 参数 / 配置 / 事件 |
@@ -50,7 +51,7 @@ default 与具名 Dashboard 是同一根组件;其 install 会注册配套组
50
51
  | `@epxing/dashboard/title` | `default` | 看板标题组件,展示标题和相关样式。 [详细参考](../../docs/revision/dashboard/Title.md) |
51
52
  | `@epxing/dashboard/div` | `default` | 看板内容容器,承载嵌套内容和布局。 [详细参考](../../docs/revision/dashboard/Div.md) |
52
53
  | `@epxing/dashboard/widget` | `default` | 看板挂件容器,负责挂件内容与布局交互。 [详细参考](../../docs/revision/dashboard/Widget.md) |
53
- | `@epxing/dashboard/style.css` | 样式副作用入口 | 在产品入口引入一次。 |
54
+ | `@epxing/dashboard/style.css` | 可选的显式样式入口 | JS 入口自动加载本包样式;保留此路径以兼容旧代码。 |
54
55
 
55
56
  ## 源码兼容与其他入口
56
57
 
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [完整公开 API、导入方式与示例](./API.md)
4
4
 
5
+ 从 5.3.0-beta.2 起,导入本包 JS 时自动加载包级样式,根入口和稳定子路径均无需手动引入 style.css。显式样式入口继续兼容旧代码;产品覆盖样式放在框架导入之后。
6
+
5
7
  数据看板包 - **可视化看板搭建,拖拽组件组成仪表盘大屏(按需加载)**。
6
8
 
7
9
  ## 范围
@@ -34,7 +36,6 @@
34
36
 
35
37
  ```js
36
38
  import plugin from '@epxing/dashboard'
37
- import '@epxing/dashboard/style.css'
38
39
  app.use(plugin)
39
40
  ```
40
41
 
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import DashboardHeader from "./Header.js";
2
3
  import DashboardGrid from "./DashboardGrid.js";
3
4
  import chartRequestScope from "./chart-request-scope.js";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { isContainerType, normalizeGridParams } from "./grid/model.js";
2
3
  import { normalizeGridItem } from "./layout-util.js";
3
4
  import { layoutHeight, itemRect, rectStyle, resolveGrid } from "./grid/geometry.js";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { openBlock, createElementBlock, withModifiers, normalizeStyle, normalizeClass, createElementVNode, Fragment, renderList, createBlock, Teleport, renderSlot, createCommentVNode, markRaw } from "vue";
2
3
  import { DDManager, GridStack } from "gridstack";
3
4
  import "gridstack/dist/gridstack.min.css";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { openBlock, createElementBlock, withModifiers, normalizeClass, createElementVNode, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
2
3
  /* empty css */
3
4
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
package/dist/src/Div.js CHANGED
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { __vitePreload as __epxPackagePreload } from "../_virtual/preload-helper.js";
2
3
  import { defineAsyncComponent, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, createElementVNode, Fragment, createCommentVNode, toDisplayString, createBlock, withCtx, resolveDynamicComponent, createVNode, createTextVNode } from "vue";
3
4
  import { normalizeGridItem } from "./layout-util.js";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import Header from "@epxing/components/src/header";
2
3
  import { evalWith } from "@epxing/utils/src/eval-with";
3
4
  import { MobileSheet } from "@epxing/components/src/mobile";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { openBlock, createElementBlock } from "vue";
2
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
3
4
  const _sfc_main = {
package/dist/src/Tabs.js CHANGED
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { __vitePreload as __epxPackagePreload } from "../_virtual/preload-helper.js";
2
3
  import { defineAsyncComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createCommentVNode, Fragment, renderList, withModifiers, withDirectives, vModelText, toDisplayString, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, createVNode, createTextVNode } from "vue";
3
4
  import { normalizeGridItem } from "./layout-util.js";
package/dist/src/Title.js CHANGED
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import component from "@epxing/core/src/mixins/component";
2
3
  import { openBlock, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, createTextVNode, toDisplayString } from "vue";
3
4
  /* empty css */
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import DashboardGrid from "./DashboardGrid.js";
2
3
  import chartRequestScope from "./chart-request-scope.js";
3
4
  import { evalWith } from "@epxing/utils/src/eval-with";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { markRaw } from "vue";
2
3
  import { createChartRequestBroker } from "@epxing/utils/src/chart-request-broker";
3
4
  const chartRequestScope = {
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { stackMobileLayout } from "./layout-util.js";
2
3
  const DEFAULT_DASHBOARD_THEME = "light";
3
4
  function getDashboardDesignTarget(config = {}) {
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  function collides(l1, l2) {
2
3
  if (l1 === l2) return false;
3
4
  if (l1.x + l1.w <= l2.x) return false;
@@ -1,3 +1,4 @@
1
+ import '../../../style.css';
1
2
  import { rectStyle, itemRect } from "../geometry.js";
2
3
  import { openBlock, createElementBlock, normalizeStyle, renderSlot } from "vue";
3
4
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
@@ -1,3 +1,4 @@
1
+ import '../../../style.css';
1
2
  import { layoutHeight, resolveGrid } from "../geometry.js";
2
3
  import { compact } from "../compact.js";
3
4
  import { openBlock, createElementBlock, normalizeStyle, renderSlot } from "vue";
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  import { reactive } from "vue";
2
3
  function createDesignState() {
3
4
  const state = reactive({ activeId: null, activeItem: null, activeOwner: null });
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  import { GridStackEngine } from "gridstack";
2
3
  class NoCollideEngine extends GridStackEngine {
3
4
  collide() {
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  function resolveGrid(grid, { containerWidth = 0, bodyHeight = 0 } = {}) {
2
3
  const colNum = grid.colNum;
3
4
  const rowHeight = grid.rowHeight === "auto" ? Math.max(1, bodyHeight / 1e3 * 10) : grid.rowHeight;
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  function px(n) {
2
3
  return `${n}px`;
3
4
  }
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  import { isContainerType, getContainerGrid, isLegacyConfig, getPageGrid, MOBILE_GRID, normalizeGridParams, LEGACY_CONTAINER_GRID } from "./model.js";
2
3
  import { stackMobileLayout } from "../layout-util.js";
3
4
  const pageGridMixin = {
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  import { normalizeGridItem } from "../layout-util.js";
2
3
  const CONFIG_VERSION = "3.0";
3
4
  const CONTAINER_TYPES = ["dashboard-div", "dashboard-tabs"];
@@ -1,3 +1,4 @@
1
+ import '../../style.css';
1
2
  function createViewportGate({ root = null, mountMargin = "100%", unmountMargin = "200%", sticky = false, onChange } = {}) {
2
3
  const IO = typeof window !== "undefined" ? window.IntersectionObserver : void 0;
3
4
  if (typeof IO !== "function") {
package/dist/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import Dashboard from "./Dashboard.js";
2
3
  import DashboardTabs from "./Tabs.js";
3
4
  import DashboardTitle from "./Title.js";
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  const DEFAULT_HALF_TYPES = [
2
3
  "num-statistic",
3
4
  "card-num",
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  import { stackMobileLayout } from "./layout-util.js";
2
3
  import { normalizeMobileAppearance } from "@epxing/utils/src/mobile-chart-appearance";
3
4
  function indexDashboardItems(items = [], result = /* @__PURE__ */ new Map()) {
@@ -1,3 +1,4 @@
1
+ import '../style.css';
1
2
  const kebabCase = (key) => key.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2
3
  const camelCase = (key) => key.replace(/-(\w)/g, (s, c) => c.toUpperCase());
3
4
  const ACCENT_BASE = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epxing/dashboard",
3
- "version": "5.3.0-beta.1",
3
+ "version": "5.3.0-beta.2",
4
4
  "description": "看板运行态渲染",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -56,10 +56,10 @@
56
56
  ],
57
57
  "dependencies": {
58
58
  "gridstack": "13.3.0",
59
- "@epxing/core": "^5.3.0-beta.1",
60
- "@epxing/utils": "^5.3.0-beta.1",
61
- "@epxing/components": "^5.3.0-beta.1",
62
- "@epxing/theme": "^5.3.0-beta.1"
59
+ "@epxing/components": "^5.3.0-beta.2",
60
+ "@epxing/core": "^5.3.0-beta.2",
61
+ "@epxing/theme": "^5.3.0-beta.2",
62
+ "@epxing/utils": "^5.3.0-beta.2"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "vue": "3.5.39",
@@ -76,7 +76,8 @@
76
76
  "./dist/src/store/**",
77
77
  "./dist/src/mixins/**",
78
78
  "./dist/src/runtime-utils/util.js",
79
- "./dist/src/runtime-services.js"
79
+ "./dist/src/runtime-services.js",
80
+ "./dist/**/*.js"
80
81
  ],
81
82
  "publishConfig": {
82
83
  "access": "public",