narrat 0.6.0 → 0.6.3
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/CHANGELOG.md +103 -0
- package/lib/app.vue.d.ts +1 -0
- package/lib/index.esm.js +184 -152
- package/lib/index.js +184 -152
- package/lib/store.d.ts +2 -0
- package/lib/utils/audio-loader.d.ts +2 -2
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version: 0.6.
|
|
1
|
+
// Version: 0.6.3 - April 25, 2022 16:37:54
|
|
2
2
|
import 'es6-promise/auto';
|
|
3
3
|
import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, Transition, withCtx, renderSlot, createTextVNode, resolveComponent, toDisplayString, createVNode, TransitionGroup, createApp } from 'vue';
|
|
4
4
|
import { createLogger, createStore } from 'vuex';
|
|
@@ -30,7 +30,7 @@ function styleInject(css, ref) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n.list-enter-from,\n.list-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n overflow: hidden;\n}\n\nselect {\n background-color: grey;\n}\n\nbutton {\n background-color: #72080f;\n color: white;\n border-radius: 30px;\n padding: 5px;\n font-weight: 800;\n font-size: 16px;\n margin: 5px;\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\ntd {\n padding: 4px;\n border: 1px solid white;\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
|
|
33
|
+
var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\n transition: transform 0.3s ease;\n} */\n\n.list-enter-from,\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n}\n\nselect {\n background-color: grey;\n}\n\nbutton {\n background-color: #72080f;\n color: white;\n border-radius: 30px;\n padding: 5px;\n font-weight: 800;\n font-size: 16px;\n margin: 5px;\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\ntd {\n padding: 4px;\n border: 1px solid white;\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
|
|
34
34
|
styleInject(css_248z);
|
|
35
35
|
|
|
36
36
|
const f=ref([]),v=ref(null),m=ref(null),g=ref(null),h=reactive({current:""}),y=[],b=ref(!1),k=readonly(f),w=readonly(v),M=readonly(m),q=readonly(g),x=readonly(h),$=(e=w.value)=>{h.current=e;const t=k.value.findIndex((t=>t.name===e)),n=k.value.map((e=>e.name));for(let a=0;a<n.length;a++){if(a>0&&a<n.length-1){const e=n[a]+"Minus",r=n[a]+"Plus";h[e]=t<=a,h[r]=t>=a;}h[n[a]]=n[a]===e;}},V=(e=M.value)=>{h.orientation=e,h.isLandscape="landscape"===e,h.isPortrait="portrait"===e;},O=(e=q.value||"light")=>{h.theme=e,h.isDark="dark"===e,h.isLight="light"===e;};function j(e,t){if("undefined"==typeof window||!window.matchMedia)return !1;if("undefined"!=typeof window&&!window.matchMedia)return console.error("Vue3 Mq: No MatchMedia support detected in this browser. Responsive breakpoints not available."),!1;{b.value=!0;const n=window.matchMedia(e),a=({matches:e})=>{e&&t();};y.push({mql:n,cb:a});n.addEventListener&&"function"==typeof n.addEventListener?n.addEventListener("change",a):n.addListener(a),a(n);}}var L=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bootstrap5:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},bootstrap4:{xs:0,sm:576,md:768,lg:992,xl:1200},bootstrap3:{xs:0,sm:768,md:992,lg:1200},vuetify:{xs:0,sm:600,md:960,lg:1264,xl:1904},tailwind:{xs:0,sm:640,md:768,lg:1024,xl:1280,xxl:1536},devices:{phone:0,tablet:768,laptop:1370,desktop:1906}});const T=e=>{if(!e||"object"!=typeof e)return !1;const t=[];for(let n in e){const a=parseFloat(e[n]);n&&"string"==typeof n?/^[^a-z]/i.test(n)||/[^a-zA-Z0-9_]/.test(n)?console.warn(`Vue3 Mq: "${n}" is an invalid breakpoint key. Breakpoint keys must start with a letter and contain only alphanumeric characters and underscores. Skipping.`):!a&&0!==a||isNaN(a)||a<0?console.warn(`Vue3 Mq: "${n}: ${e[n]}" is not a valid breakpoint. Breakpoints should be a number of zero or above. Skipping.`):t.push({name:n,min:a}):console.warn(`Vue3 Mq: Invalid or missing breakpoint key (${JSON.stringify(n)}). Skipping.`);}t.some((e=>0===e.min))||console.warn("Vue3 Mq: You have not declared a breakpoint with a minimum value of 0. There may be screen sizes to which Vue3Mq does not respond.");return new Set(t.map((e=>e.min))).size<t.length&&console.warn("Vue3 Mq: Your breakpoint configuration contains duplicate values. Behaviour may be unpredictable."),0!==t.length&&t.sort(((e,t)=>e.min-t.min))};function R({breakpoints:e,preset:t}){const n=(e=>{if("string"==typeof e&&L[e])return L[e];{const t=Object.keys(L);return console.error(`Vue3 Mq: "${e}" is not a valid preset. Available options are: ${t.join(", ")}`),!1}})(t),a=T(e);if(!1===n&&!a)throw new TypeError("Vue3 Mq: You must provide a valid preset, or valid breakpoint settings.");var r;r=a||T(n),f.value=r,function(){for(;y.length>0;){const e=y.shift();if(e&&"object"==typeof e){const{mql:t,cb:n}=e;t.addEventListener&&"function"==typeof t.addEventListener?t.removeEventListener("change",n):t.removeListener(n);}}}(),(()=>{const e=Object.keys(h);for(let t of e)delete h[t];$(),V(),O();})();const o=k.value.reduce(((e,t,n,a)=>{const r=`(min-width: ${t.min}px)`,o=n<a.length-1?`(max-width: ${a[n+1].min-1}px)`:null,i=r+(o?" and "+o:"");return Object.assign(e,{[t.name]:i})}),{});for(const i in o){j(o[i],(()=>{$(i);}));}["portrait","landscape"].forEach((e=>{j(`(orientation: ${e})`,(()=>{V(e);}));})),["light","dark"].forEach((e=>{j(`(prefers-color-scheme: ${e})`,(()=>{O(e);}));}));}var N={install:(e,{preset:t="bootstrap5",breakpoints:n,defaultBreakpoint:a,defaultOrientation:r="landscape",defaultTheme:o}={})=>{try{const l=!1===["landscape","portrait"].includes(s=r)?(console.error(`Vue3 Mq: "${s}" is not a valid default orientation. Reverting to unset value.`),null):s,u=((e=null)=>!1===["dark","light"].includes(e)&&null!==e?(console.error(`Vue3 Mq: "${e}" is not a valid default theme. Reverting to unset value.`),null):e)(o);i=a,v.value=i,(e=>{m.value=e;})(l),(e=>{g.value=e;})(u),e.provide("mq",x),e.provide("updateBreakpoints",R),R({breakpoints:n,preset:t});}catch(l){console.error(l);}var i,s;}};
|
|
@@ -249,8 +249,9 @@ function parserError(commit, ctx, line, text) {
|
|
|
249
249
|
error(commit, errorText);
|
|
250
250
|
}
|
|
251
251
|
function error(commit, text) {
|
|
252
|
-
commit('createError', `❌ ${text}`);
|
|
253
252
|
console.error(text);
|
|
253
|
+
text = text.replace(/[\r\n]/g, `\n<br />`);
|
|
254
|
+
commit('createError', `❌ ${text}`);
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
let config$1;
|
|
@@ -372,7 +373,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
372
373
|
}))
|
|
373
374
|
}
|
|
374
375
|
|
|
375
|
-
var css_248z$3 = ".modal-mask {\n position: fixed;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: table;\n transition: opacity 0.3s ease;\n}\n\n.modal-wrapper {\n display: table-cell;\n vertical-align: middle;\n}\n\n.modal-container {\n min-width: 300px;\n max-width: 90vw;\n margin: 0px auto;\n padding: 20px 30px;\n border-radius: 2px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);\n transition: all 0.3s ease;\n font-family: Helvetica, Arial, sans-serif;\n}\n\n.modal-header h3 {\n margin-top: 0;\n color: #42b983;\n}\n\n.modal-body {\n margin: 20px 0;\n}\n\n.modal-default-button {\n float: right;\n}\n\n/*\n * The following styles are auto-applied to elements with\n * transition=\"modal\" when their visibility is toggled\n * by Vue.js.\n *\n * You can easily play with the modal transition by editing\n * these styles.\n */\n\n.modal-enter {\n opacity: 0;\n}\n\n.modal-leave-active {\n opacity: 0;\n}\n\n.modal-enter .modal-container,\n.modal-leave-active .modal-container {\n transform: scale(1.1);\n}\n
|
|
376
|
+
var css_248z$3 = ".modal-mask {\n position: fixed;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: table;\n transition: opacity 0.3s ease;\n}\n\n.modal-wrapper {\n display: table-cell;\n vertical-align: middle;\n}\n\n.modal-container {\n min-width: 300px;\n max-width: 90vw;\n max-height: 75vh;\n overflow-y: auto;\n margin: 0px auto;\n padding: 20px 30px;\n border-radius: 2px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);\n transition: all 0.3s ease;\n font-family: Helvetica, Arial, sans-serif;\n}\n\n.modal-header h3 {\n margin-top: 0;\n color: #42b983;\n}\n\n.modal-body {\n margin: 20px 0;\n}\n\n.modal-default-button {\n float: right;\n}\n\n/*\n * The following styles are auto-applied to elements with\n * transition=\"modal\" when their visibility is toggled\n * by Vue.js.\n *\n * You can easily play with the modal transition by editing\n * these styles.\n */\n\n.modal-enter {\n opacity: 0;\n}\n\n.modal-leave-active {\n opacity: 0;\n}\n\n.modal-enter .modal-container,\n.modal-leave-active .modal-container {\n transform: scale(1.1);\n}\n";
|
|
376
377
|
styleInject(css_248z$3);
|
|
377
378
|
|
|
378
379
|
script$2.render = render$2;
|
|
@@ -4156,20 +4157,18 @@ async function loadAudioAssets(config) {
|
|
|
4156
4157
|
console.log(`Loading audio`);
|
|
4157
4158
|
const loadingPromises = [];
|
|
4158
4159
|
for (const key in config.sound) {
|
|
4159
|
-
|
|
4160
|
-
loadingPromises.push(loadAudio(key, path, audio.sound));
|
|
4160
|
+
loadingPromises.push(loadAudio(key, { loop: true, html5: true, ...config.sound[key] }, audio.sound));
|
|
4161
4161
|
}
|
|
4162
4162
|
for (const key in config.music) {
|
|
4163
|
-
|
|
4164
|
-
loadingPromises.push(loadAudio(key, path, audio.music));
|
|
4163
|
+
loadingPromises.push(loadAudio(key, config.music[key], audio.music));
|
|
4165
4164
|
}
|
|
4166
4165
|
return Promise.all(loadingPromises);
|
|
4167
4166
|
}
|
|
4168
|
-
async function loadAudio(key,
|
|
4167
|
+
async function loadAudio(key, config, dest) {
|
|
4169
4168
|
return new Promise((resolve, reject) => {
|
|
4170
|
-
console.log(`Loading audio ${
|
|
4169
|
+
console.log(`Loading audio ${config.src}`);
|
|
4171
4170
|
const sound = new howler.Howl({
|
|
4172
|
-
|
|
4171
|
+
...config,
|
|
4173
4172
|
});
|
|
4174
4173
|
sound.load();
|
|
4175
4174
|
dest[key] = sound;
|
|
@@ -4271,9 +4270,11 @@ function debounce(func, waitMilliseconds = 50, options = {}) {
|
|
|
4271
4270
|
|
|
4272
4271
|
console.log('hello app');
|
|
4273
4272
|
var script$8 = defineComponent({
|
|
4273
|
+
$refs: {
|
|
4274
|
+
dialogContainer: HTMLInputElement,
|
|
4275
|
+
},
|
|
4274
4276
|
inject: ['mq'],
|
|
4275
4277
|
components: {
|
|
4276
|
-
VolumeControls: script$4,
|
|
4277
4278
|
DialogBox: script,
|
|
4278
4279
|
DialogPicture: script$1,
|
|
4279
4280
|
DebugMenu: script$3,
|
|
@@ -4322,10 +4323,22 @@ var script$8 = defineComponent({
|
|
|
4322
4323
|
this.updateScreenSize();
|
|
4323
4324
|
}, 5000);
|
|
4324
4325
|
},
|
|
4326
|
+
watch: {
|
|
4327
|
+
dialogLength(newCount, oldCount) {
|
|
4328
|
+
if (this.$refs.dialog) {
|
|
4329
|
+
const dialog = this.$refs.dialog;
|
|
4330
|
+
console.log('hello dialog');
|
|
4331
|
+
dialog.scrollTop = dialog.scrollHeight + 100000;
|
|
4332
|
+
}
|
|
4333
|
+
},
|
|
4334
|
+
},
|
|
4325
4335
|
computed: {
|
|
4326
4336
|
dialog() {
|
|
4327
4337
|
return this.$store.state.dialog;
|
|
4328
4338
|
},
|
|
4339
|
+
dialogLength() {
|
|
4340
|
+
return this.dialog.length;
|
|
4341
|
+
},
|
|
4329
4342
|
lastDialog() {
|
|
4330
4343
|
if (this.dialog.length > 0) {
|
|
4331
4344
|
return this.dialog[this.dialog.length - 1];
|
|
@@ -4406,7 +4419,6 @@ var script$8 = defineComponent({
|
|
|
4406
4419
|
if (this.layoutMode === 'horizontal') ;
|
|
4407
4420
|
return {
|
|
4408
4421
|
// position: 'absolute',
|
|
4409
|
-
backgroundColor: 'green',
|
|
4410
4422
|
width: this.layoutMode === 'horizontal' ? `${this.dialogWidth}px` : '100%',
|
|
4411
4423
|
height,
|
|
4412
4424
|
// right: 0,
|
|
@@ -4539,11 +4551,12 @@ var script$8 = defineComponent({
|
|
|
4539
4551
|
});
|
|
4540
4552
|
|
|
4541
4553
|
const _hoisted_1$7 = ["width", "height"];
|
|
4542
|
-
const _hoisted_2$6 = {
|
|
4554
|
+
const _hoisted_2$6 = /*#__PURE__*/createElementVNode("div", { class: "anchor" }, null, -1);
|
|
4555
|
+
const _hoisted_3$4 = {
|
|
4543
4556
|
key: 1,
|
|
4544
4557
|
class: "flex flex-col"
|
|
4545
4558
|
};
|
|
4546
|
-
const
|
|
4559
|
+
const _hoisted_4$3 = { key: 2 };
|
|
4547
4560
|
|
|
4548
4561
|
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4549
4562
|
const _component_Hud = resolveComponent("Hud");
|
|
@@ -4592,34 +4605,32 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4592
4605
|
? (openBlock(), createElementBlock("div", {
|
|
4593
4606
|
key: 1,
|
|
4594
4607
|
class: "dialog override",
|
|
4608
|
+
ref: "dialog",
|
|
4595
4609
|
style: normalizeStyle(_ctx.dialogStyle)
|
|
4596
4610
|
}, [
|
|
4597
|
-
|
|
4598
|
-
|
|
4611
|
+
createVNode(TransitionGroup, {
|
|
4612
|
+
name: "list",
|
|
4613
|
+
tag: "div",
|
|
4614
|
+
class: "dialog-container w-full override",
|
|
4599
4615
|
style: normalizeStyle(_ctx.dialogContainerStyle)
|
|
4600
|
-
},
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
}), 128))
|
|
4614
|
-
]),
|
|
4615
|
-
_: 1
|
|
4616
|
-
})
|
|
4617
|
-
], 4)
|
|
4616
|
+
}, {
|
|
4617
|
+
default: withCtx(() => [
|
|
4618
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dialog, (dialog, i) => {
|
|
4619
|
+
return (openBlock(), createBlock(_component_DialogBox, {
|
|
4620
|
+
key: i,
|
|
4621
|
+
options: _ctx.getDialogBoxOptions(dialog, i),
|
|
4622
|
+
active: _ctx.isDialogActive(i)
|
|
4623
|
+
}, null, 8, ["options", "active"]))
|
|
4624
|
+
}), 128))
|
|
4625
|
+
]),
|
|
4626
|
+
_: 1
|
|
4627
|
+
}, 8, ["style"]),
|
|
4628
|
+
_hoisted_2$6
|
|
4618
4629
|
], 4))
|
|
4619
4630
|
: createCommentVNode("", true)
|
|
4620
4631
|
], 4))
|
|
4621
4632
|
: (_ctx.gameLoaded)
|
|
4622
|
-
? (openBlock(), createElementBlock("div",
|
|
4633
|
+
? (openBlock(), createElementBlock("div", _hoisted_3$4, [
|
|
4623
4634
|
createElementVNode("button", {
|
|
4624
4635
|
class: "button menu-button start-button override",
|
|
4625
4636
|
onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.startGame && _ctx.startGame(...args)))
|
|
@@ -4632,7 +4643,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4632
4643
|
}, " Continue Game "))
|
|
4633
4644
|
: createCommentVNode("", true)
|
|
4634
4645
|
]))
|
|
4635
|
-
: (openBlock(), createElementBlock("div",
|
|
4646
|
+
: (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
4636
4647
|
createVNode(_component_LoadingBar, {
|
|
4637
4648
|
percentage: _ctx.loadingPercentage,
|
|
4638
4649
|
step: _ctx.loadingStep
|
|
@@ -4645,7 +4656,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4645
4656
|
], 4))
|
|
4646
4657
|
}
|
|
4647
4658
|
|
|
4648
|
-
var css_248z$9 = "#app {\n background-color: black;\n width: 100%;\n height: 100%;\n position: absolute;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: white;\n box-sizing: border-box;\n overflow: hidden;\n transform-origin: center center;\n}\n\n.game {\n background-color: black;\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.interact-button {\n height: 50px;\n background-color: #72080f;\n border: 1px solid black;\n font-weight: bold;\n font-size: 20px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n\n.dialog-container {\n flex-shrink: 2;\n /* padding: 20px; */\n height: 100%;\n width: 100%;\n background-color: #171717;\n
|
|
4659
|
+
var css_248z$9 = "#app {\n background-color: black;\n width: 100%;\n height: 100%;\n position: absolute;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: white;\n box-sizing: border-box;\n overflow: hidden;\n transform-origin: center center;\n}\n\n.game {\n background-color: black;\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.interact-button {\n height: 50px;\n background-color: #72080f;\n border: 1px solid black;\n font-weight: bold;\n font-size: 20px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n\n.dialog-container {\n flex-shrink: 2;\n /* padding: 20px; */\n min-height: 100%;\n width: 100%;\n background-color: #171717;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: center;\n overflow-x: hidden;\n}\n\n.dialog {\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n}\n\n.dialog * {\n overflow-anchor: none;\n}\n\n.background {\n margin: 0;\n}\n\n#background-canvas {\n height: 100%;\n}\n\n.anchor {\n overflow-anchor: auto;\n height: 1px;\n}\n";
|
|
4649
4660
|
styleInject(css_248z$9);
|
|
4650
4661
|
|
|
4651
4662
|
script$8.render = render$8;
|
|
@@ -4769,122 +4780,134 @@ async function runLine(context) {
|
|
|
4769
4780
|
}
|
|
4770
4781
|
async function runCommand(context, cmd, choices) {
|
|
4771
4782
|
const { state, commit, dispatch } = context;
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
branch: state.machine.script[branch],
|
|
4777
|
-
currentIndex: 0,
|
|
4778
|
-
};
|
|
4779
|
-
commit('setStack', newStack);
|
|
4780
|
-
await dispatch('runLine');
|
|
4781
|
-
break;
|
|
4782
|
-
case 'text':
|
|
4783
|
-
await textCommand(commit, {
|
|
4784
|
-
speaker: 'game',
|
|
4785
|
-
text: cmd.options.text,
|
|
4786
|
-
choices,
|
|
4787
|
-
interactive: true,
|
|
4788
|
-
});
|
|
4789
|
-
break;
|
|
4790
|
-
case 'set':
|
|
4791
|
-
const key = cmd.args[0];
|
|
4792
|
-
const value = cmd.args[1];
|
|
4793
|
-
commit('setData', { path: key, value });
|
|
4794
|
-
return dispatch('nextLine');
|
|
4795
|
-
case 'add':
|
|
4796
|
-
const addKey = cmd.args[0];
|
|
4797
|
-
const addValue = cmd.args[1];
|
|
4798
|
-
commit('addInstruction', { path: addKey, value: addValue });
|
|
4799
|
-
return dispatch('nextLine');
|
|
4800
|
-
case 'if':
|
|
4801
|
-
const newBranch = runConditionCommand(context, cmd);
|
|
4802
|
-
if (newBranch) {
|
|
4783
|
+
try {
|
|
4784
|
+
switch (cmd.commandType) {
|
|
4785
|
+
case 'jump':
|
|
4786
|
+
const branch = cmd.args[0];
|
|
4803
4787
|
const newStack = {
|
|
4804
|
-
branch:
|
|
4788
|
+
branch: state.machine.script[branch],
|
|
4789
|
+
label: branch,
|
|
4805
4790
|
currentIndex: 0,
|
|
4806
4791
|
};
|
|
4807
|
-
commit('
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4792
|
+
commit('setStack', newStack);
|
|
4793
|
+
await dispatch('runLine');
|
|
4794
|
+
break;
|
|
4795
|
+
case 'text':
|
|
4796
|
+
await textCommand(commit, {
|
|
4797
|
+
speaker: 'game',
|
|
4798
|
+
text: cmd.options.text,
|
|
4799
|
+
choices,
|
|
4800
|
+
interactive: true,
|
|
4801
|
+
});
|
|
4802
|
+
break;
|
|
4803
|
+
case 'set':
|
|
4804
|
+
const key = cmd.args[0];
|
|
4805
|
+
const value = cmd.args[1];
|
|
4806
|
+
commit('setData', { path: key, value });
|
|
4807
|
+
return dispatch('nextLine');
|
|
4808
|
+
case 'add':
|
|
4809
|
+
const addKey = cmd.args[0];
|
|
4810
|
+
const addValue = cmd.args[1];
|
|
4811
|
+
commit('addInstruction', { path: addKey, value: addValue });
|
|
4812
|
+
return dispatch('nextLine');
|
|
4813
|
+
case 'if':
|
|
4814
|
+
const newBranch = runConditionCommand(context, cmd);
|
|
4815
|
+
if (newBranch) {
|
|
4816
|
+
const newStack = {
|
|
4817
|
+
branch: newBranch,
|
|
4818
|
+
currentIndex: 0,
|
|
4819
|
+
};
|
|
4820
|
+
commit('addStack', newStack);
|
|
4821
|
+
return dispatch('runLine');
|
|
4822
|
+
}
|
|
4823
|
+
return dispatch('nextLine');
|
|
4824
|
+
case 'talk':
|
|
4825
|
+
await textCommand(commit, {
|
|
4826
|
+
speaker: cmd.args[0],
|
|
4827
|
+
pose: cmd.args[1],
|
|
4828
|
+
text: `"${cmd.args[2]}"`,
|
|
4829
|
+
choices,
|
|
4830
|
+
interactive: true,
|
|
4831
|
+
});
|
|
4832
|
+
break;
|
|
4833
|
+
case 'choice':
|
|
4834
|
+
await runChoice(context, cmd);
|
|
4835
|
+
break;
|
|
4836
|
+
case 'set_screen':
|
|
4837
|
+
commit('setScreen', cmd.options.screen);
|
|
4838
|
+
return dispatch('nextLine');
|
|
4839
|
+
case 'clear_dialog':
|
|
4840
|
+
commit('clearDialog');
|
|
4841
|
+
return dispatch('nextLine');
|
|
4842
|
+
case 'set_button':
|
|
4843
|
+
console.log(cmd.args);
|
|
4844
|
+
commit('changeButton', {
|
|
4845
|
+
button: cmd.args[0],
|
|
4846
|
+
enabled: cmd.args[1],
|
|
4847
|
+
});
|
|
4848
|
+
return dispatch('nextLine');
|
|
4849
|
+
case 'play':
|
|
4850
|
+
const options = cmd.options;
|
|
4851
|
+
if (options.mode === 'music') {
|
|
4852
|
+
changeMusic(context, options.audio);
|
|
4853
|
+
}
|
|
4854
|
+
else {
|
|
4855
|
+
playSound(context.commit, options.audio);
|
|
4856
|
+
}
|
|
4857
|
+
return dispatch('nextLine');
|
|
4858
|
+
case 'wait':
|
|
4859
|
+
await timeout(cmd.options.duration);
|
|
4860
|
+
return dispatch('nextLine');
|
|
4861
|
+
case 'add_level':
|
|
4862
|
+
const skillKey = cmd.args[0];
|
|
4863
|
+
const levelToAdd = cmd.args[1];
|
|
4864
|
+
if (!skillKey || !levelToAdd) {
|
|
4865
|
+
error(commit, `add_level command needs a skill id and a value as parameters`);
|
|
4866
|
+
}
|
|
4867
|
+
commit('incrementSkill', {
|
|
4868
|
+
skill: skillKey,
|
|
4869
|
+
amount: levelToAdd,
|
|
4870
|
+
});
|
|
4871
|
+
const skillName = getConfig().skills[skillKey].name;
|
|
4872
|
+
const skillLevel = state.skills[skillKey].level;
|
|
4873
|
+
dispatch('addNotification', `Your skill in ${skillName} is now level ${skillLevel}`);
|
|
4874
|
+
return dispatch('nextLine');
|
|
4875
|
+
case 'add_stat':
|
|
4876
|
+
const statKey = cmd.args[0];
|
|
4877
|
+
const amountToAdd = cmd.args[1];
|
|
4878
|
+
if (!statKey || !amountToAdd) {
|
|
4879
|
+
error(commit, `add_stat command needs a stat id and a value as parameters`);
|
|
4880
|
+
}
|
|
4881
|
+
commit('addStat', {
|
|
4882
|
+
stat: statKey,
|
|
4883
|
+
amount: amountToAdd,
|
|
4884
|
+
});
|
|
4885
|
+
return dispatch('nextLine');
|
|
4886
|
+
case 'set_stat':
|
|
4887
|
+
const setStatKey = cmd.args[0];
|
|
4888
|
+
const setAmount = cmd.args[1];
|
|
4889
|
+
if (!setStatKey || !setAmount) {
|
|
4890
|
+
error(commit, `set_stat command needs a stat id and a value as parameters`);
|
|
4891
|
+
}
|
|
4892
|
+
commit('setStat', {
|
|
4893
|
+
stat: setStatKey,
|
|
4894
|
+
amount: setAmount,
|
|
4895
|
+
});
|
|
4896
|
+
return dispatch('nextLine');
|
|
4897
|
+
case 'notify':
|
|
4898
|
+
const text = cmd.args[0];
|
|
4899
|
+
dispatch('addNotification', text);
|
|
4900
|
+
return dispatch('nextLine');
|
|
4901
|
+
default:
|
|
4902
|
+
break;
|
|
4903
|
+
}
|
|
4904
|
+
}
|
|
4905
|
+
catch (err) {
|
|
4906
|
+
console.log(state.machine.stack[state.machine.stack.length - 1].label);
|
|
4907
|
+
error(commit, `Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
|
|
4908
|
+
<b>${err}</b>
|
|
4909
|
+
Script: ${cmd.code}
|
|
4910
|
+
Label: ${state.machine.stack[state.machine.stack.length - 1].label}`);
|
|
4888
4911
|
}
|
|
4889
4912
|
}
|
|
4890
4913
|
async function playerAnswered(context, choiceIndex) {
|
|
@@ -5257,6 +5280,8 @@ function processRenpyCommands(ctx, lines, parentLine) {
|
|
|
5257
5280
|
code: line.code,
|
|
5258
5281
|
operator,
|
|
5259
5282
|
args,
|
|
5283
|
+
line: line.line,
|
|
5284
|
+
fileName: ctx.fileName,
|
|
5260
5285
|
};
|
|
5261
5286
|
branchContext.line = line;
|
|
5262
5287
|
branchContext.command = command;
|
|
@@ -5498,6 +5523,7 @@ function setupStore(options) {
|
|
|
5498
5523
|
{
|
|
5499
5524
|
currentIndex: 0,
|
|
5500
5525
|
branch,
|
|
5526
|
+
label,
|
|
5501
5527
|
},
|
|
5502
5528
|
];
|
|
5503
5529
|
this.dispatch('runLine');
|
|
@@ -5576,6 +5602,7 @@ function setupStore(options) {
|
|
|
5576
5602
|
state.machine.stack.push({
|
|
5577
5603
|
currentIndex: 0,
|
|
5578
5604
|
branch: script.main,
|
|
5605
|
+
label: 'main',
|
|
5579
5606
|
});
|
|
5580
5607
|
state.ready = true;
|
|
5581
5608
|
},
|
|
@@ -5610,6 +5637,10 @@ function setupStore(options) {
|
|
|
5610
5637
|
state.machine.stack.splice(state.machine.stack.length - 1);
|
|
5611
5638
|
},
|
|
5612
5639
|
addStack(state, newStack) {
|
|
5640
|
+
if (!newStack.label) {
|
|
5641
|
+
newStack.label =
|
|
5642
|
+
state.machine.stack[state.machine.stack.length - 1].label;
|
|
5643
|
+
}
|
|
5613
5644
|
state.machine.stack.push(newStack);
|
|
5614
5645
|
},
|
|
5615
5646
|
setStack(state, newStack) {
|
|
@@ -5698,7 +5729,7 @@ async function startApp(config, options) {
|
|
|
5698
5729
|
mousePos.x = e.clientX;
|
|
5699
5730
|
mousePos.y = e.clientY;
|
|
5700
5731
|
});
|
|
5701
|
-
console.log('%c Narrat game engine – 0.6.
|
|
5732
|
+
console.log('%c Narrat game engine – 0.6.3 - April 25, 2022 16:37:54', 'background: #222; color: #bada55');
|
|
5702
5733
|
const storeSetup = setupStore(options);
|
|
5703
5734
|
store$1 = storeSetup.store;
|
|
5704
5735
|
app = createApp(script$8, {
|
|
@@ -5797,6 +5828,7 @@ function mouseclick(e) {
|
|
|
5797
5828
|
const newStack = {
|
|
5798
5829
|
branch: store$1.state.machine.script[scriptToRun],
|
|
5799
5830
|
currentIndex: 0,
|
|
5831
|
+
label: scriptToRun,
|
|
5800
5832
|
};
|
|
5801
5833
|
store$1.commit('setStack', newStack);
|
|
5802
5834
|
store$1.dispatch('runLine');
|