Skip to content

Commit 8a13e8f

Browse files
committed
refactor(core): extract /const
1 parent d91f0f5 commit 8a13e8f

File tree

17 files changed

+23
-16
lines changed

17 files changed

+23
-16
lines changed

packages/core/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"types": "./dist/utils/index.d.ts",
1717
"import": "./dist/utils/index.mjs",
1818
"require": "./dist/utils/index.cjs"
19+
},
20+
"./const": {
21+
"types": "./dist/constants/index.d.ts",
22+
"import": "./dist/constants/index.mjs",
23+
"require": "./dist/constants/index.cjs"
1924
}
2025
},
2126
"typesVersions": {
@@ -25,6 +30,9 @@
2530
],
2631
"utils": [
2732
"./dist/utils/index.d.ts"
33+
],
34+
"const": [
35+
"./dist/constants/index.d.ts"
2836
]
2937
}
3038
},

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ export { TrackpadCore } from './entities/TrackpadCore';
1212

1313
export * from './singletons/Registry';
1414
export * from './singletons/GamepadManager';
15-
16-
export * from './constants';

packages/core/tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default defineConfig({
44
entry: {
55
index: 'src/index.ts',
66
'utils/index': 'src/utils/index.ts',
7+
'constants/index': 'src/constants/index.ts',
78
},
89
format: ['cjs', 'esm'],
910
outExtension({ format }) {

packages/vue/src/components/InputZone.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { computed, nextTick, ref, useSlots, VNode, watch } from 'vue';
33
import {
44
InputZoneCore,
5-
OmniPad,
65
type ConfigTreeNode,
76
type InputZoneConfig,
87
type InputZoneState,
@@ -14,6 +13,7 @@ import { projectPercentToBox, resolveLayoutStyle, supportsContainerQueries } fro
1413
import { getComponent } from '../utils/componentRegistry';
1514
import VirtualLayerBase from './VirtualLayerBase.vue';
1615
import { useWidgetSetup } from '../composables/useWidgetSetup';
16+
import { OmniPad } from '@omnipad/core/const';
1717
1818
interface InputZoneProps {
1919
/** The runtime tree node for automatic setup. */

packages/vue/src/components/RootLayer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup lang="ts">
22
import {
33
RootLayerCore,
4-
OmniPad,
54
type BaseConfig,
65
type ConfigTreeNode,
76
type LayoutBox,
@@ -11,6 +10,7 @@ import { resolveLayoutStyle } from '@omnipad/web';
1110
import VirtualLayerBase from './VirtualLayerBase.vue';
1211
import { computed } from 'vue';
1312
import { useWidgetSetup } from '../composables/useWidgetSetup';
13+
import { OmniPad } from '@omnipad/core/const';
1414
1515
const props = defineProps<{
1616
/** The runtime tree node for automatic setup. */

packages/vue/src/components/TargetZone.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import { computed } from 'vue';
33
import {
44
TargetZoneCore,
5-
OmniPad,
65
type ConfigTreeNode,
76
type CursorState,
87
type LayoutBox,
98
type TargetZoneConfig,
109
} from '@omnipad/core';
1110
import { resolveLayoutStyle, projectPercentToBox, supportsContainerQueries } from '@omnipad/web';
1211
import { useWidgetSetup } from '../composables/useWidgetSetup';
12+
import { OmniPad } from '@omnipad/core/const';
1313
1414
interface TargetZoneProps {
1515
/** The runtime tree node for automatic setup. */

packages/vue/src/components/VirtualButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<script setup lang="ts">
22
import {
33
ButtonCore,
4-
OmniPad,
54
type ButtonConfig,
65
type ButtonState,
76
type ConfigTreeNode,
87
type LayoutBox,
98
} from '@omnipad/core';
109
import VirtualButtonBase from './VirtualButtonBase.vue';
1110
import { useWidgetSetup } from '../composables/useWidgetSetup';
11+
import { OmniPad } from '@omnipad/core/const';
1212
1313
interface VirtualButtonProps {
1414
/** The runtime tree node for automatic setup. */

packages/vue/src/components/VirtualDPad.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { ref, watchEffect } from 'vue';
33
import {
44
DPadCore,
5-
OmniPad,
65
type ConfigTreeNode,
76
type DPadConfig,
87
type DPadState,
@@ -11,6 +10,7 @@ import {
1110
import { supportsContainerQueries } from '@omnipad/web';
1211
import VirtualAxisBase from './VirtualAxisBase.vue';
1312
import { useWidgetSetup } from '../composables/useWidgetSetup';
13+
import { OmniPad } from '@omnipad/core/const';
1414
1515
/**
1616
* Props for the Virtual D-Pad component.

packages/vue/src/components/VirtualJoystick.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { ref, watchEffect } from 'vue';
33
import {
44
JoystickCore,
5-
OmniPad,
65
type ConfigTreeNode,
76
type JoystickConfig,
87
type JoystickState,
@@ -12,6 +11,7 @@ import { supportsContainerQueries } from '@omnipad/web';
1211
import VirtualAxisBase from './VirtualAxisBase.vue';
1312
import VirtualButtonBase from './VirtualButtonBase.vue';
1413
import { useWidgetSetup } from '../composables/useWidgetSetup';
14+
import { OmniPad } from '@omnipad/core/const';
1515
1616
interface VirtualJoystickProps {
1717
/** The runtime tree node for automatic setup. */

packages/vue/src/components/VirtualTrackpad.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script setup lang="ts">
22
import {
33
TrackpadCore,
4-
OmniPad,
54
type ActionMapping,
65
type ConfigTreeNode,
76
type LayoutBox,
@@ -10,6 +9,7 @@ import {
109
} from '@omnipad/core';
1110
import VirtualButtonBase from './VirtualButtonBase.vue';
1211
import { useWidgetSetup } from '../composables/useWidgetSetup';
12+
import { OmniPad } from '@omnipad/core/const';
1313
1414
interface VirtualTrackpadProps {
1515
/** The runtime tree node for automatic setup. */

0 commit comments

Comments
 (0)