shopify-theme-devtools 2.1.0 → 2.2.0
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/README.md +43 -12
- package/dist/theme-devtools.js +2218 -815
- package/package.json +1 -1
- package/src/liquid/theme-devtools-bridge.liquid +0 -65
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shopify-theme-devtools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "In-browser devtools panel for Shopify theme development - inspect Liquid context, metafields, settings, sections, and cart state",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/theme-devtools.js",
|
|
@@ -65,37 +65,6 @@
|
|
|
65
65
|
{%- assign devtools_metafield_namespaces = 'custom,global,shopify' | split: ',' -%}
|
|
66
66
|
{%- endif -%}
|
|
67
67
|
|
|
68
|
-
{%- comment -%}
|
|
69
|
-
Configure your theme settings to expose here.
|
|
70
|
-
Format: setting_id|type|label|group
|
|
71
|
-
Common types: color, text, checkbox, number, range, select, image_picker, font_picker
|
|
72
|
-
{%- endcomment -%}
|
|
73
|
-
{%- capture devtools_settings_config -%}
|
|
74
|
-
colors_accent_1|color|Accent 1|colors
|
|
75
|
-
colors_accent_2|color|Accent 2|colors
|
|
76
|
-
colors_text|color|Text color|colors
|
|
77
|
-
colors_background|color|Background|colors
|
|
78
|
-
colors_background_2|color|Secondary background|colors
|
|
79
|
-
colors_outline_button_labels|color|Outline button labels|colors
|
|
80
|
-
colors_solid_button_labels|color|Solid button labels|colors
|
|
81
|
-
type_header_font|font_picker|Header font|typography
|
|
82
|
-
type_body_font|font_picker|Body font|typography
|
|
83
|
-
type_header_font_size|range|Header font size|typography
|
|
84
|
-
type_body_font_size|range|Body font size|typography
|
|
85
|
-
page_width|range|Page width|layout
|
|
86
|
-
spacing_sections|range|Section spacing|layout
|
|
87
|
-
cart_type|select|Cart type|cart
|
|
88
|
-
cart_drawer_enabled|checkbox|Enable cart drawer|cart
|
|
89
|
-
show_vendor|checkbox|Show vendor|product
|
|
90
|
-
show_secondary_image|checkbox|Show secondary image|product
|
|
91
|
-
predictive_search_enabled|checkbox|Predictive search|search
|
|
92
|
-
social_twitter_link|text|Twitter link|social
|
|
93
|
-
social_facebook_link|text|Facebook link|social
|
|
94
|
-
social_instagram_link|text|Instagram link|social
|
|
95
|
-
favicon|image_picker|Favicon|favicon
|
|
96
|
-
checkout_logo|image_picker|Checkout logo|checkout
|
|
97
|
-
{%- endcapture -%}
|
|
98
|
-
|
|
99
68
|
{%- if theme.role == 'development' or theme.role == 'unpublished' -%}
|
|
100
69
|
{%- capture devtools_context -%}
|
|
101
70
|
{
|
|
@@ -454,40 +423,6 @@ checkout_logo|image_picker|Checkout logo|checkout
|
|
|
454
423
|
"blog": null
|
|
455
424
|
{%- endif -%}
|
|
456
425
|
},
|
|
457
|
-
"settings": {
|
|
458
|
-
{%- assign devtools_settings_lines = devtools_settings_config | strip | newline_to_br | split: '<br />' -%}
|
|
459
|
-
{%- assign devtools_current_group = '' -%}
|
|
460
|
-
{%- assign devtools_group_started = false -%}
|
|
461
|
-
{%- for line in devtools_settings_lines -%}
|
|
462
|
-
{%- assign line_stripped = line | strip -%}
|
|
463
|
-
{%- if line_stripped != blank -%}
|
|
464
|
-
{%- assign parts = line_stripped | split: '|' -%}
|
|
465
|
-
{%- assign setting_id = parts[0] -%}
|
|
466
|
-
{%- assign setting_type = parts[1] -%}
|
|
467
|
-
{%- assign setting_label = parts[2] -%}
|
|
468
|
-
{%- assign setting_group = parts[3] | default: 'theme' -%}
|
|
469
|
-
{%- if setting_group != devtools_current_group -%}
|
|
470
|
-
{%- if devtools_group_started -%}
|
|
471
|
-
},
|
|
472
|
-
{%- endif -%}
|
|
473
|
-
"{{ setting_group }}": {
|
|
474
|
-
{%- assign devtools_current_group = setting_group -%}
|
|
475
|
-
{%- assign devtools_group_started = true -%}
|
|
476
|
-
{%- assign devtools_first_in_group = true -%}
|
|
477
|
-
{%- endif -%}
|
|
478
|
-
{%- unless devtools_first_in_group -%},{%- endunless -%}
|
|
479
|
-
"{{ setting_id }}": {
|
|
480
|
-
"value": {{ settings[setting_id] | json }},
|
|
481
|
-
"type": {{ setting_type | json }},
|
|
482
|
-
"label": {{ setting_label | json }}
|
|
483
|
-
}
|
|
484
|
-
{%- assign devtools_first_in_group = false -%}
|
|
485
|
-
{%- endif -%}
|
|
486
|
-
{%- endfor -%}
|
|
487
|
-
{%- if devtools_group_started -%}
|
|
488
|
-
}
|
|
489
|
-
{%- endif -%}
|
|
490
|
-
},
|
|
491
426
|
"sectionSettings": {
|
|
492
427
|
{%- comment -%} Section settings are injected via JS from data attributes {%- endcomment -%}
|
|
493
428
|
},
|