@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.
- package/README.md +71 -0
- package/package.json +26 -25
- package/packages/core/package.json +10 -8
- package/packages/core/src/components/Button.tsx +1 -1
- package/packages/core/src/components/Card.tsx +8 -3
- package/packages/core/src/components/IconButton.tsx +1 -1
- package/packages/core/src/components/LangSelector.tsx +2 -2
- package/packages/core/src/components/Link.tsx +0 -1
- package/packages/core/src/components/LinkCard.tsx +87 -52
- package/packages/core/src/components/MenuButton.tsx +2 -2
- package/packages/core/src/components/NavigationItem.tsx +1 -1
- package/packages/core/src/components/NotificationBanner.tsx +20 -0
- package/packages/core/src/components/PopoverMenu.tsx +1 -0
- package/packages/core/src/components/buttonStyle.ts +1 -1
- package/packages/core/src/components/index.ts +1 -1
- package/packages/core/src/icons/index.ts +1 -1
- package/packages/core/src/index.ts +1 -0
- package/packages/core/vite.config.ts +2 -1
- package/packages/forms/.turbo/turbo-build.log +12 -22
- package/packages/forms/dist/index.cjs.js +52 -79
- package/packages/forms/dist/index.es.js +455 -646
- package/packages/forms/dist/types/components/Checkbox.d.ts +2 -2
- package/packages/forms/dist/types/components/Checkbox.d.ts.map +1 -1
- package/packages/forms/dist/types/components/FieldsetControl.d.ts +2 -2
- package/packages/forms/dist/types/components/FieldsetControl.d.ts.map +1 -1
- package/packages/forms/dist/types/components/FileInput.d.ts +2 -2
- package/packages/forms/dist/types/components/FileInput.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Input.d.ts +2 -2
- package/packages/forms/dist/types/components/Input.d.ts.map +1 -1
- package/packages/forms/dist/types/components/LabelControl.d.ts +2 -2
- package/packages/forms/dist/types/components/LabelControl.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Radio.d.ts +2 -2
- package/packages/forms/dist/types/components/Radio.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Select.d.ts +2 -2
- package/packages/forms/dist/types/components/Select.d.ts.map +1 -1
- package/packages/forms/dist/types/components/Textarea.d.ts +2 -2
- package/packages/forms/dist/types/components/Textarea.d.ts.map +1 -1
- package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts +1 -1
- package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts +1 -1
- package/packages/forms/dist/types/components/inputStyle.d.ts +1 -1
- package/packages/forms/dist/types/components/inputStyle.d.ts.map +1 -1
- package/packages/forms/node_modules/.bin/autoprefixer +44 -6
- package/packages/forms/package.json +9 -7
- package/packages/forms/src/components/Checkbox.tsx +1 -2
- package/packages/forms/src/components/FileInput.tsx +3 -3
- package/packages/forms/src/components/Input.tsx +0 -1
- package/packages/forms/src/components/Radio.tsx +0 -1
- package/packages/forms/src/components/Select.tsx +0 -1
- package/packages/forms/src/components/Textarea.tsx +0 -1
- package/packages/forms/tests/FieldsetControl.test.tsx +8 -2
- package/packages/forms/tests/FileInput.test.tsx +30 -5
- package/packages/forms/tests/LabelControl.test.tsx +8 -2
- package/packages/forms/vite.config.ts +2 -1
- package/packages/helper/.turbo/turbo-build.log +12 -23
- package/packages/helper/dist/index.cjs.js +7 -9
- package/packages/helper/dist/index.es.js +23 -23
- package/packages/helper/dist/types/calc.d.ts.map +1 -1
- package/packages/helper/dist/types/cx.d.ts.map +1 -1
- package/packages/helper/dist/types/styles.d.ts +9 -9
- package/packages/helper/dist/types/styles.d.ts.map +1 -1
- package/packages/helper/dist/types/treefy.d.ts.map +1 -1
- package/packages/helper/node_modules/.bin/vitest +55 -0
- package/packages/helper/package.json +13 -3
- package/packages/helper/src/cx.ts +1 -1
- package/packages/helper/src/styles.ts +2 -4
- package/packages/helper/src/treefy.ts +3 -1
- package/packages/helper/tests/calc.test.ts +22 -0
- package/packages/helper/tests/cx.test.ts +30 -0
- package/packages/helper/tests/querySelector.test.ts +24 -0
- package/packages/helper/tests/treefy.test.ts +111 -0
- package/packages/helper/tests/vitest.setup.ts +2 -0
- package/packages/markdown/.turbo/turbo-build.log +12 -22
- package/packages/markdown/dist/index.cjs.js +37 -63
- package/packages/markdown/dist/index.es.js +4287 -4425
- package/packages/markdown/dist/types/components/Markdown.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/attr.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/card.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/cell.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/faq.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/grid.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/headings.d.ts +3 -1
- package/packages/markdown/dist/types/plugins/headings.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/helper.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/linkButton.d.ts.map +1 -1
- package/packages/markdown/dist/types/plugins/youtube.d.ts.map +1 -1
- package/packages/markdown/node_modules/.bin/autoprefixer +44 -6
- package/packages/markdown/package.json +16 -15
- package/packages/markdown/src/components/Markdown.tsx +4 -0
- package/packages/markdown/src/plugins/grid.ts +4 -1
- package/packages/markdown/src/plugins/headings.ts +6 -3
- package/packages/markdown/src/plugins/linkButton.ts +2 -1
- package/packages/markdown/src/plugins/youtube.ts +5 -4
- package/packages/tailwind-theme-plugin/#package.json# +51 -0
- package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +12 -22
- package/packages/tailwind-theme-plugin/dist/index.cjs.js +1 -1
- package/packages/tailwind-theme-plugin/dist/index.es.js +1111 -1477
- package/packages/tailwind-theme-plugin/dist/types/index.d.ts +1 -4
- package/packages/tailwind-theme-plugin/dist/types/index.d.ts.map +1 -1
- package/packages/tailwind-theme-plugin/node_modules/.bin/autoprefixer +44 -6
- package/packages/tailwind-theme-plugin/package.json +8 -6
- package/packages/tailwind-theme-plugin/src/index.ts +15 -58
- package/packages/tailwind-theme-plugin/vite.config.ts +2 -0
- package/packages/forms/node_modules/.bin/tailwind +0 -17
- package/packages/forms/node_modules/.bin/tailwindcss +0 -17
- package/packages/forms/node_modules/.bin/ts-node +0 -17
- package/packages/forms/node_modules/.bin/ts-node-cwd +0 -17
- package/packages/forms/node_modules/.bin/ts-node-esm +0 -17
- package/packages/forms/node_modules/.bin/ts-node-script +0 -17
- package/packages/forms/node_modules/.bin/ts-node-transpile-only +0 -17
- package/packages/forms/node_modules/.bin/ts-script +0 -17
- package/packages/forms/node_modules/.bin/tsc +0 -17
- package/packages/forms/node_modules/.bin/tsserver +0 -17
- package/packages/forms/node_modules/.vite/vitest/results.json +0 -1
- package/packages/markdown/node_modules/.bin/tailwind +0 -17
- package/packages/markdown/node_modules/.bin/tailwindcss +0 -17
- package/packages/markdown/node_modules/.bin/ts-node +0 -17
- package/packages/markdown/node_modules/.bin/ts-node-cwd +0 -17
- package/packages/markdown/node_modules/.bin/ts-node-esm +0 -17
- package/packages/markdown/node_modules/.bin/ts-node-script +0 -17
- package/packages/markdown/node_modules/.bin/ts-node-transpile-only +0 -17
- package/packages/markdown/node_modules/.bin/ts-script +0 -17
- package/packages/markdown/node_modules/.bin/tsc +0 -17
- package/packages/markdown/node_modules/.bin/tsserver +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/tailwind +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/tailwindcss +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-cwd +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-esm +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-script +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-transpile-only +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/ts-script +0 -17
- package/packages/tailwind-theme-plugin/node_modules/.bin/tsc +0 -17
- 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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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:
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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="/
|
|
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="/
|
|
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.
|
|
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+
|
|
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
|
-
"
|
|
45
|
-
"react
|
|
46
|
-
"
|
|
47
|
-
"
|
|
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": "
|
|
51
|
+
"@sakura-ui/helper": "workspace:*",
|
|
51
52
|
"github-slugger": "^2.0.0",
|
|
52
|
-
"hastscript": "^9.0.
|
|
53
|
-
"mdast-util-directive": "^3.
|
|
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.
|
|
63
|
-
"remark-gfm": "^4.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.
|
|
66
|
+
"remark-rehype": "^11.1.2",
|
|
66
67
|
"unified": "^11.0.5",
|
|
67
|
-
"unist-util-visit": "^5.
|
|
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.
|
|
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(
|
|
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:
|
|
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)
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
[36mvite v6.0.3 [32mbuilding for production...[36m[39m
|
|
19
|
-
[2K[1Gtransforming (1) [2msrc/index.ts[22m[2K[1Gtransforming (5) [2m../../node_modules/.pnpm/tailwindcss@3.4.16_ts-node@10.9.2_@swc+core@1.10.1_@types+node@22.10.2_types[2K[1G[32m✓[39m 10 modules transformed.
|
|
20
|
-
[2K[1Grendering chunks (1)...[2K[1G[2K[1Gcomputing gzip size (0)...[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.es.js [39m[1m[2m148.47 kB[22m[1m[22m[2m │ gzip: 8.96 kB[22m
|
|
21
|
-
[2K[1Grendering chunks (1)...[2K[1G[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.cjs.js [39m[1m[2m72.23 kB[22m[1m[22m[2m │ gzip: 7.64 kB[22m
|
|
22
|
-
[32m✓ built in 263ms[39m
|
|
1
|
+
$ rimraf dist
|
|
2
|
+
$ run-p build:*
|
|
3
|
+
$ vite build
|
|
4
|
+
$ tsc && tsc-alias
|
|
5
|
+
[36mvite v7.3.6 [32mbuilding client environment for production...[36m[39m
|
|
6
|
+
transforming...
|
|
7
|
+
[32m✓[39m 5 modules transformed.
|
|
8
|
+
rendering chunks...
|
|
9
|
+
computing gzip size...
|
|
10
|
+
[2mdist/[22m[36mindex.es.js [39m[1m[2m160.05 kB[22m[1m[22m[2m │ gzip: 10.15 kB[22m
|
|
11
|
+
[2mdist/[22m[36mindex.cjs.js [39m[1m[2m88.17 kB[22m[1m[22m[2m │ gzip: 8.80 kB[22m
|
|
12
|
+
[32m✓ built in 552ms[39m
|