@flux-ui/visuals 3.2.0-beta.9 → 3.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.
@@ -1,4 +1,4 @@
1
- import { BorderBeamVariant } from '../composable/private';
1
+ import { BorderBeamVariant } from '@flux-ui/types';
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 '../composable/private';
1
+ import { HighlighterVariant } from '@flux-ui/types';
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 '../composable/private';
1
+ import { HighlighterGroupProps } from '@flux-ui/types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Slots = {
4
4
  default(): any;
@@ -0,0 +1,20 @@
1
+ import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ readonly animatedColors: string[];
4
+ readonly animatedOpacity?: number;
5
+ readonly animatedSeed?: number;
6
+ readonly aspectRatio?: number;
7
+ readonly isMasked?: boolean;
8
+ };
9
+ type __VLS_Slots = {
10
+ default?(): VNode[];
11
+ controlled?(): VNode[];
12
+ };
13
+ declare const __VLS_base: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -9,6 +9,7 @@ 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';
12
13
  export { default as FluxVisualPing } from './FluxVisualPing.vue';
13
14
  export { default as FluxVisualSlotText } from './FluxVisualSlotText.vue';
14
15
  export { default as FluxVisualTextScramble } from './FluxVisualTextScramble.vue';
@@ -1,2 +1,2 @@
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
+ export { default as useBorderBeamPulse } from './useBorderBeamPulse';
2
+ export { default as useHighlighterGroup, useHighlighterGroupInjection, type HighlighterGroupContext, type HighlighterGroupEntry } from './useHighlighterGroup';
@@ -1,5 +1,5 @@
1
+ import { BorderBeamVariant } from '@flux-ui/types';
1
2
  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,16 +1,6 @@
1
+ import { HighlighterGroupProps } from '@flux-ui/types';
1
2
  import { annotationGroup } from 'rough-notation';
2
3
  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
- };
14
4
  export type HighlighterGroupEntry = {
15
5
  readonly element: HTMLElement;
16
6
  getAnnotation(): Annotation | null;
package/dist/index.css CHANGED
@@ -998,6 +998,46 @@
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);
1001
1041
  }.ping {
1002
1042
  position: relative;
1003
1043
  display: inline-block;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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";
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";
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$4 = Math.pow(29, 3) / Math.pow(3, 3);
913
+ var k$5 = 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$4;
931
+ var fn$2 = (v) => Math.pow(v, 3) > e$4 ? Math.pow(v, 3) : (116 * v - 16) / k$5;
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$4 * value + 16) / 116;
953
+ var f$3 = (value) => value > e$4 ? Math.cbrt(value) : (k$5 * 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$2 = Math.pow(29, 3) / Math.pow(3, 3);
1815
+ var k$3 = 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$2;
1819
+ var fn$1 = (v) => Math.pow(v, 3) > e$2 ? Math.pow(v, 3) : (116 * v - 16) / k$3;
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$2 * value + 16) / 116;
1868
+ var f$2 = (value) => value > e$2 ? Math.cbrt(value) : (k$3 * 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$2 * value : 116 * Math.cbrt(value) - 16;
2074
+ var l_fn = (value) => value <= e$2 ? k$3 * 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$2 : Math.pow((l + 16) / 116, 3));
2114
+ let y = D50.Y * (l <= 8 ? l / k$3 : Math.pow((l + 16) / 116, 3));
2115
2115
  let res = {
2116
2116
  mode: "xyz50",
2117
2117
  x: y * (9 * up) / (4 * vp),
@@ -3862,7 +3862,11 @@ var Locale = class Locale {
3862
3862
  }
3863
3863
  static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {
3864
3864
  const specifiedLocale = locale || Settings.defaultLocale;
3865
- return new Locale(specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), numberingSystem || Settings.defaultNumberingSystem, outputCalendar || Settings.defaultOutputCalendar, validateWeekSettings(weekSettings) || Settings.defaultWeekSettings, specifiedLocale);
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);
3866
3870
  }
3867
3871
  static resetCache() {
3868
3872
  sysLocaleCache = null;
@@ -9257,7 +9261,7 @@ function friendlyDateTime(dateTimeish) {
9257
9261
  else throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`);
9258
9262
  }
9259
9263
  //#endregion
9260
- //#region ../../node_modules/.bun/@basmilius+utils@3.45.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
9264
+ //#region ../../node_modules/.bun/@basmilius+utils@3.50.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
9261
9265
  function x$1(e) {
9262
9266
  let t = {};
9263
9267
  do {
@@ -9270,6 +9274,14 @@ function x$1(e) {
9270
9274
  } while (e = Object.getPrototypeOf(e));
9271
9275
  return t;
9272
9276
  }
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
+ }
9273
9285
  function R$1(e) {
9274
9286
  return globalThis.document ? e instanceof HTMLElement : !1;
9275
9287
  }
@@ -9299,7 +9311,7 @@ function K$1(e, t, n) {
9299
9311
  Object.defineProperty(e, t, { value: n });
9300
9312
  }
9301
9313
  //#endregion
9302
- //#region ../../node_modules/.bun/@basmilius+http-client@3.45.0+66382d5e2ea3742d/node_modules/@basmilius/http-client/dist/index.mjs
9314
+ //#region ../../node_modules/.bun/@basmilius+http-client@3.50.0+2111c3e180df0f85/node_modules/@basmilius/http-client/dist/index.mjs
9303
9315
  function adapter_default(Parent) {
9304
9316
  return class extends Parent {
9305
9317
  constructor(...args) {
@@ -11872,6 +11884,61 @@ var FluxVisualNumberFlow_default = /* @__PURE__ */ defineComponent({
11872
11884
  };
11873
11885
  }
11874
11886
  });
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
+ });
11875
11942
  var Ping_module_default = {
11876
11943
  ping: `ping`,
11877
11944
  visualPing: `visual-ping`
@@ -12315,6 +12382,6 @@ var FluxVisualTextShimmer_default = /* @__PURE__ */ defineComponent({
12315
12382
  }
12316
12383
  });
12317
12384
  //#endregion
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 };
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 };
12319
12386
 
12320
12387
  //# sourceMappingURL=index.js.map