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/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Version: 0.6.0 - September 1, 2021 16:10:49
1
+ // Version: 0.6.3 - April 25, 2022 16:37:54
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -34,7 +34,7 @@ function styleInject(css, ref) {
34
34
  }
35
35
  }
36
36
 
37
- 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";
37
+ 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";
38
38
  styleInject(css_248z);
39
39
 
40
40
  const f=vue.ref([]),v=vue.ref(null),m=vue.ref(null),g=vue.ref(null),h=vue.reactive({current:""}),y=[],b=vue.ref(!1),k=vue.readonly(f),w=vue.readonly(v),M=vue.readonly(m),q=vue.readonly(g),x=vue.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;}};
@@ -253,8 +253,9 @@ function parserError(commit, ctx, line, text) {
253
253
  error(commit, errorText);
254
254
  }
255
255
  function error(commit, text) {
256
- commit('createError', `❌ ${text}`);
257
256
  console.error(text);
257
+ text = text.replace(/[\r\n]/g, `\n<br />`);
258
+ commit('createError', `❌ ${text}`);
258
259
  }
259
260
 
260
261
  let config$1;
@@ -376,7 +377,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
376
377
  }))
377
378
  }
378
379
 
379
- 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\n";
380
+ 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";
380
381
  styleInject(css_248z$3);
381
382
 
382
383
  script$2.render = render$2;
@@ -4160,20 +4161,18 @@ async function loadAudioAssets(config) {
4160
4161
  console.log(`Loading audio`);
4161
4162
  const loadingPromises = [];
4162
4163
  for (const key in config.sound) {
4163
- const path = config.sound[key].path;
4164
- loadingPromises.push(loadAudio(key, path, audio.sound));
4164
+ loadingPromises.push(loadAudio(key, { loop: true, html5: true, ...config.sound[key] }, audio.sound));
4165
4165
  }
4166
4166
  for (const key in config.music) {
4167
- const path = config.music[key].path;
4168
- loadingPromises.push(loadAudio(key, path, audio.music));
4167
+ loadingPromises.push(loadAudio(key, config.music[key], audio.music));
4169
4168
  }
4170
4169
  return Promise.all(loadingPromises);
4171
4170
  }
4172
- async function loadAudio(key, path, dest) {
4171
+ async function loadAudio(key, config, dest) {
4173
4172
  return new Promise((resolve, reject) => {
4174
- console.log(`Loading audio ${path}`);
4173
+ console.log(`Loading audio ${config.src}`);
4175
4174
  const sound = new howler.Howl({
4176
- src: [path],
4175
+ ...config,
4177
4176
  });
4178
4177
  sound.load();
4179
4178
  dest[key] = sound;
@@ -4275,9 +4274,11 @@ function debounce(func, waitMilliseconds = 50, options = {}) {
4275
4274
 
4276
4275
  console.log('hello app');
4277
4276
  var script$8 = vue.defineComponent({
4277
+ $refs: {
4278
+ dialogContainer: HTMLInputElement,
4279
+ },
4278
4280
  inject: ['mq'],
4279
4281
  components: {
4280
- VolumeControls: script$4,
4281
4282
  DialogBox: script,
4282
4283
  DialogPicture: script$1,
4283
4284
  DebugMenu: script$3,
@@ -4326,10 +4327,22 @@ var script$8 = vue.defineComponent({
4326
4327
  this.updateScreenSize();
4327
4328
  }, 5000);
4328
4329
  },
4330
+ watch: {
4331
+ dialogLength(newCount, oldCount) {
4332
+ if (this.$refs.dialog) {
4333
+ const dialog = this.$refs.dialog;
4334
+ console.log('hello dialog');
4335
+ dialog.scrollTop = dialog.scrollHeight + 100000;
4336
+ }
4337
+ },
4338
+ },
4329
4339
  computed: {
4330
4340
  dialog() {
4331
4341
  return this.$store.state.dialog;
4332
4342
  },
4343
+ dialogLength() {
4344
+ return this.dialog.length;
4345
+ },
4333
4346
  lastDialog() {
4334
4347
  if (this.dialog.length > 0) {
4335
4348
  return this.dialog[this.dialog.length - 1];
@@ -4410,7 +4423,6 @@ var script$8 = vue.defineComponent({
4410
4423
  if (this.layoutMode === 'horizontal') ;
4411
4424
  return {
4412
4425
  // position: 'absolute',
4413
- backgroundColor: 'green',
4414
4426
  width: this.layoutMode === 'horizontal' ? `${this.dialogWidth}px` : '100%',
4415
4427
  height,
4416
4428
  // right: 0,
@@ -4543,11 +4555,12 @@ var script$8 = vue.defineComponent({
4543
4555
  });
4544
4556
 
4545
4557
  const _hoisted_1$7 = ["width", "height"];
4546
- const _hoisted_2$6 = {
4558
+ const _hoisted_2$6 = /*#__PURE__*/vue.createElementVNode("div", { class: "anchor" }, null, -1);
4559
+ const _hoisted_3$4 = {
4547
4560
  key: 1,
4548
4561
  class: "flex flex-col"
4549
4562
  };
4550
- const _hoisted_3$4 = { key: 2 };
4563
+ const _hoisted_4$3 = { key: 2 };
4551
4564
 
4552
4565
  function render$8(_ctx, _cache, $props, $setup, $data, $options) {
4553
4566
  const _component_Hud = vue.resolveComponent("Hud");
@@ -4596,34 +4609,32 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
4596
4609
  ? (vue.openBlock(), vue.createElementBlock("div", {
4597
4610
  key: 1,
4598
4611
  class: "dialog override",
4612
+ ref: "dialog",
4599
4613
  style: vue.normalizeStyle(_ctx.dialogStyle)
4600
4614
  }, [
4601
- vue.createElementVNode("div", {
4602
- class: "dialog-container override",
4615
+ vue.createVNode(vue.TransitionGroup, {
4616
+ name: "list",
4617
+ tag: "div",
4618
+ class: "dialog-container w-full override",
4603
4619
  style: vue.normalizeStyle(_ctx.dialogContainerStyle)
4604
- }, [
4605
- vue.createVNode(vue.TransitionGroup, {
4606
- name: "list",
4607
- tag: "div",
4608
- class: "w-full"
4609
- }, {
4610
- default: vue.withCtx(() => [
4611
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.dialog, (dialog, i) => {
4612
- return (vue.openBlock(), vue.createBlock(_component_DialogBox, {
4613
- key: i,
4614
- options: _ctx.getDialogBoxOptions(dialog, i),
4615
- active: _ctx.isDialogActive(i)
4616
- }, null, 8, ["options", "active"]))
4617
- }), 128))
4618
- ]),
4619
- _: 1
4620
- })
4621
- ], 4)
4620
+ }, {
4621
+ default: vue.withCtx(() => [
4622
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.dialog, (dialog, i) => {
4623
+ return (vue.openBlock(), vue.createBlock(_component_DialogBox, {
4624
+ key: i,
4625
+ options: _ctx.getDialogBoxOptions(dialog, i),
4626
+ active: _ctx.isDialogActive(i)
4627
+ }, null, 8, ["options", "active"]))
4628
+ }), 128))
4629
+ ]),
4630
+ _: 1
4631
+ }, 8, ["style"]),
4632
+ _hoisted_2$6
4622
4633
  ], 4))
4623
4634
  : vue.createCommentVNode("", true)
4624
4635
  ], 4))
4625
4636
  : (_ctx.gameLoaded)
4626
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
4637
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [
4627
4638
  vue.createElementVNode("button", {
4628
4639
  class: "button menu-button start-button override",
4629
4640
  onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.startGame && _ctx.startGame(...args)))
@@ -4636,7 +4647,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
4636
4647
  }, " Continue Game "))
4637
4648
  : vue.createCommentVNode("", true)
4638
4649
  ]))
4639
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [
4650
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [
4640
4651
  vue.createVNode(_component_LoadingBar, {
4641
4652
  percentage: _ctx.loadingPercentage,
4642
4653
  step: _ctx.loadingStep
@@ -4649,7 +4660,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
4649
4660
  ], 4))
4650
4661
  }
4651
4662
 
4652
- 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 overflow-y: auto;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: center;\n}\n\n.dialog {\n overflow-y: auto;\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n\n.background {\n margin: 0;\n}\n\n#background-canvas {\n width: 100%;\n height: 100%;\n}\n";
4663
+ 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";
4653
4664
  styleInject(css_248z$9);
4654
4665
 
4655
4666
  script$8.render = render$8;
@@ -4773,122 +4784,134 @@ async function runLine(context) {
4773
4784
  }
4774
4785
  async function runCommand(context, cmd, choices) {
4775
4786
  const { state, commit, dispatch } = context;
4776
- switch (cmd.commandType) {
4777
- case 'jump':
4778
- const branch = cmd.args[0];
4779
- const newStack = {
4780
- branch: state.machine.script[branch],
4781
- currentIndex: 0,
4782
- };
4783
- commit('setStack', newStack);
4784
- await dispatch('runLine');
4785
- break;
4786
- case 'text':
4787
- await textCommand(commit, {
4788
- speaker: 'game',
4789
- text: cmd.options.text,
4790
- choices,
4791
- interactive: true,
4792
- });
4793
- break;
4794
- case 'set':
4795
- const key = cmd.args[0];
4796
- const value = cmd.args[1];
4797
- commit('setData', { path: key, value });
4798
- return dispatch('nextLine');
4799
- case 'add':
4800
- const addKey = cmd.args[0];
4801
- const addValue = cmd.args[1];
4802
- commit('addInstruction', { path: addKey, value: addValue });
4803
- return dispatch('nextLine');
4804
- case 'if':
4805
- const newBranch = runConditionCommand(context, cmd);
4806
- if (newBranch) {
4787
+ try {
4788
+ switch (cmd.commandType) {
4789
+ case 'jump':
4790
+ const branch = cmd.args[0];
4807
4791
  const newStack = {
4808
- branch: newBranch,
4792
+ branch: state.machine.script[branch],
4793
+ label: branch,
4809
4794
  currentIndex: 0,
4810
4795
  };
4811
- commit('addStack', newStack);
4812
- return dispatch('runLine');
4813
- }
4814
- return dispatch('nextLine');
4815
- case 'talk':
4816
- await textCommand(commit, {
4817
- speaker: cmd.args[0],
4818
- pose: cmd.args[1],
4819
- text: `"${cmd.args[2]}"`,
4820
- choices,
4821
- interactive: true,
4822
- });
4823
- break;
4824
- case 'choice':
4825
- await runChoice(context, cmd);
4826
- break;
4827
- case 'set_screen':
4828
- commit('setScreen', cmd.options.screen);
4829
- return dispatch('nextLine');
4830
- case 'clear_dialog':
4831
- commit('clearDialog');
4832
- return dispatch('nextLine');
4833
- case 'set_button':
4834
- console.log(cmd.args);
4835
- commit('changeButton', {
4836
- button: cmd.args[0],
4837
- enabled: cmd.args[1],
4838
- });
4839
- return dispatch('nextLine');
4840
- case 'play':
4841
- const options = cmd.options;
4842
- if (options.mode === 'music') {
4843
- changeMusic(context, options.audio);
4844
- }
4845
- else {
4846
- playSound(context.commit, options.audio);
4847
- }
4848
- return dispatch('nextLine');
4849
- case 'wait':
4850
- await timeout(cmd.options.duration);
4851
- return dispatch('nextLine');
4852
- case 'add_level':
4853
- const skillKey = cmd.args[0];
4854
- const levelToAdd = cmd.args[1];
4855
- if (!skillKey || !levelToAdd) {
4856
- error(commit, `add_level command needs a skill id and a value as parameters`);
4857
- }
4858
- commit('incrementSkill', {
4859
- skill: skillKey,
4860
- amount: levelToAdd,
4861
- });
4862
- const skillName = getConfig().skills[skillKey].name;
4863
- const skillLevel = state.skills[skillKey].level;
4864
- dispatch('addNotification', `Your skill in ${skillName} is now level ${skillLevel}`);
4865
- return dispatch('nextLine');
4866
- case 'add_stat':
4867
- const statKey = cmd.args[0];
4868
- const amountToAdd = cmd.args[1];
4869
- if (!statKey || !amountToAdd) {
4870
- error(commit, `add_stat command needs a stat id and a value as parameters`);
4871
- }
4872
- commit('addStat', {
4873
- stat: statKey,
4874
- amount: amountToAdd,
4875
- });
4876
- return dispatch('nextLine');
4877
- case 'set_stat':
4878
- const setStatKey = cmd.args[0];
4879
- const setAmount = cmd.args[1];
4880
- if (!statKey || !amountToAdd) {
4881
- error(commit, `set_stat command needs a stat id and a value as parameters`);
4882
- }
4883
- commit('setStat', {
4884
- stat: setStatKey,
4885
- amount: setAmount,
4886
- });
4887
- return dispatch('nextLine');
4888
- case 'notify':
4889
- const text = cmd.args[0];
4890
- dispatch('addNotification', text);
4891
- return dispatch('nextLine');
4796
+ commit('setStack', newStack);
4797
+ await dispatch('runLine');
4798
+ break;
4799
+ case 'text':
4800
+ await textCommand(commit, {
4801
+ speaker: 'game',
4802
+ text: cmd.options.text,
4803
+ choices,
4804
+ interactive: true,
4805
+ });
4806
+ break;
4807
+ case 'set':
4808
+ const key = cmd.args[0];
4809
+ const value = cmd.args[1];
4810
+ commit('setData', { path: key, value });
4811
+ return dispatch('nextLine');
4812
+ case 'add':
4813
+ const addKey = cmd.args[0];
4814
+ const addValue = cmd.args[1];
4815
+ commit('addInstruction', { path: addKey, value: addValue });
4816
+ return dispatch('nextLine');
4817
+ case 'if':
4818
+ const newBranch = runConditionCommand(context, cmd);
4819
+ if (newBranch) {
4820
+ const newStack = {
4821
+ branch: newBranch,
4822
+ currentIndex: 0,
4823
+ };
4824
+ commit('addStack', newStack);
4825
+ return dispatch('runLine');
4826
+ }
4827
+ return dispatch('nextLine');
4828
+ case 'talk':
4829
+ await textCommand(commit, {
4830
+ speaker: cmd.args[0],
4831
+ pose: cmd.args[1],
4832
+ text: `"${cmd.args[2]}"`,
4833
+ choices,
4834
+ interactive: true,
4835
+ });
4836
+ break;
4837
+ case 'choice':
4838
+ await runChoice(context, cmd);
4839
+ break;
4840
+ case 'set_screen':
4841
+ commit('setScreen', cmd.options.screen);
4842
+ return dispatch('nextLine');
4843
+ case 'clear_dialog':
4844
+ commit('clearDialog');
4845
+ return dispatch('nextLine');
4846
+ case 'set_button':
4847
+ console.log(cmd.args);
4848
+ commit('changeButton', {
4849
+ button: cmd.args[0],
4850
+ enabled: cmd.args[1],
4851
+ });
4852
+ return dispatch('nextLine');
4853
+ case 'play':
4854
+ const options = cmd.options;
4855
+ if (options.mode === 'music') {
4856
+ changeMusic(context, options.audio);
4857
+ }
4858
+ else {
4859
+ playSound(context.commit, options.audio);
4860
+ }
4861
+ return dispatch('nextLine');
4862
+ case 'wait':
4863
+ await timeout(cmd.options.duration);
4864
+ return dispatch('nextLine');
4865
+ case 'add_level':
4866
+ const skillKey = cmd.args[0];
4867
+ const levelToAdd = cmd.args[1];
4868
+ if (!skillKey || !levelToAdd) {
4869
+ error(commit, `add_level command needs a skill id and a value as parameters`);
4870
+ }
4871
+ commit('incrementSkill', {
4872
+ skill: skillKey,
4873
+ amount: levelToAdd,
4874
+ });
4875
+ const skillName = getConfig().skills[skillKey].name;
4876
+ const skillLevel = state.skills[skillKey].level;
4877
+ dispatch('addNotification', `Your skill in ${skillName} is now level ${skillLevel}`);
4878
+ return dispatch('nextLine');
4879
+ case 'add_stat':
4880
+ const statKey = cmd.args[0];
4881
+ const amountToAdd = cmd.args[1];
4882
+ if (!statKey || !amountToAdd) {
4883
+ error(commit, `add_stat command needs a stat id and a value as parameters`);
4884
+ }
4885
+ commit('addStat', {
4886
+ stat: statKey,
4887
+ amount: amountToAdd,
4888
+ });
4889
+ return dispatch('nextLine');
4890
+ case 'set_stat':
4891
+ const setStatKey = cmd.args[0];
4892
+ const setAmount = cmd.args[1];
4893
+ if (!setStatKey || !setAmount) {
4894
+ error(commit, `set_stat command needs a stat id and a value as parameters`);
4895
+ }
4896
+ commit('setStat', {
4897
+ stat: setStatKey,
4898
+ amount: setAmount,
4899
+ });
4900
+ return dispatch('nextLine');
4901
+ case 'notify':
4902
+ const text = cmd.args[0];
4903
+ dispatch('addNotification', text);
4904
+ return dispatch('nextLine');
4905
+ default:
4906
+ break;
4907
+ }
4908
+ }
4909
+ catch (err) {
4910
+ console.log(state.machine.stack[state.machine.stack.length - 1].label);
4911
+ error(commit, `Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
4912
+ <b>${err}</b>
4913
+ Script: ${cmd.code}
4914
+ Label: ${state.machine.stack[state.machine.stack.length - 1].label}`);
4892
4915
  }
4893
4916
  }
4894
4917
  async function playerAnswered(context, choiceIndex) {
@@ -5261,6 +5284,8 @@ function processRenpyCommands(ctx, lines, parentLine) {
5261
5284
  code: line.code,
5262
5285
  operator,
5263
5286
  args,
5287
+ line: line.line,
5288
+ fileName: ctx.fileName,
5264
5289
  };
5265
5290
  branchContext.line = line;
5266
5291
  branchContext.command = command;
@@ -5502,6 +5527,7 @@ function setupStore(options) {
5502
5527
  {
5503
5528
  currentIndex: 0,
5504
5529
  branch,
5530
+ label,
5505
5531
  },
5506
5532
  ];
5507
5533
  this.dispatch('runLine');
@@ -5580,6 +5606,7 @@ function setupStore(options) {
5580
5606
  state.machine.stack.push({
5581
5607
  currentIndex: 0,
5582
5608
  branch: script.main,
5609
+ label: 'main',
5583
5610
  });
5584
5611
  state.ready = true;
5585
5612
  },
@@ -5614,6 +5641,10 @@ function setupStore(options) {
5614
5641
  state.machine.stack.splice(state.machine.stack.length - 1);
5615
5642
  },
5616
5643
  addStack(state, newStack) {
5644
+ if (!newStack.label) {
5645
+ newStack.label =
5646
+ state.machine.stack[state.machine.stack.length - 1].label;
5647
+ }
5617
5648
  state.machine.stack.push(newStack);
5618
5649
  },
5619
5650
  setStack(state, newStack) {
@@ -5702,7 +5733,7 @@ async function startApp(config, options) {
5702
5733
  mousePos.x = e.clientX;
5703
5734
  mousePos.y = e.clientY;
5704
5735
  });
5705
- console.log('%c Narrat game engine – 0.6.0 - September 1, 2021 16:10:49', 'background: #222; color: #bada55');
5736
+ console.log('%c Narrat game engine – 0.6.3 - April 25, 2022 16:37:54', 'background: #222; color: #bada55');
5706
5737
  const storeSetup = setupStore(options);
5707
5738
  store$1 = storeSetup.store;
5708
5739
  app = vue.createApp(script$8, {
@@ -5801,6 +5832,7 @@ function mouseclick(e) {
5801
5832
  const newStack = {
5802
5833
  branch: store$1.state.machine.script[scriptToRun],
5803
5834
  currentIndex: 0,
5835
+ label: scriptToRun,
5804
5836
  };
5805
5837
  store$1.commit('setStack', newStack);
5806
5838
  store$1.dispatch('runLine');
package/lib/store.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { InjectionKey, State } from 'vue';
2
2
  import { Store } from 'vuex';
3
+ import { MachineStack } from './types/vuex';
3
4
  import { AppOptions } from '.';
4
5
  export interface SetupStoreResult {
5
6
  store: Store<State>;
6
7
  key: InjectionKey<Store<State>>;
7
8
  }
9
+ export declare type AddStackOptions = Partial<MachineStack>;
8
10
  export declare function setupStore(options: AppOptions): SetupStoreResult;
9
11
  export declare function useStore(): Store<State>;
@@ -1,4 +1,4 @@
1
- import { Config } from '@/types/config';
1
+ import { Config, MusicConfig, SoundConfig } from '@/types/config';
2
2
  import { Howl } from 'howler';
3
3
  import { State } from 'vue';
4
4
  import { ActionContext, Commit } from 'vuex';
@@ -11,7 +11,7 @@ export declare const audio: {
11
11
  };
12
12
  };
13
13
  export declare function loadAudioAssets(config: Config): Promise<void[]>;
14
- export declare function loadAudio(key: string, path: string, dest: {
14
+ export declare function loadAudio(key: string, config: SoundConfig | MusicConfig, dest: {
15
15
  [key: string]: Howl;
16
16
  }): Promise<void>;
17
17
  export declare function changeMusic(ctx: ActionContext<State, State>, newMusic: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narrat",
3
- "version": "0.6.0",
3
+ "version": "0.6.3",
4
4
  "description": "narrat narrative engine",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",