@cck-ui/core 0.42.1 → 0.42.2
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/cjs/components/highlight/highlight.cjs +3 -3
- package/cjs/components/highlight/highlight.cjs.map +1 -1
- package/esm/components/highlight/highlight.mjs +3 -3
- package/esm/components/highlight/highlight.mjs.map +1 -1
- package/lib/components/highlight/highlight.types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
23
23
|
type: [Object, Function],
|
|
24
24
|
required: false
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
wholeWord: {
|
|
27
27
|
type: Boolean,
|
|
28
28
|
required: false
|
|
29
29
|
},
|
|
@@ -368,7 +368,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
368
368
|
const slots = (0, vue.useSlots)();
|
|
369
369
|
const defaultProps = {
|
|
370
370
|
color: "yellow",
|
|
371
|
-
|
|
371
|
+
wholeWord: false,
|
|
372
372
|
caseInsensitive: true,
|
|
373
373
|
accentInsensitive: true
|
|
374
374
|
};
|
|
@@ -409,7 +409,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
409
409
|
if (slots.default) {
|
|
410
410
|
const defaultSlotContent = slots.default();
|
|
411
411
|
for (const content of defaultSlotContent) if (typeof content.children === "string") result = result.concat(require_highlighter.highlighter(content.children, highlightStrings.value, {
|
|
412
|
-
wholeWord: props.value.
|
|
412
|
+
wholeWord: props.value.wholeWord,
|
|
413
413
|
caseInsensitive: props.value.caseInsensitive,
|
|
414
414
|
accentInsensitive: props.value.accentInsensitive
|
|
415
415
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.cjs","names":[],"sources":["../../../src/components/highlight/highlight.vue"],"sourcesContent":["<template>\n <c-text\n __static-selector=\"Highlight\"\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :style=\"resolvedStyle\"\n :unstyled=\"props.unstyled\"\n >\n <template v-for=\"({ chunk, highlighted }, i) in highlightChunks\">\n <c-mark\n v-if=\"highlighted\"\n :color=\"colorMap.get(normalizeKey(chunk)) || props.color\"\n :key=\"`highlight-mark-${i}`\"\n :style=\"props.highlightStyles\"\n :unstyled=\"props.unstyled\"\n >\n {{ chunk }}\n </c-mark>\n <span v-else :key=\"`highlight-span-${i}`\">{{ chunk }}</span>\n </template>\n </c-text>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useSlots } from 'vue'\nimport { useCckTheme, useComponentProps } from '../../core'\nimport CMark from '../mark'\nimport CText from '../text'\nimport { HighlightProps, HighlightTerm } from './highlight.types'\nimport { foldAccents, HighlightChunk, highlighter } from './highlighter/highlighter'\n\ndefineOptions({\n name: 'CHighlight',\n})\n\nconst rawProps = defineProps<HighlightProps>()\n\nconst _root = ref<InstanceType<typeof CText> | null>(null)\n\nconst theme = useCckTheme()\n\nconst slots = useSlots()\n\nconst defaultProps = {\n color: 'yellow',\n
|
|
1
|
+
{"version":3,"file":"highlight.cjs","names":[],"sources":["../../../src/components/highlight/highlight.vue"],"sourcesContent":["<template>\n <c-text\n __static-selector=\"Highlight\"\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :style=\"resolvedStyle\"\n :unstyled=\"props.unstyled\"\n >\n <template v-for=\"({ chunk, highlighted }, i) in highlightChunks\">\n <c-mark\n v-if=\"highlighted\"\n :color=\"colorMap.get(normalizeKey(chunk)) || props.color\"\n :key=\"`highlight-mark-${i}`\"\n :style=\"props.highlightStyles\"\n :unstyled=\"props.unstyled\"\n >\n {{ chunk }}\n </c-mark>\n <span v-else :key=\"`highlight-span-${i}`\">{{ chunk }}</span>\n </template>\n </c-text>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useSlots } from 'vue'\nimport { useCckTheme, useComponentProps } from '../../core'\nimport CMark from '../mark'\nimport CText from '../text'\nimport { HighlightProps, HighlightTerm } from './highlight.types'\nimport { foldAccents, HighlightChunk, highlighter } from './highlighter/highlighter'\n\ndefineOptions({\n name: 'CHighlight',\n})\n\nconst rawProps = defineProps<HighlightProps>()\n\nconst _root = ref<InstanceType<typeof CText> | null>(null)\n\nconst theme = useCckTheme()\n\nconst slots = useSlots()\n\nconst defaultProps = {\n color: 'yellow',\n wholeWord: false,\n caseInsensitive: true,\n accentInsensitive: true,\n} satisfies Partial<HighlightProps>\n\nconst props = useComponentProps({\n component: 'CHighlight',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'unstyled',\n 'highlight',\n 'highlightStyles',\n 'color',\n 'wholeWord',\n 'caseInsensitive',\n 'accentInsensitive',\n]\n\nconst isTermArray = computed(\n () => Array.isArray(props.value.highlight) && typeof props.value.highlight[0] === 'object'\n)\n\nconst colorMap = new Map<string, string>()\n\nconst normalizeKey = (s: string) => {\n let key = s\n if (props.value.caseInsensitive) {\n key = key.toLocaleLowerCase()\n }\n if (props.value.accentInsensitive) {\n key = foldAccents(key)\n }\n return key\n}\n\nconst highlightStrings = computed(() => {\n let result: string[]\n if (isTermArray.value) {\n result = (props.value.highlight as HighlightTerm[]).map((term) => {\n if (term.color) {\n colorMap.set(normalizeKey(term.text), term.color)\n }\n return term.text\n })\n } else if (Array.isArray(props.value.highlight)) {\n result = props.value.highlight as string[]\n } else {\n result = [props.value.highlight as string]\n }\n return result\n})\n\nconst highlightChunks = computed(() => {\n let result: HighlightChunk[] = []\n if (slots.default) {\n const defaultSlotContent = slots.default()\n for (const content of defaultSlotContent) {\n if (typeof content.children === 'string') {\n result = result.concat(\n highlighter(content.children, highlightStrings.value, {\n wholeWord: props.value.wholeWord,\n caseInsensitive: props.value.caseInsensitive,\n accentInsensitive: props.value.accentInsensitive,\n })\n )\n }\n }\n }\n return result\n})\n\nconst resolvedStyle = computed(() => {\n const style = props.value.style\n if (typeof style === 'function') {\n return style(theme.value)\n }\n return style\n})\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,WAAW;EAEjB,MAAM,SAAA,GAAA,IAAA,IAAA,CAA+C,IAAI;EAEzD,MAAM,QAAQ,gCAAA,YAAY;EAE1B,MAAM,SAAA,GAAA,IAAA,SAAA,CAAiB;EAEvB,MAAM,eAAe;GACnB,OAAO;GACP,WAAW;GACX,iBAAiB;GACjB,mBAAmB;EACrB;EAEA,MAAM,QAAQ,4BAAA,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,eAAA,GAAA,IAAA,SAAA,OACE,MAAM,QAAQ,MAAM,MAAM,SAAS,KAAK,OAAO,MAAM,MAAM,UAAU,OAAO,QACpF;EAEA,MAAM,2BAAW,IAAI,IAAoB;EAEzC,MAAM,gBAAgB,MAAc;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|
28
28
|
required: false
|
|
29
29
|
},
|
|
@@ -368,7 +368,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
368
368
|
const slots = useSlots();
|
|
369
369
|
const defaultProps = {
|
|
370
370
|
color: "yellow",
|
|
371
|
-
|
|
371
|
+
wholeWord: false,
|
|
372
372
|
caseInsensitive: true,
|
|
373
373
|
accentInsensitive: true
|
|
374
374
|
};
|
|
@@ -409,7 +409,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
409
409
|
if (slots.default) {
|
|
410
410
|
const defaultSlotContent = slots.default();
|
|
411
411
|
for (const content of defaultSlotContent) if (typeof content.children === "string") result = result.concat(highlighter(content.children, highlightStrings.value, {
|
|
412
|
-
wholeWord: props.value.
|
|
412
|
+
wholeWord: props.value.wholeWord,
|
|
413
413
|
caseInsensitive: props.value.caseInsensitive,
|
|
414
414
|
accentInsensitive: props.value.accentInsensitive
|
|
415
415
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.mjs","names":[],"sources":["../../../src/components/highlight/highlight.vue"],"sourcesContent":["<template>\n <c-text\n __static-selector=\"Highlight\"\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :style=\"resolvedStyle\"\n :unstyled=\"props.unstyled\"\n >\n <template v-for=\"({ chunk, highlighted }, i) in highlightChunks\">\n <c-mark\n v-if=\"highlighted\"\n :color=\"colorMap.get(normalizeKey(chunk)) || props.color\"\n :key=\"`highlight-mark-${i}`\"\n :style=\"props.highlightStyles\"\n :unstyled=\"props.unstyled\"\n >\n {{ chunk }}\n </c-mark>\n <span v-else :key=\"`highlight-span-${i}`\">{{ chunk }}</span>\n </template>\n </c-text>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useSlots } from 'vue'\nimport { useCckTheme, useComponentProps } from '../../core'\nimport CMark from '../mark'\nimport CText from '../text'\nimport { HighlightProps, HighlightTerm } from './highlight.types'\nimport { foldAccents, HighlightChunk, highlighter } from './highlighter/highlighter'\n\ndefineOptions({\n name: 'CHighlight',\n})\n\nconst rawProps = defineProps<HighlightProps>()\n\nconst _root = ref<InstanceType<typeof CText> | null>(null)\n\nconst theme = useCckTheme()\n\nconst slots = useSlots()\n\nconst defaultProps = {\n color: 'yellow',\n
|
|
1
|
+
{"version":3,"file":"highlight.mjs","names":[],"sources":["../../../src/components/highlight/highlight.vue"],"sourcesContent":["<template>\n <c-text\n __static-selector=\"Highlight\"\n ref=\"_root\"\n v-bind=\"mergedAttrs\"\n :style=\"resolvedStyle\"\n :unstyled=\"props.unstyled\"\n >\n <template v-for=\"({ chunk, highlighted }, i) in highlightChunks\">\n <c-mark\n v-if=\"highlighted\"\n :color=\"colorMap.get(normalizeKey(chunk)) || props.color\"\n :key=\"`highlight-mark-${i}`\"\n :style=\"props.highlightStyles\"\n :unstyled=\"props.unstyled\"\n >\n {{ chunk }}\n </c-mark>\n <span v-else :key=\"`highlight-span-${i}`\">{{ chunk }}</span>\n </template>\n </c-text>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useSlots } from 'vue'\nimport { useCckTheme, useComponentProps } from '../../core'\nimport CMark from '../mark'\nimport CText from '../text'\nimport { HighlightProps, HighlightTerm } from './highlight.types'\nimport { foldAccents, HighlightChunk, highlighter } from './highlighter/highlighter'\n\ndefineOptions({\n name: 'CHighlight',\n})\n\nconst rawProps = defineProps<HighlightProps>()\n\nconst _root = ref<InstanceType<typeof CText> | null>(null)\n\nconst theme = useCckTheme()\n\nconst slots = useSlots()\n\nconst defaultProps = {\n color: 'yellow',\n wholeWord: false,\n caseInsensitive: true,\n accentInsensitive: true,\n} satisfies Partial<HighlightProps>\n\nconst props = useComponentProps({\n component: 'CHighlight',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'unstyled',\n 'highlight',\n 'highlightStyles',\n 'color',\n 'wholeWord',\n 'caseInsensitive',\n 'accentInsensitive',\n]\n\nconst isTermArray = computed(\n () => Array.isArray(props.value.highlight) && typeof props.value.highlight[0] === 'object'\n)\n\nconst colorMap = new Map<string, string>()\n\nconst normalizeKey = (s: string) => {\n let key = s\n if (props.value.caseInsensitive) {\n key = key.toLocaleLowerCase()\n }\n if (props.value.accentInsensitive) {\n key = foldAccents(key)\n }\n return key\n}\n\nconst highlightStrings = computed(() => {\n let result: string[]\n if (isTermArray.value) {\n result = (props.value.highlight as HighlightTerm[]).map((term) => {\n if (term.color) {\n colorMap.set(normalizeKey(term.text), term.color)\n }\n return term.text\n })\n } else if (Array.isArray(props.value.highlight)) {\n result = props.value.highlight as string[]\n } else {\n result = [props.value.highlight as string]\n }\n return result\n})\n\nconst highlightChunks = computed(() => {\n let result: HighlightChunk[] = []\n if (slots.default) {\n const defaultSlotContent = slots.default()\n for (const content of defaultSlotContent) {\n if (typeof content.children === 'string') {\n result = result.concat(\n highlighter(content.children, highlightStrings.value, {\n wholeWord: props.value.wholeWord,\n caseInsensitive: props.value.caseInsensitive,\n accentInsensitive: props.value.accentInsensitive,\n })\n )\n }\n }\n }\n return result\n})\n\nconst resolvedStyle = computed(() => {\n const style = props.value.style\n if (typeof style === 'function') {\n return style(theme.value)\n }\n return style\n})\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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K,eAAE,OAAA,MAAM,eAAe;IAC5B,UAAU,OAAA,MAAM;;2BAEN,CAAA,gBAAA,gBAAR,KAAK,GAAA,CAAA,CAAA,CAAA;;;;;;uBAEV,mBAA4D,QAAA,EAA9C,KAAG,kBAAoB,IAAA,GAAA,gBAAQ,KAAK,GAAA,CAAA,EAAA,GAAA,EAAA"}
|
|
@@ -33,7 +33,7 @@ export interface HighlightProps extends Omit<TextProps, 'color'> {
|
|
|
33
33
|
* Only match whole words (adds word boundaries to regex).
|
|
34
34
|
* When enabled, 'the' will not match 'there'
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
wholeWord?: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Perform case-insensitive matching.
|
|
39
39
|
* @default true
|
package/package.json
CHANGED