@shwfed/config 1.1.3 → 1.1.5

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shwfed",
3
3
  "configKey": "shwfed",
4
- "version": "1.1.3",
4
+ "version": "1.1.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -56,7 +56,7 @@ const placedFields = computed(() => {
56
56
  const gridStyle = computed(() => {
57
57
  const l = activeLayout.value?.layout;
58
58
  if (!l) return "";
59
- const colTemplate = `repeat(${l.columns}, minmax(auto, 1fr))`;
59
+ const colTemplate = `repeat(${l.columns}, minmax(0, 1fr))`;
60
60
  let rowTemplate = "";
61
61
  if (l.rows) {
62
62
  const grows = Array.from({ length: l.rows }, () => false);
@@ -67,7 +67,7 @@ const gridStyle = computed(() => {
67
67
  const hi = Math.min(l.rows, y2 - 1);
68
68
  for (let r = lo; r <= hi; r++) grows[r - 1] = true;
69
69
  }
70
- rowTemplate = grows.map((g) => g ? "auto" : "minmax(auto, 1fr)").join(" ");
70
+ rowTemplate = grows.map((g) => g ? "auto" : "minmax(0, 1fr)").join(" ");
71
71
  }
72
72
  const parts = [
73
73
  "display: grid",
@@ -80,7 +80,7 @@ const gridStyle = computed(() => {
80
80
  });
81
81
  function cellStyle(placement) {
82
82
  const [[x1, y1], [x2, y2]] = placement.area;
83
- const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`];
83
+ const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`, "min-width: 0"];
84
84
  const h = placement.h && placement.h !== "stretch" ? placement.h : null;
85
85
  const v = placement.v && placement.v !== "stretch" ? placement.v : null;
86
86
  if (h || v) {
@@ -88,7 +88,7 @@ function isHidden(f) {
88
88
  }
89
89
  function cellStyle(placement) {
90
90
  const [[x1, y1], [x2, y2]] = placement.area;
91
- const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`];
91
+ const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`, "min-width: 0"];
92
92
  const h = placement.h && placement.h !== "stretch" ? placement.h : null;
93
93
  const v = placement.v && placement.v !== "stretch" ? placement.v : null;
94
94
  if (h || v) {
@@ -123,7 +123,7 @@ const placedFields = computed(() => {
123
123
  const gridStyle = computed(() => {
124
124
  const l = activeLayout.value?.layout;
125
125
  if (!l) return "";
126
- const colTemplate = `repeat(${l.columns}, minmax(auto, 1fr))`;
126
+ const colTemplate = `repeat(${l.columns}, minmax(0, 1fr))`;
127
127
  let rowTemplate = "";
128
128
  if (l.rows) {
129
129
  const grows = Array.from({ length: l.rows }, () => false);
@@ -134,7 +134,7 @@ const gridStyle = computed(() => {
134
134
  const hi = Math.min(l.rows, y2 - 1);
135
135
  for (let r = lo; r <= hi; r++) grows[r - 1] = true;
136
136
  }
137
- rowTemplate = grows.map((g) => g ? "auto" : "minmax(auto, 1fr)").join(" ");
137
+ rowTemplate = grows.map((g) => g ? "auto" : "minmax(0, 1fr)").join(" ");
138
138
  }
139
139
  const parts = [
140
140
  "display: grid",
@@ -30,7 +30,7 @@ export type FieldSizeRange = Readonly<{
30
30
  * When true, this axis escapes the grid's `1fr` equal-share and follows
31
31
  * content instead. Currently honored only on `h` by the form runtime: any
32
32
  * row track containing at least one visible field whose `h.grow` is true is
33
- * rendered as `auto`, while other rows keep `minmax(auto, 1fr)`.
33
+ * rendered as `auto`, while other rows keep `minmax(0, 1fr)`.
34
34
  */
35
35
  grow?: boolean;
36
36
  }>;
@@ -1,9 +1,8 @@
1
1
  import { injectLocal, provideLocal } from "@vueuse/core";
2
- import { defu } from "defu";
3
2
  const CEL_CONTEXT_KEY = Symbol("cel-context");
4
3
  export function provideCELContext(context) {
5
4
  const parent = injectLocal(CEL_CONTEXT_KEY, {});
6
- provideLocal(CEL_CONTEXT_KEY, defu(context, parent));
5
+ provideLocal(CEL_CONTEXT_KEY, { ...parent, ...context });
7
6
  }
8
7
  export function injectCELContext() {
9
8
  return injectLocal(CEL_CONTEXT_KEY, {});
@@ -29,11 +29,11 @@ export const Placement = Schema.Struct({
29
29
  export const Layout = Schema.Struct({
30
30
  columns: TrackCount.annotations({
31
31
  title: "\u5217\u6570",
32
- description: "\u603B\u5217\u6570\u3002\u6BCF\u5217\u7B49\u5BBD\uFF0C\u6E32\u67D3\u65F6\u5C55\u5F00\u4E3A `repeat(N, minmax(auto, 1fr))`"
32
+ description: "\u603B\u5217\u6570\u3002\u6BCF\u5217\u7B49\u5BBD\uFF0C\u6E32\u67D3\u65F6\u5C55\u5F00\u4E3A `repeat(N, minmax(0, 1fr))` \u2014 \u5217\u4F1A\u6536\u7F29\u4EE5\u9002\u914D\u5BB9\u5668\u5BBD\u5EA6"
33
33
  }),
34
34
  rows: Schema.optional(TrackCount.annotations({
35
35
  title: "\u884C\u6570",
36
- description: "\u603B\u884C\u6570\u3002\u6BCF\u884C\u7B49\u6743\uFF0C\u6E32\u67D3\u65F6\u5C55\u5F00\u4E3A `repeat(N, minmax(auto, 1fr))` \u2014 \u5728\u81EA\u7136\u9AD8\u5EA6\u5BB9\u5668\u5185\u7B49\u540C\u4E8E `auto`"
36
+ description: "\u603B\u884C\u6570\u3002\u6BCF\u884C\u7B49\u6743\uFF0C\u6E32\u67D3\u65F6\u5C55\u5F00\u4E3A `repeat(N, minmax(0, 1fr))` \u2014 \u5728\u81EA\u7136\u9AD8\u5EA6\u5BB9\u5668\u5185\u7B49\u540C\u4E8E `auto`"
37
37
  })),
38
38
  gap: Schema.optional(Schema.Number.pipe(Schema.int(), Schema.positive()).annotations({
39
39
  title: "\u7F51\u683C\u95F4\u8DDD",
@@ -35,7 +35,7 @@ watch(() => props.slotValue.layouts, (sets) => {
35
35
  const gridStyle = computed(() => {
36
36
  const l = activeLayout.value?.layout;
37
37
  if (!l) return "";
38
- const tracks = (n) => `repeat(${n}, minmax(auto, 1fr))`;
38
+ const tracks = (n) => `repeat(${n}, minmax(0, 1fr))`;
39
39
  const parts = [
40
40
  "display: grid",
41
41
  `grid-template-columns: ${tracks(l.columns)}`,
@@ -47,7 +47,7 @@ const gridStyle = computed(() => {
47
47
  });
48
48
  function cellStyle(placement) {
49
49
  const [[x1, y1], [x2, y2]] = placement.area;
50
- const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`];
50
+ const parts = [`grid-column: ${x1} / ${x2}`, `grid-row: ${y1} / ${y2}`, "min-width: 0"];
51
51
  const h = placement.h && placement.h !== "stretch" ? placement.h : null;
52
52
  const v = placement.v && placement.v !== "stretch" ? placement.v : null;
53
53
  if (h || v) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/config",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Configurable UI for SHWFED",
5
5
  "type": "module",
6
6
  "publishConfig": {