@sakura-ui/sakura-ui 0.3.0 → 0.4.2

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 (133) hide show
  1. package/README.md +71 -0
  2. package/package.json +26 -25
  3. package/packages/core/package.json +10 -8
  4. package/packages/core/src/components/Button.tsx +1 -1
  5. package/packages/core/src/components/Card.tsx +8 -3
  6. package/packages/core/src/components/IconButton.tsx +1 -1
  7. package/packages/core/src/components/LangSelector.tsx +2 -2
  8. package/packages/core/src/components/Link.tsx +0 -1
  9. package/packages/core/src/components/LinkCard.tsx +87 -52
  10. package/packages/core/src/components/MenuButton.tsx +2 -2
  11. package/packages/core/src/components/NavigationItem.tsx +1 -1
  12. package/packages/core/src/components/NotificationBanner.tsx +20 -0
  13. package/packages/core/src/components/PopoverMenu.tsx +1 -0
  14. package/packages/core/src/components/buttonStyle.ts +1 -1
  15. package/packages/core/src/components/index.ts +1 -1
  16. package/packages/core/src/icons/index.ts +1 -1
  17. package/packages/core/src/index.ts +1 -0
  18. package/packages/core/vite.config.ts +2 -1
  19. package/packages/forms/.turbo/turbo-build.log +12 -22
  20. package/packages/forms/dist/index.cjs.js +52 -79
  21. package/packages/forms/dist/index.es.js +455 -646
  22. package/packages/forms/dist/types/components/Checkbox.d.ts +2 -2
  23. package/packages/forms/dist/types/components/Checkbox.d.ts.map +1 -1
  24. package/packages/forms/dist/types/components/FieldsetControl.d.ts +2 -2
  25. package/packages/forms/dist/types/components/FieldsetControl.d.ts.map +1 -1
  26. package/packages/forms/dist/types/components/FileInput.d.ts +2 -2
  27. package/packages/forms/dist/types/components/FileInput.d.ts.map +1 -1
  28. package/packages/forms/dist/types/components/Input.d.ts +2 -2
  29. package/packages/forms/dist/types/components/Input.d.ts.map +1 -1
  30. package/packages/forms/dist/types/components/LabelControl.d.ts +2 -2
  31. package/packages/forms/dist/types/components/LabelControl.d.ts.map +1 -1
  32. package/packages/forms/dist/types/components/Radio.d.ts +2 -2
  33. package/packages/forms/dist/types/components/Radio.d.ts.map +1 -1
  34. package/packages/forms/dist/types/components/Select.d.ts +2 -2
  35. package/packages/forms/dist/types/components/Select.d.ts.map +1 -1
  36. package/packages/forms/dist/types/components/Textarea.d.ts +2 -2
  37. package/packages/forms/dist/types/components/Textarea.d.ts.map +1 -1
  38. package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts +1 -1
  39. package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts +1 -1
  40. package/packages/forms/dist/types/components/inputStyle.d.ts +1 -1
  41. package/packages/forms/dist/types/components/inputStyle.d.ts.map +1 -1
  42. package/packages/forms/node_modules/.bin/autoprefixer +44 -6
  43. package/packages/forms/package.json +9 -7
  44. package/packages/forms/src/components/Checkbox.tsx +1 -2
  45. package/packages/forms/src/components/FileInput.tsx +3 -3
  46. package/packages/forms/src/components/Input.tsx +0 -1
  47. package/packages/forms/src/components/Radio.tsx +0 -1
  48. package/packages/forms/src/components/Select.tsx +0 -1
  49. package/packages/forms/src/components/Textarea.tsx +0 -1
  50. package/packages/forms/tests/FieldsetControl.test.tsx +8 -2
  51. package/packages/forms/tests/FileInput.test.tsx +30 -5
  52. package/packages/forms/tests/LabelControl.test.tsx +8 -2
  53. package/packages/forms/vite.config.ts +2 -1
  54. package/packages/helper/.turbo/turbo-build.log +12 -23
  55. package/packages/helper/dist/index.cjs.js +7 -9
  56. package/packages/helper/dist/index.es.js +23 -23
  57. package/packages/helper/dist/types/calc.d.ts.map +1 -1
  58. package/packages/helper/dist/types/cx.d.ts.map +1 -1
  59. package/packages/helper/dist/types/styles.d.ts +9 -9
  60. package/packages/helper/dist/types/styles.d.ts.map +1 -1
  61. package/packages/helper/dist/types/treefy.d.ts.map +1 -1
  62. package/packages/helper/node_modules/.bin/vitest +55 -0
  63. package/packages/helper/package.json +13 -3
  64. package/packages/helper/src/cx.ts +1 -1
  65. package/packages/helper/src/styles.ts +2 -4
  66. package/packages/helper/src/treefy.ts +3 -1
  67. package/packages/helper/tests/calc.test.ts +22 -0
  68. package/packages/helper/tests/cx.test.ts +30 -0
  69. package/packages/helper/tests/querySelector.test.ts +24 -0
  70. package/packages/helper/tests/treefy.test.ts +111 -0
  71. package/packages/helper/tests/vitest.setup.ts +2 -0
  72. package/packages/markdown/.turbo/turbo-build.log +12 -22
  73. package/packages/markdown/dist/index.cjs.js +37 -63
  74. package/packages/markdown/dist/index.es.js +4287 -4425
  75. package/packages/markdown/dist/types/components/Markdown.d.ts.map +1 -1
  76. package/packages/markdown/dist/types/plugins/attr.d.ts.map +1 -1
  77. package/packages/markdown/dist/types/plugins/card.d.ts.map +1 -1
  78. package/packages/markdown/dist/types/plugins/cell.d.ts.map +1 -1
  79. package/packages/markdown/dist/types/plugins/faq.d.ts.map +1 -1
  80. package/packages/markdown/dist/types/plugins/grid.d.ts.map +1 -1
  81. package/packages/markdown/dist/types/plugins/headings.d.ts +3 -1
  82. package/packages/markdown/dist/types/plugins/headings.d.ts.map +1 -1
  83. package/packages/markdown/dist/types/plugins/helper.d.ts.map +1 -1
  84. package/packages/markdown/dist/types/plugins/linkButton.d.ts.map +1 -1
  85. package/packages/markdown/dist/types/plugins/youtube.d.ts.map +1 -1
  86. package/packages/markdown/node_modules/.bin/autoprefixer +44 -6
  87. package/packages/markdown/package.json +16 -15
  88. package/packages/markdown/src/components/Markdown.tsx +4 -0
  89. package/packages/markdown/src/plugins/grid.ts +4 -1
  90. package/packages/markdown/src/plugins/headings.ts +6 -3
  91. package/packages/markdown/src/plugins/linkButton.ts +2 -1
  92. package/packages/markdown/src/plugins/youtube.ts +5 -4
  93. package/packages/tailwind-theme-plugin/#package.json# +51 -0
  94. package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +12 -22
  95. package/packages/tailwind-theme-plugin/dist/index.cjs.js +1 -1
  96. package/packages/tailwind-theme-plugin/dist/index.es.js +1111 -1477
  97. package/packages/tailwind-theme-plugin/dist/types/index.d.ts +1 -4
  98. package/packages/tailwind-theme-plugin/dist/types/index.d.ts.map +1 -1
  99. package/packages/tailwind-theme-plugin/node_modules/.bin/autoprefixer +44 -6
  100. package/packages/tailwind-theme-plugin/package.json +8 -6
  101. package/packages/tailwind-theme-plugin/src/index.ts +15 -58
  102. package/packages/tailwind-theme-plugin/vite.config.ts +2 -0
  103. package/packages/forms/node_modules/.bin/tailwind +0 -17
  104. package/packages/forms/node_modules/.bin/tailwindcss +0 -17
  105. package/packages/forms/node_modules/.bin/ts-node +0 -17
  106. package/packages/forms/node_modules/.bin/ts-node-cwd +0 -17
  107. package/packages/forms/node_modules/.bin/ts-node-esm +0 -17
  108. package/packages/forms/node_modules/.bin/ts-node-script +0 -17
  109. package/packages/forms/node_modules/.bin/ts-node-transpile-only +0 -17
  110. package/packages/forms/node_modules/.bin/ts-script +0 -17
  111. package/packages/forms/node_modules/.bin/tsc +0 -17
  112. package/packages/forms/node_modules/.bin/tsserver +0 -17
  113. package/packages/forms/node_modules/.vite/vitest/results.json +0 -1
  114. package/packages/markdown/node_modules/.bin/tailwind +0 -17
  115. package/packages/markdown/node_modules/.bin/tailwindcss +0 -17
  116. package/packages/markdown/node_modules/.bin/ts-node +0 -17
  117. package/packages/markdown/node_modules/.bin/ts-node-cwd +0 -17
  118. package/packages/markdown/node_modules/.bin/ts-node-esm +0 -17
  119. package/packages/markdown/node_modules/.bin/ts-node-script +0 -17
  120. package/packages/markdown/node_modules/.bin/ts-node-transpile-only +0 -17
  121. package/packages/markdown/node_modules/.bin/ts-script +0 -17
  122. package/packages/markdown/node_modules/.bin/tsc +0 -17
  123. package/packages/markdown/node_modules/.bin/tsserver +0 -17
  124. package/packages/tailwind-theme-plugin/node_modules/.bin/tailwind +0 -17
  125. package/packages/tailwind-theme-plugin/node_modules/.bin/tailwindcss +0 -17
  126. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node +0 -17
  127. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-cwd +0 -17
  128. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-esm +0 -17
  129. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-script +0 -17
  130. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-transpile-only +0 -17
  131. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-script +0 -17
  132. package/packages/tailwind-theme-plugin/node_modules/.bin/tsc +0 -17
  133. package/packages/tailwind-theme-plugin/node_modules/.bin/tsserver +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA6C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAEnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,cAAe,QAAQ,2BAelD,CAAA;AA8JD,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,QAAQ,iDAKlB,KAAK,2BAiHP,CAAA"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AA6C/C,OAAO,EASL,KAAK,WAAW,EACjB,MAAM,YAAY,CAAA;AAEnB,UAAU,QAAQ;IAChB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,eAAO,MAAM,eAAe,GAAI,WAAW,QAAQ,2BAelD,CAAA;AAgKD,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,8CAKtB,KAAK,2BAmHP,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"attr.d.ts","sourceRoot":"","sources":["../../../src/plugins/attr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,eACP,IAAI,SASnB,CAAA"}
1
+ {"version":3,"file":"attr.d.ts","sourceRoot":"","sources":["../../../src/plugins/attr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,SACb,MAAM,IAAI,SASnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/plugins/card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,eACP,IAAI,SA+CnB,CAAA"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/plugins/card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,SACb,MAAM,IAAI,SA+CnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../src/plugins/cell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,eACP,IAAI,SAqCnB,CAAA"}
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../src/plugins/cell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,SACb,MAAM,IAAI,SAqCnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../src/plugins/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,SAAS,eACN,IAAI,SA8BnB,CAAA"}
1
+ {"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../src/plugins/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,SAAS,SACZ,MAAM,IAAI,SA8BnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/plugins/grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,eACP,IAAI,SAyCnB,CAAA"}
1
+ {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/plugins/grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,UAAU,SACb,MAAM,IAAI,SA4CnB,CAAA"}
@@ -5,5 +5,7 @@ export type HeadingItem = {
5
5
  value?: string;
6
6
  children?: Array<HeadingItem>;
7
7
  };
8
- export declare const headingsPlugin: () => (tree: Root, vFile: any) => void;
8
+ export declare const headingsPlugin: () => (tree: Root, vFile: {
9
+ data: Record<string, unknown>;
10
+ }) => void;
9
11
  //# sourceMappingURL=headings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../src/plugins/headings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,OAAO,CAAA;AAO1C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,cAAc,eACX,IAAI,SAAS,GAAG,SAmB/B,CAAA"}
1
+ {"version":3,"file":"headings.d.ts","sourceRoot":"","sources":["../../../src/plugins/headings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,OAAO,CAAA;AAO1C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,cAAc,SACjB,MAAM,IAAI,EAAE,OAAO;IAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,SAsB7D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/plugins/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEpC,eAAO,MAAM,WAAW,SAAU,IAAI,KAAG,IAAI,IAAI,UAMhD,CAAA;AAED,eAAO,MAAM,oBAAoB,SAAU,IAAI,KAAG,IAAI,IAAI,UAEzD,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,IAAI,KAAG,IAAI,IAAI,UAEpD,CAAA;AAED,eAAO,MAAM,eAAe,SAAU,IAAI,KAAG,IAAI,IAAI,UAEpD,CAAA;AAED,eAAO,MAAM,SAAS,SAAU,IAAI,KAAG,IAAI,IAAI,OAE9C,CAAA"}
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/plugins/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEpC,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,KAAG,IAAI,IAAI,UAMhD,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,MAAM,IAAI,KAAG,IAAI,IAAI,UAEzD,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,KAAG,IAAI,IAAI,UAEpD,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,KAAG,IAAI,IAAI,UAEpD,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,IAAI,IAAI,OAE9C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"linkButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/linkButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,gBAAgB,eACb,IAAI,SAenB,CAAA"}
1
+ {"version":3,"file":"linkButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/linkButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,eAAO,MAAM,gBAAgB,SACnB,MAAM,IAAI,SAgBnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"youtube.d.ts","sourceRoot":"","sources":["../../../src/plugins/youtube.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAOjC,eAAO,MAAM,aAAa,eACV,IAAI,SAuCnB,CAAA"}
1
+ {"version":3,"file":"youtube.d.ts","sourceRoot":"","sources":["../../../src/plugins/youtube.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAOjC,eAAO,MAAM,aAAa,SAChB,MAAM,IAAI,SAwCnB,CAAA"}
@@ -1,17 +1,55 @@
1
1
  #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
2
+ # Resolve $0 through symlinks so basedir is the shim's real directory.
3
+ # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ link="$0"
5
+ hops=0
6
+ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
+ hops=$((hops+1))
8
+ target=$(readlink "$link")
9
+ case "$target" in
10
+ /*) link="$target" ;;
11
+ *) link="$(dirname "$link")/$target" ;;
12
+ esac
13
+ done
14
+ basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
15
+ basedir_win="$basedir"
16
+ exe=""
17
+ msys=""
3
18
 
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
19
+ case `uname -a` in
20
+ *CYGWIN*|*MINGW*|*MSYS*)
21
+ if command -v cygpath > /dev/null 2>&1; then
22
+ basedir_win=`cygpath -w "$basedir"`
23
+ fi
24
+ exe=".exe"
25
+ msys="true"
26
+ ;;
27
+ *WSL2*)
28
+ if command -v wslpath > /dev/null 2>&1; then
29
+ basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
+ if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
+ basedir_win="$basedir"
32
+ else
33
+ exe=".exe"
34
+ fi
35
+ fi
36
+ ;;
6
37
  esac
7
38
 
8
39
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/bin/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/node_modules"
40
+ export NODE_PATH="/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules/autoprefixer/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/node_modules"
10
41
  else
11
- export NODE_PATH="/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/bin/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
42
+ export NODE_PATH="/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules/autoprefixer/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
12
43
  fi
13
- if [ -x "$basedir/node" ]; then
44
+ if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
+ exec "$basedir/node.exe" "$basedir_win/../autoprefixer/bin/autoprefixer" "$@"
46
+ elif [ -x "$basedir/node" ]; then
14
47
  exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@"
48
+ elif command -v node >/dev/null 2>&1; then
49
+ exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
50
+ elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
+ exec node.exe "$basedir_win/../autoprefixer/bin/autoprefixer" "$@"
15
52
  else
16
53
  exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
17
54
  fi
55
+ # cmd-shim-target=/home/runner/work/sakura-ui/sakura-ui/packages/markdown/node_modules/autoprefixer/bin/autoprefixer
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-ui/markdown",
3
- "version": "0.1.2",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "markdown"
@@ -9,7 +9,7 @@
9
9
  "homepage": "https://github.com/glassonion1/sakura-ui",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "git+ssh://git@github.com:glassonion1/sakura-ui.git",
12
+ "url": "git+https://github.com/glassonion1/sakura-ui.git",
13
13
  "directory": "packages/markdown"
14
14
  },
15
15
  "license": "MIT",
@@ -38,19 +38,20 @@
38
38
  "build": "run-p build:*",
39
39
  "build:scripts": "vite build",
40
40
  "build:types": "tsc && tsc-alias",
41
- "test": "vitest"
41
+ "test": "vitest run --passWithNoTests",
42
+ "test:watch": "vitest"
42
43
  },
43
44
  "peerDependencies": {
44
- "react": "^19.0.0",
45
- "react-dom": "^19.0.0",
46
- "tailwindcss": "^3.4.5",
47
- "@sakura-ui/core": "^0.3.2"
45
+ "@sakura-ui/core": "^0.4.0-beta.0",
46
+ "react": "^19.2.1",
47
+ "react-dom": "^19.2.1",
48
+ "tailwindcss": "^4.1.17"
48
49
  },
49
50
  "dependencies": {
50
- "@sakura-ui/helper": "0.0.5",
51
+ "@sakura-ui/helper": "workspace:*",
51
52
  "github-slugger": "^2.0.0",
52
- "hastscript": "^9.0.0",
53
- "mdast-util-directive": "^3.0.0",
53
+ "hastscript": "^9.0.1",
54
+ "mdast-util-directive": "^3.1.0",
54
55
  "mdast-util-to-string": "^4.0.0",
55
56
  "rehype-external-links": "^3.0.0",
56
57
  "rehype-raw": "^7.0.0",
@@ -59,12 +60,12 @@
59
60
  "rehype-slug": "^6.0.0",
60
61
  "remark": "^15.0.1",
61
62
  "remark-breaks": "^4.0.0",
62
- "remark-directive": "^3.0.0",
63
- "remark-gfm": "^4.0.0",
63
+ "remark-directive": "^3.0.1",
64
+ "remark-gfm": "^4.0.1",
64
65
  "remark-parse": "^11.0.0",
65
- "remark-rehype": "^11.1.0",
66
+ "remark-rehype": "^11.1.2",
66
67
  "unified": "^11.0.5",
67
- "unist-util-visit": "^5.0.0"
68
+ "unist-util-visit": "^5.1.0"
68
69
  },
69
70
  "devDependencies": {
70
71
  "@testing-library/jest-dom": "catalog:",
@@ -72,7 +73,7 @@
72
73
  "@types/mdast": "^4.0.4",
73
74
  "@types/react": "catalog:",
74
75
  "@types/react-dom": "catalog:",
75
- "@types/unist": "^3.0.2",
76
+ "@types/unist": "^3.0.3",
76
77
  "autoprefixer": "catalog:",
77
78
  "happy-dom": "catalog:",
78
79
  "postcss": "catalog:",
@@ -192,9 +192,11 @@ const Img = (props: ImgProps) => {
192
192
  }
193
193
 
194
194
  if (restProps['data-node'] === 'cell-img') {
195
+ // biome-ignore lint/a11y/useAltText: alt is carried by restProps from the markdown image syntax
195
196
  return <img className={cx('mb-4', className)} {...restProps} />
196
197
  }
197
198
 
199
+ // biome-ignore lint/a11y/useAltText: alt is carried by restProps from the markdown image syntax
198
200
  return <img className={className} {...restProps} />
199
201
  }
200
202
 
@@ -250,6 +252,7 @@ export const Markdown = ({
250
252
  const [element, setElement] = React.useState(<React.Fragment />)
251
253
 
252
254
  const markdown2Headings = React.useCallback((md: string) => {
255
+ // biome-ignore lint/suspicious/noExplicitAny: remark does not type the data that plugins attach to the VFile
253
256
  const result: any = remark().use(headingsPlugin).processSync(md)
254
257
 
255
258
  const headings: HeadingItem[] = result.data.fm.headings.filter(
@@ -312,6 +315,7 @@ export const Markdown = ({
312
315
  .use(rehypeExternalLinks, { target: '_blank' }) // hast -> hast
313
316
  .use(rebypeShiftHeding, { shift: shiftHeding }) // hast -> hast
314
317
  .use(rehypeSlug)
318
+ // biome-ignore lint/suspicious/noExplicitAny: rehype-react's declared option type rejects the component map it accepts at runtime
315
319
  .use(rehypeReact, rhypeReactOptions as any) // hast -> React Elements
316
320
  .processSync(md).result
317
321
  return elem
@@ -20,7 +20,10 @@ export const gridPlugin = () => {
20
20
  node.attributes['data-behavior'] = 'list'
21
21
  }
22
22
 
23
- const gridNum: number = Number.parseInt(node.name.split('-').pop() || '1')
23
+ const gridNum: number = Number.parseInt(
24
+ node.name.split('-').pop() || '1',
25
+ 10
26
+ )
24
27
 
25
28
  // Tailwind doesn't generate CSS for string interpolation
26
29
  const gridClass: { [key: number]: string } = {
@@ -13,7 +13,7 @@ export type HeadingItem = {
13
13
  }
14
14
 
15
15
  export const headingsPlugin = () => {
16
- return (tree: Root, vFile: any) => {
16
+ return (tree: Root, vFile: { data: Record<string, unknown> }) => {
17
17
  const headings: Array<HeadingItem> = []
18
18
  const slugger = new Slugger()
19
19
 
@@ -29,7 +29,10 @@ export const headingsPlugin = () => {
29
29
 
30
30
  visit(tree, isHeading, getFlatHeadingsList)
31
31
 
32
- if (!vFile.data.fm) vFile.data.fm = {}
33
- vFile.data.fm.headings = treefy(headings)
32
+ if (!vFile.data.fm) {
33
+ vFile.data.fm = {}
34
+ }
35
+ const fm = vFile.data.fm as { headings?: Array<HeadingItem> }
36
+ fm.headings = treefy(headings)
34
37
  }
35
38
  }
@@ -11,7 +11,8 @@ export const linkButtonPlugin = () => {
11
11
  visit(tree, isTextDirective, (node: Directives) => {
12
12
  if (node.name !== 'link-button') return
13
13
 
14
- const data = node.data || (node.data = {})
14
+ node.data ??= {}
15
+ const data = node.data
15
16
  const tagName = 'a'
16
17
 
17
18
  data.hName = tagName
@@ -11,7 +11,8 @@ export const youtubePlugin = () => {
11
11
  if (node.type === 'containerDirective' || node.type === 'leafDirective') {
12
12
  if (node.name !== 'youtube') return
13
13
 
14
- const data = node.data || (node.data = {})
14
+ node.data ??= {}
15
+ const data = node.data
15
16
  const attributes = node.attributes || {}
16
17
  const id = attributes.id
17
18
 
@@ -22,8 +23,8 @@ export const youtubePlugin = () => {
22
23
  const child = node.children[0] as Literal
23
24
 
24
25
  const title = child.value as string
25
- const width = attributes.width
26
- const height = attributes.height
26
+ const width = attributes.width ?? undefined
27
+ const height = attributes.height ?? undefined
27
28
  const allow =
28
29
  attributes.allow ||
29
30
  'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture'
@@ -36,7 +37,7 @@ export const youtubePlugin = () => {
36
37
  src: `https://www.youtube-nocookie.com/embed/${id}`,
37
38
  width: width,
38
39
  height: height,
39
- frameBorder: 0,
40
+ frameBorder: '0',
40
41
  allow: allow,
41
42
  referrerpolicy: referrerpolicy,
42
43
  allowFullScreen: true,
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@sakura-ui/tailwind-theme-plugin",
3
+ "version": "0.4.0",
4
+ "description": "",
5
+ "keywords": [],
6
+ "author": "glassonion1",
7
+ "homepage": "https://github.com/glassonion1/sakura-ui",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+ssh://git@github.com:glassonion1/sakura-ui.git",
11
+ "directory": "packages/config"
12
+ },
13
+ "license": "MIT",
14
+ "type": "module",
15
+ "main": "dist/index.cjs.js",
16
+ "types": "dist/types/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/types/index.d.ts",
20
+ "require": "./dist/index.cjs.js",
21
+ "import": "./dist/index.es.js"
22
+ }
23
+ },
24
+ "sideEffects": false,
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "scripts": {
32
+ "lint": "run-s lint:*",
33
+ "lint:eslint": "biome lint ./",
34
+ "lint:prettier": "prettier --write --ignore-path .gitignore './src/*.ts'",
35
+ "prebuild": "rimraf dist",
36
+ "build": "run-p build:*",
37
+ "build:scripts": "vite build",
38
+ "build:types": "tsc && tsc-alias",
39
+ "test": "vitest"
40
+ },
41
+ "peerDependencies": {
42
+ "tailwindcss": "^4.1.17"
43
+ },
44
+ "devDependencies": {
45
+ "@digital-go-jp/design-tokens": "^1.1.0",
46
+ "@tailwindcss/vite": "catalog:",
47
+ "autoprefixer": "catalog:",
48
+ "postcss": "catalog:",
49
+ "tailwindcss": "catalog:"
50
+ }
51
+ }
@@ -1,22 +1,12 @@
1
-
2
- 
3
- > @sakura-ui/tailwind-theme-plugin@0.3.1 prebuild /Users/t.fujita/Documents/Repos/sakura-ui/packages/tailwind-theme-plugin
4
- > rimraf dist
5
-
6
-
7
- > @sakura-ui/tailwind-theme-plugin@0.3.1 build /Users/t.fujita/Documents/Repos/sakura-ui/packages/tailwind-theme-plugin
8
- > run-p build:*
9
-
10
-
11
- > @sakura-ui/tailwind-theme-plugin@0.3.1 build:scripts /Users/t.fujita/Documents/Repos/sakura-ui/packages/tailwind-theme-plugin
12
- > vite build
13
-
14
-
15
- > @sakura-ui/tailwind-theme-plugin@0.3.1 build:types /Users/t.fujita/Documents/Repos/sakura-ui/packages/tailwind-theme-plugin
16
- > tsc && tsc-alias
17
-
18
- vite v6.0.3 building for production...
19
- transforming (1) src/index.tstransforming (5) ../../node_modules/.pnpm/tailwindcss@3.4.16_ts-node@10.9.2_@swc+core@1.10.1_@types+node@22.10.2_types✓ 10 modules transformed.
20
- rendering chunks (1)...computing gzip size (0)...computing gzip size (1)...dist/index.es.js 148.47 kB │ gzip: 8.96 kB
21
- rendering chunks (1)...computing gzip size (1)...dist/index.cjs.js 72.23 kB │ gzip: 7.64 kB
22
- ✓ built in 263ms
1
+ $ rimraf dist
2
+ $ run-p build:*
3
+ $ vite build
4
+ $ tsc && tsc-alias
5
+ vite v7.3.6 building client environment for production...
6
+ transforming...
7
+ ✓ 5 modules transformed.
8
+ rendering chunks...
9
+ computing gzip size...
10
+ dist/index.es.js 160.05 kB │ gzip: 10.15 kB
11
+ dist/index.cjs.js 88.17 kB │ gzip: 8.80 kB
12
+ ✓ built in 552ms