@cjlapao/ui-kit 0.2.20 → 0.2.22
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/dist/{CapsuleBlueprint-BmoD-pSK.d.cts → CapsuleBlueprint-D6IiGOwg.d.cts} +1 -1
- package/dist/{CapsuleBlueprint-BmoD-pSK.d.ts → CapsuleBlueprint-D6IiGOwg.d.ts} +1 -1
- package/dist/index.cjs +3097 -2700
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +20 -3
- package/dist/index.d.cts +97 -47
- package/dist/index.d.ts +97 -47
- package/dist/index.js +2522 -2127
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +25 -7
- package/dist/markdown.cjs.map +1 -1
- package/dist/markdown.d.cts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +26 -8
- package/dist/markdown.js.map +1 -1
- package/package.json +1 -1
package/dist/markdown.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { v as CapsuleBlueprintParameter } from './CapsuleBlueprint-
|
|
3
|
-
export { ak as HelpButton } from './CapsuleBlueprint-
|
|
2
|
+
import { v as CapsuleBlueprintParameter } from './CapsuleBlueprint-D6IiGOwg.cjs';
|
|
3
|
+
export { ak as HelpButton } from './CapsuleBlueprint-D6IiGOwg.cjs';
|
|
4
4
|
|
|
5
5
|
interface MarkdownEditorProps {
|
|
6
6
|
value?: string;
|
package/dist/markdown.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { v as CapsuleBlueprintParameter } from './CapsuleBlueprint-
|
|
3
|
-
export { ak as HelpButton } from './CapsuleBlueprint-
|
|
2
|
+
import { v as CapsuleBlueprintParameter } from './CapsuleBlueprint-D6IiGOwg.js';
|
|
3
|
+
export { ak as HelpButton } from './CapsuleBlueprint-D6IiGOwg.js';
|
|
4
4
|
|
|
5
5
|
interface MarkdownEditorProps {
|
|
6
6
|
value?: string;
|
package/dist/markdown.js
CHANGED
|
@@ -3742,7 +3742,7 @@ function createI18n(config) {
|
|
|
3742
3742
|
if (!available.has(locale)) locale = "en";
|
|
3743
3743
|
let isRTL = isRTLLocale(locale);
|
|
3744
3744
|
let version = 0;
|
|
3745
|
-
const
|
|
3745
|
+
const listeners2 = /* @__PURE__ */ new Set();
|
|
3746
3746
|
const messageCache = /* @__PURE__ */ new Map();
|
|
3747
3747
|
const renderMessage = (key, source, values) => {
|
|
3748
3748
|
const cacheKey = `${locale}\0${source}`;
|
|
@@ -3806,7 +3806,7 @@ function createI18n(config) {
|
|
|
3806
3806
|
locale = resolved;
|
|
3807
3807
|
isRTL = isRTLLocale(locale);
|
|
3808
3808
|
version += 1;
|
|
3809
|
-
for (const listener of [...
|
|
3809
|
+
for (const listener of [...listeners2]) listener();
|
|
3810
3810
|
},
|
|
3811
3811
|
formatNumber(value, options) {
|
|
3812
3812
|
try {
|
|
@@ -3843,9 +3843,9 @@ function createI18n(config) {
|
|
|
3843
3843
|
return isRTL;
|
|
3844
3844
|
},
|
|
3845
3845
|
subscribe(listener) {
|
|
3846
|
-
|
|
3846
|
+
listeners2.add(listener);
|
|
3847
3847
|
return () => {
|
|
3848
|
-
|
|
3848
|
+
listeners2.delete(listener);
|
|
3849
3849
|
};
|
|
3850
3850
|
},
|
|
3851
3851
|
getVersion() {
|
|
@@ -4055,7 +4055,7 @@ var mergeClassTokens = (...groups) => {
|
|
|
4055
4055
|
var hasExplicitSize = (value) => Boolean(value) && /\b(?:min-|max-)?(?:w|h)-/.test(value);
|
|
4056
4056
|
|
|
4057
4057
|
// src/components/CustomIcon.tsx
|
|
4058
|
-
import { useMemo as useMemo2 } from "react";
|
|
4058
|
+
import { useMemo as useMemo2, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
4059
4059
|
|
|
4060
4060
|
// src/icons/components/Accordion.tsx
|
|
4061
4061
|
import { forwardRef } from "react";
|
|
@@ -8595,6 +8595,23 @@ var iconRegistry = {
|
|
|
8595
8595
|
Windows
|
|
8596
8596
|
};
|
|
8597
8597
|
|
|
8598
|
+
// src/icons/customRegistry.ts
|
|
8599
|
+
var customIcons = /* @__PURE__ */ new Map();
|
|
8600
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
8601
|
+
var revision = 0;
|
|
8602
|
+
var subscribeIcons = (listener) => {
|
|
8603
|
+
listeners.add(listener);
|
|
8604
|
+
return () => {
|
|
8605
|
+
listeners.delete(listener);
|
|
8606
|
+
};
|
|
8607
|
+
};
|
|
8608
|
+
var getIconRevision = () => revision;
|
|
8609
|
+
var getServerIconRevision = () => 0;
|
|
8610
|
+
function resolveIcon(name) {
|
|
8611
|
+
const registrations = customIcons.get(name);
|
|
8612
|
+
return registrations?.[registrations.length - 1]?.component ?? (Object.prototype.hasOwnProperty.call(iconRegistry, name) ? iconRegistry[name] : void 0);
|
|
8613
|
+
}
|
|
8614
|
+
|
|
8598
8615
|
// src/components/CustomIcon.tsx
|
|
8599
8616
|
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
8600
8617
|
var SIZE_CLASS_MAP = {
|
|
@@ -8621,7 +8638,8 @@ var CustomIcon = ({
|
|
|
8621
8638
|
style,
|
|
8622
8639
|
...rest
|
|
8623
8640
|
}) => {
|
|
8624
|
-
|
|
8641
|
+
useSyncExternalStore2(subscribeIcons, getIconRevision, getServerIconRevision);
|
|
8642
|
+
const IconComponent = typeof icon === "string" ? resolveIcon(icon) : icon;
|
|
8625
8643
|
const dimension = useMemo2(() => {
|
|
8626
8644
|
if (!customSize) return void 0;
|
|
8627
8645
|
return typeof customSize === "number" ? `${customSize}px` : customSize;
|
|
@@ -8659,9 +8677,9 @@ var CustomIcon = ({
|
|
|
8659
8677
|
// The fallback used to drop every computed class, so a missing icon had no
|
|
8660
8678
|
// size at all unless `customSize` was given — it collapsed the layout
|
|
8661
8679
|
// around it.
|
|
8662
|
-
/* @__PURE__ */ jsx148("span", { className: "grid h-full w-full place-items-center rounded bg-neutral-100 text-[0.6em] font-bold uppercase text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400", children: icon
|
|
8680
|
+
/* @__PURE__ */ jsx148("span", { className: "grid h-full w-full place-items-center rounded bg-neutral-100 text-[0.6em] font-bold uppercase text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400", children: typeof icon === "string" ? icon.charAt(0) || "?" : "?" })
|
|
8663
8681
|
);
|
|
8664
|
-
if (!IconComponent && icon && !warned3.has(icon)) {
|
|
8682
|
+
if (!IconComponent && typeof icon === "string" && icon && !warned3.has(icon)) {
|
|
8665
8683
|
warned3.add(icon);
|
|
8666
8684
|
console.warn(`Icon not found in registry: ${icon}`);
|
|
8667
8685
|
}
|