@flux-ui/visuals 3.2.0-beta.11 → 3.2.0-beta.9

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.
@@ -1,4 +1,4 @@
1
- import { BorderBeamVariant } from '@flux-ui/types';
1
+ import { BorderBeamVariant } from '../composable/private';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Props = {
4
4
  readonly active?: boolean;
@@ -1,4 +1,4 @@
1
- import { HighlighterVariant } from '@flux-ui/types';
1
+ import { HighlighterVariant } from '../composable/private';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Props = {
4
4
  readonly variant?: HighlighterVariant;
@@ -1,4 +1,4 @@
1
- import { HighlighterGroupProps } from '@flux-ui/types';
1
+ import { HighlighterGroupProps } from '../composable/private';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Slots = {
4
4
  default(): any;
@@ -9,7 +9,6 @@ export { default as FluxVisualHighlighter } from './FluxVisualHighlighter.vue';
9
9
  export { default as FluxVisualHighlighterGroup } from './FluxVisualHighlighterGroup.vue';
10
10
  export { default as FluxVisualNoise } from './FluxVisualNoise.vue';
11
11
  export { default as FluxVisualNumberFlow } from './FluxVisualNumberFlow.vue';
12
- export { default as FluxVisualPaneIllustration } from './FluxVisualPaneIllustration.vue';
13
12
  export { default as FluxVisualPing } from './FluxVisualPing.vue';
14
13
  export { default as FluxVisualSlotText } from './FluxVisualSlotText.vue';
15
14
  export { default as FluxVisualTextScramble } from './FluxVisualTextScramble.vue';
@@ -1,2 +1,2 @@
1
- export { default as useBorderBeamPulse } from './useBorderBeamPulse';
2
- export { default as useHighlighterGroup, useHighlighterGroupInjection, type HighlighterGroupContext, type HighlighterGroupEntry } from './useHighlighterGroup';
1
+ export { default as useBorderBeamPulse, type BorderBeamVariant } from './useBorderBeamPulse';
2
+ export { default as useHighlighterGroup, useHighlighterGroupInjection, type HighlighterGroupContext, type HighlighterGroupEntry, type HighlighterGroupProps, type HighlighterVariant } from './useHighlighterGroup';
@@ -1,5 +1,5 @@
1
- import { BorderBeamVariant } from '@flux-ui/types';
2
1
  import { Ref } from 'vue';
2
+ export type BorderBeamVariant = 'sm' | 'md' | 'line' | 'pulse-inner' | 'pulse-outside';
3
3
  type UseBorderBeamPulseOptions = {
4
4
  readonly duration: Ref<number>;
5
5
  readonly elementRef: Ref<HTMLElement | null>;
@@ -1,6 +1,16 @@
1
- import { HighlighterGroupProps } from '@flux-ui/types';
2
1
  import { annotationGroup } from 'rough-notation';
3
2
  type Annotation = Parameters<typeof annotationGroup>[0][number];
3
+ export type HighlighterVariant = 'highlight' | 'box' | 'circle' | 'underline' | 'strike-through' | 'crossed-off' | 'bracket';
4
+ export type HighlighterGroupProps = {
5
+ readonly variant?: HighlighterVariant;
6
+ readonly color?: string;
7
+ readonly strokeWidth?: number;
8
+ readonly animationDuration?: number;
9
+ readonly iterations?: number;
10
+ readonly padding?: number;
11
+ readonly multiline?: boolean;
12
+ readonly whenInView?: boolean;
13
+ };
4
14
  export type HighlighterGroupEntry = {
5
15
  readonly element: HTMLElement;
6
16
  getAnnotation(): Annotation | null;
package/dist/index.css CHANGED
@@ -998,46 +998,6 @@
998
998
  font-variant-numeric: tabular-nums;
999
999
  display: inline-block;
1000
1000
  white-space: nowrap;
1001
- }.pane-illustration {
1002
- --mask: linear-gradient(to bottom, black, transparent);
1003
- --mask-content: linear-gradient(to bottom, black, rgb(0 0 0 / .75), transparent);
1004
- position: relative;
1005
- border-radius: calc(var(--radius) - 1px);
1006
- }
1007
- .pane-illustration:not(:first-child) {
1008
- border-top-left-radius: 0;
1009
- border-top-right-radius: 0;
1010
- }
1011
- .pane-illustration:not(:last-child) {
1012
- border-bottom-left-radius: 0;
1013
- border-bottom-right-radius: 0;
1014
- }
1015
-
1016
- .pane-illustration-content {
1017
- position: relative;
1018
- display: flex;
1019
- height: 100%;
1020
- align-items: center;
1021
- justify-content: center;
1022
- }
1023
-
1024
- .pane-illustration-content-controlled {
1025
- overflow: hidden;
1026
- -webkit-mask-image: var(--mask-content);
1027
- mask-image: var(--mask-content);
1028
- }
1029
-
1030
- .pane-illustration-magic {
1031
- position: absolute;
1032
- inset: -1px;
1033
- border-radius: inherit;
1034
- }
1035
-
1036
- .pane-illustration-masked {
1037
- }
1038
- .pane-illustration-masked .pane-illustration-magic {
1039
- -webkit-mask-image: var(--mask);
1040
- mask-image: var(--mask);
1041
1001
  }.ping {
1042
1002
  position: relative;
1043
1003
  display: inline-block;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment, cloneVNode, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, customRef, defineComponent, getCurrentInstance, h, inject, markRaw, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, ref, renderList, renderSlot, shallowRef, toDisplayString, unref, useId, useSlots, useTemplateRef, watch, watchEffect } from "vue";
1
+ import { Fragment, cloneVNode, computed, createCommentVNode, createElementBlock, createElementVNode, customRef, defineComponent, getCurrentInstance, h, inject, markRaw, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, ref, renderList, renderSlot, shallowRef, toDisplayString, unref, useId, useTemplateRef, watch, watchEffect } from "vue";
2
2
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/rgb/parseNumber.js
3
3
  var parseNumber = (color, len) => {
4
4
  if (typeof color !== "number") return;
@@ -910,7 +910,7 @@ var convertLchToLab = ({ l, c, h, alpha }, mode = "lab") => {
910
910
  };
911
911
  //#endregion
912
912
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/constants.js
913
- var k$5 = Math.pow(29, 3) / Math.pow(3, 3);
913
+ var k$4 = Math.pow(29, 3) / Math.pow(3, 3);
914
914
  var e$4 = Math.pow(6, 3) / Math.pow(29, 3);
915
915
  //#endregion
916
916
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/constants.js
@@ -928,7 +928,7 @@ Math.pow(29, 3) / Math.pow(3, 3);
928
928
  Math.pow(6, 3) / Math.pow(29, 3);
929
929
  //#endregion
930
930
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToXyz65.js
931
- var fn$2 = (v) => Math.pow(v, 3) > e$4 ? Math.pow(v, 3) : (116 * v - 16) / k$5;
931
+ var fn$2 = (v) => Math.pow(v, 3) > e$4 ? Math.pow(v, 3) : (116 * v - 16) / k$4;
932
932
  var convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
933
933
  if (l === void 0) l = 0;
934
934
  if (a === void 0) a = 0;
@@ -950,7 +950,7 @@ var convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
950
950
  var convertLab65ToRgb = (lab) => convertXyz65ToRgb(convertLab65ToXyz65(lab));
951
951
  //#endregion
952
952
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertXyz65ToLab65.js
953
- var f$3 = (value) => value > e$4 ? Math.cbrt(value) : (k$5 * value + 16) / 116;
953
+ var f$3 = (value) => value > e$4 ? Math.cbrt(value) : (k$4 * value + 16) / 116;
954
954
  var convertXyz65ToLab65 = ({ x, y, z, alpha }) => {
955
955
  if (x === void 0) x = 0;
956
956
  if (y === void 0) y = 0;
@@ -1812,11 +1812,11 @@ var definition$16 = {
1812
1812
  };
1813
1813
  //#endregion
1814
1814
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/constants.js
1815
- var k$3 = Math.pow(29, 3) / Math.pow(3, 3);
1815
+ var k$2 = Math.pow(29, 3) / Math.pow(3, 3);
1816
1816
  var e$2 = Math.pow(6, 3) / Math.pow(29, 3);
1817
1817
  //#endregion
1818
1818
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToXyz50.js
1819
- var fn$1 = (v) => Math.pow(v, 3) > e$2 ? Math.pow(v, 3) : (116 * v - 16) / k$3;
1819
+ var fn$1 = (v) => Math.pow(v, 3) > e$2 ? Math.pow(v, 3) : (116 * v - 16) / k$2;
1820
1820
  var convertLabToXyz50 = ({ l, a, b, alpha }) => {
1821
1821
  if (l === void 0) l = 0;
1822
1822
  if (a === void 0) a = 0;
@@ -1865,7 +1865,7 @@ var convertRgbToXyz50 = (rgb) => {
1865
1865
  };
1866
1866
  //#endregion
1867
1867
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertXyz50ToLab.js
1868
- var f$2 = (value) => value > e$2 ? Math.cbrt(value) : (k$3 * value + 16) / 116;
1868
+ var f$2 = (value) => value > e$2 ? Math.cbrt(value) : (k$2 * value + 16) / 116;
1869
1869
  var convertXyz50ToLab = ({ x, y, z, alpha }) => {
1870
1870
  if (x === void 0) x = 0;
1871
1871
  if (y === void 0) y = 0;
@@ -2071,7 +2071,7 @@ var u_fn$1 = (x, y, z) => 4 * x / (x + 15 * y + 3 * z);
2071
2071
  var v_fn$1 = (x, y, z) => 9 * y / (x + 15 * y + 3 * z);
2072
2072
  var un$2 = u_fn$1(D50.X, D50.Y, D50.Z);
2073
2073
  var vn$2 = v_fn$1(D50.X, D50.Y, D50.Z);
2074
- var l_fn = (value) => value <= e$2 ? k$3 * value : 116 * Math.cbrt(value) - 16;
2074
+ var l_fn = (value) => value <= e$2 ? k$2 * value : 116 * Math.cbrt(value) - 16;
2075
2075
  var convertXyz50ToLuv = ({ x, y, z, alpha }) => {
2076
2076
  if (x === void 0) x = 0;
2077
2077
  if (y === void 0) y = 0;
@@ -2111,7 +2111,7 @@ var convertLuvToXyz50 = ({ l, u, v, alpha }) => {
2111
2111
  if (v === void 0) v = 0;
2112
2112
  let up = u / (13 * l) + un$1;
2113
2113
  let vp = v / (13 * l) + vn$1;
2114
- let y = D50.Y * (l <= 8 ? l / k$3 : Math.pow((l + 16) / 116, 3));
2114
+ let y = D50.Y * (l <= 8 ? l / k$2 : Math.pow((l + 16) / 116, 3));
2115
2115
  let res = {
2116
2116
  mode: "xyz50",
2117
2117
  x: y * (9 * up) / (4 * vp),
@@ -3862,11 +3862,7 @@ var Locale = class Locale {
3862
3862
  }
3863
3863
  static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {
3864
3864
  const specifiedLocale = locale || Settings.defaultLocale;
3865
- const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
3866
- const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
3867
- const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
3868
- const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;
3869
- return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);
3865
+ return new Locale(specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), numberingSystem || Settings.defaultNumberingSystem, outputCalendar || Settings.defaultOutputCalendar, validateWeekSettings(weekSettings) || Settings.defaultWeekSettings, specifiedLocale);
3870
3866
  }
3871
3867
  static resetCache() {
3872
3868
  sysLocaleCache = null;
@@ -9261,7 +9257,7 @@ function friendlyDateTime(dateTimeish) {
9261
9257
  else throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`);
9262
9258
  }
9263
9259
  //#endregion
9264
- //#region ../../node_modules/.bun/@basmilius+utils@3.50.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
9260
+ //#region ../../node_modules/.bun/@basmilius+utils@3.45.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
9265
9261
  function x$1(e) {
9266
9262
  let t = {};
9267
9263
  do {
@@ -9274,14 +9270,6 @@ function x$1(e) {
9274
9270
  } while (e = Object.getPrototypeOf(e));
9275
9271
  return t;
9276
9272
  }
9277
- function j$1(e) {
9278
- let t = parseInt(e.startsWith(`#`) ? e.substring(1) : e, 16);
9279
- return [
9280
- t >> 16 & 255,
9281
- t >> 8 & 255,
9282
- t & 255
9283
- ];
9284
- }
9285
9273
  function R$1(e) {
9286
9274
  return globalThis.document ? e instanceof HTMLElement : !1;
9287
9275
  }
@@ -9311,7 +9299,7 @@ function K$1(e, t, n) {
9311
9299
  Object.defineProperty(e, t, { value: n });
9312
9300
  }
9313
9301
  //#endregion
9314
- //#region ../../node_modules/.bun/@basmilius+http-client@3.50.0+2111c3e180df0f85/node_modules/@basmilius/http-client/dist/index.mjs
9302
+ //#region ../../node_modules/.bun/@basmilius+http-client@3.45.0+66382d5e2ea3742d/node_modules/@basmilius/http-client/dist/index.mjs
9315
9303
  function adapter_default(Parent) {
9316
9304
  return class extends Parent {
9317
9305
  constructor(...args) {
@@ -11884,61 +11872,6 @@ var FluxVisualNumberFlow_default = /* @__PURE__ */ defineComponent({
11884
11872
  };
11885
11873
  }
11886
11874
  });
11887
- var PaneIllustration_module_default = {
11888
- paneIllustration: `pane-illustration`,
11889
- paneIllustrationContent: `pane-illustration-content`,
11890
- paneIllustrationContentControlled: `pane-illustration-content-controlled pane-illustration-content`,
11891
- paneIllustrationMagic: `pane-illustration-magic`,
11892
- paneIllustrationMasked: `pane-illustration-masked pane-illustration`
11893
- };
11894
- //#endregion
11895
- //#region src/component/FluxVisualPaneIllustration.vue
11896
- var FluxVisualPaneIllustration_default = /* @__PURE__ */ defineComponent({
11897
- __name: "FluxVisualPaneIllustration",
11898
- props: {
11899
- animatedColors: {},
11900
- animatedOpacity: {},
11901
- animatedSeed: {},
11902
- aspectRatio: { default: () => 16 / 9 },
11903
- isMasked: { type: Boolean }
11904
- },
11905
- setup(__props) {
11906
- const slots = useSlots();
11907
- const borderColor = computed(() => {
11908
- if (!__props.animatedColors || __props.animatedColors.length === 0) return "transparent";
11909
- const [r, g, b] = j$1(__props.animatedColors[0]);
11910
- return `rgb(${r} ${g} ${b} / .15)`;
11911
- });
11912
- return (_ctx, _cache) => {
11913
- return openBlock(), createElementBlock("div", {
11914
- "data-flux-pane-illustration": "",
11915
- class: normalizeClass(__props.isMasked ? unref(PaneIllustration_module_default).paneIllustrationMasked : unref(PaneIllustration_module_default).paneIllustration),
11916
- style: normalizeStyle({ aspectRatio: __props.aspectRatio })
11917
- }, [
11918
- createElementVNode("div", {
11919
- class: normalizeClass(unref(PaneIllustration_module_default).paneIllustrationMagic),
11920
- style: normalizeStyle({ border: `1px solid ${borderColor.value}` })
11921
- }, [createVNode(FluxVisualGridPattern_default, { "stroke-dasharray": 3 }), createVNode(FluxVisualAnimatedColors_default, {
11922
- colors: __props.animatedColors,
11923
- opacity: __props.animatedOpacity,
11924
- seed: __props.animatedSeed
11925
- }, null, 8, [
11926
- "colors",
11927
- "opacity",
11928
- "seed"
11929
- ])], 6),
11930
- slots.controlled ? (openBlock(), createElementBlock("div", {
11931
- key: 0,
11932
- class: normalizeClass(unref(PaneIllustration_module_default).paneIllustrationContentControlled)
11933
- }, [renderSlot(_ctx.$slots, "controlled")], 2)) : createCommentVNode("", true),
11934
- slots.default ? (openBlock(), createElementBlock("div", {
11935
- key: 1,
11936
- class: normalizeClass(unref(PaneIllustration_module_default).paneIllustrationContent)
11937
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("", true)
11938
- ], 6);
11939
- };
11940
- }
11941
- });
11942
11875
  var Ping_module_default = {
11943
11876
  ping: `ping`,
11944
11877
  visualPing: `visual-ping`
@@ -12382,6 +12315,6 @@ var FluxVisualTextShimmer_default = /* @__PURE__ */ defineComponent({
12382
12315
  }
12383
12316
  });
12384
12317
  //#endregion
12385
- export { FluxVisualAnimatedColors_default as FluxVisualAnimatedColors, FluxVisualAttention_default as FluxVisualAttention, FluxVisualBorderBeam_default as FluxVisualBorderBeam, FluxVisualBorderShine_default as FluxVisualBorderShine, FluxVisualDotPattern_default as FluxVisualDotPattern, FluxVisualFlickeringGrid_default as FluxVisualFlickeringGrid, FluxVisualGridPattern_default as FluxVisualGridPattern, FluxVisualHighlighter_default as FluxVisualHighlighter, FluxVisualHighlighterGroup_default as FluxVisualHighlighterGroup, FluxVisualNoise_default as FluxVisualNoise, FluxVisualNumberFlow_default as FluxVisualNumberFlow, FluxVisualPaneIllustration_default as FluxVisualPaneIllustration, FluxVisualPing_default as FluxVisualPing, FluxVisualSlotText_default as FluxVisualSlotText, FluxVisualTextScramble_default as FluxVisualTextScramble, FluxVisualTextShimmer_default as FluxVisualTextShimmer };
12318
+ export { FluxVisualAnimatedColors_default as FluxVisualAnimatedColors, FluxVisualAttention_default as FluxVisualAttention, FluxVisualBorderBeam_default as FluxVisualBorderBeam, FluxVisualBorderShine_default as FluxVisualBorderShine, FluxVisualDotPattern_default as FluxVisualDotPattern, FluxVisualFlickeringGrid_default as FluxVisualFlickeringGrid, FluxVisualGridPattern_default as FluxVisualGridPattern, FluxVisualHighlighter_default as FluxVisualHighlighter, FluxVisualHighlighterGroup_default as FluxVisualHighlighterGroup, FluxVisualNoise_default as FluxVisualNoise, FluxVisualNumberFlow_default as FluxVisualNumberFlow, FluxVisualPing_default as FluxVisualPing, FluxVisualSlotText_default as FluxVisualSlotText, FluxVisualTextScramble_default as FluxVisualTextScramble, FluxVisualTextShimmer_default as FluxVisualTextShimmer };
12386
12319
 
12387
12320
  //# sourceMappingURL=index.js.map