@godxjp/ui 33.8.1 → 33.9.1

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.
@@ -1676,6 +1676,65 @@ export declare const COMPONENT_PROP_REGISTRY: {
1676
1676
  readonly reason: "Per-locale validation messages keyed by BCP-47 tag; marks each locale's tab and sends the ACTIVE one through FormField. `error` (one message) cannot say which locale failed.";
1677
1677
  }];
1678
1678
  };
1679
+ readonly TranslatableLocaleProp: {
1680
+ readonly group: "data-entry";
1681
+ readonly file: "components/data-entry.prop.ts";
1682
+ readonly vocabulary: readonly ["ValueProp", "DefaultValueProp", "OnValueChangeProp", {
1683
+ readonly field: "locales";
1684
+ readonly local: true;
1685
+ readonly reason: "The BCP-47 tags a translatable control edits, in tab order (gh#1336). A per-field list, not a value.";
1686
+ }, {
1687
+ readonly field: "defaultLocale";
1688
+ readonly local: true;
1689
+ readonly reason: "The locale tab selected first — the AppProvider's `defaultLocale`, scoped to one field.";
1690
+ }, {
1691
+ readonly field: "fallbackLocale";
1692
+ readonly local: true;
1693
+ readonly reason: "The locale whose text an EMPTY locale shows as its placeholder — the AppProvider's `fallbackLocale`, scoped to one field.";
1694
+ }, {
1695
+ readonly field: "errors";
1696
+ readonly local: true;
1697
+ readonly reason: "Per-locale validation messages keyed by BCP-47 tag; `error` (one message) cannot say which locale failed.";
1698
+ }];
1699
+ };
1700
+ readonly TranslatableFieldControlProp: {
1701
+ readonly group: "data-entry";
1702
+ readonly file: "components/data-entry.prop.ts";
1703
+ readonly vocabulary: readonly ["ValueProp", "OnValueChangeProp", "PlaceholderProp", {
1704
+ readonly field: "lang";
1705
+ readonly local: true;
1706
+ readonly reason: "The active locale's BCP-47 tag, handed to the control as its HTML `lang` attribute.";
1707
+ }];
1708
+ };
1709
+ readonly TranslatableFieldProp: {
1710
+ readonly group: "data-entry";
1711
+ readonly file: "components/data-entry.prop.ts";
1712
+ readonly vocabulary: readonly ["ValueProp", "DefaultValueProp", "OnValueChangeProp", "SizeProp", "PlaceholderProp", "IdProp", "ClassNameProp", {
1713
+ readonly field: "locales";
1714
+ readonly local: true;
1715
+ readonly reason: "The BCP-47 tags the field edits, in tab order (gh#1336). Defaults to the app's content / registered locales; a per-field list, not a value.";
1716
+ }, {
1717
+ readonly field: "defaultLocale";
1718
+ readonly local: true;
1719
+ readonly reason: "The locale tab selected first — the AppProvider's own `defaultLocale` spelling, scoped to one field.";
1720
+ }, {
1721
+ readonly field: "fallbackLocale";
1722
+ readonly local: true;
1723
+ readonly reason: "The locale whose text an EMPTY locale shows as its placeholder — the AppProvider's own `fallbackLocale` spelling, scoped to one field.";
1724
+ }, {
1725
+ readonly field: "errors";
1726
+ readonly local: true;
1727
+ readonly reason: "Per-locale validation messages keyed by BCP-47 tag; marks each locale's tab and sends the ACTIVE one through FormField.";
1728
+ }, {
1729
+ readonly field: "renderControl";
1730
+ readonly local: true;
1731
+ readonly reason: "The one control in the panel, rendered from the active locale's props (gh#1365) — the engine is shared by TranslatableInput, TranslatableTextarea and @godxjp/block-editor's TranslatableRichText. `render*` as in renderPreview / renderEmbed.";
1732
+ }, {
1733
+ readonly field: "toPlaceholder";
1734
+ readonly local: true;
1735
+ readonly reason: "Turns the fallback locale's stored text into a plain placeholder (HTML → text for a rich-text control). No vocabulary entry describes a value-to-placeholder mapping.";
1736
+ }];
1737
+ };
1679
1738
  readonly TranslatableTextareaProp: {
1680
1739
  readonly group: "data-entry";
1681
1740
  readonly file: "components/data-entry.prop.ts";
@@ -1912,6 +1912,92 @@ const COMPONENT_PROP_REGISTRY = {
1912
1912
  }
1913
1913
  ]
1914
1914
  },
1915
+ TranslatableLocaleProp: {
1916
+ group: "data-entry",
1917
+ file: "components/data-entry.prop.ts",
1918
+ vocabulary: [
1919
+ "ValueProp",
1920
+ "DefaultValueProp",
1921
+ "OnValueChangeProp",
1922
+ {
1923
+ field: "locales",
1924
+ local: true,
1925
+ reason: "The BCP-47 tags a translatable control edits, in tab order (gh#1336). A per-field list, not a value."
1926
+ },
1927
+ {
1928
+ field: "defaultLocale",
1929
+ local: true,
1930
+ reason: "The locale tab selected first \u2014 the AppProvider's `defaultLocale`, scoped to one field."
1931
+ },
1932
+ {
1933
+ field: "fallbackLocale",
1934
+ local: true,
1935
+ reason: "The locale whose text an EMPTY locale shows as its placeholder \u2014 the AppProvider's `fallbackLocale`, scoped to one field."
1936
+ },
1937
+ {
1938
+ field: "errors",
1939
+ local: true,
1940
+ reason: "Per-locale validation messages keyed by BCP-47 tag; `error` (one message) cannot say which locale failed."
1941
+ }
1942
+ ]
1943
+ },
1944
+ TranslatableFieldControlProp: {
1945
+ group: "data-entry",
1946
+ file: "components/data-entry.prop.ts",
1947
+ vocabulary: [
1948
+ "ValueProp",
1949
+ "OnValueChangeProp",
1950
+ "PlaceholderProp",
1951
+ {
1952
+ field: "lang",
1953
+ local: true,
1954
+ reason: "The active locale's BCP-47 tag, handed to the control as its HTML `lang` attribute."
1955
+ }
1956
+ ]
1957
+ },
1958
+ TranslatableFieldProp: {
1959
+ group: "data-entry",
1960
+ file: "components/data-entry.prop.ts",
1961
+ vocabulary: [
1962
+ "ValueProp",
1963
+ "DefaultValueProp",
1964
+ "OnValueChangeProp",
1965
+ "SizeProp",
1966
+ "PlaceholderProp",
1967
+ "IdProp",
1968
+ "ClassNameProp",
1969
+ {
1970
+ field: "locales",
1971
+ local: true,
1972
+ reason: "The BCP-47 tags the field edits, in tab order (gh#1336). Defaults to the app's content / registered locales; a per-field list, not a value."
1973
+ },
1974
+ {
1975
+ field: "defaultLocale",
1976
+ local: true,
1977
+ reason: "The locale tab selected first \u2014 the AppProvider's own `defaultLocale` spelling, scoped to one field."
1978
+ },
1979
+ {
1980
+ field: "fallbackLocale",
1981
+ local: true,
1982
+ reason: "The locale whose text an EMPTY locale shows as its placeholder \u2014 the AppProvider's own `fallbackLocale` spelling, scoped to one field."
1983
+ },
1984
+ {
1985
+ field: "errors",
1986
+ local: true,
1987
+ reason: "Per-locale validation messages keyed by BCP-47 tag; marks each locale's tab and sends the ACTIVE one through FormField."
1988
+ },
1989
+ {
1990
+ field: "renderControl",
1991
+ local: true,
1992
+ reason: "The one control in the panel, rendered from the active locale's props (gh#1365) \u2014 the engine is shared by TranslatableInput, TranslatableTextarea and @godxjp/block-editor's TranslatableRichText. `render*` as in renderPreview / renderEmbed."
1993
+ },
1994
+ {
1995
+ field: "toPlaceholder",
1996
+ local: true,
1997
+ reason: "Turns the fallback locale's stored text into a plain placeholder (HTML \u2192 text for a rich-text control). No vocabulary entry describes a value-to-placeholder mapping."
1998
+ }
1999
+ ]
2000
+ },
1915
2001
  TranslatableTextareaProp: {
1916
2002
  group: "data-entry",
1917
2003
  file: "components/data-entry.prop.ts",
@@ -1660,6 +1660,47 @@
1660
1660
  gap: var(--space-1);
1661
1661
  }
1662
1662
 
1663
+ .ui-rich-text-editor {
1664
+ border: var(--stroke-hairline) solid hsl(var(--input));
1665
+ border-radius: var(--control-radius, var(--radius));
1666
+ background-color: hsl(var(--background));
1667
+ transition: border-color var(--duration-fast);
1668
+ }
1669
+
1670
+ .ui-rich-text-editor:focus-within {
1671
+ border-color: hsl(var(--ring));
1672
+ }
1673
+
1674
+ .ui-rich-text-editor[data-status="error"] {
1675
+ border-color: var(--control-status-error-border-color);
1676
+ }
1677
+
1678
+ .ui-rich-text-editor[data-status="warning"] {
1679
+ border-color: var(--control-status-warning-border-color, hsl(var(--text-warning)));
1680
+ }
1681
+
1682
+ .ui-rich-text-editor[data-disabled] {
1683
+ background-color: hsl(var(--muted));
1684
+ }
1685
+
1686
+ .ui-rich-text-editor-toolbar {
1687
+ display: flex;
1688
+ flex-wrap: wrap;
1689
+ align-items: center;
1690
+ gap: var(--space-1) var(--space-3);
1691
+ padding: var(--space-1);
1692
+ border-block-end: var(--stroke-hairline) solid hsl(var(--border));
1693
+ }
1694
+
1695
+ .ui-rich-text-editor-toolbar svg {
1696
+ inline-size: var(--control-icon-size);
1697
+ block-size: var(--control-icon-size);
1698
+ }
1699
+
1700
+ .ui-rich-text-editor .ui-block-editor-content {
1701
+ padding: var(--block-editor-frame-padding);
1702
+ }
1703
+
1663
1704
  .ui-block-editor-wikilink {
1664
1705
  color: hsl(var(--prose-link-color, var(--text-link, var(--primary))));
1665
1706
  text-decoration-line: underline;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "33.8.1",
2
+ "version": "33.9.1",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
@@ -200,6 +200,7 @@
200
200
  "dialog-layout.css",
201
201
  "alert-layout.css",
202
202
  "data-display-layout.css",
203
+ "data-entry-layout.css",
203
204
  "form-layout.css",
204
205
  "navigation-layout.css"
205
206
  ]
@@ -848,6 +849,20 @@
848
849
  "motion.css"
849
850
  ]
850
851
  },
852
+ "RichTextEditor": {
853
+ "layers": [
854
+ "layout.css",
855
+ "control.css",
856
+ "toggle.css",
857
+ "text-layout.css",
858
+ "dialog-layout.css",
859
+ "alert-layout.css",
860
+ "data-display-layout.css",
861
+ "data-entry-layout.css",
862
+ "form-layout.css",
863
+ "navigation-layout.css"
864
+ ]
865
+ },
851
866
  "ScrollArea": {
852
867
  "layers": [
853
868
  "data-display-layout.css"
@@ -1107,6 +1122,15 @@
1107
1122
  "navigation-layout.css"
1108
1123
  ]
1109
1124
  },
1125
+ "TranslatableField": {
1126
+ "layers": [
1127
+ "control.css",
1128
+ "toggle.css",
1129
+ "dialog-layout.css",
1130
+ "data-entry-layout.css",
1131
+ "navigation-layout.css"
1132
+ ]
1133
+ },
1110
1134
  "TranslatableInput": {
1111
1135
  "layers": [
1112
1136
  "control.css",
@@ -1116,6 +1140,20 @@
1116
1140
  "navigation-layout.css"
1117
1141
  ]
1118
1142
  },
1143
+ "TranslatableRichText": {
1144
+ "layers": [
1145
+ "layout.css",
1146
+ "control.css",
1147
+ "toggle.css",
1148
+ "text-layout.css",
1149
+ "dialog-layout.css",
1150
+ "alert-layout.css",
1151
+ "data-display-layout.css",
1152
+ "data-entry-layout.css",
1153
+ "form-layout.css",
1154
+ "navigation-layout.css"
1155
+ ]
1156
+ },
1119
1157
  "TranslatableTextarea": {
1120
1158
  "layers": [
1121
1159
  "control.css",