@octax-app/hot-date-react 0.0.1 → 0.0.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.
@@ -78,7 +78,7 @@ function y(e) {
78
78
  return /^\d+$/.test(t) ? Number(t) : l[t] ?? null;
79
79
  }
80
80
  //#endregion
81
- //#region node_modules/@js-temporal/polyfill/dist/index.esm.js
81
+ //#region node_modules/.pnpm/@js-temporal+polyfill@0.4.4/node_modules/@js-temporal/polyfill/dist/index.esm.js
82
82
  var b = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
83
83
  (function(n, r) {
84
84
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n ||= self, n.JSBI = r());
@@ -8773,9 +8773,11 @@ function zc(e, t, n) {
8773
8773
  }
8774
8774
  //#endregion
8775
8775
  //#region src/hot-date.ts
8776
- var Bc = "type anything...", Vc = "\n :host { display: block; font: inherit; color: inherit; }\n .field { position: relative; display: block; width: 100%; }\n .input {\n font: inherit; color: inherit;\n width: 100%; box-sizing: border-box;\n border: 1px solid #cccccc50; border-radius: 4px;\n padding: 5px 4px;\n background: Field;\n }\n .ghost {\n position: absolute; inset: 0; display: flex; align-items: center;\n pointer-events: none; font: inherit;\n white-space: pre; overflow: hidden;\n }\n .ghost-completion { min-width: 0; overflow: hidden; white-space: pre; }\n .ghost-typed { color: transparent; }\n .ghost-tail { opacity: 0.5; }\n .ghost-hint {\n flex-shrink: 0; margin-left: 6px;\n padding: 0.05em 0.35em; border: 1px solid currentColor; border-radius: 3px;\n font-size: 0.7em; font-family: inherit; opacity: 0.5; background: transparent;\n }\n .ghost-hint[hidden] { display: none; }\n .ghost-resolution { opacity: 0.5; flex: 0 0 auto; margin-left: auto; }\n ::slotted([slot=\"ambiguity\"][hidden]) { display: none; }\n", Hc = document.createElement("template");
8777
- Hc.innerHTML = "\n <div class=\"field\">\n <input class=\"input\" part=\"input\" type=\"text\" autocomplete=\"off\" spellcheck=\"false\" />\n <div class=\"ghost\" part=\"ghost\" aria-live=\"polite\"><span class=\"ghost-completion\"><span class=\"ghost-typed\" aria-hidden=\"true\"></span><span class=\"ghost-tail\"></span></span><span class=\"ghost-resolution\"></span><kbd class=\"ghost-hint\" part=\"hint\" hidden>Tab</kbd></div>\n </div>\n <slot name=\"ambiguity\"></slot>\n";
8778
- var Uc = class extends HTMLElement {
8776
+ var Bc = "type anything...", Vc = "\n :host { display: block; font: inherit; color: inherit; }\n .field { position: relative; display: block; width: 100%; }\n .input {\n font: inherit; color: inherit;\n width: 100%; box-sizing: border-box;\n border: 1px solid #cccccc50; border-radius: 4px;\n padding: 5px 4px;\n background: Field;\n }\n .ghost {\n position: absolute; inset: 0; display: flex; align-items: center;\n pointer-events: none; font: inherit;\n white-space: pre; overflow: hidden;\n }\n .ghost-completion { min-width: 0; overflow: hidden; white-space: pre; }\n .ghost-typed { color: transparent; }\n .ghost-tail { opacity: 0.5; }\n .ghost-hint {\n flex-shrink: 0; margin-left: 6px;\n padding: 0.05em 0.35em; border: 1px solid currentColor; border-radius: 3px;\n font-size: 0.7em; font-family: inherit; opacity: 0.5; background: transparent;\n }\n .ghost-hint[hidden] { display: none; }\n .ghost-resolution { opacity: 0.5; flex: 0 0 auto; margin-left: auto; }\n ::slotted([slot=\"ambiguity\"][hidden]) { display: none; }\n", Hc = "\n <div class=\"field\">\n <input class=\"input\" part=\"input\" type=\"text\" autocomplete=\"off\" spellcheck=\"false\" />\n <div class=\"ghost\" part=\"ghost\" aria-live=\"polite\"><span class=\"ghost-completion\"><span class=\"ghost-typed\" aria-hidden=\"true\"></span><span class=\"ghost-tail\"></span></span><span class=\"ghost-resolution\"></span><kbd class=\"ghost-hint\" part=\"hint\" hidden>Tab</kbd></div>\n </div>\n <slot name=\"ambiguity\"></slot>\n", Uc = null;
8777
+ function Wc() {
8778
+ return Uc || (Uc = document.createElement("template"), Uc.innerHTML = Hc), Uc;
8779
+ }
8780
+ var Gc = class extends HTMLElement {
8779
8781
  static formAssociated = !0;
8780
8782
  static get observedAttributes() {
8781
8783
  return [
@@ -8817,7 +8819,7 @@ var Uc = class extends HTMLElement {
8817
8819
  activeSuggestionIndexValue = 0;
8818
8820
  lastTabCompletedTo = null;
8819
8821
  constructor() {
8820
- super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.append(Hc.content.cloneNode(!0));
8822
+ super(), this.attachShadow({ mode: "open" }), this.shadowRoot?.append(Wc().content.cloneNode(!0));
8821
8823
  let e = this.shadowRoot;
8822
8824
  if (!e) throw Error("Unable to create shadow root.");
8823
8825
  this.inputElement = e.querySelector("input") ?? document.createElement("input"), this.ghostElement = e.querySelector(".ghost") ?? document.createElement("div"), this.ghostTypedElement = e.querySelector(".ghost-typed") ?? document.createElement("span"), this.ghostTailElement = e.querySelector(".ghost-tail") ?? document.createElement("span"), this.ghostHintElement = e.querySelector(".ghost-hint") ?? document.createElement("kbd"), this.ghostResolutionElement = e.querySelector(".ghost-resolution") ?? document.createElement("span"), this.ambiguityElement = document.createElement("div"), this.ambiguityElement.setAttribute("slot", "ambiguity"), this.ambiguityElement.hidden = !0, this.internals = typeof this.attachInternals == "function" ? this.attachInternals() : null, this.bindEvents();
@@ -9178,6 +9180,6 @@ var Uc = class extends HTMLElement {
9178
9180
  }));
9179
9181
  }
9180
9182
  };
9181
- customElements.get("hot-date") || customElements.define("hot-date", Uc);
9183
+ customElements.get("hot-date") || customElements.define("hot-date", Gc);
9182
9184
  //#endregion
9183
- export { Uc as t };
9185
+ export { Gc as t };
package/dist/hot-date.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./hot-date-CdRySQgv.js";
1
+ import { t as e } from "./hot-date-CE4exKZT.js";
2
2
  export { e as HotDateElement };
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@octax-app/hot-date-react",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "React wrapper for the hot-date natural language date input web component.",
5
5
  "type": "module",
6
- "main": "./dist/hot-date.js",
7
- "module": "./dist/hot-date.js",
8
- "types": "./dist/hot-date.d.ts",
6
+ "main": "./dist/hot-date-react.js",
7
+ "module": "./dist/hot-date-react.js",
8
+ "types": "./dist/react/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./dist/hot-date.d.ts",
12
- "import": "./dist/hot-date.js"
13
- },
14
- "./react": {
15
11
  "types": "./dist/react/index.d.ts",
16
12
  "import": "./dist/hot-date-react.js"
13
+ },
14
+ "./element": {
15
+ "types": "./dist/hot-date.d.ts",
16
+ "import": "./dist/hot-date.js"
17
17
  }
18
18
  },
19
19
  "files": [