layplux 1.0.0 → 2.0.0

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.
@@ -4,8 +4,8 @@ import {
4
4
  provide,
5
5
  inject
6
6
  } from "vue";
7
- import { Popup } from "../popup";
8
- import { ChevronRightIcon } from "../icon";
7
+ import { Popup } from "../popup/index.mjs";
8
+ import { ChevronRightIcon } from "../icon/index.mjs";
9
9
  const DROPDOWN_CLOSE = Symbol("dropdown-close");
10
10
  const DROPDOWN_ON_CLICK = Symbol("dropdown-on-click");
11
11
  const Dropdown = defineComponent({
@@ -1,8 +1,8 @@
1
- export * from "./corner-glow";
2
- export * from "./panel-view";
3
- export * from "./widget";
4
- export * from "./title";
5
- export * from "./panel-view";
6
- export * from "./dropdown";
7
- export * from "./tooltip";
8
- export * from "./center-view";
1
+ export * from "./corner-glow/index.mjs";
2
+ export * from "./panel-view/index.mjs";
3
+ export * from "./widget/index.mjs";
4
+ export * from "./title/index.mjs";
5
+ export * from "./panel-view/index.mjs";
6
+ export * from "./dropdown/index.mjs";
7
+ export * from "./tooltip/index.mjs";
8
+ export * from "./center-view/index.mjs";
@@ -6,10 +6,10 @@ import {
6
6
  DropdownItem,
7
7
  DropdownDivider,
8
8
  DropdownSubmenu
9
- } from "../dropdown";
10
- import { MoreIcon, MinimizeIcon } from "../icon";
11
- import { createContent } from "../../utils";
12
- import { getBuiltInLocale } from "../../locales";
9
+ } from "../dropdown/index.mjs";
10
+ import { MoreIcon, MinimizeIcon } from "../icon/index.mjs";
11
+ import { createContent } from "../../utils/index.mjs";
12
+ import { getBuiltInLocale } from "../../locales/index.mjs";
13
13
  const viewModeKeys = /* @__PURE__ */ new Set(["DockPinned", "DockUnpinned", "Undock"]);
14
14
  function findItem(items, key) {
15
15
  if (!items) return;
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "vue/jsx-runtime";
2
2
  import { defineComponent } from "vue";
3
- import { createContent } from "../../utils";
3
+ import { createContent } from "../../utils/index.mjs";
4
4
  const TitleView = defineComponent({
5
5
  name: "TitleView",
6
6
  inheritAttrs: false,
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "vue/jsx-runtime";
2
2
  import { defineComponent } from "vue";
3
- import { createContent } from "../../utils";
4
- import { Popup } from "../popup";
3
+ import { createContent } from "../../utils/index.mjs";
4
+ import { Popup } from "../popup/index.mjs";
5
5
  const Tooltip = defineComponent({
6
6
  name: "LaypluxTooltip",
7
7
  props: {
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "vue/jsx-runtime";
2
2
  import { defineComponent, Fragment, ref, onErrorCaptured, h } from "vue";
3
- import { TitleView } from "../title";
4
- import { Tooltip } from "../tooltip";
3
+ import { TitleView } from "../title/index.mjs";
4
+ import { Tooltip } from "../tooltip/index.mjs";
5
5
  const WidgetView = defineComponent({
6
6
  name: "WidgetView",
7
7
  inheritAttrs: false,
@@ -1,7 +1,7 @@
1
- import { default as default2 } from "./layout/layplux";
2
- import { useSkeleton } from "./managers/skeleton";
3
- import { createPluginEventBus } from "./utils/event-bus";
4
- import { FocusTracker } from "./utils/focus-tracker";
1
+ import { default as default2 } from "./layout/layplux.mjs";
2
+ import { useSkeleton } from "./managers/skeleton.mjs";
3
+ import { createPluginEventBus } from "./utils/event-bus.mjs";
4
+ import { FocusTracker } from "./utils/focus-tracker.mjs";
5
5
  export {
6
6
  FocusTracker,
7
7
  default2 as Layplux,
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "vue/jsx-runtime";
2
2
  import { defineComponent } from "vue";
3
- import { Skeleton } from "./skeleton";
3
+ import { Skeleton } from "./skeleton/index.mjs";
4
4
  const LayeredManager = defineComponent({
5
5
  name: "LayeredManager",
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "vue/jsx-runtime";
2
2
  import { defineComponent } from "vue";
3
- import { RootPane } from "./root-pane";
3
+ import { RootPane } from "./root-pane.mjs";
4
4
  const Layplux = defineComponent({
5
5
  name: "Layplux",
6
6
  props: {
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs } from "vue/jsx-runtime";
2
2
  import { computed, defineComponent, provide } from "vue";
3
- import { LayeredManager } from "./layered-manager";
4
- import { GlassOverlay } from "./glass-overlay";
5
- import { CornerGlow } from "../components";
3
+ import { LayeredManager } from "./layered-manager.mjs";
4
+ import { GlassOverlay } from "./glass-overlay.mjs";
5
+ import { CornerGlow } from "../components/index.mjs";
6
6
  const RootPane = defineComponent({
7
7
  name: "RootPane",
8
8
  props: {
@@ -7,7 +7,7 @@ import {
7
7
  ref,
8
8
  Teleport
9
9
  } from "vue";
10
- import { PanelView } from "../../components";
10
+ import { PanelView } from "../../components/index.mjs";
11
11
  const CenterArea = defineComponent({
12
12
  name: "CenterArea",
13
13
  props: {
@@ -1,4 +1,4 @@
1
- import { Skeleton } from "./skeleton";
1
+ import { Skeleton } from "./skeleton.mjs";
2
2
  export {
3
3
  Skeleton
4
4
  };
@@ -1,15 +1,15 @@
1
1
  import { jsx, jsxs } from "vue/jsx-runtime";
2
2
  import { defineComponent } from "vue";
3
- import { TopArea } from "./top-area";
4
- import { BottomArea } from "./bottom-area";
5
- import { LeftTopArea } from "./left-top-area";
6
- import { LeftBottomArea } from "./left-bottom-area";
7
- import { BottomLeftArea } from "./bottom-left-area";
8
- import { RightTopArea } from "./right-top-area";
9
- import { RightBottomArea } from "./right-bottom-area";
10
- import { BottomRightArea } from "./bottom-right-area";
11
- import {} from "../../managers";
12
- import { CenterArea } from "./center-area";
3
+ import { TopArea } from "./top-area.mjs";
4
+ import { BottomArea } from "./bottom-area.mjs";
5
+ import { LeftTopArea } from "./left-top-area.mjs";
6
+ import { LeftBottomArea } from "./left-bottom-area.mjs";
7
+ import { BottomLeftArea } from "./bottom-left-area.mjs";
8
+ import { RightTopArea } from "./right-top-area.mjs";
9
+ import { RightBottomArea } from "./right-bottom-area.mjs";
10
+ import { BottomRightArea } from "./bottom-right-area.mjs";
11
+ import {} from "../../managers/index.mjs";
12
+ import { CenterArea } from "./center-area.mjs";
13
13
  const Skeleton = defineComponent({
14
14
  name: "Skeleton",
15
15
  props: {
@@ -1,5 +1,5 @@
1
- import { zhCN } from "./zh-CN";
2
- import { enUS } from "./en-US";
1
+ import { zhCN } from "./zh-CN.mjs";
2
+ import { enUS } from "./en-US.mjs";
3
3
  const builtInLocales = {
4
4
  "zh-CN": zhCN,
5
5
  "en-US": enUS
@@ -1,4 +1,4 @@
1
- import {} from "./widget-container";
1
+ import {} from "./widget-container.mjs";
2
2
  function useArea(skeleton, name, handle) {
3
3
  const container = skeleton.createContainer(name, handle);
4
4
  function add(config) {
@@ -1,3 +1,3 @@
1
- export * from "./skeleton";
2
- export * from "./area";
3
- export * from "./widget";
1
+ export * from "./skeleton.mjs";
2
+ export * from "./area.mjs";
3
+ export * from "./widget.mjs";
@@ -1,13 +1,13 @@
1
1
  import { ref } from "vue";
2
- import { useArea } from "./area";
3
- import { isWidget, useWidget } from "./widget";
4
- import { useWidgetContainer } from "./widget-container";
2
+ import { useArea } from "./area.mjs";
3
+ import { isWidget, useWidget } from "./widget.mjs";
4
+ import { useWidgetContainer } from "./widget-container.mjs";
5
5
  import {
6
6
  FocusTracker,
7
7
  createPluginEventBus,
8
8
  getBuiltInLocale
9
- } from "../utils";
10
- import { injectThemeCSS } from "./theme";
9
+ } from "../utils/index.mjs";
10
+ import { injectThemeCSS } from "./theme.mjs";
11
11
  function useSkeleton() {
12
12
  const widgets = [];
13
13
  const self = {};
@@ -1,7 +1,7 @@
1
1
  import { computed, h, watch } from "vue";
2
- import { createContent, uniqueId } from "../utils";
3
- import { WidgetTitleView, WidgetView } from "../components";
4
- import { usePane } from "./pane";
2
+ import { createContent, uniqueId } from "../utils/index.mjs";
3
+ import { WidgetTitleView, WidgetView } from "../components/index.mjs";
4
+ import { usePane } from "./pane.mjs";
5
5
  function useWidget(config, container, skeleton) {
6
6
  const { name, props, type } = config;
7
7
  const active = computed(() => container?.activeId.value === name);
@@ -1 +1 @@
1
- export * from "./config";
1
+ export * from "./config.mjs";
@@ -1,8 +1,8 @@
1
- export * from "./vue";
2
- export * from "./unique-id";
3
- export * from "./focus-tracker";
4
- export * from "./event-bus";
5
- import { getBuiltInLocale, zhCN, enUS } from "../locales";
1
+ export * from "./vue.mjs";
2
+ export * from "./unique-id.mjs";
3
+ export * from "./focus-tracker.mjs";
4
+ export * from "./event-bus.mjs";
5
+ import { getBuiltInLocale, zhCN, enUS } from "../locales/index.mjs";
6
6
  export {
7
7
  enUS,
8
8
  getBuiltInLocale,
package/dist/umd/index.js CHANGED
@@ -2694,7 +2694,7 @@
2694
2694
  return locale;
2695
2695
  }
2696
2696
 
2697
- function _isSlot$2(s) {
2697
+ function _isSlot$1(s) {
2698
2698
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
2699
2699
  }
2700
2700
  const viewModeKeys = new Set(['DockPinned', 'DockUnpinned', 'Undock']);
@@ -2759,7 +2759,7 @@
2759
2759
  "title": item.label,
2760
2760
  "icon": item.icon,
2761
2761
  "getContainer": () => panelRef.value
2762
- }, _isSlot$2(_slot = renderItems(item.children, currentMode)) ? _slot : {
2762
+ }, _isSlot$1(_slot = renderItems(item.children, currentMode)) ? _slot : {
2763
2763
  default: () => [_slot]
2764
2764
  });
2765
2765
  }
@@ -3051,32 +3051,6 @@
3051
3051
  }
3052
3052
  });
3053
3053
 
3054
- function _isSlot$1(s) {
3055
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
3056
- }
3057
- vue.defineComponent({
3058
- name: 'CenterView',
3059
- props: {
3060
- widget: Object,
3061
- anchor: {
3062
- type: String,
3063
- required: true
3064
- }
3065
- },
3066
- setup(props) {
3067
- return () => {
3068
- let _slot;
3069
- if (!props.widget) return null;
3070
- return vue.createVNode(vue.Teleport, {
3071
- "defer": true,
3072
- "to": props.anchor
3073
- }, _isSlot$1(_slot = props.widget.renderContent()) ? _slot : {
3074
- default: () => [_slot]
3075
- });
3076
- };
3077
- }
3078
- });
3079
-
3080
3054
  function _isSlot(s) {
3081
3055
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
3082
3056
  }
package/package.json CHANGED
@@ -1,29 +1,31 @@
1
1
  {
2
2
  "name": "layplux",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "IDE-like window system and plugin framework for the web",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.cjs",
7
7
  "module": "./dist/esm/index.mjs",
8
- "unpkg": "./dist/umd/index.js",
9
8
  "types": "./dist/types/index.d.ts",
10
9
  "exports": {
11
10
  ".": {
12
11
  "types": "./dist/types/index.d.ts",
13
12
  "import": "./dist/esm/index.mjs",
14
- "require": "./dist/cjs/index.cjs"
13
+ "require": "./dist/cjs/index.cjs",
14
+ "default": "./dist/esm/index.mjs"
15
15
  },
16
- "./*": {
17
- "types": "./dist/types/*.d.ts",
18
- "import": "./dist/esm/*.mjs",
19
- "require": "./dist/cjs/*.cjs"
20
- },
21
- "./style": "./dist/style/index.css",
22
- "./style/scss": "./dist/style/layplux.scss"
16
+ "./dist/style/*": "./dist/style/*",
17
+ "./scss": {
18
+ "sass": "./dist/style/layplux.scss",
19
+ "default": "./dist/style/layplux.scss"
20
+ }
23
21
  },
24
22
  "files": [
25
23
  "dist"
26
24
  ],
25
+ "sideEffects": [
26
+ "*.css",
27
+ "*.scss"
28
+ ],
27
29
  "dependencies": {
28
30
  "eventemitter2": "^6.4.9"
29
31
  },