@rpg-engine/long-bow 0.6.6 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +114 -18
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +114 -19
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +2 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -17509,6 +17509,101 @@ var PagerContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17509
17509
|
componentId: "sc-h904b1-0"
|
|
17510
17510
|
})(["display:flex;justify-content:space-between;align-items:center;width:calc(100% - 30px);"]);
|
|
17511
17511
|
|
|
17512
|
+
var TabBody = function TabBody(_ref) {
|
|
17513
|
+
var id = _ref.id,
|
|
17514
|
+
children = _ref.children,
|
|
17515
|
+
styles = _ref.styles;
|
|
17516
|
+
return React.createElement(Container$o, {
|
|
17517
|
+
styles: styles,
|
|
17518
|
+
"data-tab-id": id
|
|
17519
|
+
}, children);
|
|
17520
|
+
};
|
|
17521
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
17522
|
+
displayName: "TabBody__Container",
|
|
17523
|
+
componentId: "sc-196oof2-0"
|
|
17524
|
+
})(["width:100%;height:", ";overflow-y:auto;"], function (props) {
|
|
17525
|
+
var _props$styles;
|
|
17526
|
+
return ((_props$styles = props.styles) == null ? void 0 : _props$styles.height) || 'auto';
|
|
17527
|
+
});
|
|
17528
|
+
|
|
17529
|
+
var Tab$1 = function Tab(_ref) {
|
|
17530
|
+
var active = _ref.active,
|
|
17531
|
+
label = _ref.label,
|
|
17532
|
+
onPointerDown = _ref.onPointerDown,
|
|
17533
|
+
type = _ref.type;
|
|
17534
|
+
return React.createElement(CustomTab, {
|
|
17535
|
+
activeTab: active,
|
|
17536
|
+
onPointerDown: onPointerDown,
|
|
17537
|
+
className: type
|
|
17538
|
+
}, React.createElement("p", null, label));
|
|
17539
|
+
};
|
|
17540
|
+
var CustomTab = /*#__PURE__*/styled.div.withConfig({
|
|
17541
|
+
displayName: "Tab__CustomTab",
|
|
17542
|
+
componentId: "sc-qw5dfu-0"
|
|
17543
|
+
})(["width:120px;color:white;font-size:0.8rem;&.gray{border-left:0.25rem solid rgba(0,0,0,0.25);border-right:0.25rem solid rgba(0,0,0,0.25);border-top:0.25rem solid rgba(0,0,0,0.25);border-bottom:", ";background:", ";}&.brown{border-left:0.25rem solid #996d55;border-right:0.25rem solid #996d55;border-top:0.25rem solid #996d55;border-bottom:", ";background:", ";}margin-right:10px;p{text-align:center;font-size:0.6rem;opacity:", ";}border-radius:5px 5px 0 0;position:relative;top:0.3rem;"], function (props) {
|
|
17544
|
+
return props.activeTab ? '' : '0.25rem solid rgba(0, 0, 0, 0.25)';
|
|
17545
|
+
}, function (props) {
|
|
17546
|
+
return props.activeTab ? '#4E4A4E' : '#2b292b';
|
|
17547
|
+
}, function (props) {
|
|
17548
|
+
return props.activeTab ? '' : '0.25rem solid #996d55';
|
|
17549
|
+
}, function (props) {
|
|
17550
|
+
return props.activeTab ? '#BF886A' : '#B67051';
|
|
17551
|
+
}, function (props) {
|
|
17552
|
+
return props.activeTab ? '1' : '0.5';
|
|
17553
|
+
});
|
|
17554
|
+
|
|
17555
|
+
var MultitabType;
|
|
17556
|
+
(function (MultitabType) {
|
|
17557
|
+
MultitabType["Brown"] = "brown";
|
|
17558
|
+
MultitabType["Gray"] = "gray";
|
|
17559
|
+
})(MultitabType || (MultitabType = {}));
|
|
17560
|
+
var TabsContainer = function TabsContainer(_ref) {
|
|
17561
|
+
var children = _ref.children,
|
|
17562
|
+
onCloseButton = _ref.onCloseButton,
|
|
17563
|
+
tabs = _ref.tabs,
|
|
17564
|
+
_ref$type = _ref.type,
|
|
17565
|
+
type = _ref$type === void 0 ? MultitabType.Brown : _ref$type;
|
|
17566
|
+
var _useState = useState(tabs[0].id),
|
|
17567
|
+
selectedTab = _useState[0],
|
|
17568
|
+
setSelectedTab = _useState[1]; //by default the first one
|
|
17569
|
+
var onRenderTabs = function onRenderTabs() {
|
|
17570
|
+
return tabs.map(function (tab, index) {
|
|
17571
|
+
return React.createElement(Tab$1, {
|
|
17572
|
+
type: type,
|
|
17573
|
+
active: selectedTab === tab.id,
|
|
17574
|
+
label: tab.label,
|
|
17575
|
+
key: tab.label + "_" + index,
|
|
17576
|
+
onPointerDown: function onPointerDown() {
|
|
17577
|
+
return setSelectedTab(tab.id);
|
|
17578
|
+
}
|
|
17579
|
+
});
|
|
17580
|
+
});
|
|
17581
|
+
};
|
|
17582
|
+
var onGetContainerType = function onGetContainerType() {
|
|
17583
|
+
switch (type) {
|
|
17584
|
+
case MultitabType.Brown:
|
|
17585
|
+
return RPGUIContainerTypes.FramedGold;
|
|
17586
|
+
case MultitabType.Gray:
|
|
17587
|
+
return RPGUIContainerTypes.Framed;
|
|
17588
|
+
default:
|
|
17589
|
+
return RPGUIContainerTypes.Framed;
|
|
17590
|
+
}
|
|
17591
|
+
};
|
|
17592
|
+
return React.createElement(DraggableContainer, {
|
|
17593
|
+
onCloseButton: onCloseButton,
|
|
17594
|
+
type: onGetContainerType()
|
|
17595
|
+
}, onRenderTabs(), React.createElement(BodyContainer, {
|
|
17596
|
+
selectedTab: selectedTab,
|
|
17597
|
+
className: type
|
|
17598
|
+
}, children));
|
|
17599
|
+
};
|
|
17600
|
+
var BodyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
17601
|
+
displayName: "TabsContainer__BodyContainer",
|
|
17602
|
+
componentId: "sc-s81iap-0"
|
|
17603
|
+
})(["display:flex;width:100%;height:100%;justify-content:space-between;& > *:not([data-tab-id=", "]){display:none;}&.brown{border:0.25rem solid #996D55;background-color:#BF886A;}&.gray{border:0.25rem solid rgba(0,0,0,0.25);background-color:#4E4A4E;}border-radius:5px;padding:0.5rem;"], function (props) {
|
|
17604
|
+
return props.selectedTab;
|
|
17605
|
+
});
|
|
17606
|
+
|
|
17512
17607
|
var PartyCreate = function PartyCreate(_ref) {
|
|
17513
17608
|
var onClose = _ref.onClose,
|
|
17514
17609
|
onCreate = _ref.onCreate;
|
|
@@ -17962,7 +18057,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
17962
18057
|
}
|
|
17963
18058
|
return value * 100 / max;
|
|
17964
18059
|
};
|
|
17965
|
-
return React.createElement(Container$
|
|
18060
|
+
return React.createElement(Container$p, {
|
|
17966
18061
|
className: "rpgui-progress",
|
|
17967
18062
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
17968
18063
|
"data-rpguitype": "progress",
|
|
@@ -17992,7 +18087,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17992
18087
|
displayName: "ProgressBar__TextOverlay",
|
|
17993
18088
|
componentId: "sc-qa6fzh-1"
|
|
17994
18089
|
})(["width:100%;position:relative;"]);
|
|
17995
|
-
var Container$
|
|
18090
|
+
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
17996
18091
|
displayName: "ProgressBar__Container",
|
|
17997
18092
|
componentId: "sc-qa6fzh-2"
|
|
17998
18093
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -18174,9 +18269,9 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
18174
18269
|
|
|
18175
18270
|
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
18176
18271
|
var children = _ref.children;
|
|
18177
|
-
return React.createElement(Container$
|
|
18272
|
+
return React.createElement(Container$q, null, children);
|
|
18178
18273
|
};
|
|
18179
|
-
var Container$
|
|
18274
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
18180
18275
|
displayName: "RPGUIScrollbar__Container",
|
|
18181
18276
|
componentId: "sc-p3msmb-0"
|
|
18182
18277
|
})([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
|
|
@@ -18362,7 +18457,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
18362
18457
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
18363
18458
|
_ref$margin = _ref.margin,
|
|
18364
18459
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
18365
|
-
return React.createElement(Container$
|
|
18460
|
+
return React.createElement(Container$r, {
|
|
18366
18461
|
className: "simple-progress-bar"
|
|
18367
18462
|
}, React.createElement(ProgressBarContainer, {
|
|
18368
18463
|
margin: margin
|
|
@@ -18371,7 +18466,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
18371
18466
|
bgColor: bgColor
|
|
18372
18467
|
}))));
|
|
18373
18468
|
};
|
|
18374
|
-
var Container$
|
|
18469
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
18375
18470
|
displayName: "SimpleProgressBar__Container",
|
|
18376
18471
|
componentId: "sc-mbeil3-0"
|
|
18377
18472
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -18665,7 +18760,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
18665
18760
|
castingType = spell.castingType,
|
|
18666
18761
|
cooldown = spell.cooldown,
|
|
18667
18762
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
18668
|
-
return React.createElement(Container$
|
|
18763
|
+
return React.createElement(Container$s, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$9, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
|
|
18669
18764
|
className: "label"
|
|
18670
18765
|
}, "Casting Type:"), React.createElement("div", {
|
|
18671
18766
|
className: "value"
|
|
@@ -18691,7 +18786,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
18691
18786
|
className: "value"
|
|
18692
18787
|
}, requiredItem))), React.createElement(Description$2, null, description));
|
|
18693
18788
|
};
|
|
18694
|
-
var Container$
|
|
18789
|
+
var Container$s = /*#__PURE__*/styled.div.withConfig({
|
|
18695
18790
|
displayName: "SpellInfo__Container",
|
|
18696
18791
|
componentId: "sc-4hbw3q-0"
|
|
18697
18792
|
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:30rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, uiColors.lightGray);
|
|
@@ -18745,7 +18840,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
18745
18840
|
var _ref$current;
|
|
18746
18841
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
18747
18842
|
};
|
|
18748
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
18843
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$t, {
|
|
18749
18844
|
ref: ref,
|
|
18750
18845
|
onTouchEnd: function onTouchEnd() {
|
|
18751
18846
|
handleFadeOut();
|
|
@@ -18770,7 +18865,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
18770
18865
|
}, option.text);
|
|
18771
18866
|
}))));
|
|
18772
18867
|
};
|
|
18773
|
-
var Container$
|
|
18868
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
18774
18869
|
displayName: "MobileSpellTooltip__Container",
|
|
18775
18870
|
componentId: "sc-6p7uvr-0"
|
|
18776
18871
|
})(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
|
|
@@ -18811,13 +18906,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
18811
18906
|
}
|
|
18812
18907
|
return;
|
|
18813
18908
|
}, []);
|
|
18814
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
18909
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$u, {
|
|
18815
18910
|
ref: ref
|
|
18816
18911
|
}, React.createElement(SpellInfoDisplay, {
|
|
18817
18912
|
spell: spell
|
|
18818
18913
|
})));
|
|
18819
18914
|
};
|
|
18820
|
-
var Container$
|
|
18915
|
+
var Container$u = /*#__PURE__*/styled.div.withConfig({
|
|
18821
18916
|
displayName: "SpellTooltip__Container",
|
|
18822
18917
|
componentId: "sc-1go0gwg-0"
|
|
18823
18918
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -18877,7 +18972,7 @@ var Spell = function Spell(_ref) {
|
|
|
18877
18972
|
var IMAGE_SCALE = 2;
|
|
18878
18973
|
return React.createElement(SpellInfoWrapper, {
|
|
18879
18974
|
spell: spell
|
|
18880
|
-
}, React.createElement(Container$
|
|
18975
|
+
}, React.createElement(Container$v, {
|
|
18881
18976
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
18882
18977
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
18883
18978
|
className: "spell"
|
|
@@ -18896,7 +18991,7 @@ var Spell = function Spell(_ref) {
|
|
|
18896
18991
|
className: "mana"
|
|
18897
18992
|
}, manaCost))));
|
|
18898
18993
|
};
|
|
18899
|
-
var Container$
|
|
18994
|
+
var Container$v = /*#__PURE__*/styled.button.withConfig({
|
|
18900
18995
|
displayName: "Spell__Container",
|
|
18901
18996
|
componentId: "sc-j96fa2-0"
|
|
18902
18997
|
})(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
|
|
@@ -18975,7 +19070,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
18975
19070
|
height: "inherit",
|
|
18976
19071
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
18977
19072
|
scale: scale
|
|
18978
|
-
}, React.createElement(Container$
|
|
19073
|
+
}, React.createElement(Container$w, null, React.createElement(Title$b, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
18979
19074
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
18980
19075
|
settingShortcutIndex: settingShortcutIndex,
|
|
18981
19076
|
shortcuts: shortcuts,
|
|
@@ -19011,7 +19106,7 @@ var Title$b = /*#__PURE__*/styled.h1.withConfig({
|
|
|
19011
19106
|
displayName: "Spellbook__Title",
|
|
19012
19107
|
componentId: "sc-r02nfq-0"
|
|
19013
19108
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
19014
|
-
var Container$
|
|
19109
|
+
var Container$w = /*#__PURE__*/styled.div.withConfig({
|
|
19015
19110
|
displayName: "Spellbook__Container",
|
|
19016
19111
|
componentId: "sc-r02nfq-1"
|
|
19017
19112
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -19423,11 +19518,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
19423
19518
|
var _ref$maxLines = _ref.maxLines,
|
|
19424
19519
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
19425
19520
|
children = _ref.children;
|
|
19426
|
-
return React.createElement(Container$
|
|
19521
|
+
return React.createElement(Container$x, {
|
|
19427
19522
|
maxLines: maxLines
|
|
19428
19523
|
}, children);
|
|
19429
19524
|
};
|
|
19430
|
-
var Container$
|
|
19525
|
+
var Container$x = /*#__PURE__*/styled.div.withConfig({
|
|
19431
19526
|
displayName: "Truncate__Container",
|
|
19432
19527
|
componentId: "sc-6x00qb-0"
|
|
19433
19528
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
@@ -19520,5 +19615,5 @@ var ButtonWrapper$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
19520
19615
|
componentId: "sc-gptoxp-5"
|
|
19521
19616
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
19522
19617
|
|
|
19523
|
-
export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
19618
|
+
export { AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
|
|
19524
19619
|
//# sourceMappingURL=long-bow.esm.js.map
|