@marianmeres/stuic 1.99.0 → 1.101.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,3 @@
1
- import type { calculateAlignment } from '../../index.js';
2
- import type { Alignment } from '../../utils/calculate-alignment.js';
1
+ import type { Alignment, calculateAlignment } from '../../utils/calculate-alignment.js';
3
2
  import type { TooltipLogger, TooltipOptions } from './tooltip.js';
4
3
  export declare const _maybePickSafePlacement: (calc: ReturnType<typeof calculateAlignment>, opts: TooltipOptions, log: TooltipLogger) => Alignment | false;
@@ -1,5 +1,6 @@
1
1
  import { get as storeGet } from 'svelte/store';
2
- import { calculateAlignment, windowSize } from '../../index.js';
2
+ import { calculateAlignment } from '../../utils/calculate-alignment.js';
3
+ import { windowSize } from '../../utils/window-size.js';
3
4
  import { _maybePickSafePlacement } from './_maybe-pick-safe-placement.js';
4
5
  export const _setPosition = async (boundaryRoot, // will default to window dimensions
5
6
  parent, div, arrow, opts, log) => {
@@ -1,7 +1,7 @@
1
1
  import { createStore } from '@marianmeres/store';
2
2
  import { derived, get as storeGet, writable, } from 'svelte/store';
3
3
  import { twMerge } from 'tailwind-merge';
4
- import { windowSize } from '../../index.js';
4
+ import { windowSize } from '../../utils/window-size.js';
5
5
  import { _makeInVisible, _makeVisible } from './_make-visible.js';
6
6
  import { _setPosition } from './_set-position.js';
7
7
  export class TooltipConfig {
@@ -1,18 +1,17 @@
1
1
  <script context="module">import { createClog } from "@marianmeres/clog";
2
2
  import { onMount } from "svelte";
3
3
  import { twMerge } from "tailwind-merge";
4
+ import { focusTrap } from "../../actions/focus-trap.js";
5
+ import Button from "../Button/Button.svelte";
6
+ import Field from "../Input/Field.svelte";
7
+ import FieldSelect from "../Input/FieldSelect.svelte";
8
+ import Notifications from "../Notifications/Notifications.svelte";
9
+ import Thc from "../Thc/Thc.svelte";
10
+ import { acpDefaultIcons } from "./acp-icons.js";
4
11
  import {
5
12
  AlertConfirmPromptType,
6
- Button,
7
- Field,
8
- FieldSelect,
9
- Notifications,
10
- Thc,
11
- createAlertConfirmPromptStore,
12
- createNotificationsStore,
13
- focusTrap
14
- } from "../../index.js";
15
- import { acpDefaultIcons } from "./acp-icons.js";
13
+ createAlertConfirmPromptStore
14
+ } from "./alert-confirm-prompt.js";
16
15
  export class AlertConfirmPromptConfig {
17
16
  // sane defaults which perhaps should stay untouched
18
17
  static preset = {
@@ -1,6 +1,7 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { createAlertConfirmPromptStore, createNotificationsStore, type NOTIFICATIONS_POSX, type NOTIFICATIONS_POSY } from '../../index.js';
3
- import type { AlertConfirmPromptKnownClasses, AlertConfirmPromptVariant } from './alert-confirm-prompt.js';
2
+ import type { NOTIFICATIONS_POSX, NOTIFICATIONS_POSY } from '../Notifications/Notifications.svelte';
3
+ import type { createNotificationsStore } from '../Notifications/notifications.js';
4
+ import { createAlertConfirmPromptStore, type AlertConfirmPromptKnownClasses, type AlertConfirmPromptVariant } from './alert-confirm-prompt.js';
4
5
  export interface AlertConfirmPromptIcons extends Record<AlertConfirmPromptVariant, () => string> {
5
6
  spinner: () => string;
6
7
  }
@@ -50,7 +50,7 @@ declare const __propDef: {
50
50
  square?: boolean | undefined;
51
51
  disabled?: boolean | undefined;
52
52
  value?: string | undefined;
53
- size?: "sm" | "md" | "lg" | "xs" | "xl" | undefined;
53
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
54
54
  };
55
55
  events: {
56
56
  focus: FocusEvent;
@@ -1,6 +1,7 @@
1
1
  <script context="module">import { slide } from "svelte/transition";
2
2
  import { twMerge } from "tailwind-merge";
3
- import { Thc, X, isTHCNotEmpty } from "../../index.js";
3
+ import Thc, { isTHCNotEmpty } from "../Thc/Thc.svelte";
4
+ import X from "../X/X.svelte";
4
5
  const themes = {
5
6
  primary: "bg-stuic-primary/10 text-stuic-primary dark:bg-stuic-primary dark:text-white/90",
6
7
  secondary: "bg-stuic-secondary/10 text-stuic-secondary dark:bg-stuic-secondary dark:text-white/90",
@@ -1,5 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type THC, type TW_COLORS } from '../../index.js';
2
+ import type { TW_COLORS } from '../../utils/tw-types.js';
3
+ import { type THC } from '../Thc/Thc.svelte';
3
4
  export declare class DismissibleMessageConfig {
4
5
  static class: {
5
6
  box: string;
@@ -2,7 +2,7 @@
2
2
  import { createEventDispatcher } from "svelte";
3
3
  import { get } from "svelte/store";
4
4
  import { twMerge } from "tailwind-merge";
5
- import { DevicePointer } from "../../index.js";
5
+ import { DevicePointer } from "../../utils/device-pointer.js";
6
6
  import { prefersReducedMotionStore } from "../../utils/prefers-reduced-motion.js";
7
7
  import { windowSize } from "../../utils/window-size.js";
8
8
  const clog = createClog("HoverExpandableWidth");
@@ -2,13 +2,11 @@
2
2
  import { createEventDispatcher } from "svelte";
3
3
  import { slide } from "svelte/transition";
4
4
  import { twMerge } from "tailwind-merge";
5
- import {
6
- autogrow,
7
- getId,
8
- trim,
9
- validate as validateAction,
10
- Thc
11
- } from "../../index.js";
5
+ import { autogrow } from "../../actions/autogrow.js";
6
+ import { trim } from "../../actions/trim.js";
7
+ import { validate as validateAction } from "../../actions/validate.js";
8
+ import { getId } from "../../utils/get-id.js";
9
+ import Thc from "../Thc/Thc.svelte";
12
10
  const _emptyClasses = () => ({
13
11
  box: "",
14
12
  wrap: "",
@@ -1,5 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type ValidateOptions, type THC } from '../../index.js';
2
+ import type { ValidateOptions } from '../../actions/validate.js';
3
+ import type { THC } from '../Thc/Thc.svelte';
3
4
  export interface FieldConfigClasses {
4
5
  box?: string;
5
6
  wrap?: string;
@@ -1,10 +1,8 @@
1
1
  <script context="module">import { slide } from "svelte/transition";
2
2
  import { twMerge } from "tailwind-merge";
3
- import {
4
- getId,
5
- Thc,
6
- validate as validateAction
7
- } from "../../index.js";
3
+ import { validate as validateAction } from "../../actions/validate.js";
4
+ import { getId } from "../../utils/get-id.js";
5
+ import Thc from "../Thc/Thc.svelte";
8
6
  const _emptyClasses = () => ({
9
7
  box: "",
10
8
  label: "",
@@ -1,5 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type THC, type ValidateOptions } from '../../index.js';
2
+ import type { ValidateOptions } from '../../actions/validate.js';
3
+ import type { THC } from '../Thc/Thc.svelte';
3
4
  export interface FieldCheckboxConfigClasses {
4
5
  box?: string;
5
6
  label?: string;
@@ -1,6 +1,6 @@
1
1
  <script context="module">import { createClog } from "@marianmeres/clog";
2
2
  import { twMerge } from "tailwind-merge";
3
- import { getId } from "../../index.js";
3
+ import { getId } from "../../utils/get-id.js";
4
4
  import XFieldRadioInternal from "./XFieldRadioInternal.svelte";
5
5
  const _emptyClasses = () => ({
6
6
  group: "",
@@ -2,11 +2,9 @@
2
2
  import { createEventDispatcher } from "svelte";
3
3
  import { slide } from "svelte/transition";
4
4
  import { twMerge } from "tailwind-merge";
5
- import {
6
- Thc,
7
- getId,
8
- validate as validateAction
9
- } from "../../index.js";
5
+ import { validate as validateAction } from "../../actions/validate.js";
6
+ import { getId } from "../../utils/get-id.js";
7
+ import Thc from "../Thc/Thc.svelte";
10
8
  const _emptyClasses = () => ({
11
9
  box: "",
12
10
  wrap: "",
@@ -1,5 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type THC, type ValidateOptions } from '../../index.js';
2
+ import type { ValidateOptions } from '../../actions/validate.js';
3
+ import type { THC } from '../Thc/Thc.svelte';
3
4
  export interface FieldSelectConfigClasses {
4
5
  box?: string;
5
6
  wrap?: string;
@@ -1,12 +1,12 @@
1
- <script context="module">import { twMerge } from "tailwind-merge";
2
- import {
3
- getId,
4
- validate as validateAction,
5
- FieldRadiosConfig,
6
- Thc
7
- } from "../../index.js";
1
+ <script context="module">import { createEventDispatcher } from "svelte";
8
2
  import { slide } from "svelte/transition";
9
- import { createEventDispatcher, onMount } from "svelte";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { validate as validateAction } from "../../actions/validate.js";
5
+ import { getId } from "../../utils/get-id.js";
6
+ import Thc from "../Thc/Thc.svelte";
7
+ import {
8
+ FieldRadiosConfig
9
+ } from "./FieldRadios.svelte";
10
10
  const _PRESET = {
11
11
  box: "flex items-start",
12
12
  label: "block w-full",
@@ -1,5 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type FieldRadiosConfigClassesBySize, type ValidateOptions, type FieldRadiosConfigClasses } from '../../index.js';
2
+ import type { ValidateOptions } from '../../actions/validate.js';
3
+ import { type FieldRadiosConfigClasses, type FieldRadiosConfigClassesBySize } from './FieldRadios.svelte';
3
4
  declare const __propDef: {
4
5
  props: {
5
6
  class?: FieldRadiosConfigClasses | undefined;
@@ -28,14 +28,14 @@ declare const __propDef: {
28
28
  classes?: Partial<NotificationKnownClasses> | undefined;
29
29
  classesByType?: Partial<Record<string, Partial<NotificationKnownClasses>>> | undefined;
30
30
  ariaCloseLabel?: string | undefined;
31
- posX?: "left" | "center" | "right" | undefined;
32
- posXMobile?: "left" | "center" | "right" | undefined;
31
+ posX?: "center" | "left" | "right" | undefined;
32
+ posXMobile?: "center" | "left" | "right" | undefined;
33
33
  posY?: "center" | "top" | "bottom" | undefined;
34
34
  posYMobile?: "center" | "top" | "bottom" | undefined;
35
35
  getPositionConfig?: (() => {
36
- posX: "left" | "center" | "right";
36
+ posX: "center" | "left" | "right";
37
37
  posY: "center" | "top" | "bottom";
38
- posXMobile: "left" | "center" | "right";
38
+ posXMobile: "center" | "left" | "right";
39
39
  posYMobile: "center" | "top" | "bottom";
40
40
  }) | undefined;
41
41
  };
@@ -49,9 +49,9 @@ export type NotificationsEvents = typeof __propDef.events;
49
49
  export type NotificationsSlots = typeof __propDef.slots;
50
50
  export default class Notifications extends SvelteComponent<NotificationsProps, NotificationsEvents, NotificationsSlots> {
51
51
  get getPositionConfig(): () => {
52
- posX: "left" | "center" | "right";
52
+ posX: "center" | "left" | "right";
53
53
  posY: "center" | "top" | "bottom";
54
- posXMobile: "left" | "center" | "right";
54
+ posXMobile: "center" | "left" | "right";
55
55
  posYMobile: "center" | "top" | "bottom";
56
56
  };
57
57
  }
@@ -36,7 +36,7 @@ declare const __propDef: {
36
36
  stopPropagation?: boolean | undefined;
37
37
  preventDefault?: boolean | undefined;
38
38
  preHook?: SwitchPreHook | undefined;
39
- size?: "sm" | "md" | "lg" | "xs" | "xl" | undefined;
39
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
40
40
  };
41
41
  events: {
42
42
  click: MouseEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.99.0",
3
+ "version": "1.101.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",