layplux 0.0.1 → 1.0.1

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,
@@ -1,51 +1,51 @@
1
- .layplux-root.dark,
2
- .layplux-root.dark[data-theme='custom'],
3
- .layplux-root.dark[data-theme='default'] {
4
- --layplux-background: 222.34deg 10.43% 12.27%;
5
- --layplux-background-deep: 220deg 13.06% 9%;
6
- --layplux-foreground: 0 0% 95%;
7
- --layplux-card: 222.34deg 10.43% 12.27%;
8
- --layplux-card-foreground: 210 40% 98%;
9
- --layplux-popover: 0 0% 14.2%;
10
- --layplux-popover-foreground: 210 40% 98%;
11
- --layplux-muted: 240 3.7% 15.9%;
12
- --layplux-muted-foreground: 240 5% 64.9%;
13
- --layplux-primary-foreground: 0 0% 98%;
14
- --layplux-destructive: 359.21 68.47% 56.47%;
15
- --layplux-destructive-foreground: 0 0% 98%;
16
- --layplux-info: 180 1.54% 12.75%;
17
- --layplux-info-foreground: 220 4% 58%;
18
- --layplux-success: 144 57% 58%;
19
- --layplux-success-foreground: 0 0% 98%;
20
- --layplux-warning: 42 84% 61%;
21
- --layplux-warning-foreground: 0 0% 98%;
22
- --layplux-secondary: 240 5% 17%;
23
- --layplux-secondary-foreground: 0 0% 98%;
24
- --layplux-accent: 216 5% 19%;
25
- --layplux-accent-dark: 240 0% 22%;
26
- --layplux-accent-darker: 240 0% 26%;
27
- --layplux-accent-lighter: 216 5% 12%;
28
- --layplux-accent-hover: 216 5% 24%;
29
- --layplux-accent-foreground: 0 0% 98%;
30
- --layplux-heavy: 216 5% 24%;
31
- --layplux-heavy-foreground: var(--layplux-accent-foreground);
32
- --layplux-border: 220 4% 34%;
33
- --layplux-input: 0deg 0% 100% / 10%;
34
- --layplux-input-placeholder: 218deg 11% 65%;
35
- --layplux-input-background: 0deg 0% 100% / 5%;
36
- --layplux-ring: 222.2 84% 4.9%;
37
- --layplux-radius: 0.5rem;
38
- --layplux-overlay: 0deg 0% 0% / 40%;
39
- --layplux-overlay-content: 0deg 0% 0% / 40%;
40
- --layplux-font-size-base: 16px;
41
- --layplux-sidebar: 222.34deg 10.43% 12.27%;
42
- --layplux-sidebar-deep: 220deg 13.06% 9%;
43
- --layplux-menu: var(--layplux-sidebar);
44
- --layplux-header: 222.34deg 10.43% 12.27%;
45
- --layplux-shadow: 0 0% 0%;
46
- --layplux-hover: var(--layplux-foreground) / 0.08;
47
- --layplux-active: var(--layplux-foreground) / 0.12;
48
- --layplux-root-background: 210 6% 14%;
49
-
50
- color-scheme: dark;
51
- }
1
+ .layplux-root.dark,
2
+ .layplux-root.dark[data-theme='custom'],
3
+ .layplux-root.dark[data-theme='default'] {
4
+ --layplux-background: 222.34deg 10.43% 12.27%;
5
+ --layplux-background-deep: 220deg 13.06% 9%;
6
+ --layplux-foreground: 0 0% 95%;
7
+ --layplux-card: 222.34deg 10.43% 12.27%;
8
+ --layplux-card-foreground: 210 40% 98%;
9
+ --layplux-popover: 0 0% 14.2%;
10
+ --layplux-popover-foreground: 210 40% 98%;
11
+ --layplux-muted: 240 3.7% 15.9%;
12
+ --layplux-muted-foreground: 240 5% 64.9%;
13
+ --layplux-primary-foreground: 0 0% 98%;
14
+ --layplux-destructive: 359.21 68.47% 56.47%;
15
+ --layplux-destructive-foreground: 0 0% 98%;
16
+ --layplux-info: 180 1.54% 12.75%;
17
+ --layplux-info-foreground: 220 4% 58%;
18
+ --layplux-success: 144 57% 58%;
19
+ --layplux-success-foreground: 0 0% 98%;
20
+ --layplux-warning: 42 84% 61%;
21
+ --layplux-warning-foreground: 0 0% 98%;
22
+ --layplux-secondary: 240 5% 17%;
23
+ --layplux-secondary-foreground: 0 0% 98%;
24
+ --layplux-accent: 216 5% 19%;
25
+ --layplux-accent-dark: 240 0% 22%;
26
+ --layplux-accent-darker: 240 0% 26%;
27
+ --layplux-accent-lighter: 216 5% 12%;
28
+ --layplux-accent-hover: 216 5% 24%;
29
+ --layplux-accent-foreground: 0 0% 98%;
30
+ --layplux-heavy: 216 5% 24%;
31
+ --layplux-heavy-foreground: var(--layplux-accent-foreground);
32
+ --layplux-border: 220 4% 34%;
33
+ --layplux-input: 0deg 0% 100% / 10%;
34
+ --layplux-input-placeholder: 218deg 11% 65%;
35
+ --layplux-input-background: 0deg 0% 100% / 5%;
36
+ --layplux-ring: 222.2 84% 4.9%;
37
+ --layplux-radius: 0.5rem;
38
+ --layplux-overlay: 0deg 0% 0% / 40%;
39
+ --layplux-overlay-content: 0deg 0% 0% / 40%;
40
+ --layplux-font-size-base: 16px;
41
+ --layplux-sidebar: 222.34deg 10.43% 12.27%;
42
+ --layplux-sidebar-deep: 220deg 13.06% 9%;
43
+ --layplux-menu: var(--layplux-sidebar);
44
+ --layplux-header: 222.34deg 10.43% 12.27%;
45
+ --layplux-shadow: 0 0% 0%;
46
+ --layplux-hover: var(--layplux-foreground) / 0.08;
47
+ --layplux-active: var(--layplux-foreground) / 0.12;
48
+ --layplux-root-background: 210 6% 14%;
49
+
50
+ color-scheme: dark;
51
+ }
@@ -1,56 +1,56 @@
1
- .layplux-root {
2
- --layplux-popup-z-index: 2000;
3
- --layplux-font-family:
4
- -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue', arial, 'Noto Sans',
5
- sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
6
- --layplux-background: 0 0% 100%;
7
- --layplux-background-deep: 216 20.11% 95.47%;
8
- --layplux-foreground: 210 6% 21%;
9
- --layplux-card: 0 0% 100%;
10
- --layplux-card-foreground: 222.2 84% 4.9%;
11
- --layplux-popover: 0 0% 100%;
12
- --layplux-popover-foreground: 222.2 84% 4.9%;
13
- --layplux-muted: 240 4.8% 95.9%;
14
- --layplux-muted-foreground: 240 3.8% 46.1%;
15
- --layplux-primary: 212 100% 45%;
16
- --layplux-primary-foreground: 0 0% 98%;
17
- --layplux-destructive: 359.33 100% 65.1%;
18
- --layplux-destructive-foreground: 0 0% 98%;
19
- --layplux-info: 240 5% 96%;
20
- --layplux-info-foreground: 220 4% 58%;
21
- --layplux-success: 144 57% 58%;
22
- --layplux-success-foreground: 0 0% 98%;
23
- --layplux-warning: 42 84% 61%;
24
- --layplux-warning-foreground: 0 0% 98%;
25
- --layplux-secondary: 240 5% 96%;
26
- --layplux-secondary-foreground: 240 6% 10%;
27
- --layplux-accent: 240 5% 96%;
28
- --layplux-accent-dark: 216 14% 93%;
29
- --layplux-accent-darker: 216 11% 91%;
30
- --layplux-accent-lighter: 240 0% 98%;
31
- --layplux-accent-hover: 200deg 10% 90%;
32
- --layplux-accent-foreground: 240 6% 10%;
33
- --layplux-heavy: 192deg 9.43% 89.61%;
34
- --layplux-heavy-foreground: var(--layplux-accent-foreground);
35
- --layplux-border: 220 6% 82%;
36
- --layplux-input: 240deg 5.88% 90%;
37
- --layplux-input-placeholder: 217 10.6% 65%;
38
- --layplux-input-background: 0 0% 100%;
39
- --layplux-ring: 222.2 84% 4.9%;
40
- --layplux-radius: 0.5rem;
41
- --layplux-overlay: 0 0% 0% / 45%;
42
- --layplux-overlay-content: 0 0% 95% / 45%;
43
- --layplux-font-size-base: 16px;
44
- --layplux-sidebar: 0 0% 100%;
45
- --layplux-sidebar-deep: 0 0% 100%;
46
- --layplux-menu: var(--layplux-sidebar);
47
- --layplux-header: 0 0% 100%;
48
- --layplux-shadow: 0 0% 0%;
49
- --layplux-hover: var(--layplux-foreground) / 0.08;
50
- --layplux-active: var(--layplux-foreground) / 0.12;
51
-
52
- accent-color: var(--layplux-primary);
53
- color-scheme: light;
54
-
55
- --layplux-root-background: 216 12% 92%;
56
- }
1
+ .layplux-root {
2
+ --layplux-popup-z-index: 2000;
3
+ --layplux-font-family:
4
+ -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue', arial, 'Noto Sans',
5
+ sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
6
+ --layplux-background: 0 0% 100%;
7
+ --layplux-background-deep: 216 20.11% 95.47%;
8
+ --layplux-foreground: 210 6% 21%;
9
+ --layplux-card: 0 0% 100%;
10
+ --layplux-card-foreground: 222.2 84% 4.9%;
11
+ --layplux-popover: 0 0% 100%;
12
+ --layplux-popover-foreground: 222.2 84% 4.9%;
13
+ --layplux-muted: 240 4.8% 95.9%;
14
+ --layplux-muted-foreground: 240 3.8% 46.1%;
15
+ --layplux-primary: 212 100% 45%;
16
+ --layplux-primary-foreground: 0 0% 98%;
17
+ --layplux-destructive: 359.33 100% 65.1%;
18
+ --layplux-destructive-foreground: 0 0% 98%;
19
+ --layplux-info: 240 5% 96%;
20
+ --layplux-info-foreground: 220 4% 58%;
21
+ --layplux-success: 144 57% 58%;
22
+ --layplux-success-foreground: 0 0% 98%;
23
+ --layplux-warning: 42 84% 61%;
24
+ --layplux-warning-foreground: 0 0% 98%;
25
+ --layplux-secondary: 240 5% 96%;
26
+ --layplux-secondary-foreground: 240 6% 10%;
27
+ --layplux-accent: 240 5% 96%;
28
+ --layplux-accent-dark: 216 14% 93%;
29
+ --layplux-accent-darker: 216 11% 91%;
30
+ --layplux-accent-lighter: 240 0% 98%;
31
+ --layplux-accent-hover: 200deg 10% 90%;
32
+ --layplux-accent-foreground: 240 6% 10%;
33
+ --layplux-heavy: 192deg 9.43% 89.61%;
34
+ --layplux-heavy-foreground: var(--layplux-accent-foreground);
35
+ --layplux-border: 220 6% 82%;
36
+ --layplux-input: 240deg 5.88% 90%;
37
+ --layplux-input-placeholder: 217 10.6% 65%;
38
+ --layplux-input-background: 0 0% 100%;
39
+ --layplux-ring: 222.2 84% 4.9%;
40
+ --layplux-radius: 0.5rem;
41
+ --layplux-overlay: 0 0% 0% / 45%;
42
+ --layplux-overlay-content: 0 0% 95% / 45%;
43
+ --layplux-font-size-base: 16px;
44
+ --layplux-sidebar: 0 0% 100%;
45
+ --layplux-sidebar-deep: 0 0% 100%;
46
+ --layplux-menu: var(--layplux-sidebar);
47
+ --layplux-header: 0 0% 100%;
48
+ --layplux-shadow: 0 0% 0%;
49
+ --layplux-hover: var(--layplux-foreground) / 0.08;
50
+ --layplux-active: var(--layplux-foreground) / 0.12;
51
+
52
+ accent-color: var(--layplux-primary);
53
+ color-scheme: light;
54
+
55
+ --layplux-root-background: 216 12% 92%;
56
+ }
@@ -1,30 +1,30 @@
1
- .layplux-bottom-area {
2
- display: flex;
3
- flex-shrink: 0;
4
- width: 100%;
5
- height: 24px;
6
- padding: 0 12px;
7
- font-size: 11px;
8
- color: hsl(var(--layplux-muted-foreground));
9
- user-select: none;
10
-
11
- &__left {
12
- display: flex;
13
- gap: 16px;
14
- align-items: center;
15
- }
16
-
17
- &__center {
18
- display: flex;
19
- flex: 1;
20
- gap: 16px;
21
- align-items: center;
22
- justify-content: center;
23
- }
24
-
25
- &__right {
26
- display: flex;
27
- gap: 16px;
28
- align-items: center;
29
- }
30
- }
1
+ .layplux-bottom-area {
2
+ display: flex;
3
+ flex-shrink: 0;
4
+ width: 100%;
5
+ height: 24px;
6
+ padding: 0 12px;
7
+ font-size: 11px;
8
+ color: hsl(var(--layplux-muted-foreground));
9
+ user-select: none;
10
+
11
+ &__left {
12
+ display: flex;
13
+ gap: 16px;
14
+ align-items: center;
15
+ }
16
+
17
+ &__center {
18
+ display: flex;
19
+ flex: 1;
20
+ gap: 16px;
21
+ align-items: center;
22
+ justify-content: center;
23
+ }
24
+
25
+ &__right {
26
+ display: flex;
27
+ gap: 16px;
28
+ align-items: center;
29
+ }
30
+ }
@@ -1,162 +1,162 @@
1
- .layplux-center-area {
2
- position: relative; // undocked 面板的定位父级
3
- display: flex;
4
- flex: 1;
5
- flex-direction: column;
6
- min-width: 0;
7
- min-height: 0;
8
-
9
- // ── 主区域(左 + 编辑器 + 右) ──────────────────────────────────────────
10
- &__main {
11
- display: flex;
12
- flex: 1;
13
- min-height: 0;
14
- }
15
-
16
- // ── 左 / 右侧面板列 ─────────────────────────────────────────────────────
17
- &__left,
18
- &__right {
19
- display: flex;
20
- flex-shrink: 0;
21
- flex-direction: column;
22
- min-height: 0;
23
- }
24
-
25
- // 面板列内部容器(负责上下分割)
26
- &__docked-panels {
27
- display: flex;
28
- flex: 1;
29
- flex-direction: column;
30
- min-height: 0;
31
-
32
- // 没有内部分割时,PanelView 撑满全部高度
33
- > .layplux-panel {
34
- flex: 1;
35
- min-height: 0;
36
- }
37
- }
38
-
39
- // ── 编辑器 ───────────────────────────────────────────────────────────────
40
- &__editor {
41
- position: relative;
42
- flex: 1;
43
- min-width: 0;
44
- min-height: 0;
45
- background-color: hsl(var(--layplux-background));
46
- border-radius: var(--layplux-radius);
47
- }
48
-
49
- // ── 底部面板行 ───────────────────────────────────────────────────────────
50
- &__bottom {
51
- display: flex;
52
- flex-shrink: 0;
53
- min-height: 0;
54
-
55
- // 没有内部分割时,PanelView 撑满全部宽度
56
- > .layplux-panel {
57
- flex: 1;
58
- min-width: 0;
59
- }
60
- }
61
- }
62
-
63
- // ── 拖拽手柄 ─────────────────────────────────────────────────────────────────
64
- .layplux-resize-handle {
65
- z-index: 10;
66
- flex-shrink: 0;
67
- background-color: transparent;
68
- transition: background-color 0.15s;
69
-
70
- &:hover, // 横向手柄(调整左/右侧面板宽度,底部内部左右分割)
71
- &--x {
72
- align-self: stretch;
73
- width: 4px;
74
- cursor: col-resize;
75
- }
76
-
77
- // 纵向手柄(调整底部面板高度,左/右侧内部上下分割)
78
- &--y {
79
- align-self: stretch;
80
- height: 4px;
81
- cursor: row-resize;
82
- }
83
-
84
- // 底部面板的上边缘拖拽手柄(独立定位,不在 flex 流里)
85
- &--bottom-edge {
86
- align-self: auto;
87
- }
88
-
89
- // 最大化状态:视觉高亮
90
- &--maximized {
91
- background-color: hsl(var(--layplux-foreground) / 12%);
92
- }
93
- }
94
-
95
- // ── Undocked 浮动面板 ─────────────────────────────────────────────────────────
96
- .layplux-panel--undocked {
97
- position: absolute;
98
- z-index: 100;
99
- display: flex; // 让内部 PanelView 和 edge 手柄并排 / 堆叠
100
- &-left {
101
- top: 0;
102
- left: 0;
103
- flex-direction: row; // PanelView + 右边缘手柄 横向排列
104
- height: 100%;
105
-
106
- > .layplux-panel {
107
- flex: 1;
108
- min-width: 0;
109
- }
110
- }
111
-
112
- &-right {
113
- top: 0;
114
- right: 0;
115
- flex-direction: row; // 左边缘手柄 + PanelView 横向排列
116
- height: 100%;
117
-
118
- > .layplux-panel {
119
- flex: 1;
120
- min-width: 0;
121
- }
122
- }
123
-
124
- &-bottom {
125
- right: 0;
126
- bottom: 0;
127
- left: 0;
128
- flex-direction: column; // 上边缘手柄 + PanelView 纵向排列
129
- > .layplux-panel {
130
- flex: 1;
131
- min-height: 0;
132
- }
133
- }
134
-
135
- > .layplux-resize-handle {
136
- background-color: hsl(var(--layplux-root-background));
137
- }
138
- }
139
-
140
- // edge 手柄:absolute 贴边,覆盖在 undocked 容器边界上
141
- .layplux-resize-handle {
142
- &--edge-right {
143
- flex-shrink: 0;
144
- align-self: stretch;
145
- width: 4px;
146
- cursor: col-resize;
147
- }
148
-
149
- &--edge-left {
150
- flex-shrink: 0;
151
- align-self: stretch;
152
- width: 4px;
153
- cursor: col-resize;
154
- }
155
-
156
- &--edge-top {
157
- flex-shrink: 0;
158
- align-self: stretch;
159
- height: 4px;
160
- cursor: row-resize;
161
- }
162
- }
1
+ .layplux-center-area {
2
+ position: relative; // undocked 面板的定位父级
3
+ display: flex;
4
+ flex: 1;
5
+ flex-direction: column;
6
+ min-width: 0;
7
+ min-height: 0;
8
+
9
+ // ── 主区域(左 + 编辑器 + 右) ──────────────────────────────────────────
10
+ &__main {
11
+ display: flex;
12
+ flex: 1;
13
+ min-height: 0;
14
+ }
15
+
16
+ // ── 左 / 右侧面板列 ─────────────────────────────────────────────────────
17
+ &__left,
18
+ &__right {
19
+ display: flex;
20
+ flex-shrink: 0;
21
+ flex-direction: column;
22
+ min-height: 0;
23
+ }
24
+
25
+ // 面板列内部容器(负责上下分割)
26
+ &__docked-panels {
27
+ display: flex;
28
+ flex: 1;
29
+ flex-direction: column;
30
+ min-height: 0;
31
+
32
+ // 没有内部分割时,PanelView 撑满全部高度
33
+ > .layplux-panel {
34
+ flex: 1;
35
+ min-height: 0;
36
+ }
37
+ }
38
+
39
+ // ── 编辑器 ───────────────────────────────────────────────────────────────
40
+ &__editor {
41
+ position: relative;
42
+ flex: 1;
43
+ min-width: 0;
44
+ min-height: 0;
45
+ background-color: hsl(var(--layplux-background));
46
+ border-radius: var(--layplux-radius);
47
+ }
48
+
49
+ // ── 底部面板行 ───────────────────────────────────────────────────────────
50
+ &__bottom {
51
+ display: flex;
52
+ flex-shrink: 0;
53
+ min-height: 0;
54
+
55
+ // 没有内部分割时,PanelView 撑满全部宽度
56
+ > .layplux-panel {
57
+ flex: 1;
58
+ min-width: 0;
59
+ }
60
+ }
61
+ }
62
+
63
+ // ── 拖拽手柄 ─────────────────────────────────────────────────────────────────
64
+ .layplux-resize-handle {
65
+ z-index: 10;
66
+ flex-shrink: 0;
67
+ background-color: transparent;
68
+ transition: background-color 0.15s;
69
+
70
+ &:hover, // 横向手柄(调整左/右侧面板宽度,底部内部左右分割)
71
+ &--x {
72
+ align-self: stretch;
73
+ width: 4px;
74
+ cursor: col-resize;
75
+ }
76
+
77
+ // 纵向手柄(调整底部面板高度,左/右侧内部上下分割)
78
+ &--y {
79
+ align-self: stretch;
80
+ height: 4px;
81
+ cursor: row-resize;
82
+ }
83
+
84
+ // 底部面板的上边缘拖拽手柄(独立定位,不在 flex 流里)
85
+ &--bottom-edge {
86
+ align-self: auto;
87
+ }
88
+
89
+ // 最大化状态:视觉高亮
90
+ &--maximized {
91
+ background-color: hsl(var(--layplux-foreground) / 12%);
92
+ }
93
+ }
94
+
95
+ // ── Undocked 浮动面板 ─────────────────────────────────────────────────────────
96
+ .layplux-panel--undocked {
97
+ position: absolute;
98
+ z-index: 100;
99
+ display: flex; // 让内部 PanelView 和 edge 手柄并排 / 堆叠
100
+ &-left {
101
+ top: 0;
102
+ left: 0;
103
+ flex-direction: row; // PanelView + 右边缘手柄 横向排列
104
+ height: 100%;
105
+
106
+ > .layplux-panel {
107
+ flex: 1;
108
+ min-width: 0;
109
+ }
110
+ }
111
+
112
+ &-right {
113
+ top: 0;
114
+ right: 0;
115
+ flex-direction: row; // 左边缘手柄 + PanelView 横向排列
116
+ height: 100%;
117
+
118
+ > .layplux-panel {
119
+ flex: 1;
120
+ min-width: 0;
121
+ }
122
+ }
123
+
124
+ &-bottom {
125
+ right: 0;
126
+ bottom: 0;
127
+ left: 0;
128
+ flex-direction: column; // 上边缘手柄 + PanelView 纵向排列
129
+ > .layplux-panel {
130
+ flex: 1;
131
+ min-height: 0;
132
+ }
133
+ }
134
+
135
+ > .layplux-resize-handle {
136
+ background-color: hsl(var(--layplux-root-background));
137
+ }
138
+ }
139
+
140
+ // edge 手柄:absolute 贴边,覆盖在 undocked 容器边界上
141
+ .layplux-resize-handle {
142
+ &--edge-right {
143
+ flex-shrink: 0;
144
+ align-self: stretch;
145
+ width: 4px;
146
+ cursor: col-resize;
147
+ }
148
+
149
+ &--edge-left {
150
+ flex-shrink: 0;
151
+ align-self: stretch;
152
+ width: 4px;
153
+ cursor: col-resize;
154
+ }
155
+
156
+ &--edge-top {
157
+ flex-shrink: 0;
158
+ align-self: stretch;
159
+ height: 4px;
160
+ cursor: row-resize;
161
+ }
162
+ }
@@ -1,6 +1,6 @@
1
- .layered-manager {
2
- position: relative;
3
- display: flex;
4
- height: 100%;
5
- min-height: 0;
6
- }
1
+ .layered-manager {
2
+ position: relative;
3
+ display: flex;
4
+ height: 100%;
5
+ min-height: 0;
6
+ }
@@ -1,79 +1,79 @@
1
- .layplux-panel {
2
- position: relative;
3
- display: flex;
4
- flex-shrink: 0;
5
- flex-direction: column;
6
- min-height: 0;
7
- overflow: hidden;
8
- background-color: hsl(var(--layplux-sidebar-deep));
9
- border-radius: var(--layplux-radius);
10
-
11
- &__header {
12
- display: flex;
13
- flex-shrink: 0;
14
- gap: 4px;
15
- align-items: center;
16
- height: 36px;
17
- padding: 0 8px;
18
- user-select: none;
19
- border-bottom: 1px solid hsl(var(--layplux-border));
20
- }
21
-
22
- &__title {
23
- flex: 1;
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- font-size: 12px;
27
- font-weight: 600;
28
- color: hsl(var(--layplux-muted-foreground));
29
- text-transform: uppercase;
30
- letter-spacing: 0.05em;
31
- white-space: nowrap;
32
- }
33
-
34
- // viewMode 切换按钮组
35
- &__actions {
36
- display: flex;
37
- gap: 2px;
38
- align-items: center;
39
- margin-left: auto;
40
- }
41
-
42
- &__action-btn {
43
- display: flex;
44
- align-items: center;
45
- justify-content: center;
46
- width: 22px;
47
- height: 22px;
48
- padding: 0;
49
- color: hsl(var(--layplux-muted-foreground));
50
- cursor: pointer;
51
- background: transparent;
52
- border: none;
53
- border-radius: 4px;
54
- transition:
55
- background-color 0.1s,
56
- color 0.1s;
57
-
58
- &:hover {
59
- color: hsl(var(--layplux-foreground));
60
- background-color: hsl(var(--layplux-hover));
61
- }
62
-
63
- &--active {
64
- color: hsl(var(--layplux-foreground));
65
- background-color: hsl(var(--layplux-active));
66
- }
67
- }
68
-
69
- &__body {
70
- flex: 1;
71
- min-height: 0;
72
- overflow: hidden auto;
73
- }
74
-
75
- &__content {
76
- height: 100%;
77
- min-height: 0;
78
- }
79
- }
1
+ .layplux-panel {
2
+ position: relative;
3
+ display: flex;
4
+ flex-shrink: 0;
5
+ flex-direction: column;
6
+ min-height: 0;
7
+ overflow: hidden;
8
+ background-color: hsl(var(--layplux-sidebar-deep));
9
+ border-radius: var(--layplux-radius);
10
+
11
+ &__header {
12
+ display: flex;
13
+ flex-shrink: 0;
14
+ gap: 4px;
15
+ align-items: center;
16
+ height: 36px;
17
+ padding: 0 8px;
18
+ user-select: none;
19
+ border-bottom: 1px solid hsl(var(--layplux-border));
20
+ }
21
+
22
+ &__title {
23
+ flex: 1;
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ font-size: 12px;
27
+ font-weight: 600;
28
+ color: hsl(var(--layplux-muted-foreground));
29
+ text-transform: uppercase;
30
+ letter-spacing: 0.05em;
31
+ white-space: nowrap;
32
+ }
33
+
34
+ // viewMode 切换按钮组
35
+ &__actions {
36
+ display: flex;
37
+ gap: 2px;
38
+ align-items: center;
39
+ margin-left: auto;
40
+ }
41
+
42
+ &__action-btn {
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ width: 22px;
47
+ height: 22px;
48
+ padding: 0;
49
+ color: hsl(var(--layplux-muted-foreground));
50
+ cursor: pointer;
51
+ background: transparent;
52
+ border: none;
53
+ border-radius: 4px;
54
+ transition:
55
+ background-color 0.1s,
56
+ color 0.1s;
57
+
58
+ &:hover {
59
+ color: hsl(var(--layplux-foreground));
60
+ background-color: hsl(var(--layplux-hover));
61
+ }
62
+
63
+ &--active {
64
+ color: hsl(var(--layplux-foreground));
65
+ background-color: hsl(var(--layplux-active));
66
+ }
67
+ }
68
+
69
+ &__body {
70
+ flex: 1;
71
+ min-height: 0;
72
+ overflow: hidden auto;
73
+ }
74
+
75
+ &__content {
76
+ height: 100%;
77
+ min-height: 0;
78
+ }
79
+ }
@@ -1,17 +1,17 @@
1
- .layplux-root {
2
- position: relative;
3
- width: 100%;
4
- height: 100%;
5
- contain: strict;
6
- font-family: var(--layplux-font-family);
7
- font-size: var(--layplux-font-size-base);
8
- color: hsl(var(--layplux-foreground));
9
- background-color: hsl(var(--layplux-root-background));
10
- isolation: isolate;
11
-
12
- *,
13
- *::before,
14
- *::after {
15
- box-sizing: border-box;
16
- }
17
- }
1
+ .layplux-root {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ contain: strict;
6
+ font-family: var(--layplux-font-family);
7
+ font-size: var(--layplux-font-size-base);
8
+ color: hsl(var(--layplux-foreground));
9
+ background-color: hsl(var(--layplux-root-background));
10
+ isolation: isolate;
11
+
12
+ *,
13
+ *::before,
14
+ *::after {
15
+ box-sizing: border-box;
16
+ }
17
+ }
@@ -1,38 +1,38 @@
1
- .layplux-skeleton {
2
- display: flex;
3
- flex: 1;
4
- flex-direction: column;
5
- min-height: 0;
6
-
7
- &__body {
8
- display: flex;
9
- flex: 1;
10
- min-height: 0;
11
- }
12
-
13
- &__stripe {
14
- display: flex;
15
- flex-shrink: 0;
16
- flex-direction: column;
17
- min-width: 6px;
18
-
19
- &-top {
20
- flex: 1;
21
- overflow: hidden auto;
22
- }
23
-
24
- &-separator {
25
- flex-shrink: 0;
26
- width: 24px;
27
- height: 1px;
28
- margin: 4px auto;
29
- background: hsl(var(--layplux-border));
30
- }
31
- }
32
-
33
- &__center {
34
- display: flex;
35
- flex: 1;
36
- min-height: 0;
37
- }
38
- }
1
+ .layplux-skeleton {
2
+ display: flex;
3
+ flex: 1;
4
+ flex-direction: column;
5
+ min-height: 0;
6
+
7
+ &__body {
8
+ display: flex;
9
+ flex: 1;
10
+ min-height: 0;
11
+ }
12
+
13
+ &__stripe {
14
+ display: flex;
15
+ flex-shrink: 0;
16
+ flex-direction: column;
17
+ min-width: 6px;
18
+
19
+ &-top {
20
+ flex: 1;
21
+ overflow: hidden auto;
22
+ }
23
+
24
+ &-separator {
25
+ flex-shrink: 0;
26
+ width: 24px;
27
+ height: 1px;
28
+ margin: 4px auto;
29
+ background: hsl(var(--layplux-border));
30
+ }
31
+ }
32
+
33
+ &__center {
34
+ display: flex;
35
+ flex: 1;
36
+ min-height: 0;
37
+ }
38
+ }
package/package.json CHANGED
@@ -1,46 +1,49 @@
1
- {
2
- "name": "layplux",
3
- "version": "0.0.1",
4
- "description": "IDE-like window system and plugin framework for the web",
5
- "type": "module",
6
- "main": "./dist/cjs/index.cjs",
7
- "module": "./dist/esm/index.mjs",
8
- "unpkg": "./dist/umd/index.js",
9
- "types": "./dist/types/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/types/index.d.ts",
13
- "import": "./dist/esm/index.mjs",
14
- "require": "./dist/cjs/index.cjs"
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"
23
- },
24
- "files": ["dist"],
25
- "scripts": {
26
- "dev": "vite build --watch",
27
- "build": "gulp --gulpfile ../../build-script/gulpfile.js build",
28
- "test": "vitest run",
29
- "test:watch": "vitest"
30
- },
31
- "dependencies": {
32
- "eventemitter2": "^6.4.9"
33
- },
34
- "devDependencies": {
35
- "@vitejs/plugin-vue": "^6.0.7",
36
- "@vitejs/plugin-vue-jsx": "^5.1.5",
37
- "typescript": "^6.0.3",
38
- "vite": "^8.0.14",
39
- "vitest": "^4.1.7",
40
- "vue": "^3.5.34",
41
- "vue-tsc": "^3.3.2"
42
- },
43
- "peerDependencies": {
44
- "vue": "^3.5.0"
45
- }
46
- }
1
+ {
2
+ "name": "layplux",
3
+ "version": "1.0.1",
4
+ "description": "IDE-like window system and plugin framework for the web",
5
+ "type": "module",
6
+ "main": "./dist/cjs/index.cjs",
7
+ "module": "./dist/esm/index.mjs",
8
+ "unpkg": "./dist/umd/index.js",
9
+ "types": "./dist/types/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/types/index.d.ts",
13
+ "import": "./dist/esm/index.mjs",
14
+ "require": "./dist/cjs/index.cjs"
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",
23
+ "./scss": "./dist/style/layplux.scss"
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "dependencies": {
29
+ "eventemitter2": "^6.4.9"
30
+ },
31
+ "devDependencies": {
32
+ "@vitejs/plugin-vue": "^6.0.7",
33
+ "@vitejs/plugin-vue-jsx": "^5.1.5",
34
+ "typescript": "^6.0.3",
35
+ "vite": "^8.0.14",
36
+ "vitest": "^4.1.7",
37
+ "vue": "^3.5.34",
38
+ "vue-tsc": "^3.3.2"
39
+ },
40
+ "peerDependencies": {
41
+ "vue": "^3.5.0"
42
+ },
43
+ "scripts": {
44
+ "dev": "vite build --watch",
45
+ "build": "gulp --gulpfile ../../build-script/gulpfile.js build",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest"
48
+ }
49
+ }