@nsail/stack 0.1.977 → 0.1.984

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/dist/form.js CHANGED
@@ -13,6 +13,7 @@ export function useForm(message, initial) {
13
13
  const [submitting, setSubmitting] = useState(false);
14
14
  const [saved, setSaved] = useState(false);
15
15
  const sending = useRef(false);
16
+ // Bumped in the handlers below, never inside a state updater, which StrictMode runs twice.
16
17
  const edits = useRef(0);
17
18
  const set = useCallback((name, next) => {
18
19
  setValue((current) => ({ ...current, [name]: next }));
@@ -50,7 +51,6 @@ export function useForm(message, initial) {
50
51
  return false;
51
52
  }
52
53
  sending.current = true;
53
- // Counted in the handler, not in a state updater, which StrictMode runs twice.
54
54
  const sentAt = edits.current;
55
55
  setSubmitting(true);
56
56
  setSaved(false);
package/dist/strings.js CHANGED
@@ -7,7 +7,7 @@ import mudEs from "./catalogs/strings.es.json";
7
7
  // renderer draws it.
8
8
  const stackCatalogs = { en: mudBase, es: { ...mudBase, ...mudEs } };
9
9
  export function stackStrings(language) {
10
- return stackCatalogs[language] ?? stackCatalogs.en;
10
+ return stackCatalogs[language] ?? stackCatalogs[language.split("-")[0].toLowerCase()] ?? stackCatalogs.en;
11
11
  }
12
12
  const token = /{([A-Za-z0-9_]+)}/g;
13
13
  function fill(text, args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsail/stack",
3
- "version": "0.1.977",
3
+ "version": "0.1.984",
4
4
  "description": "NSail's vendor-free client half: sends messages from the descriptors an Sdk generates, speaks the catalog, and holds the hooks a page reads with.",
5
5
  "license": "MIT",
6
6
  "repository": {