@uyghurcommunity/ui 0.0.0-stage → 0.4.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.
Files changed (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +221 -2
  3. package/THIRD_PARTY_NOTICES.md +28 -0
  4. package/assets/flags/east-turkistan.svg +1 -0
  5. package/assets/icon-catalog.json +1514 -0
  6. package/assets/icons/almond.svg +1 -0
  7. package/assets/icons/ancient-ruins.svg +1 -0
  8. package/assets/icons/apricot.svg +1 -0
  9. package/assets/icons/archway.svg +1 -0
  10. package/assets/icons/arrow-down.svg +1 -0
  11. package/assets/icons/arrow-left.svg +1 -0
  12. package/assets/icons/arrow-right.svg +1 -0
  13. package/assets/icons/arrow-up.svg +1 -0
  14. package/assets/icons/atlas.svg +1 -0
  15. package/assets/icons/aywan.svg +1 -0
  16. package/assets/icons/book.svg +1 -0
  17. package/assets/icons/boots.svg +1 -0
  18. package/assets/icons/calendar.svg +1 -0
  19. package/assets/icons/calligraphy.svg +1 -0
  20. package/assets/icons/camel.svg +1 -0
  21. package/assets/icons/carpet.svg +1 -0
  22. package/assets/icons/carved-door.svg +1 -0
  23. package/assets/icons/ceramic-vase.svg +1 -0
  24. package/assets/icons/chapan.svg +1 -0
  25. package/assets/icons/check-circle.svg +1 -0
  26. package/assets/icons/check.svg +1 -0
  27. package/assets/icons/chevron-down.svg +1 -0
  28. package/assets/icons/chevron-left.svg +1 -0
  29. package/assets/icons/chevron-right.svg +1 -0
  30. package/assets/icons/chevron-up.svg +1 -0
  31. package/assets/icons/city-gate.svg +1 -0
  32. package/assets/icons/close.svg +1 -0
  33. package/assets/icons/code.svg +1 -0
  34. package/assets/icons/color/almond.svg +1 -0
  35. package/assets/icons/color/ancient-ruins.svg +1 -0
  36. package/assets/icons/color/apricot.svg +1 -0
  37. package/assets/icons/color/archway.svg +1 -0
  38. package/assets/icons/color/atlas.svg +1 -0
  39. package/assets/icons/color/aywan.svg +1 -0
  40. package/assets/icons/color/boots.svg +1 -0
  41. package/assets/icons/color/calligraphy.svg +1 -0
  42. package/assets/icons/color/camel.svg +1 -0
  43. package/assets/icons/color/carpet.svg +1 -0
  44. package/assets/icons/color/carved-door.svg +1 -0
  45. package/assets/icons/color/ceramic-vase.svg +1 -0
  46. package/assets/icons/color/chapan.svg +1 -0
  47. package/assets/icons/color/city-gate.svg +1 -0
  48. package/assets/icons/color/cotton.svg +1 -0
  49. package/assets/icons/color/crescent.svg +1 -0
  50. package/assets/icons/color/dap.svg +1 -0
  51. package/assets/icons/color/doppa-top.svg +1 -0
  52. package/assets/icons/color/doppa.svg +1 -0
  53. package/assets/icons/color/dove.svg +1 -0
  54. package/assets/icons/color/dutar.svg +1 -0
  55. package/assets/icons/color/embroidery.svg +1 -0
  56. package/assets/icons/color/floral-rosette.svg +1 -0
  57. package/assets/icons/color/flower.svg +1 -0
  58. package/assets/icons/color/fur-hat.svg +1 -0
  59. package/assets/icons/color/ghijek.svg +1 -0
  60. package/assets/icons/color/grapes.svg +1 -0
  61. package/assets/icons/color/horse.svg +1 -0
  62. package/assets/icons/color/jewelry.svg +1 -0
  63. package/assets/icons/color/laghman.svg +1 -0
  64. package/assets/icons/color/landscape.svg +1 -0
  65. package/assets/icons/color/lattice-window.svg +1 -0
  66. package/assets/icons/color/loom.svg +1 -0
  67. package/assets/icons/color/madrasa.svg +1 -0
  68. package/assets/icons/color/mausoleum.svg +1 -0
  69. package/assets/icons/color/melon.svg +1 -0
  70. package/assets/icons/color/mens-coat.svg +1 -0
  71. package/assets/icons/color/minaret.svg +1 -0
  72. package/assets/icons/color/mosque.svg +1 -0
  73. package/assets/icons/color/nan-stack.svg +1 -0
  74. package/assets/icons/color/nan.svg +1 -0
  75. package/assets/icons/color/ornamental-border.svg +1 -0
  76. package/assets/icons/color/polo.svg +1 -0
  77. package/assets/icons/color/pomegranate.svg +1 -0
  78. package/assets/icons/color/rawap.svg +1 -0
  79. package/assets/icons/color/samsa.svg +1 -0
  80. package/assets/icons/color/sash.svg +1 -0
  81. package/assets/icons/color/satar.svg +1 -0
  82. package/assets/icons/color/spindle.svg +1 -0
  83. package/assets/icons/color/star-eight.svg +1 -0
  84. package/assets/icons/color/surnai.svg +1 -0
  85. package/assets/icons/color/tambur.svg +1 -0
  86. package/assets/icons/color/tea-bowl.svg +1 -0
  87. package/assets/icons/color/tea-set.svg +1 -0
  88. package/assets/icons/color/teapot.svg +1 -0
  89. package/assets/icons/color/traditional-house.svg +1 -0
  90. package/assets/icons/color/traditional-shoes.svg +1 -0
  91. package/assets/icons/color/tree-of-life.svg +1 -0
  92. package/assets/icons/color/unity.svg +1 -0
  93. package/assets/icons/color/uyghur-medallion.svg +1 -0
  94. package/assets/icons/color/womens-dress.svg +1 -0
  95. package/assets/icons/color/womens-headdress.svg +1 -0
  96. package/assets/icons/color/yurt.svg +1 -0
  97. package/assets/icons/copy.svg +1 -0
  98. package/assets/icons/cotton.svg +1 -0
  99. package/assets/icons/crescent.svg +1 -0
  100. package/assets/icons/dap.svg +1 -0
  101. package/assets/icons/direction-ltr.svg +1 -0
  102. package/assets/icons/direction-rtl.svg +1 -0
  103. package/assets/icons/doppa-top.svg +1 -0
  104. package/assets/icons/doppa.svg +1 -0
  105. package/assets/icons/dove.svg +1 -0
  106. package/assets/icons/download.svg +1 -0
  107. package/assets/icons/dutar.svg +1 -0
  108. package/assets/icons/edit.svg +1 -0
  109. package/assets/icons/embroidery.svg +1 -0
  110. package/assets/icons/external-link.svg +1 -0
  111. package/assets/icons/floral-rosette.svg +1 -0
  112. package/assets/icons/flower.svg +1 -0
  113. package/assets/icons/fur-hat.svg +1 -0
  114. package/assets/icons/ghijek.svg +1 -0
  115. package/assets/icons/globe.svg +1 -0
  116. package/assets/icons/grapes.svg +1 -0
  117. package/assets/icons/heart.svg +1 -0
  118. package/assets/icons/home.svg +1 -0
  119. package/assets/icons/horse.svg +1 -0
  120. package/assets/icons/image.svg +1 -0
  121. package/assets/icons/info.svg +1 -0
  122. package/assets/icons/jewelry.svg +1 -0
  123. package/assets/icons/keyboard.svg +1 -0
  124. package/assets/icons/laghman.svg +1 -0
  125. package/assets/icons/landscape.svg +1 -0
  126. package/assets/icons/language.svg +1 -0
  127. package/assets/icons/lattice-window.svg +1 -0
  128. package/assets/icons/link.svg +1 -0
  129. package/assets/icons/loom.svg +1 -0
  130. package/assets/icons/madrasa.svg +1 -0
  131. package/assets/icons/mail.svg +1 -0
  132. package/assets/icons/mausoleum.svg +1 -0
  133. package/assets/icons/melon.svg +1 -0
  134. package/assets/icons/mens-coat.svg +1 -0
  135. package/assets/icons/menu.svg +1 -0
  136. package/assets/icons/minaret.svg +1 -0
  137. package/assets/icons/minus.svg +1 -0
  138. package/assets/icons/moon.svg +1 -0
  139. package/assets/icons/mosque.svg +1 -0
  140. package/assets/icons/nan-stack.svg +1 -0
  141. package/assets/icons/nan.svg +1 -0
  142. package/assets/icons/ornamental-border.svg +1 -0
  143. package/assets/icons/palette.svg +1 -0
  144. package/assets/icons/pause.svg +1 -0
  145. package/assets/icons/play.svg +1 -0
  146. package/assets/icons/plus.svg +1 -0
  147. package/assets/icons/polo.svg +1 -0
  148. package/assets/icons/pomegranate.svg +1 -0
  149. package/assets/icons/rawap.svg +1 -0
  150. package/assets/icons/redo.svg +1 -0
  151. package/assets/icons/samsa.svg +1 -0
  152. package/assets/icons/sash.svg +1 -0
  153. package/assets/icons/satar.svg +1 -0
  154. package/assets/icons/search.svg +1 -0
  155. package/assets/icons/settings.svg +1 -0
  156. package/assets/icons/spindle.svg +1 -0
  157. package/assets/icons/star-eight.svg +1 -0
  158. package/assets/icons/star.svg +1 -0
  159. package/assets/icons/sun.svg +1 -0
  160. package/assets/icons/surnai.svg +1 -0
  161. package/assets/icons/tambur.svg +1 -0
  162. package/assets/icons/tea-bowl.svg +1 -0
  163. package/assets/icons/tea-set.svg +1 -0
  164. package/assets/icons/teapot.svg +1 -0
  165. package/assets/icons/traditional-house.svg +1 -0
  166. package/assets/icons/traditional-shoes.svg +1 -0
  167. package/assets/icons/trash.svg +1 -0
  168. package/assets/icons/tree-of-life.svg +1 -0
  169. package/assets/icons/undo.svg +1 -0
  170. package/assets/icons/unity.svg +1 -0
  171. package/assets/icons/upload.svg +1 -0
  172. package/assets/icons/user.svg +1 -0
  173. package/assets/icons/users.svg +1 -0
  174. package/assets/icons/uyghur-medallion.svg +1 -0
  175. package/assets/icons/warning.svg +1 -0
  176. package/assets/icons/womens-dress.svg +1 -0
  177. package/assets/icons/womens-headdress.svg +1 -0
  178. package/assets/icons/yurt.svg +1 -0
  179. package/assets/maps/README.md +27 -0
  180. package/assets/maps/east-turkistan-filled.svg +1 -0
  181. package/assets/maps/east-turkistan-outline.svg +1 -0
  182. package/assets/maps/east-turkistan.metadata.json +64 -0
  183. package/assets/maps/east-turkistan.source.geojson +1 -0
  184. package/package.json +93 -4
  185. package/src/application.css +4 -0
  186. package/src/application.d.ts +7 -0
  187. package/src/application.js +120 -0
  188. package/src/blocks.css +1 -0
  189. package/src/font.css +8 -0
  190. package/src/heritage-color.js +30 -0
  191. package/src/icon-labels.js +98 -0
  192. package/src/icons.d.ts +13 -0
  193. package/src/icons.js +102 -0
  194. package/src/index.d.ts +17 -0
  195. package/src/index.js +202 -0
  196. package/src/interactions.css +15 -0
  197. package/src/interactions.d.ts +10 -0
  198. package/src/interactions.js +183 -0
  199. package/src/map-data.js +68 -0
  200. package/src/maps.d.ts +11 -0
  201. package/src/maps.js +17 -0
  202. package/src/reference-clothing.js +51 -0
  203. package/src/reference-places.js +43 -0
  204. package/src/styles.css +20 -0
  205. package/src/themes.d.ts +7 -0
  206. package/src/themes.js +36 -0
  207. package/src/traditional-drawings.js +42 -0
  208. package/src/vendor/README.md +17 -0
  209. package/src/vendor/keyboard/LICENSE +21 -0
  210. package/src/vendor/keyboard/index.js +248 -0
  211. package/src/vendor/keyboard/style.js +22 -0
  212. package/src/vendor/text/LICENSE +21 -0
  213. package/src/vendor/text/index.js +275 -0
  214. package/src/writing.d.ts +17 -0
  215. package/src/writing.js +115 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 UyghurCommunity
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,222 @@
1
- # Temporary Holding Version
1
+ # ئۇيغۇرچە UI · Uyghur UI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [ئۇيغۇرچە Documentation](https://uyghurcommunity.github.io/uyghur-ui/guide/introduction.html) · [English documentation](https://uyghurcommunity.github.io/uyghur-ui/guide/en/introduction.html) · [Lab](https://uyghurcommunity.github.io/uyghur-ui/lab.html) · [Community](https://uyghurcommunity.github.io/uyghur-ui/community.html) · [Installation](https://uyghurcommunity.github.io/uyghur-ui/guide/installation.html) · [Live component gallery](https://uyghurcommunity.github.io/uyghur-ui/) · [UyghurCommunity](https://github.com/UyghurCommunity)
4
+
5
+ ئۇيغۇرچە تور بەتلەر ئۈچۈن كۇنۇپكا، فورما، سۆزلىشىش كۆزنىكى، بەتكۈچ، تىزىملىك، ئۇقتۇرۇش، 110 SVG سىنبەلگە ۋە شەرقىي تۈركىستان خەرىتىسى. 63 مەدەنىيەت سىنبەلگىسىنىڭ سىزىقلىق ۋە رەڭلىك نۇسخىسى بار. ALKATIP Basma خەت نۇسخىسى، ئوڭدىن سولغا لايىھە ۋە كۇنۇپكا تاختىسى بىلەن ئىشلىتىشنى قوللايدۇ.
6
+
7
+ Framework-independent CSS components and small native JavaScript controllers for Uyghur interfaces. Buttons, fields, checkbox/radio/switch, select, textarea, range, cards, badges, avatar, navigation, native accordion, dialog, RTL-aware tabs and plain-text toasts are included. The collection provides 110 original outline icons, 63 cultural color variants, an East Turkistan flag, and sourced map assets as files and render functions.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ npm install @uyghurcommunity/ui
13
+ ```
14
+
15
+ In a bundler-based application:
16
+
17
+ ```js
18
+ import '@uyghurcommunity/ui/styles.css';
19
+ import { bindDialog, bindTabs, bindForm, showToast, iconSVG, flagSVG, mapSVG } from '@uyghurcommunity/ui';
20
+ ```
21
+
22
+ Without a bundler, serve this checkout over HTTP, link `src/styles.css`, and import `./src/index.js` from a module script. There is no build step or runtime JavaScript dependency.
23
+
24
+ ```html
25
+ <html lang="ug" dir="rtl">
26
+ <link rel="stylesheet" href="./src/styles.css">
27
+ <body class="ug-ui">
28
+ <button class="ug-button" id="open">تەڭشەك</button>
29
+ <dialog class="ug-dialog" id="settings" aria-labelledby="settings-title">
30
+ <h2 id="settings-title" tabindex="-1">تەڭشەك</h2>
31
+ <button class="ug-button" data-ug-close>تاقاش</button>
32
+ </dialog>
33
+ <script type="module">
34
+ import { bindDialog } from './src/index.js';
35
+ const ui = bindDialog(document.getElementById('settings'), {
36
+ trigger: document.getElementById('open'),
37
+ initialFocus: document.getElementById('settings-title'),
38
+ });
39
+ // ui.open(); ui.close(); ui.destroy();
40
+ </script>
41
+ </body>
42
+ </html>
43
+ ```
44
+
45
+ The native `<dialog>` supplies focus containment, Escape cancellation and background inertness. Supply an accessible name and visible close button. Controllers do not add a custom modal polyfill. Queued close events are ignored if a dialog has already reopened. `destroy()` removes listeners and restores attributes managed by the binding.
46
+
47
+ ## API
48
+
49
+ - `bindDialog(dialog, { trigger?, initialFocus?, dismissOutside=true })`: `open()`, `close(value?)`, `destroy()`. Set `dismissOutside:false` to opt out of outside-pointer dismissal.
50
+ - `bindDisclosure(button, panel)`: `toggle()`, `setOpen(boolean)`, `destroy()`. Connect `aria-controls` in your markup.
51
+ - `bindTabs(container)`: roving tab focus, Home/End, RTL horizontal arrows, vertical arrows and current disabled-tab skipping. The first tablist owns its tabs; nested groups stay independent. Each tab needs a distinct panel inside the container. Direction and orientation come from the tablist. `select(tab, focus?)`, `destroy()`.
52
+ - `validateForm(form, { messages? })`: actual native validity errors with Uyghur defaults; errors contain `field` and `message`. Associate labels, hint/error IDs and `aria-describedby` in markup. Set `data-ug-error="error-id"` to populate the inline error text.
53
+ - `bindForm(form, { onValid?, messages? })`: sets `novalidate` while bound so invalid submissions reach the localized validator, then focuses the first invalid control. An explicit `onValid` handles valid submissions locally. Without `onValid`, valid native form submission remains enabled. `destroy()` restores the original `novalidate`, managed `aria-invalid` attributes, and error text. Native validation does not replace server validation.
54
+ - `showToast(region, text, { duration=8000, dismissLabel? })`: renders text safely and returns `dismiss()`/`destroy()`. Use `duration:0` for important messages. Give the region `role="status" aria-live="polite"`.
55
+ - `iconSVG(name, { size=24, strokeWidth=1.7, label='', variant='outline' })`: escaped accessible name, or decorative `aria-hidden` when label is empty. The 63 cultural icons support `variant:'color'`; requesting color for a general UI icon falls back to its outline. Names are available in `iconNames`, and color availability in `coloredIconNames`.
56
+ - `iconCatalog`: immutable names, Uyghur/English labels, category, search aliases and available `variants` for all 110 icons.
57
+ - `iconCategories`: bilingual filter labels. `findIcons(query, { category='all' })` combines text and category matching and returns icon names. Categories: `all`, `traditional`, `music`, `textiles`, `architecture`, `table`, `garden` (Nature), `clothing`, `crafts`, `motifs`, `general`.
58
+ - `flagSVG({ width=90, label? })`: East Turkistan flag at a 3:2 width/height ratio. It is never automatically mirrored.
59
+ - `mapSVG({ width=640, variant='outline', label?, color='currentColor', strokeWidth=4 })`: north-up map SVG with an accessible Uyghur name by default. Variants are `outline` and `filled`; width must be an integer from 64–2048, stroke width 0.5–12, and color `currentColor`, `#RGB` or `#RRGGBB`. Labels are escaped and limited to 160 characters.
60
+ - `mapMetadata`: deeply frozen source, license, geometry, projection and boundary-basis metadata.
61
+
62
+ Components use native labels/controls and explicit RTL/LTR containers. `ug-row` supplies a wrapping flex row; `ug-columns` supplies two columns that collapse on smaller screens. Both layout helpers are scoped under `ug-ui` in the package stylesheet. Copied gallery fragments include that scope, `lang="ug"`, `dir="rtl"`, and fully rendered SVG icons. Load the package stylesheet as described in each snippet; bare JavaScript imports need a bundler or import map.
63
+
64
+ Icons do not mirror automatically: select a directional icon intentionally for the action. Use logical CSS properties in consumer layouts. Core imports have no document access and can be used during server rendering.
65
+
66
+ ## Theme and assets
67
+
68
+ Override `--ug-blue`, `--ug-accent`, `--ug-radius`, `--ug-font` and other tokens in `src/styles.css`. Set `data-ug-theme="dark"` on a containing element for dark colors. The external ALKATIP Basma face uses `font-display:swap`; no font binary is redistributed. Consumers can supply their own approved font stylesheet/token.
69
+
70
+ SVG assets live in `assets/icons/`, `assets/icons/color/`, `assets/flags/east-turkistan.svg` and `assets/maps/`. Downloads are linked from the gallery. SVG render options are bounded and labels are escaped. Never pass untrusted markup directly to `innerHTML`; the gallery only inserts the library's fixed validated SVG output.
71
+
72
+ Installed-package asset subpaths include `@uyghurcommunity/ui/icons/flower`, `@uyghurcommunity/ui/icons/color/dutar` (icon names without an extension) and `@uyghurcommunity/ui/flags/east-turkistan.svg`. Icon and flag render functions are available from the root import or `@uyghurcommunity/ui/icons`; map functions and metadata are available from the root import or `@uyghurcommunity/ui/maps`.
73
+
74
+ ## Uyghur cultural collection · مىراس سىنبەلگىلىرى
75
+
76
+ The cultural collection introduced 36 new themes and full color variants in **0.3.0**, retained in **0.4.1**. There are now **110 outline icons**, including **63 cultural pictograms and motifs with matching color variants**. The gallery supports Uyghur labels, English names, spelling aliases, category filters and variant selection.
77
+
78
+ | Collection | Icons |
79
+ | --- | --- |
80
+ | Instruments | dutar, tambur, rawap, ghijek, satar, dap, surnai |
81
+ | Clothing | doppa, fur-hat, womens-headdress, mens-coat, womens-dress, chapan, sash, boots, traditional-shoes |
82
+ | Textiles and crafts | atlas, carpet, embroidery, loom, spindle, ceramic-vase, jewelry |
83
+ | Architecture | aywan, archway, carved-door, lattice-window, mosque, mausoleum, minaret, madrasa, traditional-house, yurt, city-gate, ancient-ruins |
84
+ | Food and tea | nan, nan-stack, samsa, polo, laghman, teapot, tea-bowl, tea-set, pomegranate |
85
+ | Nature | grapes, apricot, cotton, melon, landscape, horse, camel |
86
+ | Motifs and symbols | almond, flower, doppa-top, uyghur-medallion, floral-rosette, ornamental-border, calligraphy, star-eight, crescent, tree-of-life, unity, dove |
87
+
88
+ ```js
89
+ import { iconSVG, iconCatalog, coloredIconNames, findIcons } from '@uyghurcommunity/ui';
90
+ const dutar = iconSVG('dutar', { size: 48, label: 'دۇتار' });
91
+ const colorDutar = iconSVG('dutar', { size: 64, variant: 'color', label: 'دۇتار' });
92
+ console.log(coloredIconNames.length); // 63
93
+ console.log(iconCatalog.find(icon => icon.name === 'dutar').variants); // ['outline', 'color']
94
+ findIcons('راۋاب'); // ['rawap']
95
+ findIcons('', { category: 'music' }); // seven instrument names
96
+ ```
97
+
98
+ [Download the cultural SVG collection](https://uyghurcommunity.github.io/uyghur-ui/downloads/uyghur-traditional-icons.zip) or [all SVGs](https://uyghurcommunity.github.io/uyghur-ui/downloads/uyghur-ui-icons.zip). Both ZIPs include outline and color variants, the East Turkistan flag, both map SVGs, map source GeoJSON and metadata, bilingual icon metadata, the license and source notices. The JSON catalog is also exported as `@uyghurcommunity/ui/catalog.json`.
99
+
100
+ These are original modern interface pictograms inspired by Uyghur cultural life and the owner's supplied reference boards. The reference images are not redistributed. The frame drum is labeled **Dap**; **Tambur** remains a separate long-necked instrument. Instrument forms and spellings vary; the collection includes search aliases and simplified silhouettes. Cultural context and visual references are recorded in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
101
+
102
+ ## East Turkistan map · شەرقىي تۈركىستان خەرىتىسى
103
+
104
+ [Preview the map](https://uyghurcommunity.github.io/uyghur-ui/#map), [download the map ZIP](https://uyghurcommunity.github.io/uyghur-ui/downloads/east-turkistan-map.zip), or use the separate [outline SVG](assets/maps/east-turkistan-outline.svg) and [filled SVG](assets/maps/east-turkistan-filled.svg).
105
+
106
+ ```js
107
+ import { mapSVG, mapMetadata } from '@uyghurcommunity/ui/maps';
108
+
109
+ const outline = mapSVG({ width: 640, label: 'شەرقىي تۈركىستان خەرىتىسى' });
110
+ const filled = mapSVG({ width: 640, variant: 'filled', color: '#559EE2' });
111
+ console.log(mapMetadata.source.layerVersion); // '5.1.1'
112
+ console.log(mapMetadata.projection.viewBox); // '0 0 1024 906'
113
+ ```
114
+
115
+ The asset is named East Turkistan for this collection. Its geometry follows **Natural Earth's Xinjiang admin-1 polygon (`CHN-1756` / `CN-XJ`)**, layer **5.1.1**, pinned to repository release **v5.1.2**, commit `f1890d9f152c896d250a77557a5751a93d494776`. It represents that dataset's modern administrative outline; it does not reconstruct historical boundaries. [Dataset description](https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/), [pinned source](https://github.com/nvkelso/natural-earth-vector/blob/f1890d9f152c896d250a77557a5751a93d494776/geojson/ne_10m_admin_1_states_provinces.geojson).
116
+
117
+ Both styles retain all 1,835 source vertices without simplification, using an equirectangular projection with standard parallel 42°N and viewBox `0 0 1024 906`. They remain north up and east right in RTL pages. The standalone SVGs contain accessible Uyghur/English names and no external references, scripts or font dependencies. **Made with Natural Earth.** Source geometry is [public domain](https://www.naturalearthdata.com/about/terms-of-use/).
118
+
119
+ Package file exports:
120
+
121
+ ```text
122
+ @uyghurcommunity/ui/maps/east-turkistan-outline.svg
123
+ @uyghurcommunity/ui/maps/east-turkistan-filled.svg
124
+ @uyghurcommunity/ui/maps/metadata.json
125
+ @uyghurcommunity/ui/maps/source.geojson
126
+ ```
127
+
128
+ The [metadata](assets/maps/east-turkistan.metadata.json), [original extracted GeoJSON](assets/maps/east-turkistan.source.geojson) and [map notes](assets/maps/README.md) record source checksums, geographic extent and reproducible generation details.
129
+
130
+ ## Interaction gallery
131
+
132
+ [Try the six original interactions](https://uyghurcommunity.github.io/uyghur-ui/interactions.html): embroidery spotlight, Doppa depth card, Atlas selection, local envelope animation, map comparison and ornament ripple. The presentation takes inspiration from [Aceternity’s interaction gallery](https://ui.aceternity.com/interactions); the implementations and cultural artwork are original, with no Aceternity source or runtime dependency.
133
+
134
+ Each demo has touch and keyboard controls, a shared pause control, reduced-motion support and a complete HTML/CSS/JavaScript example to copy or download. The comparison download embeds both map SVGs, and every standalone example registers the supplied ALKATIP Basma font URLs. Font binaries are not bundled. The envelope is a local visual demonstration and sends no message.
135
+
136
+ Version 0.4.0 exports these reusable controllers through `@uyghurcommunity/ui/interactions`, with a separate `@uyghurcommunity/ui/interactions.css` stylesheet. Source: `docs/interactions-data.js`, `docs/interaction-controls.js`, `docs/interaction-demo.css` and `docs/interaction-document.js`. `build:docs` renders `interactions.html` from the same examples and shared documentation shell.
137
+
138
+
139
+ ## Writing and application controls · يېزىق ۋە قوللىنىشچان UI
140
+
141
+ Core **0.4.0** adds these subpaths; the [Lab](https://uyghurcommunity.github.io/uyghur-ui/lab.html) supplies complete labeled markup and working local examples.
142
+
143
+ ```js
144
+ import { bindUyghurInput } from '@uyghurcommunity/ui/writing';
145
+ import { bindCombobox, bindDropdown, bindDrawer, bindDataTable } from '@uyghurcommunity/ui/application';
146
+ ```
147
+
148
+ | Controller | Options | Methods |
149
+ | --- | --- | --- |
150
+ | `bindUyghurInput(root, options)` | `onChange(value)`, `maxLength=10000` | `getValue`, `setValue`, `previewCleanup(options?)`, `applyCleanup`, `undoCleanup`, `validate`, `destroy` |
151
+ | `bindCombobox(root, options)` | `onChange?` | `open`, `close`, `getValue`, `select(value)`, `destroy` |
152
+ | `bindDropdown(root)` | — | `open`, `close`, `toggle`, `destroy` |
153
+ | `bindDrawer(root, options)` | `initialFocus?`, `dismissOutside?` | `open`, `close`, `destroy` |
154
+ | `bindDataTable(root, options)` | `pageSize=5` | `getState`, `setPage(oneBasedPage)`, `refresh`, `destroy` |
155
+
156
+ Writing validation returns `{valid,message,length,maxLength}`. `setValue`, `applyCleanup` and `undoCleanup` return booleans. Preview cleanup before applying it, and retain an undo path. The table operates on local rows; server requests, storage and authorization belong to the consuming app. Destroy bindings on real unmount.
157
+
158
+ The Lab also provides two composed, copyable layouts: a dashboard sidebar with a data table, and an article editor with writing assistance, preview and local export. Their styles are exported as `@uyghurcommunity/ui/blocks.css` and included by the core stylesheet. These are local examples, not hosted application services.
159
+
160
+ ## React and offline installation
161
+
162
+ React wrappers are a separate **0.4.1** package:
163
+
164
+ ```sh
165
+ npm install @uyghurcommunity/ui @uyghurcommunity/ui-react
166
+ ```
167
+
168
+ ```jsx
169
+ import '@uyghurcommunity/ui/styles.css';
170
+ import { Button, Icon, Dialog, Tabs, UyghurInput, Interaction } from '@uyghurcommunity/ui-react';
171
+
172
+ export function Welcome() {
173
+ return <main className="ug-ui" lang="ug" dir="rtl"><Button>باشلاڭ</Button><Icon name="dutar" /></main>;
174
+ }
175
+ ```
176
+
177
+ Your application supplies React. See the React package README for props and lifecycle. Avoid attaching a second vanilla binding to a wrapper-managed element.
178
+
179
+ The separate [Uyghur Starters](https://github.com/UyghurCommunity/uyghur-starters) create CLI **0.2.0** can generate local UI templates without a network template fetch:
180
+
181
+ ```sh
182
+ npm install --save-dev @uyghurcommunity/create
183
+ npx create-uyghur --ui-list
184
+ npx create-uyghur --ui combobox --dir examples/new-combobox
185
+ ```
186
+
187
+ Available IDs: `writing-field`, `dialog`, `combobox`, `dropdown`, `drawer`, `data-table`. Choose a new relative directory. The command does not deploy or publish anything.
188
+
189
+ ## Themes
190
+
191
+ ```js
192
+ import { createTheme, exportThemeCSS, exportThemeJSON } from '@uyghurcommunity/ui/themes';
193
+ const theme = createTheme('doppa');
194
+ const css = exportThemeCSS(theme, { selector: '.my-product' });
195
+ const json = exportThemeJSON(theme);
196
+ ```
197
+
198
+ Presets: `doppa`, `atlas`, `desert`, `ceramic`. Optional overrides are `accent`, `radius`, `fontSize`, `lineHeight` and `mode`. Theme objects `{id,name,tokens}` are deeply frozen. CSS defaults to selector `.ug-ui`; load exported CSS after the base stylesheet. JSON records the theme without applying it. [Try the workbench](https://uyghurcommunity.github.io/uyghur-ui/lab.html#lab-themes).
199
+
200
+ ## Contributing
201
+
202
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). [Community](https://uyghurcommunity.github.io/uyghur-ui/community.html) links real bug, component and translation issue forms, plus community-maintained examples. Both language guides retain the same page when switched. Update their source and regenerate rather than editing only emitted HTML.
203
+
204
+ ## Run and verify
205
+
206
+ ```sh
207
+ python3 -m http.server 4173
208
+ npm test
209
+ npm run check
210
+ npm pack --dry-run
211
+ npm run build:map
212
+ npm run build:icons
213
+ npm run build:docs
214
+ ```
215
+
216
+ The gallery has working previews and copyable HTML/JavaScript. Demo form values stay in the browser and no submission service is connected. Motion is optional and honors reduced-motion preferences. Browser and assistive-technology contributions are welcome.
217
+
218
+ `build:map` regenerates the map SVGs, metadata and JavaScript geometry module offline from the committed source GeoJSON. `build:icons` regenerates the outline/color icon files, catalog and deterministic ZIP downloads using Node only. CI checks that generated files match the committed assets.
219
+
220
+ `build:docs` produces 22 static guide pages (11 Uyghur and 11 English) from `docs/guide-content.js` and `docs/guide-content-en.js`, the Lab/community/interaction pages, shared navigation and the local search index. The guides cover installation, a complete quick start, components, JavaScript APIs, icons, theming, RTL, accessibility, troubleshooting and release history. All guide prose is readable without JavaScript. Search, code-copy helpers, mobile navigation and theme preferences enhance the static pages in the browser. Keep generated `guide/` (including `guide/en/`), `lab.html`, `community.html`, `interactions.html`, `index.html` navigation and `assets/docs-search.json` committed for GitHub Pages.
221
+
222
+ Code and original icons: [MIT](LICENSE). Natural Earth map data: public domain. Flag, cultural references and external-font details: [third-party notices](THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,28 @@
1
+ # Assets and references
2
+
3
+ The UI code and original 24×24 outline and color icon drawings are MIT licensed by UyghurCommunity. Version 0.3.0 contains 110 outline icons and 63 cultural color variants. Cultural motifs are original geometric interpretations, not reconstructions of particular museum objects.
4
+
5
+ The cultural collection uses factual visual references to distinguish instrument silhouettes and cultural forms. The SVG paths are newly drawn; reference photographs, collection illustrations and historic patterns are not redistributed:
6
+
7
+ - [Wende Museum: instruments from the Ian Price collection](https://wendemuseum.org/traditional-central-asian-musical-instruments-from-the-collection-of-ian-price/) — dutar, tambur, rawap, ghijek, satar and dap shapes.
8
+ - [National Music Museum: rawap](https://emuseum.nmmusd.org/objects/12426/34size-rawap) — bowl body and curved shoulders.
9
+ - [UNESCO: Uyghur Muqam](https://ich.unesco.org/en/RL/uyghur-muqam-of-xinjiang-00109) — cultural context for varied bowed and plucked instruments.
10
+ - [Yale eHRAF: Uyghur summary](https://ehrafworldcultures.yale.edu/cultures/ai04/summary) — craft and etles silk context.
11
+
12
+ Two owner-supplied reference boards—an outline cultural-object sheet and the illustrated “Uyghur Culture Icons” sheet—guided the added clothing, craft, architectural, landscape and ornament themes. The project provides newly drawn SVG interpretations; neither reference image, its decorative frames nor its illustrations is redistributed. The illustrated board labels a circular frame drum “Tambur”; the collection uses **Dap / داپ** for the frame drum and retains **Tambur / تەمبۈر** as a separate long-necked instrument, following the instrument references above.
13
+
14
+ Labels and aliases help people find the drawings; they are not a normative dictionary or catalog of regional variants. Food, garden and architectural objects can also be found in neighboring cultures.
15
+
16
+ The East Turkistan flag geometry is adapted from [Kokbayraq flag.svg](https://commons.wikimedia.org/wiki/File:Kokbayraq_flag.svg), current geometry by Wikimedia Commons contributor Colohisto (16 June 2024), following earlier contributors. Commons marks this simple geometric flag as public domain. Its blue field and white crescent/star are retained without mirroring in RTL layouts. The asset is a flag rendering, not an endorsement by or affiliation with a government or organization.
17
+
18
+ The East Turkistan map outline and filled assets use the **Xinjiang admin-1 feature (`CHN-1756`, `CN-XJ`, `ne_id: 1159312657`)** from [Natural Earth 1:10,000,000 Admin 1 – States, Provinces](https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/). The layer is version **5.1.1**, obtained from repository release **v5.1.2**, pinned commit [`f1890d9f152c896d250a77557a5751a93d494776`](https://github.com/nvkelso/natural-earth-vector/tree/f1890d9f152c896d250a77557a5751a93d494776). [Original GeoJSON](https://github.com/nvkelso/natural-earth-vector/blob/f1890d9f152c896d250a77557a5751a93d494776/geojson/ne_10m_admin_1_states_provinces.geojson), [layer version record](https://github.com/nvkelso/natural-earth-vector/blob/f1890d9f152c896d250a77557a5751a93d494776/10m_cultural/ne_10m_admin_1_states_provinces.VERSION.txt).
19
+
20
+ **Made with Natural Earth.** Natural Earth states that all versions of its vector and raster map data are [public domain](https://www.naturalearthdata.com/about/terms-of-use/), including permission to modify and redistribute. The source feature and derived map geometry remain public domain; the code's MIT license does not impose a new license on that data. Both variants retain all 1,835 source vertices, using an equirectangular projection with standard parallel 42°N. Their north-up orientation is preserved in RTL layouts. The collection name is East Turkistan; the geometry follows the cited dataset's modern administrative outline, rather than a reconstruction of historical boundaries. `assets/maps/east-turkistan.metadata.json` and the extracted original GeoJSON record the exact source, checksums and geographic extent.
21
+
22
+ ALKATIP Basma is linked using the project owner's supplied OnlineWebFonts WOFF2/WOFF/TTF URLs. Font binaries are not bundled or covered by the MIT code license.
23
+
24
+ Accessibility references: [W3C modal dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/), [W3C form labels](https://www.w3.org/WAI/tutorials/forms/labels/), and [W3C form validation](https://www.w3.org/WAI/tutorials/forms/validation/). The library uses native HTML controls and does not claim independent assistive-technology certification.
25
+
26
+ ## Reused UyghurCommunity modules
27
+
28
+ Uyghur UI 0.4.1 includes unchanged source copies from `@uyghurcommunity/keyboard` 0.1.1 and `@uyghurcommunity/text` 0.1.0 under `src/vendor/`. Their MIT licenses remain beside the source. `src/vendor/README.md` records the source repositories, versions and SHA-256 checksums. The writing controller composes these modules; normalization and cleanup require an explicit preview and apply action. Font binaries are not bundled. The optional React adapter is separately packaged under the same MIT license and uses React as a peer dependency.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="900" height="600" viewBox="0 -30000 90000 60000" focusable="false" role="img" aria-label="شەرقىي تۈركىستان بايرىقى / East Turkistan flag"><path fill="#559EE2" d="m0-30000h90000v60000H0"/><path fill="#fff" d="m41750 0 13568-4408-8386 11541V-7133l8386 11541zm925 8021a15000 15000 0 1 1 0-16042 12000 12000 0 1 0 0 16042"/></svg>