smoothly 1.0.0-alpha.12 → 1.0.0-alpha.14

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.
@@ -19,6 +19,13 @@ class ClientIdentifier {
19
19
  }
20
20
  }
21
21
 
22
+ class StateBase {
23
+ constructor(...parameters) {
24
+ this.listenable = new Listenable.Listenable();
25
+ this.client = parameters.length == 1 ? parameters[0] : undefined;
26
+ }
27
+ }
28
+
22
29
  exports.App = index.App;
23
30
  Object.defineProperty(exports, 'Cosmetic', {
24
31
  enumerable: true,
@@ -38,5 +45,6 @@ Object.defineProperty(exports, 'GoogleFont', {
38
45
  }
39
46
  });
40
47
  exports.ClientIdentifier = ClientIdentifier;
48
+ exports.StateBase = StateBase;
41
49
 
42
50
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"file":"index.cjs.js","mappings":";;;;;;;;;MAEsB,gBAAgB;EAErC,iBAAwB;EAExB,WAAW,KAAK;IACf,gBAAgB,CAAC,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAA;IACnF,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE;MACjC,gBAAgB,CAAC,UAAU,GAAGA,qBAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;MACrD,YAAY,CAAC,OAAO,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAA;KACrE;IACD,OAAO,gBAAgB,CAAC,UAAU,CAAA;GAClC;;;;;;;;;;;;;;;;;;;;;;;","names":["Identifier"],"sources":["./src/model/ClientIdentifier.ts"],"sourcesContent":["import { Identifier } from \"authly\"\n\nexport abstract class ClientIdentifier {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate constructor() {}\n\tprivate static valueCache?: string\n\tstatic get value(): string {\n\t\tClientIdentifier.valueCache = localStorage.getItem(\"clientIdentifier\") || undefined\n\t\tif (!ClientIdentifier.valueCache) {\n\t\t\tClientIdentifier.valueCache = Identifier.generate(12)\n\t\t\tlocalStorage.setItem(\"clientIdentifier\", ClientIdentifier.valueCache)\n\t\t}\n\t\treturn ClientIdentifier.valueCache\n\t}\n}\n"],"version":3}
1
+ {"file":"index.cjs.js","mappings":";;;;;;;;;MAEsB,gBAAgB;EAErC,iBAAwB;EAExB,WAAW,KAAK;IACf,gBAAgB,CAAC,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAA;IACnF,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE;MACjC,gBAAgB,CAAC,UAAU,GAAGA,qBAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;MACrD,YAAY,CAAC,OAAO,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAA;KACrE;IACD,OAAO,gBAAgB,CAAC,UAAU,CAAA;GAClC;;;MCXoB,SAAS;EAI9B,YAAsB,GAAG,UAAkD;IAH3D,eAAU,GAAG,IAAIC,qBAAU,EAAuB,CAAA;IAIjE,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAI,SAAe,CAAA;GACvE;;;;;;;;;;;;;;;;;;;;;;;;","names":["Identifier","Listenable"],"sources":["./src/model/ClientIdentifier.ts","./src/model/StateBase.ts"],"sourcesContent":["import { Identifier } from \"authly\"\n\nexport abstract class ClientIdentifier {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate constructor() {}\n\tprivate static valueCache?: string\n\tstatic get value(): string {\n\t\tClientIdentifier.valueCache = localStorage.getItem(\"clientIdentifier\") || undefined\n\t\tif (!ClientIdentifier.valueCache) {\n\t\t\tClientIdentifier.valueCache = Identifier.generate(12)\n\t\t\tlocalStorage.setItem(\"clientIdentifier\", ClientIdentifier.valueCache)\n\t\t}\n\t\treturn ClientIdentifier.valueCache\n\t}\n}\n","import { HasListenable, Listenable, WithListenable } from \"./Listenable\"\n\nexport abstract class StateBase<T extends StateBase<any, any>, C = undefined> implements HasListenable<T> {\n\tpublic readonly listenable = new Listenable() as WithListenable<T>\n\tprotected readonly client: C\n\t// 2 different signatures depending on if C i set to a type.\n\tprotected constructor(...parameters: C extends undefined ? [] : [client: C]) {\n\t\tthis.client = parameters.length == 1 ? parameters[0] : (undefined as C)\n\t}\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  export { App, redirect } from "./components/App";
2
- export { ClientIdentifier, GoogleFont, Message, Notice, Trigger, Listenable, } from "./model";
2
+ export { ClientIdentifier, GoogleFont, Message, Notice, Trigger, Listenable, StateBase, } from "./model";
3
3
  export { Cosmetic } from "./utilities";
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAEN,gBAAgB,EAGhB,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,EAEP,UAAU,GACV,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA","sourcesContent":["export { Components, JSX } from \"./components\"\nexport { App, redirect } from \"./components/App\"\nexport {\n\tAutocomplete,\n\tClientIdentifier,\n\tColor,\n\tFill,\n\tGoogleFont,\n\tMessage,\n\tNotice,\n\tTrigger,\n\tOption,\n\tListenable,\n} from \"./model\"\nexport { Cosmetic } from \"./utilities\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAEN,gBAAgB,EAGhB,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,EAEP,UAAU,EAIV,SAAS,GACT,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA","sourcesContent":["export { Components, JSX } from \"./components\"\nexport { App, redirect } from \"./components/App\"\nexport {\n\tAutocomplete,\n\tClientIdentifier,\n\tColor,\n\tFill,\n\tGoogleFont,\n\tMessage,\n\tNotice,\n\tTrigger,\n\tOption,\n\tListenable,\n\tHasListenable,\n\tWithListenable,\n\tCanBeListenable,\n\tStateBase,\n} from \"./model\"\nexport { Cosmetic } from \"./utilities\"\n"]}
@@ -4,4 +4,5 @@ export { Message } from "./Message";
4
4
  export { Notice } from "./Notice";
5
5
  export { Trigger } from "./Trigger";
6
6
  export { Listenable } from "./Listenable";
7
+ export { StateBase } from "./StateBase";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA","sourcesContent":["export { Autocomplete } from \"./Autocomplete\"\nexport { ClientIdentifier } from \"./ClientIdentifier\"\nexport { Color } from \"./Color\"\nexport { Fill } from \"./Fill\"\nexport { GoogleFont } from \"./GoogleFont\"\nexport { Message } from \"./Message\"\nexport { Notice } from \"./Notice\"\nexport { Option } from \"./Option\"\nexport { Trigger } from \"./Trigger\"\nexport { Listenable } from \"./Listenable\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAkD,MAAM,cAAc,CAAA;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA","sourcesContent":["export { Autocomplete } from \"./Autocomplete\"\nexport { ClientIdentifier } from \"./ClientIdentifier\"\nexport { Color } from \"./Color\"\nexport { Fill } from \"./Fill\"\nexport { GoogleFont } from \"./GoogleFont\"\nexport { Message } from \"./Message\"\nexport { Notice } from \"./Notice\"\nexport { Option } from \"./Option\"\nexport { Trigger } from \"./Trigger\"\nexport { Listenable, HasListenable, WithListenable, CanBeListenable } from \"./Listenable\"\nexport { StateBase } from \"./StateBase\"\n"]}
@@ -1278,6 +1278,13 @@ class Listenable {
1278
1278
  }
1279
1279
  _Listenable_listeners = new WeakMap();
1280
1280
 
1281
+ class StateBase {
1282
+ constructor(...parameters) {
1283
+ this.listenable = new Listenable();
1284
+ this.client = parameters.length == 1 ? parameters[0] : undefined;
1285
+ }
1286
+ }
1287
+
1281
1288
  var Hex;
1282
1289
  (function (Hex) {
1283
1290
  function is(value) {
@@ -54102,6 +54109,6 @@ const defineCustomElements = (opts) => {
54102
54109
  }
54103
54110
  };
54104
54111
 
54105
- export { App, ClientIdentifier, Cosmetic, GoogleFont, Listenable, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyAddress, SmoothlyAddressDisplay, SmoothlyAddresses, SmoothlyApp, SmoothlyAppDemo, SmoothlyBacktotop, SmoothlyButton, SmoothlyButtonDemo, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyColor, SmoothlyCountry, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFilter, SmoothlyFilterInput, SmoothlyForm, SmoothlyFrame, SmoothlyGoogleFont, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioButton, SmoothlyRadioButtonItem, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySkeleton, SmoothlySpinner, SmoothlySubmit, SmoothlySummary, SmoothlySvg, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableDemoFiltered, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyToggle, SmoothlyToggleSwitch, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, Trigger, defineCustomElements, redirect };
54112
+ export { App, ClientIdentifier, Cosmetic, GoogleFont, Listenable, Message, Notice, SmoothlyAccordion, SmoothlyAccordionItem, SmoothlyAddress, SmoothlyAddressDisplay, SmoothlyAddresses, SmoothlyApp, SmoothlyAppDemo, SmoothlyBacktotop, SmoothlyButton, SmoothlyButtonDemo, SmoothlyCalendar, SmoothlyCheckbox, SmoothlyColor, SmoothlyCountry, SmoothlyDialog, SmoothlyDialogDemo, SmoothlyDisplay, SmoothlyDisplayAmount, SmoothlyDisplayDateTime, SmoothlyDisplayDemo, SmoothlyFilter, SmoothlyFilterInput, SmoothlyForm, SmoothlyFrame, SmoothlyGoogleFont, SmoothlyIcon, SmoothlyIconDemo, SmoothlyInput, SmoothlyInputDate, SmoothlyInputDateRange, SmoothlyInputDemo, SmoothlyInputMonth, SmoothlyItem, SmoothlyMenuOptions, SmoothlyNotification, SmoothlyNotifier, SmoothlyOption, SmoothlyPicker, SmoothlyPopup, SmoothlyQuiet, SmoothlyRadio, SmoothlyRadioButton, SmoothlyRadioButtonItem, SmoothlyRadioGroup, SmoothlyReorder, SmoothlyRoom, SmoothlySelect, SmoothlySelectDemo, SmoothlySelector, SmoothlySkeleton, SmoothlySpinner, SmoothlySubmit, SmoothlySummary, SmoothlySvg, SmoothlyTab, SmoothlyTabSwitch, SmoothlyTable, SmoothlyTableCell, SmoothlyTableDemo, SmoothlyTableDemoFiltered, SmoothlyTableExpandableCell, SmoothlyTableExpandableRow, SmoothlyTableHeader, SmoothlyTableRow, SmoothlyToggle, SmoothlyToggleSwitch, SmoothlyTrigger, SmoothlyTriggerSink, SmoothlyTriggerSource, SmoothlyTuple, SmoothlyUrlencoded, StateBase, Trigger, defineCustomElements, redirect };
54106
54113
 
54107
54114
  //# sourceMappingURL=index.js.map