@smartnet360/svelte-components 0.0.1-beta.2 → 0.0.1

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.
@@ -270,7 +270,7 @@
270
270
  <div class="card-body">
271
271
  <h5 class="card-title">{grid.name}</h5>
272
272
  <p class="card-text text-muted">
273
- Layout: {grid.layoutId}<br>
273
+ <!-- Layout: {grid.layoutId}<br> -->
274
274
  Components: {grid.componentAssignments.length}<br>
275
275
  Created: {new Date(grid.created).toLocaleDateString()}
276
276
  </p>
@@ -278,10 +278,12 @@
278
278
  <div class="card-footer bg-transparent">
279
279
  <div class="d-flex gap-2">
280
280
  <button
281
- class="btn btn-primary btn-sm"
282
- on:click={() => switchToGrid(grid.id)}
281
+ class="btn btn-outline-primary btn-sm"
282
+ on:click={() => launchGrid(grid.id)}
283
+ aria-label="Launch in new window"
284
+ title="Launch in new window"
283
285
  >
284
- Open
286
+ <i class="bi bi-box-arrow-up-right" aria-hidden="true"></i>
285
287
  </button>
286
288
  <button
287
289
  class="btn btn-outline-secondary btn-sm"
@@ -291,14 +293,6 @@
291
293
  >
292
294
  <i class="bi bi-pencil" aria-hidden="true"></i>
293
295
  </button>
294
- <button
295
- class="btn btn-outline-primary btn-sm"
296
- on:click={() => launchGrid(grid.id)}
297
- aria-label="Launch in new window"
298
- title="Launch in new window"
299
- >
300
- <i class="bi bi-box-arrow-up-right" aria-hidden="true"></i>
301
- </button>
302
296
  <button
303
297
  class="btn btn-outline-danger btn-sm"
304
298
  on:click={() => deleteGrid(grid.id)}
@@ -14,7 +14,7 @@ export const GRID_LAYOUTS = {
14
14
  'half-horizontal': {
15
15
  id: 'half-horizontal',
16
16
  name: 'Half Horizontal (1x1)',
17
- description: 'Two equal horizontal sections (left and right)',
17
+ description: '',
18
18
  icon: '⬌',
19
19
  category: 'basic',
20
20
  slots: [
@@ -47,7 +47,7 @@ export const GRID_LAYOUTS = {
47
47
  'half-vertical': {
48
48
  id: 'half-vertical',
49
49
  name: 'Half Vertical (1x1)',
50
- description: 'Two equal vertical sections (top and bottom)',
50
+ description: '',
51
51
  icon: '⬍',
52
52
  category: 'basic',
53
53
  slots: [
@@ -81,7 +81,7 @@ export const GRID_LAYOUTS = {
81
81
  'left-half-right-quarters': {
82
82
  id: 'left-half-right-quarters',
83
83
  name: 'Left Half + Right Quarters (1x2)',
84
- description: 'Left section takes half, right side split into two quarters',
84
+ description: '',
85
85
  icon: '⬌⬍',
86
86
  category: 'asymmetric',
87
87
  slots: [
@@ -122,7 +122,7 @@ export const GRID_LAYOUTS = {
122
122
  'right-half-left-quarters': {
123
123
  id: 'right-half-left-quarters',
124
124
  name: 'Right Half + Left Quarters (2x1)',
125
- description: 'Right section takes half, left side split into two quarters',
125
+ description: '',
126
126
  icon: '⬍⬌',
127
127
  category: 'asymmetric',
128
128
  slots: [
@@ -163,7 +163,7 @@ export const GRID_LAYOUTS = {
163
163
  'top-half-bottom-quarters': {
164
164
  id: 'top-half-bottom-quarters',
165
165
  name: 'Top Half + Bottom Quarters (1x2)',
166
- description: 'Top section takes half, bottom split into two quarters',
166
+ description: '',
167
167
  icon: '⬌⬍',
168
168
  category: 'asymmetric',
169
169
  slots: [
@@ -204,7 +204,7 @@ export const GRID_LAYOUTS = {
204
204
  'bottom-half-top-quarters': {
205
205
  id: 'bottom-half-top-quarters',
206
206
  name: 'Bottom Half + Top Quarters (2x1)',
207
- description: 'Bottom section takes half, top split into two quarters',
207
+ description: '',
208
208
  icon: '⬍⬌',
209
209
  category: 'asymmetric',
210
210
  slots: [
@@ -246,7 +246,7 @@ export const GRID_LAYOUTS = {
246
246
  'quarters': {
247
247
  id: 'quarters',
248
248
  name: 'Four Quarters (2x2)',
249
- description: 'Four equal quadrants in a 2x2 grid',
249
+ description: '',
250
250
  icon: '⬜',
251
251
  category: 'symmetric',
252
252
  slots: [
@@ -7,12 +7,12 @@
7
7
  import type { GridConfiguration } from './gridLayouts.js';
8
8
  import type { ComponentConfig } from './GridSelector/index.js';
9
9
  /**
10
- * Create a launch handler that opens grids in new windows using localStorage
10
+ * Create a launch handler that opens grids in new tabs using localStorage
11
11
  * This recreates the previous built-in behavior as a reusable helper
12
12
  */
13
- export declare function createWindowLauncher(gridViewerUrl: string, availableComponents: ComponentConfig[], windowFeatures?: string): (grid: GridConfiguration) => void;
13
+ export declare function createWindowLauncher(gridViewerUrl: string, availableComponents: ComponentConfig[]): (grid: GridConfiguration) => void;
14
14
  /**
15
- * Create a launch handler that opens grids in new tabs (simpler window features)
15
+ * Create a launch handler that opens grids in new tabs (same as createWindowLauncher now)
16
16
  */
17
17
  export declare function createTabLauncher(gridViewerUrl: string, availableComponents: ComponentConfig[]): (grid: GridConfiguration) => void;
18
18
  /**
@@ -5,10 +5,10 @@
5
5
  * These are optional helpers - parents can implement their own launch logic.
6
6
  */
7
7
  /**
8
- * Create a launch handler that opens grids in new windows using localStorage
8
+ * Create a launch handler that opens grids in new tabs using localStorage
9
9
  * This recreates the previous built-in behavior as a reusable helper
10
10
  */
11
- export function createWindowLauncher(gridViewerUrl, availableComponents, windowFeatures = 'width=1200,height=800,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,location=no,status=no') {
11
+ export function createWindowLauncher(gridViewerUrl, availableComponents) {
12
12
  return (grid) => {
13
13
  // Create temporary storage key
14
14
  const key = `grid-viewer-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
@@ -25,25 +25,25 @@ export function createWindowLauncher(gridViewerUrl, availableComponents, windowF
25
25
  }))
26
26
  };
27
27
  localStorage.setItem(key, JSON.stringify(data));
28
- // Open new window with the key parameter
28
+ // Open new tab with the key parameter
29
29
  const url = `${gridViewerUrl}?key=${key}`;
30
- const newWindow = window.open(url, `grid-${grid.id}`, windowFeatures);
31
- // Focus the new window if it opened successfully
32
- if (newWindow) {
33
- newWindow.focus();
30
+ const newTab = window.open(url, '_blank');
31
+ // Focus the new tab if it opened successfully
32
+ if (newTab) {
33
+ newTab.focus();
34
34
  }
35
35
  else {
36
- // Clean up if window failed to open
36
+ // Clean up if tab failed to open
37
37
  localStorage.removeItem(key);
38
- alert('Failed to open new window. Please check your browser\'s popup blocker settings.');
38
+ alert('Failed to open new tab. Please check your browser\'s popup blocker settings.');
39
39
  }
40
40
  };
41
41
  }
42
42
  /**
43
- * Create a launch handler that opens grids in new tabs (simpler window features)
43
+ * Create a launch handler that opens grids in new tabs (same as createWindowLauncher now)
44
44
  */
45
45
  export function createTabLauncher(gridViewerUrl, availableComponents) {
46
- return createWindowLauncher(gridViewerUrl, availableComponents, 'scrollbars=yes,resizable=yes');
46
+ return createWindowLauncher(gridViewerUrl, availableComponents);
47
47
  }
48
48
  /**
49
49
  * Create a launch handler that uses direct URL navigation (same tab)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartnet360/svelte-components",
3
- "version": "0.0.1-beta.2",
3
+ "version": "0.0.1",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -11,11 +11,9 @@
11
11
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12
12
  "format": "prettier --write .",
13
13
  "lint": "prettier --check . && eslint .",
14
- "release:beta": "npm version prerelease --preid=beta && npm publish --tag beta --access public",
15
- "release:alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha --access public",
16
- "release:patch": "npm version patch && npm publish --tag latest --access public",
17
- "release:minor": "npm version minor && npm publish --tag latest --access public",
18
- "release:major": "npm version major && npm publish --tag latest --access public"
14
+ "release:patch": "npm version patch && npm publish --access public",
15
+ "release:minor": "npm version minor && npm publish --access public",
16
+ "release:major": "npm version major && npm publish --access public"
19
17
  },
20
18
  "files": [
21
19
  "dist"