@ecomcx/ecomweb-theme-sdk 2.0.0 → 2.2.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/API.md CHANGED
@@ -209,7 +209,7 @@ ResetPasswordForm({ labels, paths }: { labels?: Partial<AuthLabels>; paths?: Par
209
209
  Ô tìm kiếm — gửi về trang chủ của ngôn ngữ hiện tại (/?s= hoặc /en?s=).
210
210
 
211
211
  ```ts
212
- SearchForm({ defaultValue, placeholder, buttonLabel, postType, showLabel, buttonPosition, buttonIcon }: { buttonIcon?: boolean; defaultValue?: string | null; placeholder?: string; buttonLabel?: string; postType?: string; showLabel?: boolean; buttonPosition?: "right" | "left" | "below"; }): Promise<JSX.Element>
212
+ SearchForm({ defaultValue, placeholder, buttonLabel, postType, showLabel, buttonPosition, buttonIcon, scopes, scopeType, collapse }: { collapse?: "tablet" | "mobile"; scopes?: Array<{ value: string; label: string; }>; scopeType?: string; buttonIcon?: boolean; defaultValue?: string | null; placeholder?: string; buttonLabel?: string; postType?: string; showLabel?: boolean; buttonPosition?: "right" | "left" | "below"; }): Promise<JSX.Element>
213
213
  ```
214
214
 
215
215
  #### `Slot`
@@ -801,7 +801,7 @@ const AUTH_PATHS: AuthPaths
801
801
 
802
802
  #### `BINDABLE`
803
803
 
804
- Thuộc tính gắn được của khối lõi: tên trong bindings → nơi đặt giá trị.
804
+ Thuộc tính gắn được của khối lõi (dùng chung với trình soạn:
805
805
 
806
806
  ```ts
807
807
  const BINDABLE: Record<string, readonly string[]>
@@ -1343,12 +1343,36 @@ Dùng trong file `"use client"`. Tên đã có ở entry chính (component clien
1343
1343
 
1344
1344
  ### Component
1345
1345
 
1346
+ #### `AudienceGate`
1347
+
1348
+ Khối theo nhóm người xem: kiểm ở trình duyệt (trang vẫn cache được). Chưa biết người xem → ẩn; khớp nhóm → hiện.
1349
+
1350
+ ```ts
1351
+ AudienceGate({ audience, children }: { audience: "guest" | "user"; children: ReactNode; }): JSX.Element
1352
+ ```
1353
+
1354
+ #### `BgVideo`
1355
+
1356
+ Video nền (Ảnh bìa): tự phát, tắt tiếng, lặp, không có điều khiển; người xem bật "giảm chuyển động" thì dừng và chỉ hiện ảnh (poster).
1357
+
1358
+ ```ts
1359
+ BgVideo({ src, poster, className, style }: { src: string; poster?: string; className?: string; style?: CSSProperties; }): JSX.Element
1360
+ ```
1361
+
1362
+ #### `CarouselClient`
1363
+
1364
+ Khối Carousel (slider): track cuộn ngang bám mép slide (vuốt được trên điện thoại, không JS vẫn cuộn), nút trước / sau, chấm theo vị trí, tự chạy tuỳ chọn (dừng khi rê chuột / đang focus / tab ẩn / người dùng tắt hiệu ứng chuyển động, có nút Tạm dừng). Số slide thấy cùng lúc theo khổ máy do CSS (style.css).
1365
+
1366
+ ```ts
1367
+ CarouselClient({ children, count, config: c, label }: { children: ReactNode; count: number; config: CarouselConfig; label?: string; }): JSX.Element
1368
+ ```
1369
+
1346
1370
  #### `CountdownClient`
1347
1371
 
1348
1372
  Khối countdown: đếm ngược tới `target` (ms). Dựng lần đầu cùng giá trị trên máy chủ, rồi cập nhật mỗi giây.
1349
1373
 
1350
1374
  ```ts
1351
- CountdownClient({ target, label, expiredText, units, serverNow, attrs }: { target: number; label?: string; expiredText?: string; units?: Partial<Record<CountdownUnit, string>>; serverNow?: number; attrs?: Record<string, unknown>; }): JSX.Element
1375
+ CountdownClient({ target, label, expiredText, units, serverNow, rules, storageKey, attrs }: { target: number; label?: string; expiredText?: string; units?: Partial<Record<CountdownUnit, string>>; serverNow?: number; rules?: CountdownRules; storageKey?: string; attrs?: Record<string, unknown>; }): JSX.Element | null
1352
1376
  ```
1353
1377
 
1354
1378
  #### `FormBlockClient`
@@ -1356,7 +1380,15 @@ CountdownClient({ target, label, expiredText, units, serverNow, attrs }: { targe
1356
1380
  Khối form cơ bản của lõi (1.39): các ô đã vẽ sẵn ở máy chủ (children), phần này gửi bài qua /api/cms/forms, báo lỗi đúng ô (422), hiện lời cảm ơn. Chống spam: ô bẫy ẩn (_hp) + thời gian điền (máy chủ kiểm), máy chủ còn giới hạn theo IP.
1357
1381
 
1358
1382
  ```ts
1359
- FormBlockClient({ formId, source, successMessage, labels, button, className, children, fields: extraUi }: { formId: string; source: string; successMessage?: string; labels: { submit: string; sending: string; error: string; }; fields?: ReactNode; button?: { className?: string; style?: CSSProperties; }; className?: string; children?: ReactNode; }): JSX.Element
1383
+ FormBlockClient({ formId, source, successMessage, labels, button, className, children, fields: extraUi }: { formId: string; source: string; successMessage?: string; labels: { submit: string; sending: string; error: string; next?: string; back?: string; step?: string; }; fields?: ReactNode; button?: { className?: string; style?: CSSProperties; }; className?: string; children?: ReactNode; }): JSX.Element
1384
+ ```
1385
+
1386
+ #### `GalleryThumbsClient`
1387
+
1388
+ Gallery dạng thumbnail slider: ảnh lớn + dải ảnh nhỏ bấm / bàn phím (← → Home End) đổi ảnh lớn.
1389
+
1390
+ ```ts
1391
+ GalleryThumbsClient({ mains, thumbs, label }: { mains: ReactNode[]; thumbs: ReactNode[]; label?: string; }): JSX.Element
1360
1392
  ```
1361
1393
 
1362
1394
  #### `LanguageSwitcherClient`
@@ -1375,12 +1407,44 @@ Phóng to ảnh: bấm ảnh mở lớp phủ (Esc hoặc bấm nền để đó
1375
1407
  LightboxClient({ src, alt, children }: { src: string; alt: string; children: ReactNode; }): JSX.Element
1376
1408
  ```
1377
1409
 
1410
+ #### `NavDrawer`
1411
+
1412
+ Menu di động của khối Menu: nút burger mở ngăn trượt từ trái (nền mờ, nút đóng, khoá cuộn trang, Esc / bấm nền / bấm liên kết để đóng, trả focus về nút). Menu con hiện thụt vào ngay dưới mục cha. Khác NavToggle (giữ nguyên cho theme cũ dùng <details>).
1413
+
1414
+ ```ts
1415
+ NavDrawer({ label, closeLabel, children }: { label: string; closeLabel: string; children: ReactNode; }): JSX.Element
1416
+ ```
1417
+
1418
+ #### `PopupClient`
1419
+
1420
+ Popup: nút mở + hộp thoại <dialog> gốc của trình duyệt (khoá focus trong hộp, Esc đóng, trả focus về nút) — nội dung nằm sẵn trong HTML. Bấm nền tối để đóng (khi cho phép), khoá cuộn trang khi mở.
1421
+
1422
+ ```ts
1423
+ PopupClient({ trigger, triggerClass, triggerStyle, className, style, label, closeButton, closeOnOverlay, children, popupId, auto, autoDelay, autoScroll, onceDays }: { popupId?: string; auto?: "none" | "delay" | "scroll" | "exit" | "idle"; autoDelay?: number; autoScroll?: number; onceDays?: number; trigger: ReactNode; triggerClass: string; triggerStyle?: CSSProperties; className: string; style?: CSSProperties; label?: string; closeButton: boolean; closeOnOverlay: boolean; children: ReactNode; }): JSX.Element
1424
+ ```
1425
+
1426
+ #### `QueryFilterBar`
1427
+
1428
+ Thanh lọc của khối Query (GET): ô tìm, mục phân loại (liên kết tới trang mục / nút lọc / ô chọn), sắp xếp. Giá trị lên URL dạng ?fq_s, ?fq_sort, ?fq_<phân loại>; khối Query bật "Nhận bộ lọc từ thanh lọc" đọc lại. Ô chọn tự gửi khi đổi.
1429
+
1430
+ ```ts
1431
+ QueryFilterBar({ action, taxonomy, termStyle, terms, currentTerm, values, showSearch, showSort, showYear, showReset, years, sorts, labels, range }: { range?: { param: string; label?: string; max?: number; }; action: string; taxonomy?: string; termStyle: "none" | "links" | "chips" | "select" | "checks"; terms: Array<{ slug: string; name: string; link: string; }>; currentTerm?: string; values: Record<string, string>; showSearch: boolean; showSort: boolean; showYear: boolean; showReset: boolean; years: number[]; sorts: Array<{ value: string; label: string; }>; labels: { all: string; search: string; placeholder: string; submit: string; sort: string; year: string; reset: string; from?: string; to?: string; }; }): JSX.Element
1432
+ ```
1433
+
1434
+ #### `ScrollRow`
1435
+
1436
+ Hàng cuộn ngang có nút trước / sau (Query dạng carousel): cuộn đúng một "trang" mỗi lần bấm, ẩn nút ở hai đầu. Không có JS vẫn vuốt / cuộn được.
1437
+
1438
+ ```ts
1439
+ ScrollRow({ children, arrows }: { children: ReactNode; arrows?: boolean; }): JSX.Element
1440
+ ```
1441
+
1378
1442
  #### `SearchFormClient`
1379
1443
 
1380
1444
  Form tìm kiếm (GET) chuyển trang phía client.
1381
1445
 
1382
1446
  ```ts
1383
- SearchFormClient({ action, defaultValue, placeholder, label, buttonLabel, postType, showLabel, buttonPosition, buttonIcon }: { buttonIcon?: boolean; action: string; defaultValue?: string | null; placeholder: string; label: string; buttonLabel: string; postType?: string; showLabel?: boolean; buttonPosition?: "right" | "left" | "below"; }): JSX.Element
1447
+ SearchFormClient({ action, defaultValue, placeholder, label, buttonLabel, postType, showLabel, buttonPosition, buttonIcon, scopes, scopeAllLabel, scopeLabel, scopeValue, collapse }: { collapse?: "tablet" | "mobile"; scopes?: Array<{ value: string; label: string; }>; scopeAllLabel?: string; scopeLabel?: string; scopeValue?: string; buttonIcon?: boolean; action: string; defaultValue?: string | null; placeholder: string; label: string; buttonLabel: string; postType?: string; showLabel?: boolean; buttonPosition?: "right" | "left" | "below"; }): JSX.Element
1384
1448
  ```
1385
1449
 
1386
1450
  #### `TabsClient`
@@ -1388,7 +1452,7 @@ SearchFormClient({ action, defaultValue, placeholder, label, buttonLabel, postTy
1388
1452
  Khối tabs: các panel đã vẽ sẵn trên máy chủ (nội dung vẫn có trong HTML cho SEO); chỉ đổi panel đang hiện. Tab dọc (`vertical`), thành accordion trên điện thoại (`mobileAccordion`, chỉ CSS: tiêu đề nằm ngay trên panel của nó); tab có neo → panel mang id = neo, mở thẳng bằng #neo.
1389
1453
 
1390
1454
  ```ts
1391
- TabsClient({ titles, panels, initial, icons, subtitles, anchors, vertical, mobileAccordion, extraClass }: { titles: string[]; panels: ReactNode[]; initial?: number; icons?: Array<string | undefined>; subtitles?: Array<string | undefined>; anchors?: Array<string | undefined>; vertical?: boolean; mobileAccordion?: boolean; extraClass?: string; }): JSX.Element
1455
+ TabsClient({ titles, panels, initial, icons, subtitles, anchors, vertical, mobileAccordion, extraClass }: { titles: string[]; panels: ReactNode[]; initial?: number; icons?: Array<ReactNode | undefined>; subtitles?: Array<string | undefined>; anchors?: Array<string | undefined>; vertical?: boolean; mobileAccordion?: boolean; extraClass?: string; }): JSX.Element
1392
1456
  ```
1393
1457
 
1394
1458
  #### `TocSpy`
@@ -1407,6 +1471,14 @@ Chuyển chuỗi đã dịch xuống component client. Server Component lấy b
1407
1471
  TranslationsProvider({ value, children }: { value: ClientMessages; children: ReactNode; }): JSX.Element
1408
1472
  ```
1409
1473
 
1474
+ #### `TypedText`
1475
+
1476
+ Chữ gõ ở cuối Tiêu đề: gõ từng ký tự, dừng, xoá, sang từ kế (lặp hoặc dừng ở từ cuối). HTML dựng sẵn là từ đầu tiên; người xem bật giảm chuyển động thì giữ nguyên từ đầu. Trình đọc màn hình đọc cả nhóm từ một lần (aria-label), không đọc từng ký tự.
1477
+
1478
+ ```ts
1479
+ TypedText({ words, speed, pause, loop }: { words: string[]; speed: number; pause: number; loop: boolean; }): JSX.Element
1480
+ ```
1481
+
1410
1482
  ### Hàm
1411
1483
 
1412
1484
  #### `emit`
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  Theo [SemVer](https://semver.org/lang/vi/): bản lớn (x.0.0) mới được đổi hoặc bỏ API công khai. Tên công khai là tên có trong [API.md](API.md).
4
4
 
5
+ ## 2.1.0 (17/11/2026)
6
+
7
+ ### Thêm (không phá tương thích)
8
+ - `getPosts({ extra })`: chuyển tham số `fq_…` của URL cho plugin đọc qua filter `posts.query` (vd lọc giá của plugin bán hàng).
9
+ - Khối Query: bộ lọc nguồn (mới nhất / chọn tay / liên quan), nhiều mục của phân loại, trường tuỳ biến, khoảng ngày, bài con, bỏ N bài đầu, loại bài đang xem, cùng tác giả, nhận bộ lọc từ thanh lọc (`urlFilters`); lọc theo `taxonomy` + `term`.
10
+ - Khối `queryFilter` (thanh lọc: tìm, phân loại dạng liên kết / nút / ô chọn, sắp xếp) và component `QueryFilterBar` (`/client`).
11
+ - Khuôn mỗi bài dạng `carousel` (`ScrollRow`, `/client`), `columnsTablet`, `columnsMobile`, `gap`.
12
+ - Khối Tìm kiếm: `scopeSelect` + `scopes` (ô chọn phạm vi), `collapse` (thu thành nút kính lúp trên tablet / điện thoại).
13
+ - Khối Menu: `NavDrawer` (ngăn trượt, gắn vào `<body>`), `overlayMenu: "tablet"`; menu con thả xuống trên máy tính.
14
+ - Binding `hideIfEmpty` (ẩn khối khi nguồn không có giá trị); core tự gán `formId`.
15
+ - `?type=any` / `?type=a,b` cho tìm kiếm của website (core).
16
+
5
17
  ## 2.0.0 (16/11/2026)
6
18
 
7
19
  ### Phá tương thích, cần làm khi nâng cấp
package/dist/api.d.ts CHANGED
@@ -125,6 +125,12 @@ export interface PostQuery {
125
125
  * Khoá chưa khai báo trả 422 (không có chỉ mục thì sắp xếp phải quét toàn bảng).
126
126
  */
127
127
  orderByMeta?: string;
128
+ /**
129
+ * Tham số bộ lọc phụ do plugin đọc (filter `posts.query`, `PostQueryData.Query`): chỉ nhận khoá `fq_…`, giá trị ≤ 100 ký tự —
130
+ * vd plugin bán hàng đọc `fq_price_min`, `fq_price_max`, `fq_sale`, `fq_stock`, `fq_sort=price_asc`. Khối Query bật "Nhận bộ lọc từ thanh lọc" tự chuyển các `fq_…` trên URL vào đây.
131
+ * @since 2.1.0
132
+ */
133
+ extra?: Record<string, string>;
128
134
  }
129
135
  /**
130
136
  * Danh sách bài đã đăng theo điều kiện (tương đương `WP_Query`). Mặc định không kèm nội dung đầy đủ (`withContent`).
package/dist/api.js CHANGED
@@ -136,9 +136,10 @@ export const getPreview = (token) => cmsFetch("/preview", { noStore: true, query
136
136
  export const getPosts = async ({ withContent, ...q } = {}) => {
137
137
  // Bóc tách TRONG thân hàm, không phải trong tham số: chữ ký đã công bố của getPosts nằm trong baseline
138
138
  // hợp đồng (api/theme-sdk.txt) nên thêm tên vào tham số là đổi một dòng đã ký (CI coi là phá hợp đồng).
139
- const { taxQuery, metaQuery, ...rest } = q;
139
+ const { taxQuery, metaQuery, extra, ...rest } = q;
140
140
  return cmsFetch("/posts", { tags: ["posts"], query: clean({
141
141
  ...postQueryParams(rest),
142
+ ...Object.fromEntries(Object.entries(extra ?? {}).filter(([k, v]) => /^fq_[a-z0-9_-]{1,40}$/i.test(k) && typeof v === "string" && v.length <= 100)),
142
143
  // Bộ lọc phức tạp đi dạng JSON — core phân tích và áp thẳng vào câu SQL (không lọc bằng bộ nhớ).
143
144
  taxQuery: taxQuery?.length ? JSON.stringify(taxQuery) : undefined,
144
145
  metaQuery: metaQuery?.clauses?.length ? JSON.stringify(metaQuery) : undefined,
@@ -10,6 +10,6 @@ export interface BindingContext {
10
10
  data?: ResolveResult | null;
11
11
  }
12
12
  export type BindingSource = (args: Record<string, string | number | boolean>, ctx: BindingContext) => unknown | Promise<unknown>;
13
- /** Thuộc tính gắn được của khối lõi: tên trong bindings → nơi đặt giá trị. */
13
+ /** Thuộc tính gắn được của khối lõi (dùng chung với trình soạn: @ecomcx/ecomweb-content CORE_BINDABLE). */
14
14
  export declare const BINDABLE: Record<string, readonly string[]>;
15
15
  export declare const CORE_BINDING_SOURCES: Record<string, BindingSource>;
package/dist/bindings.js CHANGED
@@ -1,7 +1,6 @@
1
- /** Thuộc tính gắn được của khối lõi: tên trong bindings → nơi đặt giá trị. */
2
- export const BINDABLE = {
3
- paragraph: ["content"], heading: ["content"], image: ["src", "alt", "caption"], button: ["text", "href"],
4
- };
1
+ import { CORE_BINDABLE } from "@ecomcx/ecomweb-content";
2
+ /** Thuộc tính gắn được của khối lõi (dùng chung với trình soạn: @ecomcx/ecomweb-content CORE_BINDABLE). */
3
+ export const BINDABLE = CORE_BINDABLE;
5
4
  const scalar = (v) => (typeof v === "string" || typeof v === "number" || typeof v === "boolean" ? String(v) : undefined);
6
5
  export const CORE_BINDING_SOURCES = {
7
6
  "core/post": (args, { post }) => {
@@ -14,6 +13,15 @@ export const CORE_BINDING_SOURCES = {
14
13
  case "author": return post.author?.name;
15
14
  case "link": return post.link;
16
15
  case "featuredImage": return post.featuredMedia?.url;
16
+ // 1.32: thêm trường cho các ô gắn dữ liệu
17
+ case "featuredImageAlt": return post.featuredMedia?.alt;
18
+ case "slug": return post.slug;
19
+ case "id": return String(post.id);
20
+ case "modified": return post.updatedAt ? new Date(post.updatedAt).toLocaleDateString(post.locale || "vi") : undefined;
21
+ case "comments": return String(post.commentCount ?? 0);
22
+ case "category": return post.terms?.category?.[0]?.name;
23
+ case "authorAvatar": return post.author?.avatarUrl ?? undefined;
24
+ case "authorBio": return post.author?.bio ?? undefined;
17
25
  default: return undefined;
18
26
  }
19
27
  },
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type CountdownUnit } from "@ecomcx/ecomweb-content";
1
+ import { type CountdownRules, type CarouselConfig, type CountdownUnit } from "@ecomcx/ecomweb-content";
2
2
  import { Component } from "react";
3
3
  import type { Comment } from "./types.js";
4
4
  import type { AnchorHTMLAttributes, CSSProperties, ReactNode } from "react";
@@ -51,7 +51,15 @@ export type LinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> &
51
51
  */
52
52
  export declare function Link({ href, prefetch, activeClassName, matchNested, className, children, ...rest }: LinkProps): import("react").JSX.Element;
53
53
  /** Form tìm kiếm (GET) chuyển trang phía client. */
54
- export declare function SearchFormClient({ action, defaultValue, placeholder, label, buttonLabel, postType, showLabel, buttonPosition, buttonIcon }: {
54
+ export declare function SearchFormClient({ action, defaultValue, placeholder, label, buttonLabel, postType, showLabel, buttonPosition, buttonIcon, scopes, scopeAllLabel, scopeLabel, scopeValue, collapse }: {
55
+ collapse?: "tablet" | "mobile";
56
+ scopes?: Array<{
57
+ value: string;
58
+ label: string;
59
+ }>;
60
+ scopeAllLabel?: string;
61
+ scopeLabel?: string;
62
+ scopeValue?: string;
55
63
  buttonIcon?: boolean;
56
64
  action: string;
57
65
  defaultValue?: string | null;
@@ -139,14 +147,16 @@ export declare function LanguageSwitcherClient({ languages, current, defaultLoca
139
147
  export { LoginForm, RegisterForm, ForgotPasswordForm, ResetPasswordForm, LogoutButton, LoginOutLink, useCurrentUser, extraFields, ProfileForm, ChangePasswordForm, DeleteAccountForm, AUTH_LABELS, AUTH_PATHS, type AuthLabels, type AuthPaths, type SignInProvider } from "./auth-forms.js";
140
148
  export { safeRedirect, type CurrentUser } from "./auth-shared.js";
141
149
  /** Khối countdown: đếm ngược tới `target` (ms). Dựng lần đầu cùng giá trị trên máy chủ, rồi cập nhật mỗi giây. */
142
- export declare function CountdownClient({ target, label, expiredText, units, serverNow, attrs }: {
150
+ export declare function CountdownClient({ target, label, expiredText, units, serverNow, rules, storageKey, attrs }: {
143
151
  target: number;
144
152
  label?: string;
145
153
  expiredText?: string;
146
154
  units?: Partial<Record<CountdownUnit, string>>;
147
155
  serverNow?: number;
156
+ rules?: CountdownRules;
157
+ storageKey?: string;
148
158
  attrs?: Record<string, unknown>;
149
- }): import("react").JSX.Element;
159
+ }): import("react").JSX.Element | null;
150
160
  /** Mục lục: tô đậm mục của tiêu đề đang đọc (tiêu đề cuối cùng đã cuộn qua mép trên 120px) — aria-current="location". */
151
161
  export declare function TocSpy(): import("react").JSX.Element;
152
162
  /** Nút ☰ của menu trên điện thoại: <details> gốc + Escape đóng menu và trả focus về nút. */
@@ -164,7 +174,7 @@ export declare function TabsClient({ titles, panels, initial, icons, subtitles,
164
174
  titles: string[];
165
175
  panels: ReactNode[];
166
176
  initial?: number;
167
- icons?: Array<string | undefined>;
177
+ icons?: Array<ReactNode | undefined>;
168
178
  subtitles?: Array<string | undefined>;
169
179
  anchors?: Array<string | undefined>;
170
180
  vertical?: boolean;
@@ -189,6 +199,9 @@ export declare function FormBlockClient({ formId, source, successMessage, labels
189
199
  submit: string;
190
200
  sending: string;
191
201
  error: string;
202
+ next?: string;
203
+ back?: string;
204
+ step?: string;
192
205
  };
193
206
  /** Ô thêm của plugin (captcha…): <Slot name="form.fields" />. Ô name="extra.*" gửi kèm trong "extra" (hook form.submitting). */
194
207
  fields?: ReactNode;
@@ -200,3 +213,116 @@ export declare function FormBlockClient({ formId, source, successMessage, labels
200
213
  className?: string;
201
214
  children?: ReactNode;
202
215
  }): import("react").JSX.Element;
216
+ /**
217
+ * Khối Carousel (slider): track cuộn ngang bám mép slide (vuốt được trên điện thoại, không JS vẫn cuộn), nút trước / sau, chấm theo vị trí,
218
+ * tự chạy tuỳ chọn (dừng khi rê chuột / đang focus / tab ẩn / người dùng tắt hiệu ứng chuyển động, có nút Tạm dừng). Số slide thấy cùng lúc theo khổ máy do CSS (style.css).
219
+ */
220
+ export declare function CarouselClient({ children, count, config: c, label }: {
221
+ children: ReactNode;
222
+ count: number;
223
+ config: CarouselConfig;
224
+ label?: string;
225
+ }): import("react").JSX.Element;
226
+ /**
227
+ * Popup: nút mở + hộp thoại <dialog> gốc của trình duyệt (khoá focus trong hộp, Esc đóng, trả focus về nút) — nội dung nằm sẵn trong HTML.
228
+ * Bấm nền tối để đóng (khi cho phép), khoá cuộn trang khi mở.
229
+ */
230
+ export declare function PopupClient({ trigger, triggerClass, triggerStyle, className, style, label, closeButton, closeOnOverlay, children, popupId, auto, autoDelay, autoScroll, onceDays }: {
231
+ popupId?: string;
232
+ auto?: "none" | "delay" | "scroll" | "exit" | "idle";
233
+ autoDelay?: number;
234
+ autoScroll?: number;
235
+ onceDays?: number;
236
+ trigger: ReactNode;
237
+ triggerClass: string;
238
+ triggerStyle?: CSSProperties;
239
+ className: string;
240
+ style?: CSSProperties;
241
+ label?: string;
242
+ closeButton: boolean;
243
+ closeOnOverlay: boolean;
244
+ children: ReactNode;
245
+ }): import("react").JSX.Element;
246
+ /**
247
+ * Chữ gõ ở cuối Tiêu đề: gõ từng ký tự, dừng, xoá, sang từ kế (lặp hoặc dừng ở từ cuối). HTML dựng sẵn là từ đầu tiên;
248
+ * người xem bật giảm chuyển động thì giữ nguyên từ đầu. Trình đọc màn hình đọc cả nhóm từ một lần (aria-label), không đọc từng ký tự.
249
+ */
250
+ export declare function TypedText({ words, speed, pause, loop }: {
251
+ words: string[];
252
+ speed: number;
253
+ pause: number;
254
+ loop: boolean;
255
+ }): import("react").JSX.Element;
256
+ /** Video nền (Ảnh bìa): tự phát, tắt tiếng, lặp, không có điều khiển; người xem bật "giảm chuyển động" thì dừng và chỉ hiện ảnh (poster). */
257
+ export declare function BgVideo({ src, poster, className, style }: {
258
+ src: string;
259
+ poster?: string;
260
+ className?: string;
261
+ style?: CSSProperties;
262
+ }): import("react").JSX.Element;
263
+ /** Hàng cuộn ngang có nút trước / sau (Query dạng carousel): cuộn đúng một "trang" mỗi lần bấm, ẩn nút ở hai đầu. Không có JS vẫn vuốt / cuộn được. */
264
+ export declare function ScrollRow({ children, arrows }: {
265
+ children: ReactNode;
266
+ arrows?: boolean;
267
+ }): import("react").JSX.Element;
268
+ /**
269
+ * Menu di động của khối Menu: nút burger mở ngăn trượt từ trái (nền mờ, nút đóng, khoá cuộn trang, Esc / bấm nền / bấm liên kết để đóng,
270
+ * trả focus về nút). Menu con hiện thụt vào ngay dưới mục cha. Khác NavToggle (giữ nguyên cho theme cũ dùng <details>).
271
+ */
272
+ export declare function NavDrawer({ label, closeLabel, children }: {
273
+ label: string;
274
+ closeLabel: string;
275
+ children: ReactNode;
276
+ }): import("react").JSX.Element;
277
+ /**
278
+ * Thanh lọc của khối Query (GET): ô tìm, mục phân loại (liên kết tới trang mục / nút lọc / ô chọn), sắp xếp.
279
+ * Giá trị lên URL dạng ?fq_s, ?fq_sort, ?fq_<phân loại>; khối Query bật "Nhận bộ lọc từ thanh lọc" đọc lại. Ô chọn tự gửi khi đổi.
280
+ */
281
+ export declare function QueryFilterBar({ action, taxonomy, termStyle, terms, currentTerm, values, showSearch, showSort, showYear, showReset, years, sorts, labels, range }: {
282
+ range?: {
283
+ param: string;
284
+ label?: string;
285
+ max?: number;
286
+ };
287
+ action: string;
288
+ taxonomy?: string;
289
+ termStyle: "none" | "links" | "chips" | "select" | "checks";
290
+ terms: Array<{
291
+ slug: string;
292
+ name: string;
293
+ link: string;
294
+ }>;
295
+ currentTerm?: string;
296
+ values: Record<string, string>;
297
+ showSearch: boolean;
298
+ showSort: boolean;
299
+ showYear: boolean;
300
+ showReset: boolean;
301
+ years: number[];
302
+ sorts: Array<{
303
+ value: string;
304
+ label: string;
305
+ }>;
306
+ labels: {
307
+ all: string;
308
+ search: string;
309
+ placeholder: string;
310
+ submit: string;
311
+ sort: string;
312
+ year: string;
313
+ reset: string;
314
+ from?: string;
315
+ to?: string;
316
+ };
317
+ }): import("react").JSX.Element;
318
+ /** Khối theo nhóm người xem: kiểm ở trình duyệt (trang vẫn cache được). Chưa biết người xem → ẩn; khớp nhóm → hiện. */
319
+ export declare function AudienceGate({ audience, children }: {
320
+ audience: "guest" | "user";
321
+ children: ReactNode;
322
+ }): import("react").JSX.Element;
323
+ /** Gallery dạng thumbnail slider: ảnh lớn + dải ảnh nhỏ bấm / bàn phím (← → Home End) đổi ảnh lớn. */
324
+ export declare function GalleryThumbsClient({ mains, thumbs, label }: {
325
+ mains: ReactNode[];
326
+ thumbs: ReactNode[];
327
+ label?: string;
328
+ }): import("react").JSX.Element;