@hybridly/vue 0.10.0-beta.29 → 0.10.0-beta.30

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/index.d.mts CHANGED
@@ -613,6 +613,10 @@ interface BaseFilterRefinement {
613
613
  * The default value of the filter.
614
614
  */
615
615
  default: any;
616
+ /**
617
+ * Whether this filter has an explicitly configured default value.
618
+ */
619
+ has_default: boolean;
616
620
  /**
617
621
  * The current operator of the filter.
618
622
  */
@@ -824,6 +828,10 @@ interface SortRefinement {
824
828
  * The default direction of the sort.
825
829
  */
826
830
  default?: SortDirection;
831
+ /**
832
+ * Whether this sort has an explicitly configured default direction.
833
+ */
834
+ has_default: boolean;
827
835
  /**
828
836
  * The label of the sort.
829
837
  */
package/dist/index.mjs CHANGED
@@ -1825,7 +1825,7 @@ function useRefinements(input, defaultOptions = {}) {
1825
1825
  console.warn(`[Refinement] Filter "${name}" does not exist.`);
1826
1826
  return;
1827
1827
  }
1828
- if (["", null].includes(value) || value === filter.default) value = void 0;
1828
+ if (["", null].includes(value) || filter.has_default && isEqual(value, filter.default)) value = void 0;
1829
1829
  const operator = (() => {
1830
1830
  const operator = options.operator ?? filter.operator;
1831
1831
  if (operator === filter.default_operator) return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridly/vue",
3
3
  "type": "module",
4
- "version": "0.10.0-beta.29",
4
+ "version": "0.10.0-beta.30",
5
5
  "description": "Vue adapter for Hybridly",
6
6
  "author": "Enzo Innocenzi <enzo@innocenzi.dev>",
7
7
  "license": "MIT",
@@ -47,8 +47,8 @@
47
47
  "dependencies": {
48
48
  "@clickbar/dot-diver": "^1.0.7",
49
49
  "es-toolkit": "^1.45.1",
50
- "@hybridly/core": "0.10.0-beta.29",
51
- "@hybridly/utils": "0.10.0-beta.29",
50
+ "@hybridly/core": "0.10.0-beta.30",
51
+ "@hybridly/utils": "0.10.0-beta.30",
52
52
  "@vue/devtools-api": "^8.1.0",
53
53
  "defu": "^6.1.4",
54
54
  "nprogress": "^0.2.0"