ably-ui 4.5.0 → 5.0.0.dev.8fa23aa

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d09ee8f8796e44d622482646a875cf7fb254f826bc91c1a75e34790765a9003
4
- data.tar.gz: b10b98323ef77ee04454093abec157f846e52ea979c7f68998d5c9f35766adf9
3
+ metadata.gz: 5364994b03466ffeb18841501b2847c231791c3309c76fdca8aade04416e5cca
4
+ data.tar.gz: c4c775188ce4e538ed3054fa38aaff52ec8e5cf8544be445f556f637657ed6ae
5
5
  SHA512:
6
- metadata.gz: 832c80f2e5c416b1e441b480644f33ddcb4d0aed873a52cf1349494965de5828f94a1d1ff59a67a1e7147438a24f6c211fd506dde0d7170cf2ebe26ff428237b
7
- data.tar.gz: 4c44b03aed8c0463461fffcda4d0c6c71013a1724a2db088b2e36a346d6f8b363692e7737613d1e24c1772f6e4b1d1b2dba3543c4c4ca4595759437fc668cd57
6
+ metadata.gz: cb7fd9fd91882044dd385389993ab86e3b4fc615901a09aee69ce8654f85e0fc01d04fc4578b736d4036c81683cefe8f5efc139a5bc55982d0842b03509c8346
7
+ data.tar.gz: ed8c1eb360a98159d48937fe018d322aa9f3a775622e7bd49d9af92a8a25cb49c66616344a51d642cbb3fff16df9ec24089e92858d8ebdedcb1a57a0dc4a6965
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ably-ui (4.2.0.dev.f1eb220)
4
+ ably-ui (5.0.0)
5
5
  view_component (~> 2.33.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -34,8 +34,6 @@ Each module, apart from components, exposes a `scripts.js`, `styles.css` and `MO
34
34
 
35
35
  This type of installation gives you access to module/components assets as well as React components.
36
36
 
37
- Note, the package is currently hosted in our private GitHub registry, so you will need a `GITHUB_REGISTRY_TOKEN` environment variable in your shell to be able to install it. See [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for instructions on obtaining one.
38
-
39
37
  ```bash
40
38
  npm install @ably/ui
41
39
 
@@ -123,18 +121,9 @@ To use `ably-ui` with [Ruby on Rails](https://rubyonrails.org/) add the `ably-ui
123
121
  ```ruby
124
122
  gem 'ably-ui',
125
123
  '1.0.0',
126
- require: 'ably_ui',
127
- source: 'https://rubygems.pkg.github.com/ably'
128
- ```
129
-
130
- And then run:
131
-
132
- ```bash
133
- bundle config https://rubygems.pkg.github.com/ably USERNAME:TOKEN
124
+ require: 'ably_ui'
134
125
  ```
135
126
 
136
- Where `USERNAME` is your GitHub username (without the `@`) and TOKEN is your [GitHub access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token). This is required because the gem is downloaded from a private gem registry on GitHub.
137
-
138
127
  Components are exposed as [View Components](https://github.com/github/view_component) and should be available in any view:
139
128
 
140
129
  ```erb
@@ -268,13 +257,20 @@ Then change back `path` to source `source` in the `Gemfile`. If you need to upda
268
257
 
269
258
  Make sure you commit & push your work and remove the [development-specific config](#using-the-development-build-of-ably-ui-in-the-preview-app) before doing this.
270
259
 
271
- You will need to authenticate with the GitHub [NPM registry](https://docs.github.com/en/free-pro-team@latest/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages) and [gem registry](https://docs.github.com/en/free-pro-team@latest/packages/using-github-packages-with-your-projects-ecosystem/configuring-rubygems-for-use-with-github-packages#authenticating-with-a-personal-access-token) to publish.
260
+ You will need to authenticate with [npmjs](https://docs.npmjs.com/creating-and-viewing-access-tokens) and [Ruby Gems](https://guides.rubygems.org/api-key-scopes/) to publish.
272
261
 
273
262
  After the above, you should have:
274
263
 
275
- - GITHUB_REGISTRY_TOKEN set in your environment (`.npmrc` will read from it)
276
- - you should do registry login as described in the above docs with your GitHub username and password
277
- - a `~/.gem/credentials` file with a `:github: Bearer TOKEN` (replace GITHUB_REGISTRY_TOKEN with your token - interpolation does not work here)
264
+ - NPM_TOKEN set in your environment
265
+ - `.npmrc` file to read NPM_TOKEN from your environment like this:
266
+ ```
267
+ //registry.npmjs.org/:_authToken=${NPM_TOKEN}
268
+ ```
269
+ - a `~/.gem/credentials` file that has your Rubygems API key:
270
+ ```
271
+ ---
272
+ :rubygems_api_key: REPLACE_THIS_WITH_YOUR_OWN_API_KEY
273
+ ```
278
274
 
279
275
  To deploy a review app with your in-progress code, you can use the `pre-release` script:
280
276
 
@@ -389,7 +385,7 @@ This will trigger GitHub actions in supported apps (currently [Voltaire](http://
389
385
  **To trigger a release:**
390
386
 
391
387
  - Merge your PR into `main`.
392
- - On the Github [Ably-UI](http://github.com/ably/ui) repo, [create a new release](https://github.com/ably/ui/releases/new) tag.
388
+ - On the Github [Ably-UI](http://github.com/ably/ably-ui) repo, [create a new release](https://github.com/ably/ably-ui/releases/new) tag.
393
389
  - Create a new tag with the new version number for the release.
394
390
  - _Do not prefix the tag with a `v`_
395
391
  - Add a meaningful title for the Release.
@@ -0,0 +1 @@
1
+ @import "./styles/properties.css";
@@ -0,0 +1,49 @@
1
+ @import "./styles/buttons.css";
2
+ @import "./styles/layout.css";
3
+ @import "./styles/text.css";
4
+
5
+ @layer components {
6
+ .ui-input {
7
+ @apply text-p2 font-light bg-light-grey rounded p-input w-full leading-none appearance-none border border-mid-grey transition-input;
8
+ @apply hover:bg-white hover:shadow-input hover:border-transparent;
9
+ @apply focus:bg-white focus:shadow-input focus:border-transparent focus:outline-gui-focus;
10
+ @apply max-w-screen-sm;
11
+ }
12
+
13
+ /* Basis for icon component */
14
+ .ui-icon-cool-black {
15
+ stroke: var(--color-cool-black);
16
+ }
17
+
18
+ .ui-icon-white {
19
+ stroke: var(--color-white);
20
+ }
21
+
22
+ .ui-icon-dark-grey {
23
+ stroke: var(--color-dark-grey);
24
+ }
25
+
26
+ /* Extend how tailwind does group hover for icons */
27
+ .group {
28
+ &:hover {
29
+ .group-hover\:icon-gui-hover {
30
+ stroke: var(--color-gui-hover);
31
+ }
32
+ }
33
+
34
+ &:focus {
35
+ .group-focus\:icon-gui-focus {
36
+ stroke: var(--color-gui-focus);
37
+ }
38
+ }
39
+ }
40
+
41
+ .ui-version-tag {
42
+ @apply inline-block absolute align-top uppercase font-bold whitespace-nowrap;
43
+
44
+ position: relative;
45
+ vertical-align: super;
46
+ margin-left: 3px;
47
+ font-size: 8px;
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.AblyUi=e(require("react"),require("react-dom")):(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=e(t[void 0],t[void 0]))}(this,(function(t,e){return(()=>{var r={757:(t,e,r)=>{t.exports=r(666)},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?y:p,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=y,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",p="suspendedYield",h="executing",y="completed",d={};function v(){}function b(){}function g(){}var w={};w[i]=function(){return this};var m=Object.getPrototypeOf,O=m&&m(m(N([])));O&&O!==r&&n.call(O,i)&&(w=O);var x=g.prototype=v.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return b.prototype=x.constructor=g,g.constructor=b,b.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(E.prototype),E.prototype[a]=function(){return this},t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},281:e=>{"use strict";e.exports=t},645:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{attachStoreToWindow:()=>y,connectState:()=>v,createRemoteDataStore:()=>b,fetchBlogPosts:()=>P,fetchSessionData:()=>D,getRemoteDataStore:()=>d,loadSprites:()=>c,queryId:()=>C,queryIdAll:()=>q,reactRenderer:()=>a,reducerBlogPosts:()=>A,reducerSessionData:()=>T,selectRecentBlogPosts:()=>L,selectSessionData:()=>U}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(r,n){return Array.isArray(n)?r.push.apply(r,t.call(n,e-1)):r.push(n),r}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var t=o(281),e=o.n(t),r=o(645),n=o.n(r);function a(t){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var o=r.getAttribute("data-react"),i=t[o];if(i){var a=r.getAttribute("data-react-props"),c=a&&JSON.parse(a||{});n().render(e().createElement(i,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}}))}const c=function(t){fetch(t).then((function(t){return t.text()})).then((function(t){var e=document.createElement("div");e.style.display="none",e.innerHTML=t,document.body.appendChild(e)})).catch((function(t){return console.error(t)}))};function u(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var f="function"==typeof Symbol&&Symbol.observable||"@@observable",s=function(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function p(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function h(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(u(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(u(1));return r(h)(t,e)}if("function"!=typeof t)throw new Error(u(2));var o=t,i=e,a=[],c=a,s=!1;function y(){c===a&&(c=a.slice())}function d(){if(s)throw new Error(u(3));return i}function v(t){if("function"!=typeof t)throw new Error(u(4));if(s)throw new Error(u(5));var e=!0;return y(),c.push(t),function(){if(e){if(s)throw new Error(u(6));e=!1,y();var r=c.indexOf(t);c.splice(r,1),a=null}}}function b(t){if(!p(t))throw new Error(u(7));if(void 0===t.type)throw new Error(u(8));if(s)throw new Error(u(9));try{s=!0,i=o(i,t)}finally{s=!1}for(var e=a=c,r=0;r<e.length;r++)(0,e[r])();return t}function g(t){if("function"!=typeof t)throw new Error(u(10));o=t,b({type:l.REPLACE})}function w(){var t,e=v;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(u(11));function r(){t.next&&t.next(d())}return r(),{unsubscribe:e(r)}}})[f]=function(){return this},t}return b({type:l.INIT}),(n={dispatch:b,subscribe:v,getState:d,replaceReducer:g})[f]=w,n}var y=function(t){window.AblyUi=window.AblyUi||{},window.AblyUi.RemoteDataStore=t},d=function(){if(!window.AblyUi.RemoteDataStore)throw new Error("Remote store was called before one was created");return window.AblyUi.RemoteDataStore},v=function(t,e){var r=d(),n=t(r);r.subscribe((function(){var o=t(r);o!==n&&(n=o,e(o))}))},b=function(t){return h(function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:l.INIT}))throw new Error(u(12));if(void 0===r(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error(u(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},c=0;c<a.length;c++){var f=a[c],s=r[f],l=t[f],p=s(l,e);if(void 0===p)throw e&&e.type,new Error(u(14));o[f]=p,n=n||p!==l}return(n=n||a.length!==Object.keys(t).length)?o:t}}(t))},g=o(757),w=o.n(g),m=function(t){return t&&t.includes("application/json")};function O(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function E(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var P=function(){var t,e=(t=w().mark((function t(e,r){var n,o;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return console.warn('Skipping fetching blog posts, invalid blogUrl: "'.concat(r,'"')),t.abrupt("return");case 4:return t.next=6,fetch(r);case 6:if(n=t.sent,!m(n.headers.get("content-type"))){t.next=14;break}return t.next=10,n.json();case 10:o=t.sent,e.dispatch({type:"blog/loaded",payload:o}),t.next=15;break;case 14:throw new Error("Blog posts url is not serving json");case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.warn("Could not fetch blog posts due to error:",t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){E(i,n,o,a,c,"next",t)}function c(t){E(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),S={recent:null},A=j({},"blogPosts",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"blog/loaded":return x(x({},t),{},{recent:e.payload});default:return t}})),L=function(t){var e;return null===(e=t.getState().blogPosts)||void 0===e?void 0:e.recent};function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function k(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function R(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var D=function(){var t,e=(t=w().mark((function t(e,r){var n,o,i;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.dispatch({type:"session/loaded",payload:t})},t.prev=1,r){t.next=6;break}return console.warn('Skipping fetching session, invalid sessionUrl: "'.concat(r,'"')),n(),t.abrupt("return");case 6:return t.next=8,fetch(r,{cache:"no-cache"});case 8:if(o=t.sent,m(o.headers.get("content-type"))){t.next=12;break}throw new Error("Session endpoint is not serving json");case 12:return t.next=14,o.json();case 14:"not-found"===(i=t.sent).error?n():n(i),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(1),n(),console.warn("Could not fetch session data due to error:",t.t0);case 22:case"end":return t.stop()}}),t,null,[[1,18]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,c,"next",t)}function c(t){R(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),I={data:null},T=_({},"session",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"session/loaded":return k(k({},t),{},{data:e.payload});default:return t}})),U=function(t){var e;return null===(e=t.getState().session)||void 0===e?void 0:e.data},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},q=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))}})(),i})()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],e):"object"==typeof exports?exports.AblyUi=e(require("react"),require("react-dom")):(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=e(t[void 0],t[void 0]))}(this,(function(t,e){return(()=>{var r={757:(t,e,r)=>{t.exports=r(666)},666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?y:p,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=y,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",p="suspendedYield",h="executing",y="completed",d={};function v(){}function b(){}function g(){}var w={};w[i]=function(){return this};var m=Object.getPrototypeOf,O=m&&m(m(N([])));O&&O!==r&&n.call(O,i)&&(w=O);var x=g.prototype=v.prototype=Object.create(w);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function N(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:k}}function k(){return{value:e,done:!0}}return b.prototype=x.constructor=g,g.constructor=b,b.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},j(E.prototype),E.prototype[a]=function(){return this},t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(x),u(x,c,"Generator"),x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=N,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),f=n.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},281:e=>{"use strict";e.exports=t},645:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{attachStoreToWindow:()=>d,connectState:()=>b,createRemoteDataStore:()=>g,fetchBlogPosts:()=>S,fetchSessionData:()=>I,getRemoteDataStore:()=>v,loadSprites:()=>u,queryId:()=>q,queryIdAll:()=>G,reactRenderer:()=>c,reducerBlogPosts:()=>L,reducerSessionData:()=>U,renderComponent:()=>a,selectRecentBlogPosts:()=>N,selectSessionData:()=>C}),Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(r,n){return Array.isArray(n)?r.push.apply(r,t.call(n,e-1)):r.push(n),r}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});var t=o(281),e=o.n(t),r=o(645),n=o.n(r),a=function(t,r,o){return n().render(e().createElement(t,r),o)};function c(t){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var o=r.getAttribute("data-react"),i=t[o];if(i){var a=r.getAttribute("data-react-props"),c=a&&JSON.parse(a||{});n().render(e().createElement(i,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}}))}const u=function(t){fetch(t).then((function(t){return t.text()})).then((function(t){var e=document.createElement("div");e.style.display="none",e.innerHTML=t,document.body.appendChild(e)})).catch((function(t){return console.error(t)}))};function f(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var s="function"==typeof Symbol&&Symbol.observable||"@@observable",l=function(){return Math.random().toString(36).substring(7).split("").join(".")},p={INIT:"@@redux/INIT"+l(),REPLACE:"@@redux/REPLACE"+l(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+l()}};function h(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function y(t,e,r){var n;if("function"==typeof e&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(f(0));if("function"==typeof e&&void 0===r&&(r=e,e=void 0),void 0!==r){if("function"!=typeof r)throw new Error(f(1));return r(y)(t,e)}if("function"!=typeof t)throw new Error(f(2));var o=t,i=e,a=[],c=a,u=!1;function l(){c===a&&(c=a.slice())}function d(){if(u)throw new Error(f(3));return i}function v(t){if("function"!=typeof t)throw new Error(f(4));if(u)throw new Error(f(5));var e=!0;return l(),c.push(t),function(){if(e){if(u)throw new Error(f(6));e=!1,l();var r=c.indexOf(t);c.splice(r,1),a=null}}}function b(t){if(!h(t))throw new Error(f(7));if(void 0===t.type)throw new Error(f(8));if(u)throw new Error(f(9));try{u=!0,i=o(i,t)}finally{u=!1}for(var e=a=c,r=0;r<e.length;r++)(0,e[r])();return t}function g(t){if("function"!=typeof t)throw new Error(f(10));o=t,b({type:p.REPLACE})}function w(){var t,e=v;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(f(11));function r(){t.next&&t.next(d())}return r(),{unsubscribe:e(r)}}})[s]=function(){return this},t}return b({type:p.INIT}),(n={dispatch:b,subscribe:v,getState:d,replaceReducer:g})[s]=w,n}var d=function(t){window.AblyUi=window.AblyUi||{},window.AblyUi.RemoteDataStore=t},v=function(){if(!window.AblyUi.RemoteDataStore)throw new Error("Remote store was called before one was created");return window.AblyUi.RemoteDataStore},b=function(t,e){var r=v(),n=t(r);r.subscribe((function(){var o=t(r);o!==n&&(n=o,e(o))}))},g=function(t){return y(function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(r[o]=t[o])}var i,a=Object.keys(r);try{!function(t){Object.keys(t).forEach((function(e){var r=t[e];if(void 0===r(void 0,{type:p.INIT}))throw new Error(f(12));if(void 0===r(void 0,{type:p.PROBE_UNKNOWN_ACTION()}))throw new Error(f(13))}))}(r)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var n=!1,o={},c=0;c<a.length;c++){var u=a[c],s=r[u],l=t[u],p=s(l,e);if(void 0===p)throw e&&e.type,new Error(f(14));o[u]=p,n=n||p!==l}return(n=n||a.length!==Object.keys(t).length)?o:t}}(t))},w=o(757),m=o.n(w),O=function(t){return t&&t.includes("application/json")};function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function j(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){E(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var S=function(){var t,e=(t=m().mark((function t(e,r){var n,o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,r){t.next=4;break}return console.warn('Skipping fetching blog posts, invalid blogUrl: "'.concat(r,'"')),t.abrupt("return");case 4:return t.next=6,fetch(r);case 6:if(n=t.sent,!O(n.headers.get("content-type"))){t.next=14;break}return t.next=10,n.json();case 10:o=t.sent,e.dispatch({type:"blog/loaded",payload:o}),t.next=15;break;case 14:throw new Error("Blog posts url is not serving json");case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(0),console.warn("Could not fetch blog posts due to error:",t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){P(i,n,o,a,c,"next",t)}function c(t){P(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),A={recent:null},L=E({},"blogPosts",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"blog/loaded":return j(j({},t),{},{recent:e.payload});default:return t}})),N=function(t){var e;return null===(e=t.getState().blogPosts)||void 0===e?void 0:e.recent};function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){R(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function R(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var I=function(){var t,e=(t=m().mark((function t(e,r){var n,o,i;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.dispatch({type:"session/loaded",payload:t})},t.prev=1,r){t.next=6;break}return console.warn('Skipping fetching session, invalid sessionUrl: "'.concat(r,'"')),n(),t.abrupt("return");case 6:return t.next=8,fetch(r,{cache:"no-cache"});case 8:if(o=t.sent,O(o.headers.get("content-type"))){t.next=12;break}throw new Error("Session endpoint is not serving json");case 12:return t.next=14,o.json();case 14:"not-found"===(i=t.sent).error?n():n(i),t.next=22;break;case 18:t.prev=18,t.t0=t.catch(1),n(),console.warn("Could not fetch session data due to error:",t.t0);case 22:case"end":return t.stop()}}),t,null,[[1,18]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,c,"next",t)}function c(t){D(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}(),T={data:null},U=R({},"session",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"session/loaded":return _(_({},t),{},{data:e.payload});default:return t}})),C=function(t){var e;return null===(e=t.getState().session)||void 0===e?void 0:e.data},q=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},G=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))}})(),i})()}));
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Slider=e())}(this,(function(){return(()=>{var t={3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,a=parseInt,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,d=f||l||Function("return this")(),s=Object.prototype.toString,v=Math.max,p=Math.min,y=function(){return d.Date.now()};function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function h(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==s.call(t)}(t))return NaN;if(b(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=u.test(t);return n||c.test(t)?a(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,u,c,a,f,l=0,d=!1,s=!1,g=!0;if("function"!=typeof t)throw new TypeError(r);function m(e){var n=i,r=o;return i=o=void 0,l=e,c=t.apply(r,n)}function x(t){return l=t,a=setTimeout(j,e),d?m(t):c}function w(t){var n=t-f;return void 0===f||n>=e||n<0||s&&t-l>=u}function j(){var t=y();if(w(t))return T(t);a=setTimeout(j,function(t){var n=e-(t-f);return s?p(n,u-(t-l)):n}(t))}function T(t){return a=void 0,g&&i?m(t):(i=o=void 0,c)}function E(){var t=y(),n=w(t);if(i=arguments,o=this,f=t,n){if(void 0===a)return x(f);if(s)return a=setTimeout(j,e),m(f)}return void 0===a&&(a=setTimeout(j,e)),c}return e=h(e)||0,b(n)&&(d=!!n.leading,u=(s="maxWait"in n)?v(h(n.maxWait)||0,e):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=f=o=a=void 0},E.flush=function(){return void 0===a?c:T(y())},E}(t,e,{leading:i,maxWait:e,trailing:o})}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";n.d(r,{default:()=>c});var t=n(3096),e=n.n(t),i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))},u=function(t){var e=i("slider-strip",t),n=Array.from(o("slider-slide",t)),r=i("slider-previous",t),u=i("slider-next",t),c=Array.from(o("slider-marker",t)),a=i("slider-controls",t);a.classList.remove("hidden");var f=n.length,l=t.getBoundingClientRect().width,d=n[0].getBoundingClientRect(),s=d.width,v=d.left,p=n[1].getBoundingClientRect().left-v-s,y=(l-s)/2,b=0,h=0,g=function(t){return e.style.transform="translateX(".concat(function(t){return t*-s+y+t*-p}(t),"px)")},m=function(t){c.forEach((function(t){return t.classList.remove("text-active-orange")})),c[t].classList.remove("text-cool-black"),c[t].classList.add("text-active-orange")},x=function(){g(b=b-1<=0?0:b-1),m(b)},w=function(){g(b=b+1>=f?b:b+1),m(b)};return g(0),m(0),r.addEventListener("click",x),e.addEventListener("touchstart",(function(t){var e;h=null===(e=t.touches[0])||void 0===e?void 0:e.clientX})),e.addEventListener("touchend",(function(t){var e,n=(null===(e=t.changedTouches[0])||void 0===e?void 0:e.clientX)-h;Math.abs(n)<20||(n>0?x:w)()})),u.addEventListener("click",w),function(){e.style.transform=null,a.classList.add("hidden")}};const c=function(t){var n=t.container,r=t.mqEnableThreshold;if(n){var i=r||function(){return!window.matchMedia("(min-width: 600px)").matches},o=function(){};i()&&(o=u(n)),window.addEventListener("resize",e()((function(){i()?o=u(n):o()}),100))}}})(),r.default})()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AblyUi=e():(t.AblyUi=t.AblyUi||{},t.AblyUi.Core=t.AblyUi.Core||{},t.AblyUi.Core.Slider=e())}(this,(function(){return(()=>{var t={3096:(t,e,n)=>{var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,a=parseInt,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,s=f||l||Function("return this")(),d=Object.prototype.toString,v=Math.max,p=Math.min,y=function(){return s.Date.now()};function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function h(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(b(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=b(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=u.test(t);return n||c.test(t)?a(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return b(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),function(t,e,n){var i,o,u,c,a,f,l=0,s=!1,d=!1,g=!0;if("function"!=typeof t)throw new TypeError(r);function m(e){var n=i,r=o;return i=o=void 0,l=e,c=t.apply(r,n)}function x(t){return l=t,a=setTimeout(j,e),s?m(t):c}function w(t){var n=t-f;return void 0===f||n>=e||n<0||d&&t-l>=u}function j(){var t=y();if(w(t))return T(t);a=setTimeout(j,function(t){var n=e-(t-f);return d?p(n,u-(t-l)):n}(t))}function T(t){return a=void 0,g&&i?m(t):(i=o=void 0,c)}function E(){var t=y(),n=w(t);if(i=arguments,o=this,f=t,n){if(void 0===a)return x(f);if(d)return a=setTimeout(j,e),m(f)}return void 0===a&&(a=setTimeout(j,e)),c}return e=h(e)||0,b(n)&&(s=!!n.leading,u=(d="maxWait"in n)?v(h(n.maxWait)||0,e):u,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=f=o=a=void 0},E.flush=function(){return void 0===a?c:T(y())},E}(t,e,{leading:i,maxWait:e,trailing:o})}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";n.d(r,{default:()=>c});var t=n(3096),e=n.n(t),i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector("[data-id=".concat(t,"]"))},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelectorAll("[data-id=".concat(t,"]"))},u=function(t){var e=i("slider-strip",t),n=Array.from(o("slider-slide",t)),r=i("slider-previous",t),u=i("slider-next",t),c=Array.from(o("slider-marker",t)),a=i("slider-controls",t);a.classList.replace("hidden","flex");var f=n.length,l=t.getBoundingClientRect().width,s=n[0].getBoundingClientRect(),d=s.width,v=s.left,p=n[1].getBoundingClientRect().left-v-d,y=(l-d)/2,b=0,h=0,g=function(t){return e.style.transform="translateX(".concat(function(t){return t*-d+y+t*-p}(t),"px)")},m=function(t){c.forEach((function(t){return t.classList.remove("text-active-orange")})),c[t].classList.remove("text-cool-black"),c[t].classList.add("text-active-orange")},x=function(){g(b=b-1<=0?0:b-1),m(b)},w=function(){g(b=b+1>=f?b:b+1),m(b)};return g(0),m(0),r.addEventListener("click",x),e.addEventListener("touchstart",(function(t){var e;h=null===(e=t.touches[0])||void 0===e?void 0:e.clientX})),e.addEventListener("touchend",(function(t){var e,n=(null===(e=t.changedTouches[0])||void 0===e?void 0:e.clientX)-h;Math.abs(n)<20||(n>0?x:w)()})),u.addEventListener("click",w),function(){e.style.transform=null,a.classList("flex","hidden")}};const c=function(t){var n=t.container,r=t.mqEnableThreshold;if(n){var i=r||function(){return!window.matchMedia("(min-width: 600px)").matches},o=function(){};i()&&(o=u(n)),window.addEventListener("resize",e()((function(){i()?o=u(n):o()}),100))}}})(),r.default})()}));
@@ -5,7 +5,7 @@
5
5
  <% end %>
6
6
  <% end %>
7
7
 
8
- <div class="flex justify-center items-center my-24 hidden" data-id="slider-controls">
8
+ <div class="hidden justify-center items-center my-24" data-id="slider-controls">
9
9
  <button type="button" class="p-0 group w-24 h-24 flex items-center focus:outline-gui-focus" data-id="slider-previous">
10
10
  <%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "transform rotate-180")) %>
11
11
  </button>
@@ -0,0 +1 @@
1
+ @import "./styles/properties.css";
@@ -0,0 +1,49 @@
1
+ @import "./styles/buttons.css";
2
+ @import "./styles/layout.css";
3
+ @import "./styles/text.css";
4
+
5
+ @layer components {
6
+ .ui-input {
7
+ @apply text-p2 font-light bg-light-grey rounded p-input w-full leading-none appearance-none border border-mid-grey transition-input;
8
+ @apply hover:bg-white hover:shadow-input hover:border-transparent;
9
+ @apply focus:bg-white focus:shadow-input focus:border-transparent focus:outline-gui-focus;
10
+ @apply max-w-screen-sm;
11
+ }
12
+
13
+ /* Basis for icon component */
14
+ .ui-icon-cool-black {
15
+ stroke: var(--color-cool-black);
16
+ }
17
+
18
+ .ui-icon-white {
19
+ stroke: var(--color-white);
20
+ }
21
+
22
+ .ui-icon-dark-grey {
23
+ stroke: var(--color-dark-grey);
24
+ }
25
+
26
+ /* Extend how tailwind does group hover for icons */
27
+ .group {
28
+ &:hover {
29
+ .group-hover\:icon-gui-hover {
30
+ stroke: var(--color-gui-hover);
31
+ }
32
+ }
33
+
34
+ &:focus {
35
+ .group-focus\:icon-gui-focus {
36
+ stroke: var(--color-gui-focus);
37
+ }
38
+ }
39
+ }
40
+
41
+ .ui-version-tag {
42
+ @apply inline-block absolute align-top uppercase font-bold whitespace-nowrap;
43
+
44
+ position: relative;
45
+ vertical-align: super;
46
+ margin-left: 3px;
47
+ font-size: 8px;
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.React=e.AblyUi.React||{},e.AblyUi.React.ConnectStateWrapper=t())}(this,(function(){return{}.default}));
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],t):"object"==typeof exports?exports.AblyUi=t(require("react"),require("react-dom")):(e.AblyUi=e.AblyUi||{},e.AblyUi.React=t(e[void 0],e[void 0]))}(this,(function(e,t){return(()=>{"use strict";var r={281:t=>{t.exports=e},645:e=>{e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{a.r(n),a.d(n,{reactRenderer:()=>i});var e=a(281),t=a.n(e),r=a(645),o=a.n(r);function i(e){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var a=r.getAttribute("data-react"),n=e[a];if(!n)throw new Error('Found a data-react attribute with "'.concat(a,'" but no matching component.'));var i=r.getAttribute("data-react-props"),c=i&&JSON.parse(i||{});o().render(t().createElement(n,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}))}})(),n})()}));
@@ -1,3 +1,3 @@
1
1
  module AblyUi
2
- VERSION = '4.5.0'
2
+ VERSION = '5.0.0.dev.8fa23aa'
3
3
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 5.0.0.dev.8fa23aa
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Piatek
8
8
  - Arti Mathanda
9
9
  - Bruce Thomas
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-10-25 00:00:00.000000000 Z
13
+ date: 2021-11-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: view_component
@@ -26,7 +26,7 @@ dependencies:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  version: 2.33.0
29
- description:
29
+ description:
30
30
  email:
31
31
  - dominik.piatek@ably.com
32
32
  - arti.mathanda@ably.com
@@ -52,6 +52,8 @@ files:
52
52
  - lib/ably_ui/core/contact_footer/contact_footer.rb
53
53
  - lib/ably_ui/core/cookie_message/component.css
54
54
  - lib/ably_ui/core/cookie_message/component.js
55
+ - lib/ably_ui/core/core.base.css
56
+ - lib/ably_ui/core/core.components.css
55
57
  - lib/ably_ui/core/core.rb
56
58
  - lib/ably_ui/core/feature_footer/component.css
57
59
  - lib/ably_ui/core/feature_footer/component.js
@@ -84,6 +86,7 @@ files:
84
86
  - lib/ably_ui/core/footer/component.js
85
87
  - lib/ably_ui/core/footer/footer.html.erb
86
88
  - lib/ably_ui/core/footer/footer.rb
89
+ - lib/ably_ui/core/icon/component.css
87
90
  - lib/ably_ui/core/icon/component.js
88
91
  - lib/ably_ui/core/icon/icon.html.erb
89
92
  - lib/ably_ui/core/icon/icon.rb
@@ -174,11 +177,15 @@ files:
174
177
  - lib/ably_ui/core/slider/slider.html.erb
175
178
  - lib/ably_ui/core/slider/slider.rb
176
179
  - lib/ably_ui/core/sprites.svg
180
+ - lib/ably_ui/core/styles.base.css
181
+ - lib/ably_ui/core/styles.components.css
177
182
  - lib/ably_ui/core/styles.css
178
183
  - lib/ably_ui/core/uptime/component.css
179
184
  - lib/ably_ui/core/uptime/component.js
180
185
  - lib/ably_ui/core/uptime/uptime.html.erb
181
186
  - lib/ably_ui/core/uptime/uptime.rb
187
+ - lib/ably_ui/react/connect_state_wrapper/component.js
188
+ - lib/ably_ui/react/scripts.js
182
189
  - lib/ably_ui/reset/scripts.js
183
190
  - lib/ably_ui/reset/styles.css
184
191
  - lib/ably_ui/version.rb
@@ -187,7 +194,7 @@ licenses:
187
194
  - Apache-2.0
188
195
  metadata:
189
196
  source_code_uri: https://github.com/ably/ably-ui
190
- post_install_message:
197
+ post_install_message:
191
198
  rdoc_options: []
192
199
  require_paths:
193
200
  - lib
@@ -198,12 +205,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
205
  version: '0'
199
206
  required_rubygems_version: !ruby/object:Gem::Requirement
200
207
  requirements:
201
- - - ">="
208
+ - - ">"
202
209
  - !ruby/object:Gem::Version
203
- version: '0'
210
+ version: 1.3.1
204
211
  requirements: []
205
212
  rubygems_version: 3.2.3
206
- signing_key:
213
+ signing_key:
207
214
  specification_version: 4
208
215
  summary: Shared component library and design system for Ably Real-time Ltd (ably.com)
209
216
  test_files: []