@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/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export * from './components/Leaderboard/Leaderboard';
|
|
|
24
24
|
export * from './components/ListMenu';
|
|
25
25
|
export * from './components/Marketplace/Marketplace';
|
|
26
26
|
export * from './components/Marketplace/MarketplaceRows';
|
|
27
|
+
export * from './components/Multitab/TabBody';
|
|
28
|
+
export * from './components/Multitab/TabsContainer';
|
|
27
29
|
export * from './components/NPCDialog/NPCDialog';
|
|
28
30
|
export * from './components/NPCDialog/NPCMultiDialog';
|
|
29
31
|
export * from './components/NPCDialog/QuestionDialog/QuestionDialog';
|
|
@@ -17512,6 +17512,100 @@ var PagerContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
17512
17512
|
componentId: "sc-h904b1-0"
|
|
17513
17513
|
})(["display:flex;justify-content:space-between;align-items:center;width:calc(100% - 30px);"]);
|
|
17514
17514
|
|
|
17515
|
+
var TabBody = function TabBody(_ref) {
|
|
17516
|
+
var id = _ref.id,
|
|
17517
|
+
children = _ref.children,
|
|
17518
|
+
styles = _ref.styles;
|
|
17519
|
+
return React__default.createElement(Container$o, {
|
|
17520
|
+
styles: styles,
|
|
17521
|
+
"data-tab-id": id
|
|
17522
|
+
}, children);
|
|
17523
|
+
};
|
|
17524
|
+
var Container$o = /*#__PURE__*/styled__default.div.withConfig({
|
|
17525
|
+
displayName: "TabBody__Container",
|
|
17526
|
+
componentId: "sc-196oof2-0"
|
|
17527
|
+
})(["width:100%;height:", ";overflow-y:auto;"], function (props) {
|
|
17528
|
+
var _props$styles;
|
|
17529
|
+
return ((_props$styles = props.styles) == null ? void 0 : _props$styles.height) || 'auto';
|
|
17530
|
+
});
|
|
17531
|
+
|
|
17532
|
+
var Tab$1 = function Tab(_ref) {
|
|
17533
|
+
var active = _ref.active,
|
|
17534
|
+
label = _ref.label,
|
|
17535
|
+
onPointerDown = _ref.onPointerDown,
|
|
17536
|
+
type = _ref.type;
|
|
17537
|
+
return React__default.createElement(CustomTab, {
|
|
17538
|
+
activeTab: active,
|
|
17539
|
+
onPointerDown: onPointerDown,
|
|
17540
|
+
className: type
|
|
17541
|
+
}, React__default.createElement("p", null, label));
|
|
17542
|
+
};
|
|
17543
|
+
var CustomTab = /*#__PURE__*/styled__default.div.withConfig({
|
|
17544
|
+
displayName: "Tab__CustomTab",
|
|
17545
|
+
componentId: "sc-qw5dfu-0"
|
|
17546
|
+
})(["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) {
|
|
17547
|
+
return props.activeTab ? '' : '0.25rem solid rgba(0, 0, 0, 0.25)';
|
|
17548
|
+
}, function (props) {
|
|
17549
|
+
return props.activeTab ? '#4E4A4E' : '#2b292b';
|
|
17550
|
+
}, function (props) {
|
|
17551
|
+
return props.activeTab ? '' : '0.25rem solid #996d55';
|
|
17552
|
+
}, function (props) {
|
|
17553
|
+
return props.activeTab ? '#BF886A' : '#B67051';
|
|
17554
|
+
}, function (props) {
|
|
17555
|
+
return props.activeTab ? '1' : '0.5';
|
|
17556
|
+
});
|
|
17557
|
+
|
|
17558
|
+
(function (MultitabType) {
|
|
17559
|
+
MultitabType["Brown"] = "brown";
|
|
17560
|
+
MultitabType["Gray"] = "gray";
|
|
17561
|
+
})(exports.MultitabType || (exports.MultitabType = {}));
|
|
17562
|
+
var TabsContainer = function TabsContainer(_ref) {
|
|
17563
|
+
var children = _ref.children,
|
|
17564
|
+
onCloseButton = _ref.onCloseButton,
|
|
17565
|
+
tabs = _ref.tabs,
|
|
17566
|
+
_ref$type = _ref.type,
|
|
17567
|
+
type = _ref$type === void 0 ? exports.MultitabType.Brown : _ref$type;
|
|
17568
|
+
var _useState = React.useState(tabs[0].id),
|
|
17569
|
+
selectedTab = _useState[0],
|
|
17570
|
+
setSelectedTab = _useState[1]; //by default the first one
|
|
17571
|
+
var onRenderTabs = function onRenderTabs() {
|
|
17572
|
+
return tabs.map(function (tab, index) {
|
|
17573
|
+
return React__default.createElement(Tab$1, {
|
|
17574
|
+
type: type,
|
|
17575
|
+
active: selectedTab === tab.id,
|
|
17576
|
+
label: tab.label,
|
|
17577
|
+
key: tab.label + "_" + index,
|
|
17578
|
+
onPointerDown: function onPointerDown() {
|
|
17579
|
+
return setSelectedTab(tab.id);
|
|
17580
|
+
}
|
|
17581
|
+
});
|
|
17582
|
+
});
|
|
17583
|
+
};
|
|
17584
|
+
var onGetContainerType = function onGetContainerType() {
|
|
17585
|
+
switch (type) {
|
|
17586
|
+
case exports.MultitabType.Brown:
|
|
17587
|
+
return exports.RPGUIContainerTypes.FramedGold;
|
|
17588
|
+
case exports.MultitabType.Gray:
|
|
17589
|
+
return exports.RPGUIContainerTypes.Framed;
|
|
17590
|
+
default:
|
|
17591
|
+
return exports.RPGUIContainerTypes.Framed;
|
|
17592
|
+
}
|
|
17593
|
+
};
|
|
17594
|
+
return React__default.createElement(DraggableContainer, {
|
|
17595
|
+
onCloseButton: onCloseButton,
|
|
17596
|
+
type: onGetContainerType()
|
|
17597
|
+
}, onRenderTabs(), React__default.createElement(BodyContainer, {
|
|
17598
|
+
selectedTab: selectedTab,
|
|
17599
|
+
className: type
|
|
17600
|
+
}, children));
|
|
17601
|
+
};
|
|
17602
|
+
var BodyContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
17603
|
+
displayName: "TabsContainer__BodyContainer",
|
|
17604
|
+
componentId: "sc-s81iap-0"
|
|
17605
|
+
})(["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) {
|
|
17606
|
+
return props.selectedTab;
|
|
17607
|
+
});
|
|
17608
|
+
|
|
17515
17609
|
var PartyCreate = function PartyCreate(_ref) {
|
|
17516
17610
|
var onClose = _ref.onClose,
|
|
17517
17611
|
onCreate = _ref.onCreate;
|
|
@@ -17965,7 +18059,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
17965
18059
|
}
|
|
17966
18060
|
return value * 100 / max;
|
|
17967
18061
|
};
|
|
17968
|
-
return React__default.createElement(Container$
|
|
18062
|
+
return React__default.createElement(Container$p, {
|
|
17969
18063
|
className: "rpgui-progress",
|
|
17970
18064
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
17971
18065
|
"data-rpguitype": "progress",
|
|
@@ -17995,7 +18089,7 @@ var TextOverlay$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
17995
18089
|
displayName: "ProgressBar__TextOverlay",
|
|
17996
18090
|
componentId: "sc-qa6fzh-1"
|
|
17997
18091
|
})(["width:100%;position:relative;"]);
|
|
17998
|
-
var Container$
|
|
18092
|
+
var Container$p = /*#__PURE__*/styled__default.div.withConfig({
|
|
17999
18093
|
displayName: "ProgressBar__Container",
|
|
18000
18094
|
componentId: "sc-qa6fzh-2"
|
|
18001
18095
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -18177,9 +18271,9 @@ var NoQuestContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
18177
18271
|
|
|
18178
18272
|
var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
|
|
18179
18273
|
var children = _ref.children;
|
|
18180
|
-
return React__default.createElement(Container$
|
|
18274
|
+
return React__default.createElement(Container$q, null, children);
|
|
18181
18275
|
};
|
|
18182
|
-
var Container$
|
|
18276
|
+
var Container$q = /*#__PURE__*/styled__default.div.withConfig({
|
|
18183
18277
|
displayName: "RPGUIScrollbar__Container",
|
|
18184
18278
|
componentId: "sc-p3msmb-0"
|
|
18185
18279
|
})([".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;}"]);
|
|
@@ -18365,7 +18459,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
18365
18459
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
18366
18460
|
_ref$margin = _ref.margin,
|
|
18367
18461
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
18368
|
-
return React__default.createElement(Container$
|
|
18462
|
+
return React__default.createElement(Container$r, {
|
|
18369
18463
|
className: "simple-progress-bar"
|
|
18370
18464
|
}, React__default.createElement(ProgressBarContainer, {
|
|
18371
18465
|
margin: margin
|
|
@@ -18374,7 +18468,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
18374
18468
|
bgColor: bgColor
|
|
18375
18469
|
}))));
|
|
18376
18470
|
};
|
|
18377
|
-
var Container$
|
|
18471
|
+
var Container$r = /*#__PURE__*/styled__default.div.withConfig({
|
|
18378
18472
|
displayName: "SimpleProgressBar__Container",
|
|
18379
18473
|
componentId: "sc-mbeil3-0"
|
|
18380
18474
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -18668,7 +18762,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
18668
18762
|
castingType = spell.castingType,
|
|
18669
18763
|
cooldown = spell.cooldown,
|
|
18670
18764
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
18671
|
-
return React__default.createElement(Container$
|
|
18765
|
+
return React__default.createElement(Container$s, null, React__default.createElement(Header$1, null, React__default.createElement("div", null, React__default.createElement(Title$9, null, name), React__default.createElement(Type$1, null, magicWords))), React__default.createElement(Statistic$1, null, React__default.createElement("div", {
|
|
18672
18766
|
className: "label"
|
|
18673
18767
|
}, "Casting Type:"), React__default.createElement("div", {
|
|
18674
18768
|
className: "value"
|
|
@@ -18694,7 +18788,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
18694
18788
|
className: "value"
|
|
18695
18789
|
}, requiredItem))), React__default.createElement(Description$2, null, description));
|
|
18696
18790
|
};
|
|
18697
|
-
var Container$
|
|
18791
|
+
var Container$s = /*#__PURE__*/styled__default.div.withConfig({
|
|
18698
18792
|
displayName: "SpellInfo__Container",
|
|
18699
18793
|
componentId: "sc-4hbw3q-0"
|
|
18700
18794
|
})(["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);
|
|
@@ -18748,7 +18842,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
18748
18842
|
var _ref$current;
|
|
18749
18843
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
18750
18844
|
};
|
|
18751
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
18845
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$t, {
|
|
18752
18846
|
ref: ref,
|
|
18753
18847
|
onTouchEnd: function onTouchEnd() {
|
|
18754
18848
|
handleFadeOut();
|
|
@@ -18773,7 +18867,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
18773
18867
|
}, option.text);
|
|
18774
18868
|
}))));
|
|
18775
18869
|
};
|
|
18776
|
-
var Container$
|
|
18870
|
+
var Container$t = /*#__PURE__*/styled__default.div.withConfig({
|
|
18777
18871
|
displayName: "MobileSpellTooltip__Container",
|
|
18778
18872
|
componentId: "sc-6p7uvr-0"
|
|
18779
18873
|
})(["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;}"]);
|
|
@@ -18814,13 +18908,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
18814
18908
|
}
|
|
18815
18909
|
return;
|
|
18816
18910
|
}, []);
|
|
18817
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
18911
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$u, {
|
|
18818
18912
|
ref: ref
|
|
18819
18913
|
}, React__default.createElement(SpellInfoDisplay, {
|
|
18820
18914
|
spell: spell
|
|
18821
18915
|
})));
|
|
18822
18916
|
};
|
|
18823
|
-
var Container$
|
|
18917
|
+
var Container$u = /*#__PURE__*/styled__default.div.withConfig({
|
|
18824
18918
|
displayName: "SpellTooltip__Container",
|
|
18825
18919
|
componentId: "sc-1go0gwg-0"
|
|
18826
18920
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -18880,7 +18974,7 @@ var Spell = function Spell(_ref) {
|
|
|
18880
18974
|
var IMAGE_SCALE = 2;
|
|
18881
18975
|
return React__default.createElement(SpellInfoWrapper, {
|
|
18882
18976
|
spell: spell
|
|
18883
|
-
}, React__default.createElement(Container$
|
|
18977
|
+
}, React__default.createElement(Container$v, {
|
|
18884
18978
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
18885
18979
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
18886
18980
|
className: "spell"
|
|
@@ -18899,7 +18993,7 @@ var Spell = function Spell(_ref) {
|
|
|
18899
18993
|
className: "mana"
|
|
18900
18994
|
}, manaCost))));
|
|
18901
18995
|
};
|
|
18902
|
-
var Container$
|
|
18996
|
+
var Container$v = /*#__PURE__*/styled__default.button.withConfig({
|
|
18903
18997
|
displayName: "Spell__Container",
|
|
18904
18998
|
componentId: "sc-j96fa2-0"
|
|
18905
18999
|
})(["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) {
|
|
@@ -18978,7 +19072,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
18978
19072
|
height: "inherit",
|
|
18979
19073
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
18980
19074
|
scale: scale
|
|
18981
|
-
}, React__default.createElement(Container$
|
|
19075
|
+
}, React__default.createElement(Container$w, null, React__default.createElement(Title$b, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
|
|
18982
19076
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
18983
19077
|
settingShortcutIndex: settingShortcutIndex,
|
|
18984
19078
|
shortcuts: shortcuts,
|
|
@@ -19014,7 +19108,7 @@ var Title$b = /*#__PURE__*/styled__default.h1.withConfig({
|
|
|
19014
19108
|
displayName: "Spellbook__Title",
|
|
19015
19109
|
componentId: "sc-r02nfq-0"
|
|
19016
19110
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
19017
|
-
var Container$
|
|
19111
|
+
var Container$w = /*#__PURE__*/styled__default.div.withConfig({
|
|
19018
19112
|
displayName: "Spellbook__Container",
|
|
19019
19113
|
componentId: "sc-r02nfq-1"
|
|
19020
19114
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -19426,11 +19520,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
19426
19520
|
var _ref$maxLines = _ref.maxLines,
|
|
19427
19521
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
19428
19522
|
children = _ref.children;
|
|
19429
|
-
return React__default.createElement(Container$
|
|
19523
|
+
return React__default.createElement(Container$x, {
|
|
19430
19524
|
maxLines: maxLines
|
|
19431
19525
|
}, children);
|
|
19432
19526
|
};
|
|
19433
|
-
var Container$
|
|
19527
|
+
var Container$x = /*#__PURE__*/styled__default.div.withConfig({
|
|
19434
19528
|
displayName: "Truncate__Container",
|
|
19435
19529
|
componentId: "sc-6x00qb-0"
|
|
19436
19530
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
@@ -19576,6 +19670,8 @@ exports.SkillsContainer = SkillsContainer;
|
|
|
19576
19670
|
exports.Spellbook = Spellbook;
|
|
19577
19671
|
exports.SpriteFromAtlas = SpriteFromAtlas;
|
|
19578
19672
|
exports.Stepper = Stepper;
|
|
19673
|
+
exports.TabBody = TabBody;
|
|
19674
|
+
exports.TabsContainer = TabsContainer;
|
|
19579
19675
|
exports.TextArea = TextArea;
|
|
19580
19676
|
exports.TimeWidget = TimeWidget;
|
|
19581
19677
|
exports.TradingMenu = TradingMenu;
|