Make all type-only imports explicit
This commit is contained in:
parent
2fcbf5422c
commit
ab81a140c9
75 changed files with 393 additions and 499 deletions
|
@ -8,9 +8,9 @@ import {
|
||||||
RegisterNodeInjectionKey,
|
RegisterNodeInjectionKey,
|
||||||
UnregisterNodeInjectionKey,
|
UnregisterNodeInjectionKey,
|
||||||
NodesInjectionKey,
|
NodesInjectionKey,
|
||||||
FeatureNode,
|
|
||||||
BoundsInjectionKey
|
BoundsInjectionKey
|
||||||
} from "game/layers";
|
} from "game/layers";
|
||||||
|
import type { FeatureNode } from "game/layers";
|
||||||
import { nextTick, onMounted, provide, ref } from "vue";
|
import { nextTick, onMounted, provide, ref } from "vue";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import { GenericLayer, layers } from "game/layers";
|
import type { GenericLayer } from "game/layers";
|
||||||
|
import { layers } from "game/layers";
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
import { computed, toRef, unref } from "vue";
|
import { computed, toRef, unref } from "vue";
|
||||||
import Layer from "./Layer.vue";
|
import Layer from "./Layer.vue";
|
||||||
|
|
|
@ -17,12 +17,13 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import { CoercableComponent } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { FeatureNode } from "game/layers";
|
import type { FeatureNode } from "game/layers";
|
||||||
import { Persistent } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
import { computeComponent, processedPropType, wrapRef } from "util/vue";
|
import { computeComponent, processedPropType, wrapRef } from "util/vue";
|
||||||
import { computed, defineComponent, nextTick, PropType, Ref, toRefs, unref, watch } from "vue";
|
import type { PropType, Ref } from "vue";
|
||||||
|
import { computed, defineComponent, nextTick, toRefs, unref, watch } from "vue";
|
||||||
import Context from "./Context.vue";
|
import Context from "./Context.vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { FeatureNode } from "game/layers";
|
import type { FeatureNode } from "game/layers";
|
||||||
import { computed, ref, toRefs } from "vue";
|
import { computed, ref, toRefs } from "vue";
|
||||||
import Context from "./Context.vue";
|
import Context from "./Context.vue";
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,10 @@ import Modal from "components/Modal.vue";
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
import state from "game/state";
|
import state from "game/state";
|
||||||
import Decimal, { DecimalSource, format } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import { ComponentPublicInstance, computed, ref, toRef } from "vue";
|
import Decimal, { format } from "util/bignum";
|
||||||
|
import type { ComponentPublicInstance } from "vue";
|
||||||
|
import { computed, ref, toRef } from "vue";
|
||||||
import Toggle from "./fields/Toggle.vue";
|
import Toggle from "./fields/Toggle.vue";
|
||||||
import SavesManager from "./SavesManager.vue";
|
import SavesManager from "./SavesManager.vue";
|
||||||
|
|
||||||
|
|
|
@ -101,12 +101,13 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Changelog from "data/Changelog.vue";
|
import Changelog from "data/Changelog.vue";
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import { ComponentPublicInstance, ref } from "vue";
|
import Tooltip from "features/tooltips/Tooltip.vue";
|
||||||
|
import { Direction } from "util/common";
|
||||||
|
import type { ComponentPublicInstance } from "vue";
|
||||||
|
import { ref } from "vue";
|
||||||
import Info from "./Info.vue";
|
import Info from "./Info.vue";
|
||||||
import Options from "./Options.vue";
|
import Options from "./Options.vue";
|
||||||
import SavesManager from "./SavesManager.vue";
|
import SavesManager from "./SavesManager.vue";
|
||||||
import Tooltip from "features/tooltips/Tooltip.vue";
|
|
||||||
import { Direction } from "util/common";
|
|
||||||
|
|
||||||
const info = ref<ComponentPublicInstance<typeof Info> | null>(null);
|
const info = ref<ComponentPublicInstance<typeof Info> | null>(null);
|
||||||
const savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);
|
const savesManager = ref<ComponentPublicInstance<typeof SavesManager> | null>(null);
|
||||||
|
|
|
@ -23,6 +23,7 @@ import Modal from "components/Modal.vue";
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import rawThemes from "data/themes";
|
import rawThemes from "data/themes";
|
||||||
import { jsx } from "features/feature";
|
import { jsx } from "features/feature";
|
||||||
|
import Tooltip from "features/tooltips/Tooltip.vue";
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
import settings, { settingFields } from "game/settings";
|
import settings, { settingFields } from "game/settings";
|
||||||
import { camelToTitle } from "util/common";
|
import { camelToTitle } from "util/common";
|
||||||
|
@ -30,7 +31,6 @@ import { coerceComponent, render } from "util/vue";
|
||||||
import { computed, ref, toRefs } from "vue";
|
import { computed, ref, toRefs } from "vue";
|
||||||
import Select from "./fields/Select.vue";
|
import Select from "./fields/Select.vue";
|
||||||
import Toggle from "./fields/Toggle.vue";
|
import Toggle from "./fields/Toggle.vue";
|
||||||
import Tooltip from "features/tooltips/Tooltip.vue";
|
|
||||||
|
|
||||||
const isOpen = ref(false);
|
const isOpen = ref(false);
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ import { computed, ref, toRefs, watch } from "vue";
|
||||||
import DangerButton from "./fields/DangerButton.vue";
|
import DangerButton from "./fields/DangerButton.vue";
|
||||||
import FeedbackButton from "./fields/FeedbackButton.vue";
|
import FeedbackButton from "./fields/FeedbackButton.vue";
|
||||||
import Text from "./fields/Text.vue";
|
import Text from "./fields/Text.vue";
|
||||||
import { LoadablePlayerData } from "./SavesManager.vue";
|
import type { LoadablePlayerData } from "./SavesManager.vue";
|
||||||
|
|
||||||
const _props = defineProps<{
|
const _props = defineProps<{
|
||||||
save: LoadablePlayerData;
|
save: LoadablePlayerData;
|
||||||
|
|
|
@ -57,18 +57,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import projInfo from "data/projInfo.json";
|
|
||||||
import Modal from "components/Modal.vue";
|
import Modal from "components/Modal.vue";
|
||||||
import player, { PlayerData, stringifySave } from "game/player";
|
import projInfo from "data/projInfo.json";
|
||||||
|
import type { PlayerData } from "game/player";
|
||||||
|
import player, { stringifySave } from "game/player";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { getUniqueID, loadSave, save, newSave } from "util/save";
|
import LZString from "lz-string";
|
||||||
import { ComponentPublicInstance, computed, nextTick, ref, shallowReactive, watch } from "vue";
|
import { ProxyState } from "util/proxies";
|
||||||
|
import { getUniqueID, loadSave, newSave, save } from "util/save";
|
||||||
|
import type { ComponentPublicInstance } from "vue";
|
||||||
|
import { computed, nextTick, ref, shallowReactive, watch } from "vue";
|
||||||
|
import Draggable from "vuedraggable";
|
||||||
import Select from "./fields/Select.vue";
|
import Select from "./fields/Select.vue";
|
||||||
import Text from "./fields/Text.vue";
|
import Text from "./fields/Text.vue";
|
||||||
import Save from "./Save.vue";
|
import Save from "./Save.vue";
|
||||||
import Draggable from "vuedraggable";
|
|
||||||
import LZString from "lz-string";
|
|
||||||
import { ProxyState } from "util/proxies";
|
|
||||||
|
|
||||||
export type LoadablePlayerData = Omit<Partial<PlayerData>, "id"> & { id: string; error?: unknown };
|
export type LoadablePlayerData = Omit<Partial<PlayerData>, "id"> & { id: string; error?: unknown };
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import state from "game/state";
|
import state from "game/state";
|
||||||
import Decimal, { DecimalSource, formatWhole } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal, { formatWhole } from "util/bignum";
|
||||||
import { computed, ref, watchEffect } from "vue";
|
import { computed, ref, watchEffect } from "vue";
|
||||||
|
|
||||||
const tps = computed(() =>
|
const tps = computed(() =>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import "components/common/fields.css";
|
import "components/common/fields.css";
|
||||||
import { CoercableComponent } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { computeOptionalComponent, unwrapRef } from "util/vue";
|
import { computeOptionalComponent, unwrapRef } from "util/vue";
|
||||||
import { ref, toRef, watch } from "vue";
|
import { ref, toRef, watch } from "vue";
|
||||||
import VueNextSelect from "vue-next-select";
|
import VueNextSelect from "vue-next-select";
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, toRefs, unref } from "vue";
|
|
||||||
import Tooltip from "features/tooltips/Tooltip.vue";
|
|
||||||
import "components/common/fields.css";
|
import "components/common/fields.css";
|
||||||
|
import Tooltip from "features/tooltips/Tooltip.vue";
|
||||||
import { Direction } from "util/common";
|
import { Direction } from "util/common";
|
||||||
|
import { computed, toRefs, unref } from "vue";
|
||||||
|
|
||||||
const _props = defineProps<{
|
const _props = defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
|
@ -26,11 +26,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { CoercableComponent } from "features/feature";
|
import "components/common/fields.css";
|
||||||
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { coerceComponent } from "util/vue";
|
import { coerceComponent } from "util/vue";
|
||||||
import { computed, onMounted, ref, toRefs, unref } from "vue";
|
import { computed, onMounted, ref, toRefs, unref } from "vue";
|
||||||
import VueTextareaAutosize from "vue-textarea-autosize";
|
import VueTextareaAutosize from "vue-textarea-autosize";
|
||||||
import "components/common/fields.css";
|
|
||||||
|
|
||||||
const _props = defineProps<{
|
const _props = defineProps<{
|
||||||
title?: CoercableComponent;
|
title?: CoercableComponent;
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { CoercableComponent } from "features/feature";
|
import "components/common/fields.css";
|
||||||
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { coerceComponent } from "util/vue";
|
import { coerceComponent } from "util/vue";
|
||||||
import { computed, unref } from "vue";
|
import { computed, unref } from "vue";
|
||||||
import "components/common/fields.css";
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title?: CoercableComponent;
|
title?: CoercableComponent;
|
||||||
|
|
|
@ -8,9 +8,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { CoercableComponent } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { computeComponent } from "util/vue";
|
import { computeComponent } from "util/vue";
|
||||||
import { Ref, toRef } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
import { toRef } from "vue";
|
||||||
import Col from "./Column.vue";
|
import Col from "./Column.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -1,41 +1,28 @@
|
||||||
import {
|
import type { Clickable, ClickableOptions, GenericClickable } from "features/clickables/clickable";
|
||||||
Clickable,
|
import { createClickable } from "features/clickables/clickable";
|
||||||
ClickableOptions,
|
import type { GenericConversion } from "features/conversion";
|
||||||
createClickable,
|
import type { CoercableComponent, JSXFunction, OptionsFunc, Replace } from "features/feature";
|
||||||
GenericClickable
|
import { jsx, setDefault } from "features/feature";
|
||||||
} from "features/clickables/clickable";
|
|
||||||
import { GenericConversion } from "features/conversion";
|
|
||||||
import {
|
|
||||||
CoercableComponent,
|
|
||||||
jsx,
|
|
||||||
JSXFunction,
|
|
||||||
OptionsFunc,
|
|
||||||
Replace,
|
|
||||||
setDefault
|
|
||||||
} from "features/feature";
|
|
||||||
import { displayResource } from "features/resources/resource";
|
import { displayResource } from "features/resources/resource";
|
||||||
import {
|
import type { GenericTree, GenericTreeNode, TreeNode, TreeNodeOptions } from "features/trees/tree";
|
||||||
createTreeNode,
|
import { createTreeNode } from "features/trees/tree";
|
||||||
GenericTree,
|
import type { Modifier } from "game/modifiers";
|
||||||
GenericTreeNode,
|
import type { Persistent } from "game/persistence";
|
||||||
TreeNode,
|
import { DefaultValue, persistent } from "game/persistence";
|
||||||
TreeNodeOptions
|
|
||||||
} from "features/trees/tree";
|
|
||||||
import { Modifier } from "game/modifiers";
|
|
||||||
import { DefaultValue, Persistent, persistent } from "game/persistence";
|
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
import Decimal, { DecimalSource, format } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import { WithRequired } from "util/common";
|
import Decimal, { format } from "util/bignum";
|
||||||
import {
|
import type { WithRequired } from "util/common";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
convertComputable,
|
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { convertComputable, processComputable } from "util/computed";
|
||||||
import { renderJSX } from "util/vue";
|
import { renderJSX } from "util/vue";
|
||||||
import { computed, Ref, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
import { computed, unref } from "vue";
|
||||||
import "./common.css";
|
import "./common.css";
|
||||||
|
|
||||||
export interface ResetButtonOptions extends ClickableOptions {
|
export interface ResetButtonOptions extends ClickableOptions {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { createResource } from "features/resources/resource";
|
||||||
import { addTooltip } from "features/tooltips/tooltip";
|
import { addTooltip } from "features/tooltips/tooltip";
|
||||||
import { createResourceTooltip } from "features/trees/tree";
|
import { createResourceTooltip } from "features/trees/tree";
|
||||||
import { createLayer } from "game/layers";
|
import { createLayer } from "game/layers";
|
||||||
import { DecimalSource } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import { render } from "util/vue";
|
import { render } from "util/vue";
|
||||||
import { createLayerTreeNode, createResetButton } from "../common";
|
import { createLayerTreeNode, createResetButton } from "../common";
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
import Spacer from "components/layout/Spacer.vue";
|
import Spacer from "components/layout/Spacer.vue";
|
||||||
import { jsx } from "features/feature";
|
import { jsx } from "features/feature";
|
||||||
import { createResource, trackBest, trackOOMPS, trackTotal } from "features/resources/resource";
|
import { createResource, trackBest, trackOOMPS, trackTotal } from "features/resources/resource";
|
||||||
import { branchedResetPropagation, createTree, GenericTree } from "features/trees/tree";
|
import type { GenericTree } from "features/trees/tree";
|
||||||
|
import { branchedResetPropagation, createTree } from "features/trees/tree";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { createLayer, GenericLayer } from "game/layers";
|
import type { GenericLayer } from "game/layers";
|
||||||
import player, { PlayerData } from "game/player";
|
import { createLayer } from "game/layers";
|
||||||
import Decimal, { DecimalSource, format, formatTime } from "util/bignum";
|
import type { PlayerData } from "game/player";
|
||||||
|
import player from "game/player";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal, { format, formatTime } from "util/bignum";
|
||||||
import { render } from "util/vue";
|
import { render } from "util/vue";
|
||||||
import { computed, toRaw } from "vue";
|
import { computed, toRaw } from "vue";
|
||||||
import prestige from "./layers/prestige";
|
import prestige from "./layers/prestige";
|
||||||
|
|
|
@ -23,12 +23,14 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { CoercableComponent, Visibility } from "features/feature";
|
|
||||||
import { computeOptionalComponent, processedPropType } from "util/vue";
|
|
||||||
import { defineComponent, StyleValue, toRefs, unref } from "vue";
|
|
||||||
import Node from "components/Node.vue";
|
|
||||||
import MarkNode from "components/MarkNode.vue";
|
|
||||||
import "components/common/features.css";
|
import "components/common/features.css";
|
||||||
|
import MarkNode from "components/MarkNode.vue";
|
||||||
|
import Node from "components/Node.vue";
|
||||||
|
import type { CoercableComponent } from "features/feature";
|
||||||
|
import { Visibility } from "features/feature";
|
||||||
|
import { computeOptionalComponent, processedPropType } from "util/vue";
|
||||||
|
import type { StyleValue } from "vue";
|
||||||
|
import { defineComponent, toRefs, unref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -2,23 +2,24 @@ import AchievementComponent from "features/achievements/Achievement.vue";
|
||||||
import {
|
import {
|
||||||
CoercableComponent,
|
CoercableComponent,
|
||||||
Component,
|
Component,
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
GatherProps,
|
||||||
getUniqueID,
|
getUniqueID,
|
||||||
|
OptionsFunc,
|
||||||
Replace,
|
Replace,
|
||||||
setDefault,
|
setDefault,
|
||||||
StyleValue,
|
StyleValue,
|
||||||
Visibility
|
Visibility
|
||||||
} from "features/feature";
|
} from "features/feature";
|
||||||
import "game/notifications";
|
import "game/notifications";
|
||||||
import { Persistent, persistent } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
import {
|
import { persistent } from "game/persistence";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { coerceComponent } from "util/vue";
|
import { coerceComponent } from "util/vue";
|
||||||
import { unref, watchEffect } from "vue";
|
import { unref, watchEffect } from "vue";
|
||||||
|
|
|
@ -45,13 +45,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { CoercableComponent, Visibility } from "features/feature";
|
|
||||||
import Decimal, { DecimalSource } from "util/bignum";
|
|
||||||
import { computeOptionalComponent, processedPropType, unwrapRef } from "util/vue";
|
|
||||||
import { computed, CSSProperties, defineComponent, StyleValue, toRefs, unref } from "vue";
|
|
||||||
import Node from "components/Node.vue";
|
|
||||||
import MarkNode from "components/MarkNode.vue";
|
import MarkNode from "components/MarkNode.vue";
|
||||||
|
import Node from "components/Node.vue";
|
||||||
|
import { CoercableComponent, Visibility } from "features/feature";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal from "util/bignum";
|
||||||
import { Direction } from "util/common";
|
import { Direction } from "util/common";
|
||||||
|
import { computeOptionalComponent, processedPropType, unwrapRef } from "util/vue";
|
||||||
|
import type { CSSProperties, StyleValue } from "vue";
|
||||||
|
import { computed, defineComponent, toRefs, unref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
import BarComponent from "features/bars/Bar.vue";
|
import BarComponent from "features/bars/Bar.vue";
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
import type { DecimalSource } from "util/bignum";
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import { DecimalSource } from "util/bignum";
|
|
||||||
import { Direction } from "util/common";
|
import { Direction } from "util/common";
|
||||||
import {
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { unref } from "vue";
|
import { unref } from "vue";
|
||||||
|
|
||||||
|
|
|
@ -51,18 +51,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import type {
|
||||||
BoardData,
|
BoardData,
|
||||||
BoardNode,
|
BoardNode,
|
||||||
BoardNodeLink,
|
BoardNodeLink,
|
||||||
GenericBoardNodeAction,
|
GenericBoardNodeAction,
|
||||||
GenericNodeType,
|
GenericNodeType
|
||||||
getNodeProperty
|
|
||||||
} from "features/boards/board";
|
} from "features/boards/board";
|
||||||
import { StyleValue, Visibility } from "features/feature";
|
import { getNodeProperty } from "features/boards/board";
|
||||||
|
import type { StyleValue } from "features/feature";
|
||||||
|
import { Visibility } from "features/feature";
|
||||||
import { PersistentState } from "game/persistence";
|
import { PersistentState } from "game/persistence";
|
||||||
import { ProcessedComputable } from "util/computed";
|
import type { ProcessedComputable } from "util/computed";
|
||||||
import { computed, Ref, ref, toRefs, unref } from "vue";
|
import { computed, ref, Ref, toRefs, unref } from "vue";
|
||||||
import panZoom from "vue-panzoom";
|
import panZoom from "vue-panzoom";
|
||||||
import BoardLinkVue from "./BoardLink.vue";
|
import BoardLinkVue from "./BoardLink.vue";
|
||||||
import BoardNodeVue from "./BoardNode.vue";
|
import BoardNodeVue from "./BoardNode.vue";
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { BoardNodeLink } from "features/boards/board";
|
import type { BoardNodeLink } from "features/boards/board";
|
||||||
import { computed, toRefs, unref } from "vue";
|
import { computed, toRefs, unref } from "vue";
|
||||||
|
|
||||||
const _props = defineProps<{
|
const _props = defineProps<{
|
||||||
|
|
|
@ -168,14 +168,8 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import themes from "data/themes";
|
import themes from "data/themes";
|
||||||
import {
|
import type { BoardNode, GenericBoardNodeAction, GenericNodeType } from "features/boards/board";
|
||||||
BoardNode,
|
import { ProgressDisplay, getNodeProperty, Shape } from "features/boards/board";
|
||||||
GenericBoardNodeAction,
|
|
||||||
GenericNodeType,
|
|
||||||
getNodeProperty,
|
|
||||||
ProgressDisplay,
|
|
||||||
Shape
|
|
||||||
} from "features/boards/board";
|
|
||||||
import { Visibility } from "features/feature";
|
import { Visibility } from "features/feature";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { computed, ref, toRefs, unref, watch } from "vue";
|
import { computed, ref, toRefs, unref, watch } from "vue";
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
import BoardComponent from "features/boards/Board.vue";
|
import BoardComponent from "features/boards/Board.vue";
|
||||||
|
import type { OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
OptionsFunc,
|
|
||||||
findFeatures,
|
findFeatures,
|
||||||
GatherProps,
|
GatherProps,
|
||||||
getUniqueID,
|
getUniqueID,
|
||||||
Replace,
|
|
||||||
setDefault,
|
setDefault,
|
||||||
StyleValue,
|
|
||||||
Visibility
|
Visibility
|
||||||
} from "features/feature";
|
} from "features/feature";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { State, Persistent, PersistentState, persistent } from "game/persistence";
|
import type { Persistent, State } from "game/persistence";
|
||||||
|
import { persistent, PersistentState } from "game/persistence";
|
||||||
|
import type { Unsubscribe } from "nanoevents";
|
||||||
import { isFunction } from "util/common";
|
import { isFunction } from "util/common";
|
||||||
import {
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { Unsubscribe } from "nanoevents";
|
|
||||||
import { computed, Ref, unref } from "vue";
|
import { computed, Ref, unref } from "vue";
|
||||||
import { Link } from "../links/links";
|
import type { Link } from "../links/links";
|
||||||
|
|
||||||
export const BoardType = Symbol("Board");
|
export const BoardType = Symbol("Board");
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
import ClickableComponent from "features/clickables/Clickable.vue";
|
import ClickableComponent from "features/clickables/Clickable.vue";
|
||||||
import { Resource } from "features/resources/resource";
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
import { Persistent, persistent } from "game/persistence";
|
import { Component, GatherProps, getUniqueID, jsx, setDefault, Visibility } from "features/feature";
|
||||||
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
|
import type { Resource } from "features/resources/resource";
|
||||||
import {
|
import type { Persistent } from "game/persistence";
|
||||||
|
import { persistent } from "game/persistence";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal, { format, formatWhole } from "util/bignum";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { coerceComponent, isCoercableComponent } from "util/vue";
|
import { coerceComponent, isCoercableComponent } from "util/vue";
|
||||||
import { computed, Ref, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import {
|
import { computed, unref } from "vue";
|
||||||
CoercableComponent,
|
|
||||||
Component,
|
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
jsx,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "./feature";
|
|
||||||
|
|
||||||
export const BuyableType = Symbol("Buyable");
|
export const BuyableType = Symbol("Buyable");
|
||||||
|
|
||||||
|
|
|
@ -32,23 +32,15 @@
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import "components/common/features.css";
|
import "components/common/features.css";
|
||||||
import { GenericChallenge } from "features/challenges/challenge";
|
import MarkNode from "components/MarkNode.vue";
|
||||||
import { jsx, StyleValue, Visibility } from "features/feature";
|
import Node from "components/Node.vue";
|
||||||
|
import type { GenericChallenge } from "features/challenges/challenge";
|
||||||
|
import type { StyleValue } from "features/feature";
|
||||||
|
import { jsx, Visibility } from "features/feature";
|
||||||
import { getHighNotifyStyle, getNotifyStyle } from "game/notifications";
|
import { getHighNotifyStyle, getNotifyStyle } from "game/notifications";
|
||||||
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
||||||
import {
|
import type { Component, PropType, UnwrapRef } from "vue";
|
||||||
Component,
|
import { computed, defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
computed,
|
|
||||||
defineComponent,
|
|
||||||
PropType,
|
|
||||||
shallowRef,
|
|
||||||
toRefs,
|
|
||||||
unref,
|
|
||||||
UnwrapRef,
|
|
||||||
watchEffect
|
|
||||||
} from "vue";
|
|
||||||
import Node from "components/Node.vue";
|
|
||||||
import MarkNode from "components/MarkNode.vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,33 +1,26 @@
|
||||||
import { isArray } from "@vue/shared";
|
import { isArray } from "@vue/shared";
|
||||||
import Toggle from "components/fields/Toggle.vue";
|
import Toggle from "components/fields/Toggle.vue";
|
||||||
import ChallengeComponent from "features/challenges/Challenge.vue";
|
import ChallengeComponent from "features/challenges/Challenge.vue";
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, jsx, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
import type { GenericReset } from "features/reset";
|
||||||
OptionsFunc,
|
import type { Resource } from "features/resources/resource";
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
jsx,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import { GenericReset } from "features/reset";
|
|
||||||
import { Resource } from "features/resources/resource";
|
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { Persistent, persistent } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
|
import { persistent } from "game/persistence";
|
||||||
import settings, { registerSettingField } from "game/settings";
|
import settings, { registerSettingField } from "game/settings";
|
||||||
import Decimal, { DecimalSource } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import {
|
import Decimal from "util/bignum";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, Ref, unref, watch, WatchStopHandle } from "vue";
|
import type { Ref, WatchStopHandle } from "vue";
|
||||||
|
import { computed, unref, watch } from "vue";
|
||||||
|
|
||||||
export const ChallengeType = Symbol("ChallengeType");
|
export const ChallengeType = Symbol("ChallengeType");
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,11 @@
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import "components/common/features.css";
|
import "components/common/features.css";
|
||||||
import Node from "components/Node.vue";
|
|
||||||
import MarkNode from "components/MarkNode.vue";
|
import MarkNode from "components/MarkNode.vue";
|
||||||
import { GenericClickable } from "features/clickables/clickable";
|
import Node from "components/Node.vue";
|
||||||
import { jsx, StyleValue, Visibility } from "features/feature";
|
import type { GenericClickable } from "features/clickables/clickable";
|
||||||
|
import type { StyleValue } from "features/feature";
|
||||||
|
import { jsx, Visibility } from "features/feature";
|
||||||
import {
|
import {
|
||||||
coerceComponent,
|
coerceComponent,
|
||||||
isCoercableComponent,
|
isCoercableComponent,
|
||||||
|
@ -40,16 +41,8 @@ import {
|
||||||
setupHoldToClick,
|
setupHoldToClick,
|
||||||
unwrapRef
|
unwrapRef
|
||||||
} from "util/vue";
|
} from "util/vue";
|
||||||
import {
|
import type { Component, PropType, UnwrapRef } from "vue";
|
||||||
Component,
|
import { defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
defineComponent,
|
|
||||||
PropType,
|
|
||||||
shallowRef,
|
|
||||||
toRefs,
|
|
||||||
unref,
|
|
||||||
UnwrapRef,
|
|
||||||
watchEffect
|
|
||||||
} from "vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
import ClickableComponent from "features/clickables/Clickable.vue";
|
import ClickableComponent from "features/clickables/Clickable.vue";
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
import type { BaseLayer } from "game/layers";
|
||||||
OptionsFunc,
|
import type { Unsubscribe } from "nanoevents";
|
||||||
GatherProps,
|
import type {
|
||||||
getUniqueID,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import { BaseLayer } from "game/layers";
|
|
||||||
import { Unsubscribe } from "nanoevents";
|
|
||||||
import {
|
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, unref } from "vue";
|
import { computed, unref } from "vue";
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
import { BaseLayer } from "game/layers";
|
import type { OptionsFunc, Replace } from "features/feature";
|
||||||
import { Modifier } from "game/modifiers";
|
import { setDefault } from "features/feature";
|
||||||
import Decimal, { DecimalSource } from "util/bignum";
|
import type { Resource } from "features/resources/resource";
|
||||||
import { WithRequired } from "util/common";
|
import type { BaseLayer } from "game/layers";
|
||||||
import {
|
import type { Modifier } from "game/modifiers";
|
||||||
Computable,
|
import type { DecimalSource } from "util/bignum";
|
||||||
convertComputable,
|
import Decimal from "util/bignum";
|
||||||
GetComputableTypeWithDefault,
|
import type { WithRequired } from "util/common";
|
||||||
processComputable,
|
import type { Computable, GetComputableTypeWithDefault, ProcessedComputable } from "util/computed";
|
||||||
ProcessedComputable
|
import { convertComputable, processComputable } from "util/computed";
|
||||||
} from "util/computed";
|
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, Ref, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { OptionsFunc, Replace, setDefault } from "./feature";
|
import { computed, unref } from "vue";
|
||||||
import { Resource } from "./resources/resource";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An object that configures a {@link conversion}.
|
* An object that configures a {@link conversion}.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import Decimal from "util/bignum";
|
import Decimal from "util/bignum";
|
||||||
import { DoNotCache } from "util/computed";
|
import { DoNotCache } from "util/computed";
|
||||||
import { CSSProperties, DefineComponent, isRef } from "vue";
|
import type { CSSProperties, DefineComponent } from "vue";
|
||||||
|
import { isRef } from "vue";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A symbol to use as a key for a vue component a feature can be rendered with
|
* A symbol to use as a key for a vue component a feature can be rendered with
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
import "components/common/table.css";
|
import "components/common/table.css";
|
||||||
import themes from "data/themes";
|
import themes from "data/themes";
|
||||||
import { Visibility } from "features/feature";
|
import { Visibility } from "features/feature";
|
||||||
import { GridCell } from "features/grids/grid";
|
import type { GridCell } from "features/grids/grid";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { processedPropType } from "util/vue";
|
import { processedPropType } from "util/vue";
|
||||||
import { computed, defineComponent, unref } from "vue";
|
import { computed, defineComponent, unref } from "vue";
|
||||||
|
|
|
@ -25,14 +25,16 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import "components/common/features.css";
|
import "components/common/features.css";
|
||||||
import Node from "components/Node.vue";
|
import Node from "components/Node.vue";
|
||||||
import { CoercableComponent, StyleValue, Visibility } from "features/feature";
|
import type { CoercableComponent, StyleValue } from "features/feature";
|
||||||
|
import { Visibility } from "features/feature";
|
||||||
import {
|
import {
|
||||||
computeComponent,
|
computeComponent,
|
||||||
computeOptionalComponent,
|
computeOptionalComponent,
|
||||||
processedPropType,
|
processedPropType,
|
||||||
setupHoldToClick
|
setupHoldToClick
|
||||||
} from "util/vue";
|
} from "util/vue";
|
||||||
import { defineComponent, PropType, toRefs, unref } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { defineComponent, toRefs, unref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,26 +1,19 @@
|
||||||
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
|
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||||
import GridComponent from "features/grids/Grid.vue";
|
import GridComponent from "features/grids/Grid.vue";
|
||||||
import {
|
import type { Persistent, State } from "game/persistence";
|
||||||
CoercableComponent,
|
import { persistent } from "game/persistence";
|
||||||
Component,
|
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import { isFunction } from "util/common";
|
import { isFunction } from "util/common";
|
||||||
import {
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, Ref, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { State, Persistent, persistent } from "game/persistence";
|
import { computed, unref } from "vue";
|
||||||
|
|
||||||
export const GridType = Symbol("Grid");
|
export const GridType = Symbol("Grid");
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
import { hasWon } from "data/projEntry";
|
import { hasWon } from "data/projEntry";
|
||||||
|
import type { OptionsFunc, Replace } from "features/feature";
|
||||||
|
import { findFeatures, jsx, setDefault } from "features/feature";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import player from "game/player";
|
import player from "game/player";
|
||||||
import { registerInfoComponent } from "game/settings";
|
import { registerInfoComponent } from "game/settings";
|
||||||
import {
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableTypeWithDefault,
|
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
ProcessedComputable,
|
GetComputableTypeWithDefault,
|
||||||
processComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { shallowReactive, unref } from "vue";
|
import { shallowReactive, unref } from "vue";
|
||||||
import { OptionsFunc, findFeatures, jsx, Replace, setDefault } from "./feature";
|
|
||||||
|
|
||||||
export const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});
|
export const hotkeys: Record<string, GenericHotkey | undefined> = shallowReactive({});
|
||||||
export const HotkeyType = Symbol("Hotkey");
|
export const HotkeyType = Symbol("Hotkey");
|
||||||
|
|
|
@ -29,13 +29,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import CollapseTransition from "@ivanv/vue-collapse-transition/src/CollapseTransition.vue";
|
||||||
import Node from "components/Node.vue";
|
import Node from "components/Node.vue";
|
||||||
import themes from "data/themes";
|
import themes from "data/themes";
|
||||||
import { CoercableComponent, Visibility } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
|
import { Visibility } from "features/feature";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { computeComponent, processedPropType } from "util/vue";
|
import { computeComponent, processedPropType } from "util/vue";
|
||||||
import CollapseTransition from "@ivanv/vue-collapse-transition/src/CollapseTransition.vue";
|
import type { PropType, Ref, StyleValue } from "vue";
|
||||||
import { computed, defineComponent, PropType, Ref, StyleValue, toRefs, unref } from "vue";
|
import { computed, defineComponent, toRefs, unref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,23 +1,15 @@
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
OptionsFunc,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import InfoboxComponent from "features/infoboxes/Infobox.vue";
|
import InfoboxComponent from "features/infoboxes/Infobox.vue";
|
||||||
import { Persistent, persistent } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
import {
|
import { persistent } from "game/persistence";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { unref } from "vue";
|
import { unref } from "vue";
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Link } from "features/links/links";
|
import type { Link } from "features/links/links";
|
||||||
import { FeatureNode } from "game/layers";
|
import type { FeatureNode } from "game/layers";
|
||||||
import { computed, toRefs } from "vue";
|
import { computed, toRefs } from "vue";
|
||||||
|
|
||||||
const _props = defineProps<{
|
const _props = defineProps<{
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Link } from "features/links/links";
|
import type { Link } from "features/links/links";
|
||||||
import { BoundsInjectionKey, NodesInjectionKey } from "game/layers";
|
import { BoundsInjectionKey, NodesInjectionKey } from "game/layers";
|
||||||
import { computed, inject, ref, toRef, watch } from "vue";
|
import { computed, inject, ref, toRef, watch } from "vue";
|
||||||
import LinkVue from "./Link.vue";
|
import LinkVue from "./Link.vue";
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
import LinksComponent from "./Links.vue";
|
import type { OptionsFunc, Replace } from "features/feature";
|
||||||
import { Component, OptionsFunc, GatherProps, Replace } from "features/feature";
|
import { GatherProps, Component } from "features/feature";
|
||||||
import { Position } from "game/layers";
|
import type { Position } from "game/layers";
|
||||||
import {
|
import type { Computable, GetComputableType, ProcessedComputable } from "util/computed";
|
||||||
Computable,
|
import { processComputable } from "util/computed";
|
||||||
GetComputableType,
|
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
|
||||||
} from "util/computed";
|
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { SVGAttributes } from "vue";
|
import type { SVGAttributes } from "vue";
|
||||||
|
import LinksComponent from "./Links.vue";
|
||||||
|
|
||||||
export const LinksType = Symbol("Links");
|
export const LinksType = Symbol("Links");
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,13 @@
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import "components/common/features.css";
|
import "components/common/features.css";
|
||||||
import { jsx, StyleValue, Visibility } from "features/feature";
|
import Node from "components/Node.vue";
|
||||||
import { GenericMilestone } from "features/milestones/milestone";
|
import type { StyleValue } from "features/feature";
|
||||||
|
import { jsx, Visibility } from "features/feature";
|
||||||
|
import type { GenericMilestone } from "features/milestones/milestone";
|
||||||
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
||||||
import { Component, defineComponent, shallowRef, toRefs, unref, UnwrapRef, watchEffect } from "vue";
|
import type { Component, UnwrapRef } from "vue";
|
||||||
import Node from "../../components/Node.vue";
|
import { defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,29 +1,20 @@
|
||||||
import Select from "components/fields/Select.vue";
|
import Select from "components/fields/Select.vue";
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, jsx, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
jsx,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import MilestoneComponent from "features/milestones/Milestone.vue";
|
import MilestoneComponent from "features/milestones/Milestone.vue";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import "game/notifications";
|
import "game/notifications";
|
||||||
import { persistent, Persistent } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
|
import { persistent } from "game/persistence";
|
||||||
import settings, { registerSettingField } from "game/settings";
|
import settings, { registerSettingField } from "game/settings";
|
||||||
import { camelToTitle } from "util/common";
|
import { camelToTitle } from "util/common";
|
||||||
import {
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { coerceComponent, isCoercableComponent } from "util/vue";
|
import { coerceComponent, isCoercableComponent } from "util/vue";
|
||||||
import { computed, unref, watchEffect } from "vue";
|
import { computed, unref, watchEffect } from "vue";
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import { StyleValue } from "features/feature";
|
import type { StyleValue } from "features/feature";
|
||||||
import { Application } from "pixi.js";
|
import { Application } from "pixi.js";
|
||||||
import { processedPropType } from "util/vue";
|
import { processedPropType } from "util/vue";
|
||||||
import { defineComponent, nextTick, onBeforeUnmount, onMounted, PropType, ref, unref } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { defineComponent, nextTick, onBeforeUnmount, onMounted, ref, unref } from "vue";
|
||||||
|
|
||||||
// TODO get typing support on the Particles component
|
// TODO get typing support on the Particles component
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
|
import type { EmitterConfigV3 } from "@pixi/particle-emitter";
|
||||||
|
import { Emitter, upgradeConfig } from "@pixi/particle-emitter";
|
||||||
|
import type { OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
|
import { Component, GatherProps, getUniqueID } from "features/feature";
|
||||||
import ParticlesComponent from "features/particles/Particles.vue";
|
import ParticlesComponent from "features/particles/Particles.vue";
|
||||||
import { Ref, shallowRef, unref } from "vue";
|
|
||||||
import {
|
|
||||||
Component,
|
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
Replace,
|
|
||||||
StyleValue
|
|
||||||
} from "features/feature";
|
|
||||||
import { createLazyProxy } from "util/proxies";
|
|
||||||
import { Application } from "pixi.js";
|
import { Application } from "pixi.js";
|
||||||
import { Emitter, EmitterConfigV3, upgradeConfig } from "@pixi/particle-emitter";
|
import type { Computable, GetComputableType } from "util/computed";
|
||||||
import { Computable, GetComputableType } from "util/computed";
|
import { createLazyProxy } from "util/proxies";
|
||||||
|
import { Ref, shallowRef, unref } from "vue";
|
||||||
|
|
||||||
export const ParticlesType = Symbol("Particles");
|
export const ParticlesType = Symbol("Particles");
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
import { OptionsFunc, getUniqueID, Replace } from "features/feature";
|
import type { OptionsFunc, Replace } from "features/feature";
|
||||||
|
import { getUniqueID } from "features/feature";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { BaseLayer } from "game/layers";
|
import type { BaseLayer } from "game/layers";
|
||||||
import { DefaultValue, Persistent, persistent, PersistentState } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
|
import { DefaultValue, persistent, PersistentState } from "game/persistence";
|
||||||
|
import type { Unsubscribe } from "nanoevents";
|
||||||
import Decimal from "util/bignum";
|
import Decimal from "util/bignum";
|
||||||
import { Computable, GetComputableType, processComputable } from "util/computed";
|
import type { Computable, GetComputableType } from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { Unsubscribe } from "nanoevents";
|
|
||||||
import { isRef, unref } from "vue";
|
import { isRef, unref } from "vue";
|
||||||
|
|
||||||
export const ResetType = Symbol("Reset");
|
export const ResetType = Symbol("Reset");
|
||||||
|
|
|
@ -10,12 +10,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { CoercableComponent } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { Resource } from "features/resources/resource";
|
import type { Resource } from "features/resources/resource";
|
||||||
|
import ResourceVue from "features/resources/Resource.vue";
|
||||||
import Decimal from "util/bignum";
|
import Decimal from "util/bignum";
|
||||||
import { computeOptionalComponent } from "util/vue";
|
import { computeOptionalComponent } from "util/vue";
|
||||||
import { computed, Ref, StyleValue, toRefs } from "vue";
|
import type { Ref, StyleValue } from "vue";
|
||||||
import ResourceVue from "features/resources/Resource.vue";
|
import { computed, toRefs } from "vue";
|
||||||
|
|
||||||
const _props = defineProps<{
|
const _props = defineProps<{
|
||||||
resource: Resource;
|
resource: Resource;
|
||||||
|
@ -34,5 +35,3 @@ const showPrefix = computed(() => {
|
||||||
return Decimal.lt(props.resource.value, "1e1000");
|
return Decimal.lt(props.resource.value, "1e1000");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { displayResource, Resource } from "features/resources/resource";
|
import type { Resource } from "features/resources/resource";
|
||||||
|
import { displayResource } from "features/resources/resource";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
|
|
||||||
import { computed, ComputedRef, isRef, ref, Ref, watch } from "vue";
|
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import { State, persistent } from "game/persistence";
|
import type { State } from "game/persistence";
|
||||||
|
import { persistent } from "game/persistence";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal, { format, formatWhole } from "util/bignum";
|
||||||
|
import type { ComputedRef, Ref } from "vue";
|
||||||
|
import { computed, isRef, ref, watch } from "vue";
|
||||||
|
|
||||||
export interface Resource<T = DecimalSource> extends Ref<T> {
|
export interface Resource<T = DecimalSource> extends Ref<T> {
|
||||||
displayName: string;
|
displayName: string;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { CoercableComponent } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { computeComponent } from "util/vue";
|
import { computeComponent } from "util/vue";
|
||||||
import { toRefs } from "vue";
|
import { toRefs } from "vue";
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { CoercableComponent, StyleValue, Visibility } from "features/feature";
|
import type { CoercableComponent, StyleValue } from "features/feature";
|
||||||
|
import { Visibility } from "features/feature";
|
||||||
import { getNotifyStyle } from "game/notifications";
|
import { getNotifyStyle } from "game/notifications";
|
||||||
import { computeComponent, processedPropType, unwrapRef } from "util/vue";
|
import { computeComponent, processedPropType, unwrapRef } from "util/vue";
|
||||||
import { computed, defineComponent, toRefs, unref } from "vue";
|
import { computed, defineComponent, toRefs, unref } from "vue";
|
||||||
|
|
|
@ -32,23 +32,15 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Sticky from "components/layout/Sticky.vue";
|
import Sticky from "components/layout/Sticky.vue";
|
||||||
import themes from "data/themes";
|
import themes from "data/themes";
|
||||||
import { CoercableComponent, StyleValue, Visibility } from "features/feature";
|
import type { CoercableComponent, StyleValue } from "features/feature";
|
||||||
import { GenericTab } from "features/tabs/tab";
|
import { Visibility } from "features/feature";
|
||||||
|
import type { GenericTab } from "features/tabs/tab";
|
||||||
import TabButton from "features/tabs/TabButton.vue";
|
import TabButton from "features/tabs/TabButton.vue";
|
||||||
import { GenericTabButton } from "features/tabs/tabFamily";
|
import type { GenericTabButton } from "features/tabs/tabFamily";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
||||||
import {
|
import type { Component, PropType, Ref } from "vue";
|
||||||
Component,
|
import { computed, defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
computed,
|
|
||||||
defineComponent,
|
|
||||||
PropType,
|
|
||||||
Ref,
|
|
||||||
shallowRef,
|
|
||||||
toRefs,
|
|
||||||
unref,
|
|
||||||
watchEffect
|
|
||||||
} from "vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,14 +1,7 @@
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID } from "features/feature";
|
||||||
Component,
|
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
Replace,
|
|
||||||
StyleValue
|
|
||||||
} from "features/feature";
|
|
||||||
import TabComponent from "features/tabs/Tab.vue";
|
import TabComponent from "features/tabs/Tab.vue";
|
||||||
import { Computable, GetComputableType } from "util/computed";
|
import type { Computable, GetComputableType } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
|
|
||||||
export const TabType = Symbol("Tab");
|
export const TabType = Symbol("Tab");
|
||||||
|
|
|
@ -1,27 +1,20 @@
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
|
||||||
OptionsFunc,
|
|
||||||
GatherProps,
|
|
||||||
getUniqueID,
|
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import TabButtonComponent from "features/tabs/TabButton.vue";
|
import TabButtonComponent from "features/tabs/TabButton.vue";
|
||||||
import TabFamilyComponent from "features/tabs/TabFamily.vue";
|
import TabFamilyComponent from "features/tabs/TabFamily.vue";
|
||||||
import { Persistent, persistent } from "game/persistence";
|
import type { Persistent } from "game/persistence";
|
||||||
import {
|
import { persistent } from "game/persistence";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, Ref, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { GenericTab } from "./tab";
|
import { computed, unref } from "vue";
|
||||||
|
import type { GenericTab } from "./tab";
|
||||||
|
|
||||||
export const TabButtonType = Symbol("TabButton");
|
export const TabButtonType = Symbol("TabButton");
|
||||||
export const TabFamilyType = Symbol("TabFamily");
|
export const TabFamilyType = Symbol("TabFamily");
|
||||||
|
|
|
@ -36,29 +36,21 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import themes from "data/themes";
|
import themes from "data/themes";
|
||||||
import { CoercableComponent, jsx, StyleValue } from "features/feature";
|
import type { CoercableComponent, StyleValue } from "features/feature";
|
||||||
import { Persistent } from "game/persistence";
|
import { jsx } from "features/feature";
|
||||||
|
import type { Persistent } from "game/persistence";
|
||||||
import settings from "game/settings";
|
import settings from "game/settings";
|
||||||
import { Direction } from "util/common";
|
import { Direction } from "util/common";
|
||||||
|
import type { VueFeature } from "util/vue";
|
||||||
import {
|
import {
|
||||||
coerceComponent,
|
coerceComponent,
|
||||||
computeOptionalComponent,
|
computeOptionalComponent,
|
||||||
processedPropType,
|
processedPropType,
|
||||||
render,
|
render,
|
||||||
unwrapRef,
|
unwrapRef
|
||||||
VueFeature
|
|
||||||
} from "util/vue";
|
} from "util/vue";
|
||||||
import {
|
import type { Component, PropType } from "vue";
|
||||||
Component,
|
import { computed, defineComponent, ref, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
computed,
|
|
||||||
defineComponent,
|
|
||||||
PropType,
|
|
||||||
ref,
|
|
||||||
shallowRef,
|
|
||||||
toRefs,
|
|
||||||
unref,
|
|
||||||
watchEffect
|
|
||||||
} from "vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,23 +1,18 @@
|
||||||
import TooltipComponent from "./Tooltip.vue";
|
import type { CoercableComponent, Replace, StyleValue } from "features/feature";
|
||||||
import {
|
import { Component, GatherProps, setDefault } from "features/feature";
|
||||||
CoercableComponent,
|
import { persistent } from "game/persistence";
|
||||||
Component,
|
import { Direction } from "util/common";
|
||||||
GatherProps,
|
import type {
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue
|
|
||||||
} from "features/feature";
|
|
||||||
import {
|
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
import { VueFeature } from "util/vue";
|
import { processComputable } from "util/computed";
|
||||||
import { nextTick, Ref, unref } from "vue";
|
import type { VueFeature } from "util/vue";
|
||||||
import { persistent } from "game/persistence";
|
import type { Ref } from "vue";
|
||||||
import { Direction } from "util/common";
|
import { nextTick, unref } from "vue";
|
||||||
|
import TooltipComponent from "./Tooltip.vue";
|
||||||
|
|
||||||
declare module "@vue/runtime-dom" {
|
declare module "@vue/runtime-dom" {
|
||||||
interface CSSProperties {
|
interface CSSProperties {
|
||||||
|
|
|
@ -7,11 +7,12 @@
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import "components/common/table.css";
|
import "components/common/table.css";
|
||||||
import { GenericTreeNode, TreeBranch } from "features/trees/tree";
|
|
||||||
import { coerceComponent, processedPropType, renderJSX, unwrapRef } from "util/vue";
|
|
||||||
import { Component, defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
|
||||||
import Links from "features/links/Links.vue";
|
|
||||||
import { jsx } from "features/feature";
|
import { jsx } from "features/feature";
|
||||||
|
import Links from "features/links/Links.vue";
|
||||||
|
import type { GenericTreeNode, TreeBranch } from "features/trees/tree";
|
||||||
|
import { coerceComponent, processedPropType, renderJSX, unwrapRef } from "util/vue";
|
||||||
|
import type { Component } from "vue";
|
||||||
|
import { defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -34,16 +34,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Node from "components/Node.vue";
|
|
||||||
import MarkNode from "components/MarkNode.vue";
|
import MarkNode from "components/MarkNode.vue";
|
||||||
import { CoercableComponent, StyleValue, Visibility } from "features/feature";
|
import Node from "components/Node.vue";
|
||||||
|
import type { CoercableComponent, StyleValue } from "features/feature";
|
||||||
|
import { Visibility } from "features/feature";
|
||||||
import {
|
import {
|
||||||
computeOptionalComponent,
|
computeOptionalComponent,
|
||||||
isCoercableComponent,
|
isCoercableComponent,
|
||||||
processedPropType,
|
processedPropType,
|
||||||
setupHoldToClick
|
setupHoldToClick
|
||||||
} from "util/vue";
|
} from "util/vue";
|
||||||
import { defineComponent, PropType, toRefs, unref } from "vue";
|
import type { PropType } from "vue";
|
||||||
|
import { defineComponent, toRefs, unref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,30 +1,23 @@
|
||||||
import {
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
CoercableComponent,
|
import { Component, GatherProps, getUniqueID, setDefault, Visibility } from "features/feature";
|
||||||
Component,
|
import type { Link } from "features/links/links";
|
||||||
OptionsFunc,
|
import type { GenericReset } from "features/reset";
|
||||||
GatherProps,
|
import type { Resource } from "features/resources/resource";
|
||||||
getUniqueID,
|
import { displayResource } from "features/resources/resource";
|
||||||
Replace,
|
|
||||||
setDefault,
|
|
||||||
StyleValue,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import { Link } from "features/links/links";
|
|
||||||
import { GenericReset } from "features/reset";
|
|
||||||
import { displayResource, Resource } from "features/resources/resource";
|
|
||||||
import TreeComponent from "features/trees/Tree.vue";
|
import TreeComponent from "features/trees/Tree.vue";
|
||||||
import TreeNodeComponent from "features/trees/TreeNode.vue";
|
import TreeNodeComponent from "features/trees/TreeNode.vue";
|
||||||
import Decimal, { DecimalSource, format, formatWhole } from "util/bignum";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import {
|
import Decimal, { format, formatWhole } from "util/bignum";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
convertComputable,
|
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { convertComputable, processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, ref, Ref, shallowRef, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
import { computed, ref, shallowRef, unref } from "vue";
|
||||||
|
|
||||||
export const TreeNodeType = Symbol("TreeNode");
|
export const TreeNodeType = Symbol("TreeNode");
|
||||||
export const TreeType = Symbol("Tree");
|
export const TreeType = Symbol("Tree");
|
||||||
|
|
|
@ -26,23 +26,17 @@
|
||||||
|
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
import "components/common/features.css";
|
import "components/common/features.css";
|
||||||
import Node from "components/Node.vue";
|
|
||||||
import MarkNode from "components/MarkNode.vue";
|
import MarkNode from "components/MarkNode.vue";
|
||||||
import { jsx, StyleValue, Visibility } from "features/feature";
|
import Node from "components/Node.vue";
|
||||||
import { displayResource, Resource } from "features/resources/resource";
|
import type { StyleValue } from "features/feature";
|
||||||
import { GenericUpgrade } from "features/upgrades/upgrade";
|
import { jsx, Visibility } from "features/feature";
|
||||||
import { DecimalSource } from "util/bignum";
|
import type { Resource } from "features/resources/resource";
|
||||||
|
import { displayResource } from "features/resources/resource";
|
||||||
|
import type { GenericUpgrade } from "features/upgrades/upgrade";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
import { coerceComponent, isCoercableComponent, processedPropType, unwrapRef } from "util/vue";
|
||||||
import {
|
import type { Component, PropType, UnwrapRef } from "vue";
|
||||||
Component,
|
import { defineComponent, shallowRef, toRefs, unref, watchEffect } from "vue";
|
||||||
defineComponent,
|
|
||||||
PropType,
|
|
||||||
shallowRef,
|
|
||||||
toRefs,
|
|
||||||
unref,
|
|
||||||
UnwrapRef,
|
|
||||||
watchEffect
|
|
||||||
} from "vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
import UpgradeComponent from "features/upgrades/Upgrade.vue";
|
import type { CoercableComponent, OptionsFunc, Replace, StyleValue } from "features/feature";
|
||||||
import {
|
import {
|
||||||
CoercableComponent,
|
|
||||||
Component,
|
Component,
|
||||||
OptionsFunc,
|
|
||||||
findFeatures,
|
findFeatures,
|
||||||
GatherProps,
|
GatherProps,
|
||||||
getUniqueID,
|
getUniqueID,
|
||||||
Replace,
|
|
||||||
setDefault,
|
setDefault,
|
||||||
StyleValue,
|
|
||||||
Visibility
|
Visibility
|
||||||
} from "features/feature";
|
} from "features/feature";
|
||||||
import { Resource } from "features/resources/resource";
|
import type { Resource } from "features/resources/resource";
|
||||||
import { GenericLayer } from "game/layers";
|
import UpgradeComponent from "features/upgrades/Upgrade.vue";
|
||||||
import Decimal, { DecimalSource } from "util/bignum";
|
import type { GenericLayer } from "game/layers";
|
||||||
|
import type { Persistent } from "game/persistence";
|
||||||
|
import { persistent } from "game/persistence";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal from "util/bignum";
|
||||||
import { isFunction } from "util/common";
|
import { isFunction } from "util/common";
|
||||||
import {
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { computed, Ref, unref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { persistent, Persistent } from "game/persistence";
|
import { computed, unref } from "vue";
|
||||||
|
|
||||||
export const UpgradeType = Symbol("Upgrade");
|
export const UpgradeType = Symbol("Upgrade");
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import Decimal from "util/bignum";
|
import player from "game/player";
|
||||||
|
import type { Settings } from "game/settings";
|
||||||
|
import settings from "game/settings";
|
||||||
|
import state from "game/state";
|
||||||
import { createNanoEvents } from "nanoevents";
|
import { createNanoEvents } from "nanoevents";
|
||||||
import { App, Ref, watch } from "vue";
|
import Decimal from "util/bignum";
|
||||||
import { GenericLayer } from "./layers";
|
import type { App, Ref } from "vue";
|
||||||
import player from "./player";
|
import { watch } from "vue";
|
||||||
import settings, { Settings } from "./settings";
|
import type { GenericLayer } from "./layers";
|
||||||
import state from "./state";
|
|
||||||
|
|
||||||
export interface GlobalEvents {
|
export interface GlobalEvents {
|
||||||
addLayer: (layer: GenericLayer, saveData: Record<string, unknown>) => void;
|
addLayer: (layer: GenericLayer, saveData: Record<string, unknown>) => void;
|
||||||
|
|
|
@ -1,26 +1,28 @@
|
||||||
import Modal from "components/Modal.vue";
|
import Modal from "components/Modal.vue";
|
||||||
import {
|
import type {
|
||||||
CoercableComponent,
|
CoercableComponent,
|
||||||
jsx,
|
|
||||||
JSXFunction,
|
JSXFunction,
|
||||||
OptionsFunc,
|
OptionsFunc,
|
||||||
Replace,
|
Replace,
|
||||||
setDefault,
|
|
||||||
StyleValue
|
StyleValue
|
||||||
} from "features/feature";
|
} from "features/feature";
|
||||||
import { createNanoEvents, Emitter } from "nanoevents";
|
import { jsx, setDefault } from "features/feature";
|
||||||
import {
|
import { globalBus } from "game/events";
|
||||||
|
import type { Persistent } from "game/persistence";
|
||||||
|
import { persistent } from "game/persistence";
|
||||||
|
import player from "game/player";
|
||||||
|
import type { Emitter } from "nanoevents";
|
||||||
|
import { createNanoEvents } from "nanoevents";
|
||||||
|
import type {
|
||||||
Computable,
|
Computable,
|
||||||
GetComputableType,
|
GetComputableType,
|
||||||
GetComputableTypeWithDefault,
|
GetComputableTypeWithDefault,
|
||||||
processComputable,
|
|
||||||
ProcessedComputable
|
ProcessedComputable
|
||||||
} from "util/computed";
|
} from "util/computed";
|
||||||
|
import { processComputable } from "util/computed";
|
||||||
import { createLazyProxy } from "util/proxies";
|
import { createLazyProxy } from "util/proxies";
|
||||||
import { InjectionKey, Ref, ref, shallowReactive, unref } from "vue";
|
import type { InjectionKey, Ref } from "vue";
|
||||||
import { globalBus } from "./events";
|
import { ref, shallowReactive, unref } from "vue";
|
||||||
import { Persistent, persistent } from "./persistence";
|
|
||||||
import player from "./player";
|
|
||||||
|
|
||||||
export interface FeatureNode {
|
export interface FeatureNode {
|
||||||
rect: DOMRect;
|
rect: DOMRect;
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
import "components/common/modifiers.css";
|
import "components/common/modifiers.css";
|
||||||
import { CoercableComponent, jsx } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import Decimal, { DecimalSource, format } from "util/bignum";
|
import { jsx } from "features/feature";
|
||||||
import { WithRequired } from "util/common";
|
import type { DecimalSource } from "util/bignum";
|
||||||
import { Computable, convertComputable, ProcessedComputable } from "util/computed";
|
import Decimal, { format } from "util/bignum";
|
||||||
|
import type { WithRequired } from "util/common";
|
||||||
|
import type { Computable, ProcessedComputable } from "util/computed";
|
||||||
|
import { convertComputable } from "util/computed";
|
||||||
import { renderJSX } from "util/vue";
|
import { renderJSX } from "util/vue";
|
||||||
import { computed, unref } from "vue";
|
import { computed, unref } from "vue";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
import { globalBus } from "game/events";
|
|
||||||
import Decimal, { DecimalSource } from "util/bignum";
|
|
||||||
import { ProxyState } from "util/proxies";
|
|
||||||
import { isArray } from "@vue/shared";
|
import { isArray } from "@vue/shared";
|
||||||
import { isReactive, isRef, Ref, ref } from "vue";
|
import { globalBus } from "game/events";
|
||||||
import { addingLayers, GenericLayer, persistentRefs } from "./layers";
|
import type { GenericLayer } from "game/layers";
|
||||||
|
import { addingLayers, persistentRefs } from "game/layers";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal from "util/bignum";
|
||||||
|
import { ProxyState } from "util/proxies";
|
||||||
|
import type { Ref } from "vue";
|
||||||
|
import { isReactive, isRef, ref } from "vue";
|
||||||
|
|
||||||
export const PersistentState = Symbol("PersistentState");
|
export const PersistentState = Symbol("PersistentState");
|
||||||
export const DefaultValue = Symbol("DefaultValue");
|
export const DefaultValue = Symbol("DefaultValue");
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import Decimal from "util/bignum";
|
|
||||||
import { isPlainObject } from "is-plain-object";
|
import { isPlainObject } from "is-plain-object";
|
||||||
import { ProxiedWithState, ProxyPath, ProxyState } from "util/proxies";
|
import Decimal from "util/bignum";
|
||||||
|
import type { ProxiedWithState } from "util/proxies";
|
||||||
|
import { ProxyPath, ProxyState } from "util/proxies";
|
||||||
import { reactive, unref } from "vue";
|
import { reactive, unref } from "vue";
|
||||||
import transientState from "./state";
|
import transientState from "./state";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import { Themes } from "data/themes";
|
import { Themes } from "data/themes";
|
||||||
import { CoercableComponent } from "features/feature";
|
import type { CoercableComponent } from "features/feature";
|
||||||
import { globalBus } from "game/events";
|
import { globalBus } from "game/events";
|
||||||
import LZString from "lz-string";
|
import LZString from "lz-string";
|
||||||
import { hardReset } from "util/save";
|
import { hardReset } from "util/save";
|
||||||
|
|
22
src/main.ts
22
src/main.ts
|
@ -1,15 +1,17 @@
|
||||||
|
import App from "App.vue";
|
||||||
|
import projInfo from "data/projInfo.json";
|
||||||
|
import type { GenericLayer } from "game/layers";
|
||||||
|
import "game/notifications";
|
||||||
|
import type { PlayerData } from "game/player";
|
||||||
|
import type { Settings } from "game/settings";
|
||||||
|
import type { Transient } from "game/state";
|
||||||
|
import type { DecimalSource } from "util/bignum";
|
||||||
|
import Decimal from "util/bignum";
|
||||||
|
import { load } from "util/save";
|
||||||
import { useRegisterSW } from "virtual:pwa-register/vue";
|
import { useRegisterSW } from "virtual:pwa-register/vue";
|
||||||
import { App as VueApp, createApp, nextTick } from "vue";
|
import type { App as VueApp } from "vue";
|
||||||
|
import { createApp, nextTick } from "vue";
|
||||||
import { useToast } from "vue-toastification";
|
import { useToast } from "vue-toastification";
|
||||||
import App from "./App.vue";
|
|
||||||
import projInfo from "./data/projInfo.json";
|
|
||||||
import { GenericLayer } from "./game/layers";
|
|
||||||
import { PlayerData } from "./game/player";
|
|
||||||
import { Settings } from "./game/settings";
|
|
||||||
import { Transient } from "./game/state";
|
|
||||||
import Decimal, { DecimalSource } from "./util/bignum";
|
|
||||||
import { load } from "./util/save";
|
|
||||||
import "./game/notifications";
|
|
||||||
|
|
||||||
document.title = projInfo.title;
|
document.title = projInfo.title;
|
||||||
if (projInfo.id === "") {
|
if (projInfo.id === "") {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Import Decimal and numberUtils from a different file to globally change which big num library gets used
|
// Import Decimal and numberUtils from a different file to globally change which big num library gets used
|
||||||
// This way switching out big number libraries just needs to happen here, not every file that needs big numbers
|
// This way switching out big number libraries just needs to happen here, not every file that needs big numbers
|
||||||
import { DecimalSource as RawDecimalSource } from "lib/break_eternity";
|
import type { DecimalSource as RawDecimalSource } from "lib/break_eternity";
|
||||||
import Decimal, * as numberUtils from "util/break_eternity";
|
import Decimal, * as numberUtils from "util/break_eternity";
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import Decimal, { DecimalSource } from "lib/break_eternity";
|
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
|
import type { DecimalSource } from "lib/break_eternity";
|
||||||
|
import Decimal from "lib/break_eternity";
|
||||||
|
|
||||||
export default Decimal;
|
export default Decimal;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { computed, Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { isFunction } from "./common";
|
import { computed } from "vue";
|
||||||
|
import { isFunction } from "util/common";
|
||||||
|
|
||||||
export const DoNotCache = Symbol("DoNotCache");
|
export const DoNotCache = Symbol("DoNotCache");
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Decimal from "./bignum";
|
import Decimal from "util/bignum";
|
||||||
|
|
||||||
export const ProxyState = Symbol("ProxyState");
|
export const ProxyState = Symbol("ProxyState");
|
||||||
export const ProxyPath = Symbol("ProxyPath");
|
export const ProxyPath = Symbol("ProxyPath");
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import projInfo from "data/projInfo.json";
|
import projInfo from "data/projInfo.json";
|
||||||
import player, { Player, PlayerData, stringifySave } from "game/player";
|
import type { Player, PlayerData } from "game/player";
|
||||||
|
import player, { stringifySave } from "game/player";
|
||||||
import settings, { loadSettings } from "game/settings";
|
import settings, { loadSettings } from "game/settings";
|
||||||
import { ProxyState } from "./proxies";
|
|
||||||
import LZString from "lz-string";
|
import LZString from "lz-string";
|
||||||
|
import { ProxyState } from "util/proxies";
|
||||||
|
|
||||||
export function setupInitialStore(player: Partial<PlayerData> = {}): Player {
|
export function setupInitialStore(player: Partial<PlayerData> = {}): Player {
|
||||||
return Object.assign(
|
return Object.assign(
|
||||||
|
|
|
@ -1,31 +1,20 @@
|
||||||
import Col from "components/layout/Column.vue";
|
import Col from "components/layout/Column.vue";
|
||||||
import Row from "components/layout/Row.vue";
|
import Row from "components/layout/Row.vue";
|
||||||
|
import type { CoercableComponent, GenericComponent, JSXFunction } from "features/feature";
|
||||||
|
import { Component as ComponentKey, GatherProps, jsx, Visibility } from "features/feature";
|
||||||
|
import type { ProcessedComputable } from "util/computed";
|
||||||
|
import { DoNotCache } from "util/computed";
|
||||||
|
import type { Component, ComputedRef, DefineComponent, PropType, Ref, ShallowRef } from "vue";
|
||||||
import {
|
import {
|
||||||
CoercableComponent,
|
|
||||||
Component as ComponentKey,
|
|
||||||
GatherProps,
|
|
||||||
GenericComponent,
|
|
||||||
jsx,
|
|
||||||
JSXFunction,
|
|
||||||
Visibility
|
|
||||||
} from "features/feature";
|
|
||||||
import {
|
|
||||||
Component,
|
|
||||||
computed,
|
computed,
|
||||||
ComputedRef,
|
|
||||||
DefineComponent,
|
|
||||||
defineComponent,
|
defineComponent,
|
||||||
isRef,
|
isRef,
|
||||||
onUnmounted,
|
onUnmounted,
|
||||||
PropType,
|
|
||||||
ref,
|
ref,
|
||||||
Ref,
|
|
||||||
ShallowRef,
|
|
||||||
shallowRef,
|
shallowRef,
|
||||||
unref,
|
unref,
|
||||||
watchEffect
|
watchEffect
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { DoNotCache, ProcessedComputable } from "./computed";
|
|
||||||
|
|
||||||
export function coerceComponent(
|
export function coerceComponent(
|
||||||
component: CoercableComponent,
|
component: CoercableComponent,
|
||||||
|
|
Loading…
Reference in a new issue