@ewjdev/anyclick-react-tailwind 1.0.0

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 ADDED
@@ -0,0 +1,17 @@
1
+ # @ewjdev/anyclick-react-tailwind
2
+
3
+ Tailwind companion styling package for `@ewjdev/anyclick-react`.
4
+
5
+ ```tsx
6
+ import { AnyclickProvider } from "@ewjdev/anyclick-react";
7
+ import {
8
+ TailwindAnyclickStyleProvider,
9
+ } from "@ewjdev/anyclick-react-tailwind";
10
+ import "@ewjdev/anyclick-react-tailwind/tailwind.css";
11
+ ```
12
+
13
+ Exports:
14
+
15
+ - `createTailwindAnyclickStyleAdapter(options?)`
16
+ - `TailwindAnyclickStyleProvider`
17
+ - `tailwind.css`
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { AnyclickStyleAdapter, AnyclickStyleProviderProps } from '@ewjdev/anyclick-react';
3
+
4
+ interface TailwindAnyclickStyleOptions {
5
+ classNamePrefix?: string;
6
+ }
7
+ declare function createTailwindAnyclickStyleAdapter(options?: TailwindAnyclickStyleOptions): AnyclickStyleAdapter;
8
+ interface TailwindAnyclickStyleProviderProps extends AnyclickStyleProviderProps {
9
+ options?: TailwindAnyclickStyleOptions;
10
+ }
11
+ declare function TailwindAnyclickStyleProvider({ children, options, ...rest }: TailwindAnyclickStyleProviderProps): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type TailwindAnyclickStyleOptions, TailwindAnyclickStyleProvider, type TailwindAnyclickStyleProviderProps, createTailwindAnyclickStyleAdapter };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { AnyclickStyleAdapter, AnyclickStyleProviderProps } from '@ewjdev/anyclick-react';
3
+
4
+ interface TailwindAnyclickStyleOptions {
5
+ classNamePrefix?: string;
6
+ }
7
+ declare function createTailwindAnyclickStyleAdapter(options?: TailwindAnyclickStyleOptions): AnyclickStyleAdapter;
8
+ interface TailwindAnyclickStyleProviderProps extends AnyclickStyleProviderProps {
9
+ options?: TailwindAnyclickStyleOptions;
10
+ }
11
+ declare function TailwindAnyclickStyleProvider({ children, options, ...rest }: TailwindAnyclickStyleProviderProps): react_jsx_runtime.JSX.Element;
12
+
13
+ export { type TailwindAnyclickStyleOptions, TailwindAnyclickStyleProvider, type TailwindAnyclickStyleProviderProps, createTailwindAnyclickStyleAdapter };
package/dist/index.js ADDED
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.tsx
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ TailwindAnyclickStyleProvider: () => TailwindAnyclickStyleProvider,
24
+ createTailwindAnyclickStyleAdapter: () => createTailwindAnyclickStyleAdapter
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+ var import_react = require("react");
28
+ var import_anyclick_react = require("@ewjdev/anyclick-react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ function classNameMap(prefix) {
31
+ return {
32
+ "comment.primaryAction": `${prefix}-action ${prefix}-action-primary`,
33
+ "comment.secondaryAction": `${prefix}-action`,
34
+ "comment.section": `${prefix}-comment-section`,
35
+ "comment.textarea": `${prefix}-field ${prefix}-textarea`,
36
+ "inspect.action": `${prefix}-action`,
37
+ "inspect.content": `${prefix}-inspect-content`,
38
+ "inspect.header": `${prefix}-header`,
39
+ "inspect.surface": `${prefix}-surface`,
40
+ "menu.backButton": `${prefix}-menu-item ${prefix}-menu-back`,
41
+ "menu.dragHandle": `${prefix}-icon-button`,
42
+ "menu.header": `${prefix}-header`,
43
+ "menu.headerAction": `${prefix}-icon-button`,
44
+ "menu.item": `${prefix}-menu-item`,
45
+ "menu.itemBadge": `${prefix}-badge`,
46
+ "menu.itemIcon": `${prefix}-menu-icon`,
47
+ "menu.itemLabel": `${prefix}-menu-label`,
48
+ "menu.list": `${prefix}-menu-list`,
49
+ "menu.overlay": `${prefix}-overlay`,
50
+ "menu.submenuIndicator": `${prefix}-submenu-indicator`,
51
+ "menu.surface": `${prefix}-surface ${prefix}-menu-surface`,
52
+ "quickChat.header": `${prefix}-header`,
53
+ "quickChat.input": `${prefix}-field ${prefix}-textarea`,
54
+ "quickChat.messageList": `${prefix}-message-list`,
55
+ "quickChat.submit": `${prefix}-icon-button`,
56
+ "quickChat.surface": `${prefix}-surface`,
57
+ "screenshot.action": `${prefix}-action`,
58
+ "screenshot.empty": `${prefix}-empty`,
59
+ "screenshot.error": `${prefix}-empty ${prefix}-error`,
60
+ "screenshot.header": `${prefix}-header ${prefix}-screenshot-header`,
61
+ "screenshot.meta": `${prefix}-meta`,
62
+ "screenshot.preview": `${prefix}-preview`,
63
+ "screenshot.surface": `${prefix}-surface`,
64
+ "screenshot.tab": `${prefix}-tab`,
65
+ "screenshot.tabActive": `${prefix}-tab ${prefix}-tab-active`,
66
+ "shared.badge": `${prefix}-badge`,
67
+ "shared.button": `${prefix}-action`,
68
+ "shared.input": `${prefix}-field`,
69
+ "shared.textarea": `${prefix}-field ${prefix}-textarea`
70
+ };
71
+ }
72
+ function createTailwindAnyclickStyleAdapter(options = {}) {
73
+ const prefix = options.classNamePrefix ?? "ac-anyclick-tw";
74
+ const classes = classNameMap(prefix);
75
+ return {
76
+ name: "tailwind-companion",
77
+ resolveSlot: ({ slot }) => ({
78
+ className: classes[slot]
79
+ })
80
+ };
81
+ }
82
+ function TailwindAnyclickStyleProvider({
83
+ children,
84
+ options,
85
+ ...rest
86
+ }) {
87
+ const adapter = (0, import_react.useMemo)(
88
+ () => createTailwindAnyclickStyleAdapter(options),
89
+ [options?.classNamePrefix]
90
+ );
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_anyclick_react.AnyclickStyleProvider, { styleAdapter: adapter, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_anyclick_react.AnyclickStyleProvider, { ...rest, children }) });
92
+ }
93
+ // Annotate the CommonJS export names for ESM import in node:
94
+ 0 && (module.exports = {
95
+ TailwindAnyclickStyleProvider,
96
+ createTailwindAnyclickStyleAdapter
97
+ });
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport {\n AnyclickStyleProvider,\n type AnyclickStyleAdapter,\n type AnyclickStyleProviderProps,\n type AnyclickStyleSlot,\n} from \"@ewjdev/anyclick-react\";\n\nexport interface TailwindAnyclickStyleOptions {\n classNamePrefix?: string;\n}\n\nfunction classNameMap(prefix: string): Record<AnyclickStyleSlot, string> {\n return {\n \"comment.primaryAction\": `${prefix}-action ${prefix}-action-primary`,\n \"comment.secondaryAction\": `${prefix}-action`,\n \"comment.section\": `${prefix}-comment-section`,\n \"comment.textarea\": `${prefix}-field ${prefix}-textarea`,\n \"inspect.action\": `${prefix}-action`,\n \"inspect.content\": `${prefix}-inspect-content`,\n \"inspect.header\": `${prefix}-header`,\n \"inspect.surface\": `${prefix}-surface`,\n \"menu.backButton\": `${prefix}-menu-item ${prefix}-menu-back`,\n \"menu.dragHandle\": `${prefix}-icon-button`,\n \"menu.header\": `${prefix}-header`,\n \"menu.headerAction\": `${prefix}-icon-button`,\n \"menu.item\": `${prefix}-menu-item`,\n \"menu.itemBadge\": `${prefix}-badge`,\n \"menu.itemIcon\": `${prefix}-menu-icon`,\n \"menu.itemLabel\": `${prefix}-menu-label`,\n \"menu.list\": `${prefix}-menu-list`,\n \"menu.overlay\": `${prefix}-overlay`,\n \"menu.submenuIndicator\": `${prefix}-submenu-indicator`,\n \"menu.surface\": `${prefix}-surface ${prefix}-menu-surface`,\n \"quickChat.header\": `${prefix}-header`,\n \"quickChat.input\": `${prefix}-field ${prefix}-textarea`,\n \"quickChat.messageList\": `${prefix}-message-list`,\n \"quickChat.submit\": `${prefix}-icon-button`,\n \"quickChat.surface\": `${prefix}-surface`,\n \"screenshot.action\": `${prefix}-action`,\n \"screenshot.empty\": `${prefix}-empty`,\n \"screenshot.error\": `${prefix}-empty ${prefix}-error`,\n \"screenshot.header\": `${prefix}-header ${prefix}-screenshot-header`,\n \"screenshot.meta\": `${prefix}-meta`,\n \"screenshot.preview\": `${prefix}-preview`,\n \"screenshot.surface\": `${prefix}-surface`,\n \"screenshot.tab\": `${prefix}-tab`,\n \"screenshot.tabActive\": `${prefix}-tab ${prefix}-tab-active`,\n \"shared.badge\": `${prefix}-badge`,\n \"shared.button\": `${prefix}-action`,\n \"shared.input\": `${prefix}-field`,\n \"shared.textarea\": `${prefix}-field ${prefix}-textarea`,\n };\n}\n\nexport function createTailwindAnyclickStyleAdapter(\n options: TailwindAnyclickStyleOptions = {},\n): AnyclickStyleAdapter {\n const prefix = options.classNamePrefix ?? \"ac-anyclick-tw\";\n const classes = classNameMap(prefix);\n\n return {\n name: \"tailwind-companion\",\n resolveSlot: ({ slot }) => ({\n className: classes[slot],\n }),\n };\n}\n\nexport interface TailwindAnyclickStyleProviderProps\n extends AnyclickStyleProviderProps {\n options?: TailwindAnyclickStyleOptions;\n}\n\nexport function TailwindAnyclickStyleProvider({\n children,\n options,\n ...rest\n}: TailwindAnyclickStyleProviderProps) {\n const adapter = useMemo(\n () => createTailwindAnyclickStyleAdapter(options),\n [options?.classNamePrefix],\n );\n\n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AAU,MAAM;AAAA,IAC7C,qBAAqB,GAAG,MAAM,WAAW,MAAM;AAAA,IAC/C,mBAAmB,GAAG,MAAM;AAAA,IAC5B,sBAAsB,GAAG,MAAM;AAAA,IAC/B,sBAAsB,GAAG,MAAM;AAAA,IAC/B,kBAAkB,GAAG,MAAM;AAAA,IAC3B,wBAAwB,GAAG,MAAM,QAAQ,MAAM;AAAA,IAC/C,gBAAgB,GAAG,MAAM;AAAA,IACzB,iBAAiB,GAAG,MAAM;AAAA,IAC1B,gBAAgB,GAAG,MAAM;AAAA,IACzB,mBAAmB,GAAG,MAAM,UAAU,MAAM;AAAA,EAC9C;AACF;AAEO,SAAS,mCACd,UAAwC,CAAC,GACnB;AACtB,QAAM,SAAS,QAAQ,mBAAmB;AAC1C,QAAM,UAAU,aAAa,MAAM;AAEnC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa,CAAC,EAAE,KAAK,OAAO;AAAA,MAC1B,WAAW,QAAQ,IAAI;AAAA,IACzB;AAAA,EACF;AACF;AAOO,SAAS,8BAA8B;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuC;AACrC,QAAM,cAAU;AAAA,IACd,MAAM,mCAAmC,OAAO;AAAA,IAChD,CAAC,SAAS,eAAe;AAAA,EAC3B;AAEA,SACE,4CAAC,+CAAsB,cAAc,SACnC,sDAAC,+CAAuB,GAAG,MAAO,UAAS,GAC7C;AAEJ;","names":[]}
package/dist/index.mjs ADDED
@@ -0,0 +1,74 @@
1
+ // src/index.tsx
2
+ import { useMemo } from "react";
3
+ import {
4
+ AnyclickStyleProvider
5
+ } from "@ewjdev/anyclick-react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function classNameMap(prefix) {
8
+ return {
9
+ "comment.primaryAction": `${prefix}-action ${prefix}-action-primary`,
10
+ "comment.secondaryAction": `${prefix}-action`,
11
+ "comment.section": `${prefix}-comment-section`,
12
+ "comment.textarea": `${prefix}-field ${prefix}-textarea`,
13
+ "inspect.action": `${prefix}-action`,
14
+ "inspect.content": `${prefix}-inspect-content`,
15
+ "inspect.header": `${prefix}-header`,
16
+ "inspect.surface": `${prefix}-surface`,
17
+ "menu.backButton": `${prefix}-menu-item ${prefix}-menu-back`,
18
+ "menu.dragHandle": `${prefix}-icon-button`,
19
+ "menu.header": `${prefix}-header`,
20
+ "menu.headerAction": `${prefix}-icon-button`,
21
+ "menu.item": `${prefix}-menu-item`,
22
+ "menu.itemBadge": `${prefix}-badge`,
23
+ "menu.itemIcon": `${prefix}-menu-icon`,
24
+ "menu.itemLabel": `${prefix}-menu-label`,
25
+ "menu.list": `${prefix}-menu-list`,
26
+ "menu.overlay": `${prefix}-overlay`,
27
+ "menu.submenuIndicator": `${prefix}-submenu-indicator`,
28
+ "menu.surface": `${prefix}-surface ${prefix}-menu-surface`,
29
+ "quickChat.header": `${prefix}-header`,
30
+ "quickChat.input": `${prefix}-field ${prefix}-textarea`,
31
+ "quickChat.messageList": `${prefix}-message-list`,
32
+ "quickChat.submit": `${prefix}-icon-button`,
33
+ "quickChat.surface": `${prefix}-surface`,
34
+ "screenshot.action": `${prefix}-action`,
35
+ "screenshot.empty": `${prefix}-empty`,
36
+ "screenshot.error": `${prefix}-empty ${prefix}-error`,
37
+ "screenshot.header": `${prefix}-header ${prefix}-screenshot-header`,
38
+ "screenshot.meta": `${prefix}-meta`,
39
+ "screenshot.preview": `${prefix}-preview`,
40
+ "screenshot.surface": `${prefix}-surface`,
41
+ "screenshot.tab": `${prefix}-tab`,
42
+ "screenshot.tabActive": `${prefix}-tab ${prefix}-tab-active`,
43
+ "shared.badge": `${prefix}-badge`,
44
+ "shared.button": `${prefix}-action`,
45
+ "shared.input": `${prefix}-field`,
46
+ "shared.textarea": `${prefix}-field ${prefix}-textarea`
47
+ };
48
+ }
49
+ function createTailwindAnyclickStyleAdapter(options = {}) {
50
+ const prefix = options.classNamePrefix ?? "ac-anyclick-tw";
51
+ const classes = classNameMap(prefix);
52
+ return {
53
+ name: "tailwind-companion",
54
+ resolveSlot: ({ slot }) => ({
55
+ className: classes[slot]
56
+ })
57
+ };
58
+ }
59
+ function TailwindAnyclickStyleProvider({
60
+ children,
61
+ options,
62
+ ...rest
63
+ }) {
64
+ const adapter = useMemo(
65
+ () => createTailwindAnyclickStyleAdapter(options),
66
+ [options?.classNamePrefix]
67
+ );
68
+ return /* @__PURE__ */ jsx(AnyclickStyleProvider, { styleAdapter: adapter, children: /* @__PURE__ */ jsx(AnyclickStyleProvider, { ...rest, children }) });
69
+ }
70
+ export {
71
+ TailwindAnyclickStyleProvider,
72
+ createTailwindAnyclickStyleAdapter
73
+ };
74
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport {\n AnyclickStyleProvider,\n type AnyclickStyleAdapter,\n type AnyclickStyleProviderProps,\n type AnyclickStyleSlot,\n} from \"@ewjdev/anyclick-react\";\n\nexport interface TailwindAnyclickStyleOptions {\n classNamePrefix?: string;\n}\n\nfunction classNameMap(prefix: string): Record<AnyclickStyleSlot, string> {\n return {\n \"comment.primaryAction\": `${prefix}-action ${prefix}-action-primary`,\n \"comment.secondaryAction\": `${prefix}-action`,\n \"comment.section\": `${prefix}-comment-section`,\n \"comment.textarea\": `${prefix}-field ${prefix}-textarea`,\n \"inspect.action\": `${prefix}-action`,\n \"inspect.content\": `${prefix}-inspect-content`,\n \"inspect.header\": `${prefix}-header`,\n \"inspect.surface\": `${prefix}-surface`,\n \"menu.backButton\": `${prefix}-menu-item ${prefix}-menu-back`,\n \"menu.dragHandle\": `${prefix}-icon-button`,\n \"menu.header\": `${prefix}-header`,\n \"menu.headerAction\": `${prefix}-icon-button`,\n \"menu.item\": `${prefix}-menu-item`,\n \"menu.itemBadge\": `${prefix}-badge`,\n \"menu.itemIcon\": `${prefix}-menu-icon`,\n \"menu.itemLabel\": `${prefix}-menu-label`,\n \"menu.list\": `${prefix}-menu-list`,\n \"menu.overlay\": `${prefix}-overlay`,\n \"menu.submenuIndicator\": `${prefix}-submenu-indicator`,\n \"menu.surface\": `${prefix}-surface ${prefix}-menu-surface`,\n \"quickChat.header\": `${prefix}-header`,\n \"quickChat.input\": `${prefix}-field ${prefix}-textarea`,\n \"quickChat.messageList\": `${prefix}-message-list`,\n \"quickChat.submit\": `${prefix}-icon-button`,\n \"quickChat.surface\": `${prefix}-surface`,\n \"screenshot.action\": `${prefix}-action`,\n \"screenshot.empty\": `${prefix}-empty`,\n \"screenshot.error\": `${prefix}-empty ${prefix}-error`,\n \"screenshot.header\": `${prefix}-header ${prefix}-screenshot-header`,\n \"screenshot.meta\": `${prefix}-meta`,\n \"screenshot.preview\": `${prefix}-preview`,\n \"screenshot.surface\": `${prefix}-surface`,\n \"screenshot.tab\": `${prefix}-tab`,\n \"screenshot.tabActive\": `${prefix}-tab ${prefix}-tab-active`,\n \"shared.badge\": `${prefix}-badge`,\n \"shared.button\": `${prefix}-action`,\n \"shared.input\": `${prefix}-field`,\n \"shared.textarea\": `${prefix}-field ${prefix}-textarea`,\n };\n}\n\nexport function createTailwindAnyclickStyleAdapter(\n options: TailwindAnyclickStyleOptions = {},\n): AnyclickStyleAdapter {\n const prefix = options.classNamePrefix ?? \"ac-anyclick-tw\";\n const classes = classNameMap(prefix);\n\n return {\n name: \"tailwind-companion\",\n resolveSlot: ({ slot }) => ({\n className: classes[slot],\n }),\n };\n}\n\nexport interface TailwindAnyclickStyleProviderProps\n extends AnyclickStyleProviderProps {\n options?: TailwindAnyclickStyleOptions;\n}\n\nexport function TailwindAnyclickStyleProvider({\n children,\n options,\n ...rest\n}: TailwindAnyclickStyleProviderProps) {\n const adapter = useMemo(\n () => createTailwindAnyclickStyleAdapter(options),\n [options?.classNamePrefix],\n );\n\n return (\n <AnyclickStyleProvider styleAdapter={adapter}>\n <AnyclickStyleProvider {...rest}>{children}</AnyclickStyleProvider>\n </AnyclickStyleProvider>\n );\n}\n"],"mappings":";AAAA,SAAgB,eAAe;AA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AkB,GAAG,MAAM;AAAA,IAC3B,wBAAwB,GAAG,MAAM,QAAQ,MAAM;AAAA,IAC/C,gBAAgB,GAAG,MAAM;AAAA,IACzB,iBAAiB,GAAG,MAAM;AAAA,IAC1B,gBAAgB,GAAG,MAAM;AAAA,IACzB,mBAAmB,GAAG,MAAM,UAAU,MAAM;AAAA,EAC9C;AACF;AAEO,SAAS,mCACd,UAAwC,CAAC,GACnB;AACtB,QAAM,SAAS,QAAQ,mBAAmB;AAC1C,QAAM,UAAU,aAAa,MAAM;AAEnC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa,CAAC,EAAE,KAAK,OAAO;AAAA,MAC1B,WAAW,QAAQ,IAAI;AAAA,IACzB;AAAA,EACF;AACF;AAOO,SAAS,8BAA8B;AAAA,EAC5C;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuC;AACrC,QAAM,UAAU;AAAA,IACd,MAAM,mCAAmC,OAAO;AAAA,IAChD,CAAC,SAAS,eAAe;AAAA,EAC3B;AAEA,SACE,oBAAC,yBAAsB,cAAc,SACnC,8BAAC,yBAAuB,GAAG,MAAO,UAAS,GAC7C;AAEJ;","names":[]}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@ewjdev/anyclick-react-tailwind",
3
+ "version": "1.0.0",
4
+ "private": false,
5
+ "description": "Tailwind style adapter package for @ewjdev/anyclick-react",
6
+ "license": "MIT",
7
+ "author": "ewjdev",
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "registry": "https://registry.npmjs.org/"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/ewjdev/anyclick.git",
15
+ "directory": "packages/anyclick-react-tailwind"
16
+ },
17
+ "sideEffects": [
18
+ "./src/tailwind.css"
19
+ ],
20
+ "main": "dist/index.js",
21
+ "module": "dist/index.mjs",
22
+ "types": "dist/index.d.ts",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "require": "./dist/index.js",
27
+ "import": "./dist/index.mjs"
28
+ },
29
+ "./tailwind.css": "./src/tailwind.css"
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "src/tailwind.css"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsup src/index.tsx --format esm,cjs --dts --sourcemap --external react",
37
+ "clean": "rimraf dist",
38
+ "dev": "tsup src/index.tsx --format esm,cjs --dts --sourcemap --external react --watch"
39
+ },
40
+ "dependencies": {
41
+ "@ewjdev/anyclick-react": "^5.0.0"
42
+ },
43
+ "peerDependencies": {
44
+ "react": ">=19.2.1",
45
+ "react-dom": ">=19.2.1",
46
+ "tailwindcss": ">=4.1.0"
47
+ },
48
+ "devDependencies": {
49
+ "@types/react": "^19.2.1",
50
+ "@types/react-dom": "^19.2.1",
51
+ "rimraf": "^6.0.1",
52
+ "tsup": "^8.3.5",
53
+ "typescript": "5.8.3"
54
+ }
55
+ }
@@ -0,0 +1,158 @@
1
+ @import "tailwindcss";
2
+
3
+ @layer components {
4
+ .ac-anyclick-tw-overlay {
5
+ @apply fixed inset-0 bg-transparent;
6
+ }
7
+
8
+ .ac-anyclick-tw-surface {
9
+ @apply rounded-xl shadow-2xl;
10
+ background: var(--anyclick-menu-bg, #ffffff);
11
+ border: 1px solid var(--anyclick-menu-border, #e2e8f0);
12
+ color: var(--anyclick-menu-text, #0f172a);
13
+ }
14
+
15
+ .ac-anyclick-tw-menu-surface {
16
+ @apply min-w-[220px] overflow-hidden;
17
+ }
18
+
19
+ .ac-anyclick-tw-header {
20
+ @apply flex items-center justify-between gap-2 px-3 py-2 text-[11px] font-bold uppercase tracking-[0.08em];
21
+ border-bottom: 1px solid var(--anyclick-menu-border, #e2e8f0);
22
+ color: var(--anyclick-menu-text-muted, var(--anyclick-menu-text, #475569));
23
+ }
24
+
25
+ .ac-anyclick-tw-menu-list {
26
+ @apply flex flex-col;
27
+ }
28
+
29
+ .ac-anyclick-tw-menu-item {
30
+ @apply flex min-h-10 w-full items-center gap-3 border-0 bg-transparent px-4 py-2 text-left text-sm transition disabled:cursor-not-allowed disabled:opacity-60;
31
+ color: var(--anyclick-menu-text, #0f172a);
32
+ }
33
+
34
+ .ac-anyclick-tw-menu-item:hover,
35
+ .ac-anyclick-tw-menu-item:focus-visible {
36
+ background: var(--anyclick-menu-hover, #f1f5f9);
37
+ color: var(--anyclick-menu-text, #0f172a);
38
+ }
39
+
40
+ .ac-anyclick-tw-menu-back {
41
+ border-bottom: 1px solid var(--anyclick-menu-border, #e2e8f0);
42
+ }
43
+
44
+ .ac-anyclick-tw-menu-icon {
45
+ @apply inline-flex h-5 w-5 items-center justify-center;
46
+ color: currentColor;
47
+ }
48
+
49
+ .ac-anyclick-tw-menu-label {
50
+ @apply inline-flex flex-1 items-center gap-2;
51
+ color: inherit;
52
+ }
53
+
54
+ .ac-anyclick-tw-submenu-indicator {
55
+ @apply ml-auto opacity-60;
56
+ color: inherit;
57
+ }
58
+
59
+ .ac-anyclick-tw-comment-section,
60
+ .ac-anyclick-tw-inspect-content,
61
+ .ac-anyclick-tw-message-list {
62
+ @apply flex flex-col gap-2 p-3;
63
+ }
64
+
65
+ .ac-anyclick-tw-action {
66
+ @apply inline-flex min-h-8 items-center justify-center gap-2 rounded-md px-3 text-sm font-semibold transition disabled:cursor-not-allowed disabled:opacity-60;
67
+ background: var(--anyclick-menu-cancel-bg, color-mix(in srgb, var(--anyclick-menu-bg, #ffffff) 88%, #ffffff));
68
+ border: 1px solid var(--anyclick-menu-border, #e2e8f0);
69
+ color: var(--anyclick-menu-cancel-text, var(--anyclick-menu-text, #0f172a));
70
+ }
71
+
72
+ .ac-anyclick-tw-action-primary {
73
+ background: var(--anyclick-menu-accent, #0284c7);
74
+ border-color: transparent;
75
+ color: var(--anyclick-menu-accent-text, #ffffff);
76
+ }
77
+
78
+ .ac-anyclick-tw-icon-button {
79
+ @apply inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent bg-transparent transition;
80
+ color: var(--anyclick-menu-text-muted, var(--anyclick-menu-text, #475569));
81
+ }
82
+
83
+ .ac-anyclick-tw-action:hover,
84
+ .ac-anyclick-tw-action:focus-visible,
85
+ .ac-anyclick-tw-icon-button:hover,
86
+ .ac-anyclick-tw-icon-button:focus-visible {
87
+ background: var(--anyclick-menu-hover, #f1f5f9);
88
+ }
89
+
90
+ .ac-anyclick-tw-action-primary:hover,
91
+ .ac-anyclick-tw-action-primary:focus-visible {
92
+ filter: brightness(1.05);
93
+ }
94
+
95
+ .ac-anyclick-tw-field {
96
+ @apply w-full rounded-md px-3 py-2 text-sm outline-none ring-0 transition;
97
+ background: var(--anyclick-menu-input-bg, #ffffff);
98
+ border: 1px solid var(--anyclick-menu-input-border, var(--anyclick-menu-border, #e2e8f0));
99
+ color: var(--anyclick-menu-text, #0f172a);
100
+ }
101
+
102
+ .ac-anyclick-tw-textarea {
103
+ @apply min-h-[88px] resize-y;
104
+ }
105
+
106
+ .ac-anyclick-tw-field::placeholder {
107
+ color: color-mix(in srgb, var(--anyclick-menu-text, #0f172a) 55%, transparent);
108
+ }
109
+
110
+ .ac-anyclick-tw-field:focus-visible {
111
+ border-color: var(--anyclick-menu-accent, #0284c7);
112
+ }
113
+
114
+ .ac-anyclick-tw-badge {
115
+ @apply inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-semibold;
116
+ background: color-mix(in srgb, var(--anyclick-menu-hover, #f1f5f9) 85%, transparent);
117
+ border: 1px solid var(--anyclick-menu-border, #e2e8f0);
118
+ color: var(--anyclick-menu-text-muted, var(--anyclick-menu-text, #475569));
119
+ }
120
+
121
+ .ac-anyclick-tw-screenshot-header {
122
+ @apply border-b-0;
123
+ }
124
+
125
+ .ac-anyclick-tw-tab {
126
+ @apply inline-flex min-h-7 items-center gap-1 rounded-md border border-transparent bg-transparent px-2 py-1 text-xs font-medium transition;
127
+ color: var(--anyclick-menu-text-muted, var(--anyclick-menu-text, #475569));
128
+ }
129
+
130
+ .ac-anyclick-tw-tab-active {
131
+ background: color-mix(in srgb, var(--anyclick-menu-accent, #0284c7) 14%, transparent);
132
+ border-color: color-mix(in srgb, var(--anyclick-menu-accent, #0284c7) 35%, transparent);
133
+ color: var(--anyclick-menu-accent, #0284c7);
134
+ }
135
+
136
+ .ac-anyclick-tw-preview {
137
+ @apply flex min-h-40 items-center justify-center rounded-lg p-2;
138
+ background: color-mix(in srgb, var(--anyclick-menu-hover, #f8fafc) 70%, transparent);
139
+ border: 1px solid var(--anyclick-menu-border, #e2e8f0);
140
+ }
141
+
142
+ .ac-anyclick-tw-empty {
143
+ @apply flex flex-col items-center justify-center gap-2 p-6 text-center text-sm;
144
+ color: var(--anyclick-menu-text-muted, var(--anyclick-menu-text, #475569));
145
+ }
146
+
147
+ .ac-anyclick-tw-error {
148
+ @apply border;
149
+ background: color-mix(in srgb, #fb7185 12%, transparent);
150
+ border-color: color-mix(in srgb, #fb7185 45%, transparent);
151
+ color: #be123c;
152
+ }
153
+
154
+ .ac-anyclick-tw-meta {
155
+ @apply text-center text-[11px];
156
+ color: var(--anyclick-menu-text-muted, var(--anyclick-menu-text, #475569));
157
+ }
158
+ }