@fibrae/semi-foundation 0.2.0 → 0.3.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.
Files changed (206) hide show
  1. package/dist/anchor/foundation.d.ts +0 -3
  2. package/dist/anchor/foundation.js +0 -1
  3. package/dist/audio-player/foundation.d.ts +0 -3
  4. package/dist/audio-player/foundation.js +0 -1
  5. package/dist/auto-complete/foundation.d.ts +0 -2
  6. package/dist/auto-complete/foundation.js +0 -1
  7. package/dist/avatar/foundation.d.ts +0 -1
  8. package/dist/avatar/variables.scss +0 -1
  9. package/dist/backtop/foundation.d.ts +0 -3
  10. package/dist/backtop/foundation.js +0 -1
  11. package/dist/base/auto-close-foundation.d.ts +0 -1
  12. package/dist/base/foundation.d.ts +0 -1
  13. package/dist/base/list-store.d.ts +0 -1
  14. package/dist/calendar/event-util.d.ts +0 -10
  15. package/dist/calendar/event-util.js +0 -10
  16. package/dist/calendar/foundation.d.ts +1 -6
  17. package/dist/calendar/foundation.js +1 -5
  18. package/dist/calendar/month-foundation.d.ts +0 -1
  19. package/dist/calendar/month-foundation.js +0 -1
  20. package/dist/carousel/foundation.d.ts +0 -2
  21. package/dist/cascader/foundation.d.ts +2 -6
  22. package/dist/cascader/foundation.js +2 -11
  23. package/dist/cascader/util.d.ts +1 -8
  24. package/dist/cascader/util.js +1 -8
  25. package/dist/checkbox/checkbox-foundation.d.ts +1 -5
  26. package/dist/checkbox/checkbox-foundation.js +0 -2
  27. package/dist/checkbox/checkbox-group-foundation.d.ts +0 -1
  28. package/dist/code-highlight/index.d.ts +0 -1
  29. package/dist/color-picker/color-picker.scss +0 -2
  30. package/dist/color-picker/interface.d.ts +0 -1
  31. package/dist/config-provider/responsive-types.d.ts +0 -16
  32. package/dist/cropper/foundation.d.ts +0 -1
  33. package/dist/cropper/foundation.js +0 -1
  34. package/dist/date-picker/_utils/get-default-picker-date.d.ts +0 -3
  35. package/dist/date-picker/_utils/get-default-picker-date.js +0 -3
  36. package/dist/date-picker/_utils/get-inset-input-format-token.d.ts +0 -2
  37. package/dist/date-picker/_utils/get-inset-input-format-token.js +0 -2
  38. package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.d.ts +0 -2
  39. package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +0 -2
  40. package/dist/date-picker/_utils/parser.d.ts +0 -3
  41. package/dist/date-picker/_utils/parser.js +0 -7
  42. package/dist/date-picker/_utils/picker-type.d.ts +0 -2
  43. package/dist/date-picker/_utils/picker-type.js +0 -2
  44. package/dist/date-picker/_utils/to-callback-args.d.ts +0 -1
  45. package/dist/date-picker/_utils/to-callback-args.js +0 -1
  46. package/dist/date-picker/date-picker.scss +0 -3
  47. package/dist/date-picker/foundation.d.ts +3 -22
  48. package/dist/date-picker/foundation.js +1 -24
  49. package/dist/date-picker/input-foundation.d.ts +1 -7
  50. package/dist/date-picker/input-foundation.js +0 -2
  51. package/dist/date-picker/month-foundation.d.ts +0 -3
  52. package/dist/date-picker/month-foundation.js +0 -2
  53. package/dist/date-picker/months-grid-foundation.d.ts +1 -10
  54. package/dist/date-picker/months-grid-foundation.js +1 -10
  55. package/dist/drag-move/foundation.d.ts +0 -1
  56. package/dist/dropdown/foundation.d.ts +0 -2
  57. package/dist/dropdown/menu-foundation.d.ts +0 -1
  58. package/dist/feedback/foundation.d.ts +0 -1
  59. package/dist/feedback/variables.scss +1 -5
  60. package/dist/float-button/float-button.css +0 -1
  61. package/dist/float-button/float-button.scss +0 -2
  62. package/dist/form/form.scss +0 -12
  63. package/dist/form/foundation.js +0 -15
  64. package/dist/form/interface.d.ts +2 -15
  65. package/dist/form/utils.d.ts +0 -8
  66. package/dist/form/utils.js +0 -7
  67. package/dist/form/variables.scss +1 -4
  68. package/dist/grid/variables.scss +0 -10
  69. package/dist/highlight/foundation.d.ts +0 -2
  70. package/dist/highlight/foundation.js +0 -2
  71. package/dist/hot-keys/foundation.d.ts +0 -1
  72. package/dist/image/image-foundation.d.ts +0 -2
  73. package/dist/image/preview-footer-foundation.d.ts +0 -1
  74. package/dist/image/preview-foundation.d.ts +0 -3
  75. package/dist/image/preview-image-foundation.d.ts +0 -1
  76. package/dist/image/preview-inner-foundation.d.ts +0 -1
  77. package/dist/input/foundation.d.ts +0 -1
  78. package/dist/input/text-entry-foundation.d.ts +0 -2
  79. package/dist/input/text-entry-foundation.js +0 -1
  80. package/dist/input/textarea-foundation.d.ts +0 -1
  81. package/dist/input-number/caret.d.ts +0 -1
  82. package/dist/input-number/caret.js +0 -1
  83. package/dist/input-number/foundation.d.ts +0 -5
  84. package/dist/input-number/foundation.js +0 -5
  85. package/dist/json-viewer/foundation.d.ts +0 -2
  86. package/dist/json-viewer/foundation.js +0 -1
  87. package/dist/locale/interface.d.ts +0 -3
  88. package/dist/markdown-render/foundation.d.ts +1 -6
  89. package/dist/markdown-render/foundation.js +1 -5
  90. package/dist/navigation/foundation.d.ts +0 -7
  91. package/dist/navigation/foundation.js +0 -6
  92. package/dist/navigation/sub-nav-foundation.d.ts +0 -1
  93. package/dist/notification/notification-list-foundation.d.ts +0 -1
  94. package/dist/notification/notification-list-foundation.js +0 -1
  95. package/dist/notification/variables.scss +0 -1
  96. package/dist/overflow-list/foundation.d.ts +0 -2
  97. package/dist/overflow-list/foundation.js +0 -1
  98. package/dist/pagination/foundation.d.ts +0 -2
  99. package/dist/pincode/foundation.d.ts +1 -4
  100. package/dist/pincode/foundation.js +1 -4
  101. package/dist/popconfirm/popconfirm-foundation.d.ts +0 -2
  102. package/dist/progress/generates.d.ts +1 -4
  103. package/dist/progress/generates.js +1 -4
  104. package/dist/progress/utils.d.ts +1 -1
  105. package/dist/progress/utils.js +1 -1
  106. package/dist/radio/radio-foundation.d.ts +0 -4
  107. package/dist/radio/radio-foundation.js +0 -1
  108. package/dist/radio/radio-group-foundation.d.ts +0 -1
  109. package/dist/rating/foundation.d.ts +0 -5
  110. package/dist/rating/foundation.js +0 -3
  111. package/dist/resizable/group/index.d.ts +0 -4
  112. package/dist/resizable/group/index.js +0 -4
  113. package/dist/resizable/resizable.scss +0 -1
  114. package/dist/resizable/single/index.d.ts +1 -5
  115. package/dist/resizable/single/index.js +1 -4
  116. package/dist/scroll-list/item-foundation.d.ts +0 -2
  117. package/dist/scroll-list/item-foundation.js +0 -1
  118. package/dist/scroll-list/variables.scss +1 -6
  119. package/dist/select/foundation.d.ts +0 -1
  120. package/dist/select/option-foundation.d.ts +2 -3
  121. package/dist/select/option-foundation.js +0 -1
  122. package/dist/select/variables.scss +1 -8
  123. package/dist/side-sheet/side-sheet-foundation.d.ts +1 -6
  124. package/dist/side-sheet/side-sheet-foundation.js +1 -5
  125. package/dist/side-sheet/variables.scss +1 -3
  126. package/dist/slider/foundation.d.ts +1 -12
  127. package/dist/slider/foundation.js +1 -13
  128. package/dist/slider/variables.scss +1 -5
  129. package/dist/spin/foundation.d.ts +0 -2
  130. package/dist/spin/foundation.js +0 -1
  131. package/dist/spin/variables.scss +1 -3
  132. package/dist/switch/foundation.d.ts +0 -1
  133. package/dist/switch/switch.scss +1 -1
  134. package/dist/switch/variables.scss +1 -5
  135. package/dist/table/foundation.d.ts +12 -21
  136. package/dist/table/foundation.js +51 -15
  137. package/dist/table/table.scss +0 -1
  138. package/dist/table/utils.d.ts +0 -8
  139. package/dist/table/utils.js +0 -13
  140. package/dist/table/variables.scss +1 -5
  141. package/dist/tabs/foundation.d.ts +0 -9
  142. package/dist/tabs/foundation.js +0 -4
  143. package/dist/tabs/tabs.scss +1 -1
  144. package/dist/tag/focus.js +0 -1
  145. package/dist/tag-input/foundation.d.ts +0 -2
  146. package/dist/tag-input/foundation.js +0 -1
  147. package/dist/tag-input/tag-input.scss +0 -1
  148. package/dist/tag-input/utils/tag-focus.d.ts +0 -1
  149. package/dist/tag-input/utils/tag-focus.js +0 -1
  150. package/dist/time-picker/combox-foundation.d.ts +3 -11
  151. package/dist/time-picker/combox-foundation.js +3 -10
  152. package/dist/time-picker/foundation.d.ts +0 -10
  153. package/dist/time-picker/foundation.js +0 -9
  154. package/dist/time-picker/utils/index.d.ts +0 -11
  155. package/dist/time-picker/utils/index.js +0 -11
  156. package/dist/tooltip/adjust-position.d.ts +1 -2
  157. package/dist/tooltip/constants.d.ts +0 -3
  158. package/dist/tooltip/constants.js +0 -3
  159. package/dist/tooltip/foundation.d.ts +0 -3
  160. package/dist/tooltip/foundation.js +0 -2
  161. package/dist/tooltip/position.scss +0 -1
  162. package/dist/transfer/foundation.d.ts +0 -4
  163. package/dist/transfer/foundation.js +0 -1
  164. package/dist/tree/foundation.d.ts +0 -2
  165. package/dist/tree/foundation.js +0 -1
  166. package/dist/tree/shared.d.ts +1 -3
  167. package/dist/tree/shared.js +0 -2
  168. package/dist/tree/tree-util.d.ts +0 -5
  169. package/dist/tree/tree-util.js +0 -5
  170. package/dist/tree-select/foundation.d.ts +0 -2
  171. package/dist/tree-select/foundation.js +0 -3
  172. package/dist/typography/ellipsis.d.ts +1 -3
  173. package/dist/typography/ellipsis.js +0 -2
  174. package/dist/typography/typography.scss +0 -1
  175. package/dist/upload/constants.d.ts +1 -1
  176. package/dist/upload/foundation.d.ts +0 -6
  177. package/dist/upload/foundation.js +1 -11
  178. package/dist/upload/utils.d.ts +0 -5
  179. package/dist/upload/utils.js +0 -5
  180. package/dist/user-guide/foundation.d.ts +0 -2
  181. package/dist/utils/a11y.d.ts +1 -5
  182. package/dist/utils/a11y.js +1 -4
  183. package/dist/utils/array.d.ts +0 -6
  184. package/dist/utils/array.js +0 -6
  185. package/dist/utils/date-fns-extra.js +1 -5
  186. package/dist/utils/dom.d.ts +0 -1
  187. package/dist/utils/dom.js +0 -1
  188. package/dist/utils/escape-html.js +0 -3
  189. package/dist/utils/field-sizing.d.ts +0 -2
  190. package/dist/utils/field-sizing.js +0 -2
  191. package/dist/utils/focus-handle.d.ts +0 -1
  192. package/dist/utils/focus-handle.js +0 -1
  193. package/dist/utils/focus-scope.d.ts +0 -1
  194. package/dist/utils/focus-scope.js +0 -1
  195. package/dist/utils/scroll-lock.d.ts +3 -4
  196. package/dist/utils/scroll-lock.js +3 -4
  197. package/dist/utils/tween.d.ts +0 -1
  198. package/dist/utils/tween.js +0 -1
  199. package/dist/utils/uuid.d.ts +0 -1
  200. package/dist/utils/uuid.js +0 -1
  201. package/dist/utils/warning.d.ts +0 -1
  202. package/dist/utils/warning.js +0 -1
  203. package/dist/video-player/progress-foundation.d.ts +0 -1
  204. package/dist/video-player/progress-foundation.js +0 -1
  205. package/dist/video-player/variables.scss +1 -1
  206. package/package.json +2 -2
@@ -8,7 +8,6 @@ export declare function setFocusToItem(itemNodes: HTMLElement[], targetItem: HTM
8
8
  export declare function setFocusToFirstItem(itemNodes: HTMLElement[]): void;
9
9
  export declare function setFocusToLastItem(itemNodes: HTMLElement[]): void;
10
10
  export interface ListNavigationOptions {
11
- /** Arrows past either end wrap around instead of staying */
12
11
  loop?: boolean;
13
12
  /** Which arrows step: Up and Down for a vertical list, Left and Right (swapped in RTL) for a horizontal one */
14
13
  orientation?: 'vertical' | 'horizontal';
@@ -87,10 +86,7 @@ export declare class Typeahead {
87
86
  */
88
87
  match(key: string, labels: string[], current: number): number;
89
88
  }
90
- /**
91
- * Development-only: warns when a dialog has no accessible name, which screen readers would announce as just
92
- * "dialog". The name comes from `aria-label` or from the element `aria-labelledby` points at (usually the title).
93
- */
89
+ /** Development-only: warns when a dialog has no accessible name, which screen readers would announce as just "dialog" */
94
90
  export declare function warnIfDialogUnnamed(dialog: HTMLElement | null, component: string): void;
95
91
  /**
96
92
  * `root`: the document or shadow root the popup lives in, which also holds its trigger (the popup is portaled into the
@@ -147,10 +147,7 @@ var Typeahead = class {
147
147
  return -1;
148
148
  }
149
149
  };
150
- /**
151
- * Development-only: warns when a dialog has no accessible name, which screen readers would announce as just
152
- * "dialog". The name comes from `aria-label` or from the element `aria-labelledby` points at (usually the title).
153
- */
150
+ /** Development-only: warns when a dialog has no accessible name, which screen readers would announce as just "dialog" */
154
151
  function warnIfDialogUnnamed(dialog, component) {
155
152
  if (!isDev() || !dialog) return;
156
153
  const labelledBy = dialog.getAttribute("aria-labelledby");
@@ -1,10 +1,4 @@
1
- /**
2
- * A new array of the unique items of source that are not in removed
3
- *
4
- * differenceUnique(['a', 'b', 'c', 'a', 'b', 'c'], ['a', 'c']) => ['b']
5
- */
6
1
  export declare function differenceUnique<T>(source: T[], removed: T[]): T[];
7
2
  type CompareFn<T> = (a: T, b: T, sortOrder: 'ascend' | 'descend') => number;
8
- /** Wraps a compare function so that `descend` flips its sign */
9
3
  export declare function withOrderSort<T = any>(fn: CompareFn<T>, order?: 'ascend' | 'descend'): (a: T, b: T) => number;
10
4
  export {};
@@ -1,14 +1,8 @@
1
1
  import { difference, uniq } from "es-toolkit";
2
2
  // src/utils/array.ts
3
- /**
4
- * A new array of the unique items of source that are not in removed
5
- *
6
- * differenceUnique(['a', 'b', 'c', 'a', 'b', 'c'], ['a', 'c']) => ['b']
7
- */
8
3
  function differenceUnique(source, removed) {
9
4
  return difference(uniq(source), removed);
10
5
  }
11
- /** Wraps a compare function so that `descend` flips its sign */
12
6
  function withOrderSort(fn, order = "ascend") {
13
7
  switch (order) {
14
8
  case "descend": return (a, b) => {
@@ -29,10 +29,7 @@ function isValidTimezoneIANAString(timeZoneString) {
29
29
  }
30
30
  const MILLISECONDS_IN_MINUTE = 6e4;
31
31
  const MILLISECONDS_IN_DAY = 864e5;
32
- /**
33
- * UTC offset of `timeZone` (IANA name or ±HH[:MM]) at the instant `time` in milliseconds, positive east of UTC. No
34
- * zone or Z means UTC; an unknown zone gives NaN.
35
- */
32
+ /** UTC offset of `timeZone` (IANA name or ±HH[:MM]) at the instant `time` in milliseconds, positive east of UTC */
36
33
  function zoneOffset(timeZone, time) {
37
34
  if (!timeZone || timeZone === "Z") return 0;
38
35
  if (!isValidTimezoneIANAString(timeZone)) return NaN;
@@ -48,7 +45,6 @@ function wallTimeToInstant(wallTime, timeZone) {
48
45
  const offsetAfter = zoneOffset(timeZone, wallTime + MILLISECONDS_IN_DAY);
49
46
  return [wallTime - Math.max(offsetBefore, offsetAfter), wallTime - Math.min(offsetBefore, offsetAfter)].find((time) => time + zoneOffset(timeZone, time) === wallTime) ?? wallTime - offsetBefore;
50
47
  }
51
- /** Wall-clock fields of a system-local Date read as UTC */
52
48
  function wallTimeAsUtc(date) {
53
49
  const utc = /* @__PURE__ */ new Date(0);
54
50
  utc.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());
@@ -11,7 +11,6 @@ export interface RegisterMediaQueryOption {
11
11
  unmatch?: (e: MediaQueryList | MediaQueryListEvent) => void;
12
12
  callInInit?: boolean;
13
13
  }
14
- /** Returns the function that removes the listener */
15
14
  export declare function registerMediaQuery(media: string, { match, unmatch, callInInit }: RegisterMediaQueryOption): () => void;
16
15
  /**
17
16
  * Whether an overlay rendered through `getPopupContainer` covers the page: no container, or one that resolves to body.
package/dist/utils/dom.js CHANGED
@@ -11,7 +11,6 @@ function isEventInside(e, ...nodes) {
11
11
  const path = e.composedPath();
12
12
  return nodes.some((node) => node != null && path.includes(node));
13
13
  }
14
- /** Returns the function that removes the listener */
15
14
  function registerMediaQuery(media, { match, unmatch, callInInit = true }) {
16
15
  if (typeof window !== "undefined") {
17
16
  const mediaQueryList = window.matchMedia(media);
@@ -29,9 +29,6 @@ function escapeHtmlInMarkdown(text) {
29
29
  }
30
30
  return result.join("\n");
31
31
  }
32
- /**
33
- * Escape `<` to `&lt;` in a single line, but preserve content inside inline code spans.
34
- */
35
32
  function escapeAngleBracketsOutsideInlineCode(line) {
36
33
  const parts = [];
37
34
  let i = 0;
@@ -9,7 +9,5 @@ export declare function supportsFieldSizing(): boolean;
9
9
  * min-block-size and max-block-size clamp the height.
10
10
  */
11
11
  export declare function fitTextareaHeight(textarea: HTMLTextAreaElement): number;
12
- /** Sets the input's inline width to fit its value, or its placeholder while empty. */
13
12
  export declare function fitInputWidth(input: HTMLInputElement): number;
14
- /** Calls `refit` when web fonts finish loading, which changes text metrics after the first measurement. */
15
13
  export declare function onFontsLoaded(refit: () => void, signal: AbortSignal): void;
@@ -20,7 +20,6 @@ function fitTextareaHeight(textarea) {
20
20
  textarea.scrollTop = scrollTop;
21
21
  return height;
22
22
  }
23
- /** Sets the input's inline width to fit its value, or its placeholder while empty. */
24
23
  function fitInputWidth(input) {
25
24
  const style = getComputedStyle(input);
26
25
  const mirror = document.createElement("span");
@@ -45,7 +44,6 @@ function fitInputWidth(input) {
45
44
  input.style.width = `${width}px`;
46
45
  return width;
47
46
  }
48
- /** Calls `refit` when web fonts finish loading, which changes text metrics after the first measurement. */
49
47
  function onFontsLoaded(refit, signal) {
50
48
  document.fonts.addEventListener("loadingdone", refit, { signal });
51
49
  }
@@ -23,7 +23,6 @@ export default class FocusTrapHandle {
23
23
  static shouldRestoreFocus(container: HTMLElement | null | undefined, modal: boolean): boolean;
24
24
  /** Whether focus is inside `container` and was moved there by the keyboard, so closing it should hand focus back */
25
25
  static isFocusVisibleWithin(container?: HTMLElement | null): boolean;
26
- /** Focuses the first focusable element in `container`, or the container itself when it holds none */
27
26
  static focusFirstOrSelf(container?: HTMLElement | null, options?: FocusOptions): void;
28
27
  /** The first focusable element marked autofocus; neither the browser nor Vue focuses one that is inserted later */
29
28
  static findAutofocus(container: HTMLElement): FocusableElement | undefined;
@@ -63,7 +63,6 @@ var FocusTrapHandle = class FocusTrapHandle {
63
63
  const active = FocusTrapHandle.getActiveElement(container);
64
64
  return Boolean(container && active && container.contains(active) && active.matches(":focus-visible"));
65
65
  }
66
- /** Focuses the first focusable element in `container`, or the container itself when it holds none */
67
66
  static focusFirstOrSelf(container, options) {
68
67
  (container ? FocusTrapHandle.getFocusableElements(container)[0] ?? container : void 0)?.focus(options);
69
68
  }
@@ -12,7 +12,6 @@ export default class FocusScope {
12
12
  activate(container: HTMLElement, preventScroll?: boolean): void;
13
13
  /** Focuses `container` without trapping Tab, for a non-modal overlay; an element inside may already have focus */
14
14
  enter(container: HTMLElement, preventScroll?: boolean): void;
15
- /** `activate` for a modal overlay, `enter` for a non-modal one */
16
15
  engage: (container: HTMLElement, modal: boolean, preventScroll?: boolean) => void;
17
16
  deactivate: () => void;
18
17
  /** Focuses the recorded element again; call it after the inert around the overlay is released */
@@ -54,7 +54,6 @@ var FocusScope = class {
54
54
  if (!container.contains(FocusTrapHandle.getActiveElement(container))) container.focus({ preventScroll });
55
55
  if (!container.contains(FocusTrapHandle.getActiveElement(container))) FocusTrapHandle.getFocusableElements(container)[0]?.focus({ preventScroll });
56
56
  }
57
- /** `activate` for a modal overlay, `enter` for a non-modal one */
58
57
  engage = (container, modal, preventScroll) => {
59
58
  if (modal) this.activate(container, preventScroll);
60
59
  else this.enter(container, preventScroll);
@@ -1,7 +1,6 @@
1
1
  /**
2
- * Stops the page from scrolling behind an overlay and returns the function that releases this lock. Locks are
3
- * counted, so stacked overlays release the page only when the last one closes. The body's end padding grows by the
4
- * scrollbar width, so the page does not shift sideways when its scrollbar disappears; padding rather than width keeps
5
- * the body's own margin and any width set by the page's stylesheet.
2
+ * Locks are counted, so stacked overlays release the page only when the last one closes. The body's end padding grows
3
+ * by the scrollbar width, so the page does not shift sideways when its scrollbar disappears; padding rather than width
4
+ * keeps the body's own margin and any width set by the page's stylesheet.
6
5
  */
7
6
  export declare function lockBodyScroll(): () => void;
@@ -2,10 +2,9 @@
2
2
  let lockCount = 0;
3
3
  let restore = null;
4
4
  /**
5
- * Stops the page from scrolling behind an overlay and returns the function that releases this lock. Locks are
6
- * counted, so stacked overlays release the page only when the last one closes. The body's end padding grows by the
7
- * scrollbar width, so the page does not shift sideways when its scrollbar disappears; padding rather than width keeps
8
- * the body's own margin and any width set by the page's stylesheet.
5
+ * Locks are counted, so stacked overlays release the page only when the last one closes. The body's end padding grows
6
+ * by the scrollbar width, so the page does not shift sideways when its scrollbar disappears; padding rather than width
7
+ * keeps the body's own margin and any width set by the page's stylesheet.
9
8
  */
10
9
  function lockBodyScroll() {
11
10
  if (lockCount === 0) {
@@ -10,5 +10,4 @@ export interface TweenOptions {
10
10
  onFrame: (value: number) => void;
11
11
  onEnd?: () => void;
12
12
  }
13
- /** Animates a number from `from` to `to` once per frame; returns a function that cancels it */
14
13
  export declare function tween({ from, to, duration, easing, onFrame, onEnd }: TweenOptions): () => void;
@@ -1,7 +1,6 @@
1
1
  // src/utils/tween.ts
2
2
  const linear = (t) => t;
3
3
  const easeInOutCubic = (t) => t < .5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2;
4
- /** Animates a number from `from` to `to` once per frame; returns a function that cancels it */
5
4
  function tween({ from, to, duration, easing = linear, onFrame, onEnd }) {
6
5
  let start;
7
6
  let frame = requestAnimationFrame(function step(now) {
@@ -1,2 +1 @@
1
- /** Random unique id, as `${prefix}-${uuid}` when a prefix is given */
2
1
  export declare function createId(prefix?: string): string;
@@ -1,5 +1,4 @@
1
1
  // src/utils/uuid.ts
2
- /** Random unique id, as `${prefix}-${uuid}` when a prefix is given */
3
2
  function createId(prefix) {
4
3
  const id = crypto.randomUUID();
5
4
  return prefix ? `${prefix}-${id}` : id;
@@ -4,5 +4,4 @@
4
4
  * false in the browser, silencing every check.
5
5
  */
6
6
  export declare function isDev(): boolean;
7
- /** Prints `info` as a development-time warning when `flag` holds; production builds print nothing */
8
7
  export default function warning(flag: boolean, info: string): void;
@@ -7,7 +7,6 @@
7
7
  function isDev() {
8
8
  return process.env.NODE_ENV !== "production";
9
9
  }
10
- /** Prints `info` as a development-time warning when `flag` holds; production builds print nothing */
11
10
  function warning(flag, info) {
12
11
  if (flag && isDev()) console.warn(`Warning: ${info}`);
13
12
  }
@@ -58,7 +58,6 @@ export default class VideoProgressFoundation<P extends VideoProgressBaseProps =
58
58
  static getMarkerTitle(list: MarkerListItem[], value: number): string | undefined;
59
59
  /** The handle's `left`; the 8px is half the handle's width in the stylesheet */
60
60
  static getHandleLeft(value: number, max: number): string;
61
- /** How much of a marker `value` covers, as a CSS width */
62
61
  static getValueWidth({ start, end }: MarkerListItem, value: number): string;
63
62
  /** The APG slider keys: arrows move by `step`, PageUp and PageDown by a tenth of `max`, Home and End to the ends */
64
63
  handleKeyDown: (e: ProgressKeyboardEvent) => void;
@@ -53,7 +53,6 @@ var VideoProgressFoundation = class VideoProgressFoundation extends BaseFoundati
53
53
  static getHandleLeft(value, max) {
54
54
  return `calc(${(max ? value / max : 0) * 100}% - 8px)`;
55
55
  }
56
- /** How much of a marker `value` covers, as a CSS width */
57
56
  static getValueWidth({ start, end }, value) {
58
57
  if (end <= start) return "0%";
59
58
  if (value > end) return "calc(100% - 2px)";
@@ -9,7 +9,7 @@ $color-videoPlayer_notification-bg: var(--semi-color-overlay-bg); // notificatio
9
9
  $color-videoPlayer_notification-text: var(--semi-color-default); // notification 字体色
10
10
  $color-videoPlayer_controls-bg: rgba(28, 31, 35, 0.8); // 控制栏背景色
11
11
  $color-videoPlayer_controls-text: #fff; // 控制栏文字色
12
- // AudioPlayer 弹层在浅色下的深灰;控制栏文字固定为白色,所以不用随主题翻转的 --semi-grey-8
12
+ // control bar text is always white, so this cannot use --semi-grey-8, which flips with the theme
13
13
  $color-videoPlayer_controls_popup-bg: rgb(46, 50, 56); // 音量弹层与菜单背景色
14
14
  $color-videoPlayer_controls_item_popup-bg-default: var(--semi-color-overlay-bg); // 控制栏弹层背景色
15
15
  $color-videoPlayer_controls_item_popup-bg-hover: rgba(67, 68, 74, 1); // 控制栏弹层背景色 - hover
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibrae/semi-foundation",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "homepage": "https://semi-design-next.pages.dev",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@date-fns/tz": "^1.5.0",
27
27
  "@dnd-kit/dom": "~0.5.1",
28
- "@fibrae/semi-json-viewer-core": "0.2.0",
28
+ "@fibrae/semi-json-viewer-core": "0.3.0",
29
29
  "@mdx-js/mdx": "^3.1.1",
30
30
  "@shikijs/core": "^4.5.0",
31
31
  "async-validator": "^4.2.5",