diff --git a/app/client/main.js b/app/client/main.js
index d9d770b7..6305c8ae 100644
--- a/app/client/main.js
+++ b/app/client/main.js
@@ -1,6 +1,6 @@
import '/imports/api/simpleSchemaConfig.js';
-import '/imports/ui/vueSetup.js';
-import '/imports/ui/styles/stylesIndex.js';
+import '/imports/client/ui/vueSetup.js';
+import '/imports/client/ui/styles/stylesIndex.js';
import '/imports/client/config.js';
import '/imports/client/serviceWorker.js';
diff --git a/app/imports/api/creature/creatureProperties/methods/duplicateProperty.js b/app/imports/api/creature/creatureProperties/methods/duplicateProperty.js
index 5a8c84fe..9bb40898 100644
--- a/app/imports/api/creature/creatureProperties/methods/duplicateProperty.js
+++ b/app/imports/api/creature/creatureProperties/methods/duplicateProperty.js
@@ -12,7 +12,7 @@ import { reorderDocs } from '/imports/api/parenting/order.js';
var snackbar;
if (Meteor.isClient) {
snackbar = require(
- '/imports/ui/components/snackbars/SnackbarQueue.js'
+ '/imports/client/ui/components/snackbars/SnackbarQueue.js'
).snackbar
}
diff --git a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js
index becf0775..2e78446f 100644
--- a/app/imports/api/engine/actions/applyPropertyByType/applyAction.js
+++ b/app/imports/api/engine/actions/applyPropertyByType/applyAction.js
@@ -5,7 +5,7 @@ import applyProperty from '../applyProperty.js';
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
import { adjustQuantityWork } from '/imports/api/creature/creatureProperties/methods/adjustQuantity.js';
import { damagePropertyWork } from '/imports/api/creature/creatureProperties/methods/damageProperty.js';
-import numberToSignedString from '/imports/ui/utility/numberToSignedString.js';
+import numberToSignedString from '/imports/api/utility/numberToSignedString.js';
import { applyNodeTriggers } from '/imports/api/engine/actions/applyTriggers.js';
import { resetProperties } from '/imports/api/creature/creatures/methods/restCreature.js';
diff --git a/app/imports/api/engine/actions/applyPropertyByType/applySavingThrow.js b/app/imports/api/engine/actions/applyPropertyByType/applySavingThrow.js
index a5aa4bae..22de7aa7 100644
--- a/app/imports/api/engine/actions/applyPropertyByType/applySavingThrow.js
+++ b/app/imports/api/engine/actions/applyPropertyByType/applySavingThrow.js
@@ -1,10 +1,10 @@
import rollDice from '/imports/parser/rollDice.js';
import recalculateCalculation from './shared/recalculateCalculation.js';
import applyProperty from '../applyProperty.js';
-import numberToSignedString from '/imports/ui/utility/numberToSignedString.js';
+import numberToSignedString from '/imports/api/utility/numberToSignedString.js';
import { applyNodeTriggers } from '/imports/api/engine/actions/applyTriggers.js';
-export default function applySavingThrow(node, actionContext){
+export default function applySavingThrow(node, actionContext) {
applyNodeTriggers(node, 'before', actionContext);
const prop = node.node;
@@ -13,7 +13,7 @@ export default function applySavingThrow(node, actionContext){
recalculateCalculation(prop.dc, actionContext);
const dc = (prop.dc?.value);
- if (!isFinite(dc)){
+ if (!isFinite(dc)) {
actionContext.addLog({
name: 'Error',
value: 'Saving throw requires a DC',
@@ -29,8 +29,8 @@ export default function applySavingThrow(node, actionContext){
// If there are no save targets, apply all children as if the save both
// succeeeded and failed
- if (!saveTargets?.length){
- scope['$saveFailed'] = {value: true};
+ if (!saveTargets?.length) {
+ scope['$saveFailed'] = { value: true };
scope['$saveSucceeded'] = { value: true };
applyNodeTriggers(node, 'after', actionContext);
return node.children.forEach(child => applyProperty(child, actionContext));
@@ -51,7 +51,7 @@ export default function applySavingThrow(node, actionContext){
const save = target.variables[prop.stat];
- if (!save){
+ if (!save) {
actionContext.addLog({
name: 'Saving throw error',
value: 'No saving throw found: ' + prop.stat,
@@ -62,7 +62,7 @@ export default function applySavingThrow(node, actionContext){
const rollModifierText = numberToSignedString(save.value, true);
let value, values, resultPrefix;
- if (save.advantage === 1){
+ if (save.advantage === 1) {
const [a, b] = rollDice(2, 20);
if (a >= b) {
value = a;
@@ -71,7 +71,7 @@ export default function applySavingThrow(node, actionContext){
value = b;
resultPrefix = `Advantage\n1d20 [ ~~${a}~~, ${b} ] ${rollModifierText}`;
}
- } else if (save.advantage === -1){
+ } else if (save.advantage === -1) {
const [a, b] = rollDice(2, 20);
if (a <= b) {
value = a;
@@ -85,14 +85,14 @@ export default function applySavingThrow(node, actionContext){
value = values[0];
resultPrefix = `1d20 [ ${value} ] ${rollModifierText}`
}
- scope['$saveDiceRoll'] = {value};
+ scope['$saveDiceRoll'] = { value };
const result = value + save.value || 0;
- scope['$saveRoll'] = {value: result};
+ scope['$saveRoll'] = { value: result };
const saveSuccess = result >= dc;
- if (saveSuccess){
- scope['$saveSucceeded'] = {value: true};
+ if (saveSuccess) {
+ scope['$saveSucceeded'] = { value: true };
} else {
- scope['$saveFailed'] = {value: true};
+ scope['$saveFailed'] = { value: true };
}
if (!prop.silent) actionContext.addLog({
name: saveSuccess ? 'Successful save' : 'Failed save',
diff --git a/app/imports/api/engine/actions/doCheck.js b/app/imports/api/engine/actions/doCheck.js
index a5bc653b..8e9789a6 100644
--- a/app/imports/api/engine/actions/doCheck.js
+++ b/app/imports/api/engine/actions/doCheck.js
@@ -4,7 +4,7 @@ import { RateLimiterMixin } from 'ddp-rate-limiter-mixin';
import CreatureProperties from '/imports/api/creature/creatureProperties/CreatureProperties.js';
import { assertEditPermission } from '/imports/api/creature/creatures/creaturePermissions.js';
import rollDice from '/imports/parser/rollDice.js';
-import numberToSignedString from '/imports/ui/utility/numberToSignedString.js';
+import numberToSignedString from '/imports/api/utility/numberToSignedString.js';
import { applyTriggers } from '/imports/api/engine/actions/applyTriggers.js';
import ActionContext from '/imports/api/engine/actions/ActionContext.js';
import evaluateCalculation from '/imports/api/engine/computation/utility/evaluateCalculation.js';
diff --git a/app/imports/api/library/methods/copyLibraryNodeTo.js b/app/imports/api/library/methods/copyLibraryNodeTo.js
index f99b184f..ea9ce06f 100644
--- a/app/imports/api/library/methods/copyLibraryNodeTo.js
+++ b/app/imports/api/library/methods/copyLibraryNodeTo.js
@@ -17,7 +17,7 @@ import fetchDocByRef from '/imports/api/parenting/fetchDocByRef.js';
var snackbar;
if (Meteor.isClient) {
snackbar = require(
- '/imports/ui/components/snackbars/SnackbarQueue.js'
+ '/imports/client/ui/components/snackbars/SnackbarQueue.js'
).snackbar
}
diff --git a/app/imports/api/library/methods/duplicateLibraryNode.js b/app/imports/api/library/methods/duplicateLibraryNode.js
index ff35b8fb..83f20106 100644
--- a/app/imports/api/library/methods/duplicateLibraryNode.js
+++ b/app/imports/api/library/methods/duplicateLibraryNode.js
@@ -12,7 +12,7 @@ import { reorderDocs } from '/imports/api/parenting/order.js';
var snackbar;
if (Meteor.isClient) {
snackbar = require(
- '/imports/ui/components/snackbars/SnackbarQueue.js'
+ '/imports/client/ui/components/snackbars/SnackbarQueue.js'
).snackbar
}
diff --git a/app/imports/ui/utility/numberToSignedString.js b/app/imports/api/utility/numberToSignedString.js
similarity index 100%
rename from app/imports/ui/utility/numberToSignedString.js
rename to app/imports/api/utility/numberToSignedString.js
diff --git a/app/imports/ui/components/CardHighlight.vue b/app/imports/client/ui/components/CardHighlight.vue
similarity index 100%
rename from app/imports/ui/components/CardHighlight.vue
rename to app/imports/client/ui/components/CardHighlight.vue
diff --git a/app/imports/ui/components/CoinValue.vue b/app/imports/client/ui/components/CoinValue.vue
similarity index 89%
rename from app/imports/ui/components/CoinValue.vue
rename to app/imports/client/ui/components/CoinValue.vue
index b13aa9ef..d5ccc0f8 100644
--- a/app/imports/ui/components/CoinValue.vue
+++ b/app/imports/client/ui/components/CoinValue.vue
@@ -19,7 +19,7 @@
diff --git a/app/imports/ui/layouts/SingleCardLayout.vue b/app/imports/client/ui/layouts/SingleCardLayout.vue
similarity index 100%
rename from app/imports/ui/layouts/SingleCardLayout.vue
rename to app/imports/client/ui/layouts/SingleCardLayout.vue
diff --git a/app/imports/ui/library/InsertLibraryNodeButton.vue b/app/imports/client/ui/library/InsertLibraryNodeButton.vue
similarity index 100%
rename from app/imports/ui/library/InsertLibraryNodeButton.vue
rename to app/imports/client/ui/library/InsertLibraryNodeButton.vue
diff --git a/app/imports/ui/library/LibraryAndNode.vue b/app/imports/client/ui/library/LibraryAndNode.vue
similarity index 87%
rename from app/imports/ui/library/LibraryAndNode.vue
rename to app/imports/client/ui/library/LibraryAndNode.vue
index aa6601db..781fcac8 100644
--- a/app/imports/ui/library/LibraryAndNode.vue
+++ b/app/imports/client/ui/library/LibraryAndNode.vue
@@ -80,18 +80,18 @@
diff --git a/app/imports/ui/properties/treeNodeViews/SavingThrowTreeNode.vue b/app/imports/client/ui/properties/treeNodeViews/SavingThrowTreeNode.vue
similarity index 89%
rename from app/imports/ui/properties/treeNodeViews/SavingThrowTreeNode.vue
rename to app/imports/client/ui/properties/treeNodeViews/SavingThrowTreeNode.vue
index 10767f99..63bbdbe5 100644
--- a/app/imports/ui/properties/treeNodeViews/SavingThrowTreeNode.vue
+++ b/app/imports/client/ui/properties/treeNodeViews/SavingThrowTreeNode.vue
@@ -17,7 +17,7 @@
diff --git a/app/imports/ui/properties/forms/shared/propertyFormIndex.js b/app/imports/ui/properties/forms/shared/propertyFormIndex.js
deleted file mode 100644
index ef29ea2d..00000000
--- a/app/imports/ui/properties/forms/shared/propertyFormIndex.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import ActionForm from '/imports/ui/properties/forms/ActionForm.vue';
-import AdjustmentForm from '/imports/ui/properties/forms/AdjustmentForm.vue';
-import AttributeForm from '/imports/ui/properties/forms/AttributeForm.vue';
-import BuffForm from '/imports/ui/properties/forms/BuffForm.vue';
-import BuffRemoverForm from '/imports/ui/properties/forms/BuffRemoverForm.vue';
-import BranchForm from '/imports/ui/properties/forms/BranchForm.vue';
-import ClassForm from '/imports/ui/properties/forms/ClassForm.vue';
-import ClassLevelForm from '/imports/ui/properties/forms/ClassLevelForm.vue';
-import ConstantForm from '/imports/ui/properties/forms/ConstantForm.vue';
-import ContainerForm from '/imports/ui/properties/forms/ContainerForm.vue';
-import DamageForm from '/imports/ui/properties/forms/DamageForm.vue';
-import DamageMultiplierForm from '/imports/ui/properties/forms/DamageMultiplierForm.vue';
-import EffectForm from '/imports/ui/properties/forms/EffectForm.vue';
-import FeatureForm from '/imports/ui/properties/forms/FeatureForm.vue';
-import FolderForm from '/imports/ui/properties/forms/FolderForm.vue';
-import ItemForm from '/imports/ui/properties/forms/ItemForm.vue';
-import NoteForm from '/imports/ui/properties/forms/NoteForm.vue';
-import PointBuyForm from '/imports/ui/properties/forms/PointBuyForm.vue';
-import ProficiencyForm from '/imports/ui/properties/forms/ProficiencyForm.vue';
-import ReferenceForm from '/imports/ui/properties/forms/ReferenceForm.vue';
-import RollForm from '/imports/ui/properties/forms/RollForm.vue';
-import SavingThrowForm from '/imports/ui/properties/forms/SavingThrowForm.vue';
-import SkillForm from '/imports/ui/properties/forms/SkillForm.vue';
-import SlotForm from '/imports/ui/properties/forms/SlotForm.vue';
-import SlotFillerForm from '/imports/ui/properties/forms/SlotFillerForm.vue';
-import SpellListForm from '/imports/ui/properties/forms/SpellListForm.vue';
-import SpellForm from '/imports/ui/properties/forms/SpellForm.vue';
-import ToggleForm from '/imports/ui/properties/forms/ToggleForm.vue';
-import TriggerForm from '/imports/ui/properties/forms/TriggerForm.vue';
-
-export default {
- action: ActionForm,
- adjustment: AdjustmentForm,
- attribute: AttributeForm,
- buff: BuffForm,
- buffRemover: BuffRemoverForm,
- branch: BranchForm,
- constant: ConstantForm,
- container: ContainerForm,
- class: ClassForm,
- classLevel: ClassLevelForm,
- damage: DamageForm,
- damageMultiplier: DamageMultiplierForm,
- effect: EffectForm,
- feature: FeatureForm,
- folder: FolderForm,
- item: ItemForm,
- note: NoteForm,
- pointBuy: PointBuyForm,
- proficiency: ProficiencyForm,
- propertySlot: SlotForm,
- reference: ReferenceForm,
- roll: RollForm,
- savingThrow: SavingThrowForm,
- skill: SkillForm,
- slotFiller: SlotFillerForm,
- spellList: SpellListForm,
- spell: SpellForm,
- toggle: ToggleForm,
- trigger: TriggerForm,
-};
diff --git a/app/imports/ui/properties/treeNodeViews/treeNodeViewIndex.js b/app/imports/ui/properties/treeNodeViews/treeNodeViewIndex.js
deleted file mode 100644
index 1f9772e8..00000000
--- a/app/imports/ui/properties/treeNodeViews/treeNodeViewIndex.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import DefaultTreeNode from '/imports/ui/properties/treeNodeViews/DefaultTreeNode.vue';
-import AdjustmentTreeNode from '/imports/ui/properties/treeNodeViews/AdjustmentTreeNode.vue';
-import BranchTreeNode from '/imports/ui/properties/treeNodeViews/BranchTreeNode.vue';
-import ItemTreeNode from '/imports/ui/properties/treeNodeViews/ItemTreeNode.vue';
-import DamageTreeNode from '/imports/ui/properties/treeNodeViews/DamageTreeNode.vue';
-import EffectTreeNode from '/imports/ui/properties/treeNodeViews/EffectTreeNode.vue';
-import ClassLevelTreeNode from '/imports/ui/properties/treeNodeViews/ClassLevelTreeNode.vue';
-import ProficiencyTreeNode from '/imports/ui/properties/treeNodeViews/ProficiencyTreeNode.vue';
-import ReferenceTreeNode from '/imports/ui/properties/treeNodeViews/ReferenceTreeNode.vue';
-import SavingThrowTreeNode from '/imports/ui/properties/treeNodeViews/SavingThrowTreeNode.vue';
-
-export default {
- default: DefaultTreeNode,
- adjustment: AdjustmentTreeNode,
- branch: BranchTreeNode,
- classLevel: ClassLevelTreeNode,
- damage: DamageTreeNode,
- effect: EffectTreeNode,
- item: ItemTreeNode,
- proficiency: ProficiencyTreeNode,
- reference: ReferenceTreeNode,
- savingThrow: SavingThrowTreeNode,
-}
diff --git a/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js b/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js
deleted file mode 100644
index 70151b48..00000000
--- a/app/imports/ui/properties/viewers/shared/propertyViewerIndex.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import ActionViewer from '/imports/ui/properties/viewers/ActionViewer.vue';
-import AdjustmentViewer from '/imports/ui/properties/viewers/AdjustmentViewer.vue';
-import AttributeViewer from '/imports/ui/properties/viewers/AttributeViewer.vue';
-import BuffViewer from '/imports/ui/properties/viewers/BuffViewer.vue';
-import BuffRemoverViewer from '/imports/ui/properties/viewers/BuffRemoverViewer.vue';
-import BranchViewer from '/imports/ui/properties/viewers/BranchViewer.vue';
-import ContainerViewer from '/imports/ui/properties/viewers/ContainerViewer.vue';
-import ClassViewer from '/imports/ui/properties/viewers/ClassViewer.vue';
-import ClassLevelViewer from '/imports/ui/properties/viewers/ClassLevelViewer.vue';
-import ConstantViewer from '/imports/ui/properties/viewers/ConstantViewer.vue';
-import DamageViewer from '/imports/ui/properties/viewers/DamageViewer.vue';
-import DamageMultiplierViewer from '/imports/ui/properties/viewers/DamageMultiplierViewer.vue';
-import EffectViewer from '/imports/ui/properties/viewers/EffectViewer.vue';
-import FeatureViewer from '/imports/ui/properties/viewers/FeatureViewer.vue';
-import FolderViewer from '/imports/ui/properties/viewers/FolderViewer.vue';
-import ItemViewer from '/imports/ui/properties/viewers/ItemViewer.vue';
-import NoteViewer from '/imports/ui/properties/viewers/NoteViewer.vue';
-import PointBuyViewer from '/imports/ui/properties/viewers/PointBuyViewer.vue';
-import ProficiencyViewer from '/imports/ui/properties/viewers/ProficiencyViewer.vue';
-import ReferenceViewer from '/imports/ui/properties/viewers/ReferenceViewer.vue';
-import RollViewer from '/imports/ui/properties/viewers/RollViewer.vue';
-import SkillViewer from '/imports/ui/properties/viewers/SkillViewer.vue';
-import SavingThrowViewer from '/imports/ui/properties/viewers/SavingThrowViewer.vue';
-import SlotViewer from '/imports/ui/properties/viewers/SlotViewer.vue';
-import SlotFillerViewer from '/imports/ui/properties/viewers/SlotFillerViewer.vue';
-import SpellListViewer from '/imports/ui/properties/viewers/SpellListViewer.vue';
-import SpellViewer from '/imports/ui/properties/viewers/SpellViewer.vue';
-import ToggleViewer from '/imports/ui/properties/viewers/ToggleViewer.vue';
-import TriggerViewer from '/imports/ui/properties/viewers/TriggerViewer.vue';
-
-export default {
- action: ActionViewer,
- adjustment: AdjustmentViewer,
- attribute: AttributeViewer,
- buff: BuffViewer,
- buffRemover: BuffRemoverViewer,
- branch: BranchViewer,
- container: ContainerViewer,
- class: ClassViewer,
- classLevel: ClassLevelViewer,
- constant: ConstantViewer,
- damage: DamageViewer,
- damageMultiplier: DamageMultiplierViewer,
- effect: EffectViewer,
- feature: FeatureViewer,
- folder: FolderViewer,
- item: ItemViewer,
- note: NoteViewer,
- pointBuy: PointBuyViewer,
- proficiency: ProficiencyViewer,
- propertySlot: SlotViewer,
- roll: RollViewer,
- reference: ReferenceViewer,
- savingThrow: SavingThrowViewer,
- slotFiller: SlotFillerViewer,
- skill: SkillViewer,
- spellList: SpellListViewer,
- spell: SpellViewer,
- toggle: ToggleViewer,
- trigger: TriggerViewer,
-};
diff --git a/app/imports/ui/properties/viewers/shared/propertyViewerMixin.js b/app/imports/ui/properties/viewers/shared/propertyViewerMixin.js
deleted file mode 100644
index de4278f2..00000000
--- a/app/imports/ui/properties/viewers/shared/propertyViewerMixin.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import PropertyName from '/imports/ui/properties/viewers/shared/PropertyName.vue';
-import PropertyVariableName from '/imports/ui/properties/viewers/shared/PropertyVariableName.vue';
-import PropertyField from '/imports/ui/properties/viewers/shared/PropertyField.vue';
-import PropertyDescription from '/imports/ui/properties/viewers/shared/PropertyDescription.vue';
-import PropertyTags from '/imports/ui/properties/viewers/shared/PropertyTags.vue';
-
-const propertyViewerMixin = {
- components: {
- PropertyName,
- PropertyVariableName,
- PropertyField,
- PropertyDescription,
- PropertyTags,
- },
- props: {
- model: {
- type: Object,
- required: true,
- },
- },
-};
-
-export default propertyViewerMixin;