@w6w/embed 0.1.1 → 0.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.
Files changed (148) hide show
  1. package/README.md +231 -4
  2. package/dist/ConfirmModal-RLbZT5_k.js +181 -0
  3. package/dist/ConfirmModal-RLbZT5_k.js.map +1 -0
  4. package/dist/CreateFunctionModal-DRsFx-FB.js +221 -0
  5. package/dist/CreateFunctionModal-DRsFx-FB.js.map +1 -0
  6. package/dist/DocumentFormModal-BExK1V-B.js +89 -0
  7. package/dist/DocumentFormModal-BExK1V-B.js.map +1 -0
  8. package/dist/ImportSpecModal-BDQIf6rg.js +136 -0
  9. package/dist/ImportSpecModal-BDQIf6rg.js.map +1 -0
  10. package/dist/W6WEmbedProvider.d.ts +22 -4
  11. package/dist/WorkflowEditor-DlbVv6Fs.js +854 -0
  12. package/dist/WorkflowEditor-DlbVv6Fs.js.map +1 -0
  13. package/dist/api-calls--JHyif6a.js +107 -0
  14. package/dist/api-calls--JHyif6a.js.map +1 -0
  15. package/dist/apps-1FNUwbGv.js +77 -0
  16. package/dist/apps-1FNUwbGv.js.map +1 -0
  17. package/dist/callables-3mFrMVG_.js +151 -0
  18. package/dist/callables-3mFrMVG_.js.map +1 -0
  19. package/dist/chrome/index.d.ts +6 -0
  20. package/dist/chrome/workspace.d.ts +29 -1
  21. package/dist/coerce-input-BicYr7nc.js +139 -0
  22. package/dist/coerce-input-BicYr7nc.js.map +1 -0
  23. package/dist/connections-CjjYeRqb.js +78 -0
  24. package/dist/connections-CjjYeRqb.js.map +1 -0
  25. package/dist/document-sources-C0grrtdq.js +86 -0
  26. package/dist/document-sources-C0grrtdq.js.map +1 -0
  27. package/dist/draft/index.d.ts +3 -1
  28. package/dist/draft/use-callable-draft.d.ts +65 -0
  29. package/dist/draft/workflow-save.d.ts +3 -0
  30. package/dist/draft.mjs +9 -5
  31. package/dist/draft.mjs.map +1 -1
  32. package/dist/editor/CallableEditorFrame.d.ts +33 -0
  33. package/dist/editor/EditorShell.d.ts +16 -0
  34. package/dist/editor/EndpointCards.d.ts +56 -0
  35. package/dist/editor/EndpointEditor.d.ts +26 -0
  36. package/dist/editor/FunctionEditor.d.ts +21 -0
  37. package/dist/editor/InputListEditor.d.ts +29 -0
  38. package/dist/editor/TargetSelector.d.ts +30 -0
  39. package/dist/editor/TargetSelector.types.d.ts +62 -0
  40. package/dist/editor/editor-apps.d.ts +8 -2
  41. package/dist/editor/types.d.ts +57 -0
  42. package/dist/editor-apps-BdenSV1o.js +95 -0
  43. package/dist/editor-apps-BdenSV1o.js.map +1 -0
  44. package/dist/editor-tools-RxmY5iyi.js +1279 -0
  45. package/dist/editor-tools-RxmY5iyi.js.map +1 -0
  46. package/dist/editor.mjs +2 -2166
  47. package/dist/editor.mjs.map +1 -1
  48. package/dist/editors/DocumentEditor.d.ts +20 -0
  49. package/dist/editors/doc-format.d.ts +3 -0
  50. package/dist/editors.d.ts +12 -0
  51. package/dist/editors.mjs +1313 -0
  52. package/dist/editors.mjs.map +1 -0
  53. package/dist/embed-status.d.ts +20 -0
  54. package/dist/endpoints-B2ynbZo-.js +227 -0
  55. package/dist/endpoints-B2ynbZo-.js.map +1 -0
  56. package/dist/forms/CreateEndpointModal.d.ts +54 -0
  57. package/dist/forms/CreateFunctionModal.d.ts +55 -0
  58. package/dist/forms/DocumentFormModal.d.ts +8 -0
  59. package/dist/forms/SecretsManager.d.ts +12 -0
  60. package/dist/forms/VarsManager.d.ts +29 -0
  61. package/dist/forms.d.ts +6 -0
  62. package/dist/forms.mjs +407 -0
  63. package/dist/forms.mjs.map +1 -0
  64. package/dist/index.d.ts +3 -1
  65. package/dist/index.mjs +153 -50
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/lib/callable-record.d.ts +21 -0
  68. package/dist/lib/coerce-input.d.ts +6 -0
  69. package/dist/lib/endpoint-editor.d.ts +23 -0
  70. package/dist/lib/index.d.ts +7 -0
  71. package/dist/lib/input-coverage.d.ts +28 -0
  72. package/dist/lib/input-seeding.d.ts +67 -0
  73. package/dist/lib/rail-settings.d.ts +3 -3
  74. package/dist/lib/recent-activity.d.ts +128 -0
  75. package/dist/lib/target-fields.d.ts +168 -0
  76. package/dist/lib/workflow-blank.d.ts +2 -0
  77. package/dist/lib.mjs +70 -48
  78. package/dist/lib.mjs.map +1 -1
  79. package/dist/lists/ActivitySummary.d.ts +29 -0
  80. package/dist/lists/CallableKindList.d.ts +34 -0
  81. package/dist/lists/ConnectionDetail.d.ts +17 -0
  82. package/dist/lists/ConnectionList.d.ts +16 -0
  83. package/dist/lists/DocumentList.d.ts +29 -0
  84. package/dist/lists/EndpointList.d.ts +19 -0
  85. package/dist/lists/FunctionList.d.ts +18 -0
  86. package/dist/lists/ReliabilityBoard.d.ts +23 -0
  87. package/dist/lists/RunHistory.d.ts +11 -0
  88. package/dist/lists/ServiceDetail.d.ts +20 -0
  89. package/dist/lists/WorkflowList.d.ts +19 -0
  90. package/dist/lists/vendor-history.d.ts +40 -0
  91. package/dist/lists.d.ts +20 -0
  92. package/dist/lists.mjs +1185 -0
  93. package/dist/lists.mjs.map +1 -0
  94. package/dist/project-context-BiCjv_E3.js +25 -0
  95. package/dist/project-context-BiCjv_E3.js.map +1 -0
  96. package/dist/project-context.d.ts +15 -1
  97. package/dist/rail/CallableRail.d.ts +12 -0
  98. package/dist/rail/CallableWorkspace.d.ts +16 -0
  99. package/dist/rail/SettingsTool.d.ts +7 -1
  100. package/dist/rail/settings-sections.d.ts +2 -2
  101. package/dist/rail-settings-XYGToh00.js +111 -0
  102. package/dist/rail-settings-XYGToh00.js.map +1 -0
  103. package/dist/rail.d.ts +11 -0
  104. package/dist/rail.mjs +35 -0
  105. package/dist/rail.mjs.map +1 -0
  106. package/dist/repos/api-calls.d.ts +4 -0
  107. package/dist/repos/apps.d.ts +14 -0
  108. package/dist/repos/callables.d.ts +91 -0
  109. package/dist/repos/connections.d.ts +33 -0
  110. package/dist/repos/dashboard.d.ts +4 -0
  111. package/dist/repos/endpoints.d.ts +125 -0
  112. package/dist/repos/functions.d.ts +79 -0
  113. package/dist/repos/index.d.ts +10 -0
  114. package/dist/repos/reliability.d.ts +42 -0
  115. package/dist/repos/saved-tests.d.ts +46 -0
  116. package/dist/repos/spec-export.d.ts +23 -0
  117. package/dist/repos/workflows.d.ts +138 -0
  118. package/dist/repos.mjs +174 -88
  119. package/dist/repos.mjs.map +1 -1
  120. package/dist/settings-rail--GdRMusb.js +33 -0
  121. package/dist/settings-rail--GdRMusb.js.map +1 -0
  122. package/dist/slug-C4ktDPdy.js +315 -0
  123. package/dist/slug-C4ktDPdy.js.map +1 -0
  124. package/dist/spec-export-Cf3VQSQS.js +176 -0
  125. package/dist/spec-export-Cf3VQSQS.js.map +1 -0
  126. package/dist/spec-import-CjmxyZDR.js +465 -0
  127. package/dist/spec-import-CjmxyZDR.js.map +1 -0
  128. package/dist/step-tests-CivICmTq.js +18 -0
  129. package/dist/step-tests-CivICmTq.js.map +1 -0
  130. package/dist/trigger-preview-VPkrryDl.js +120 -0
  131. package/dist/trigger-preview-VPkrryDl.js.map +1 -0
  132. package/dist/use-callable-draft-zHLpcr-b.js +271 -0
  133. package/dist/use-callable-draft-zHLpcr-b.js.map +1 -0
  134. package/dist/{use-workflow-draft-oI02dsP-.js → use-workflow-draft-DzAyUeA6.js} +48 -46
  135. package/dist/use-workflow-draft-DzAyUeA6.js.map +1 -0
  136. package/dist/vault-BSEWhMYC.js +117 -0
  137. package/dist/vault-BSEWhMYC.js.map +1 -0
  138. package/dist/workflow-blank-DyL3_RUA.js +14 -0
  139. package/dist/workflow-blank-DyL3_RUA.js.map +1 -0
  140. package/package.json +21 -5
  141. package/src/styles.css +408 -1
  142. package/dist/project-context-Dbk0Gr1K.js +0 -16
  143. package/dist/project-context-Dbk0Gr1K.js.map +0 -1
  144. package/dist/slug-ByKQgxrf.js +0 -642
  145. package/dist/slug-ByKQgxrf.js.map +0 -1
  146. package/dist/spec-import-HgO7ZkLZ.js +0 -898
  147. package/dist/spec-import-HgO7ZkLZ.js.map +0 -1
  148. package/dist/use-workflow-draft-oI02dsP-.js.map +0 -1
package/src/styles.css CHANGED
@@ -68,6 +68,19 @@
68
68
  font-size: 0.85em;
69
69
  }
70
70
 
71
+ .w6w-embed-root .block {
72
+ display: block;
73
+ }
74
+
75
+ .w6w-embed-root .subpanel {
76
+ margin-top: var(--w6w-sp-3);
77
+ padding-top: var(--w6w-sp-3);
78
+ border-top: 1px solid var(--border);
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: var(--w6w-sp-2);
82
+ }
83
+
71
84
  .w6w-embed-root .right-rail {
72
85
  position: sticky;
73
86
  top: 0;
@@ -677,7 +690,7 @@
677
690
  .w6w-embed-root .wf-fullbleed {
678
691
  display: flex;
679
692
  flex-direction: column;
680
- height: calc(100vh - 56px);
693
+ height: 100%;
681
694
  }
682
695
 
683
696
  .w6w-embed-root .wf-fullbleed-head {
@@ -827,3 +840,397 @@
827
840
  border-color: var(--border);
828
841
  color: var(--text);
829
842
  }
843
+
844
+ /* ── ConnectionList ── */
845
+ .w6w-embed-root .w6w-embed-conn-badge {
846
+ border: 1px solid var(--border);
847
+ border-radius: var(--radius);
848
+ color: var(--muted);
849
+ font-size: 0.75em;
850
+ padding: 0 var(--w6w-sp-1);
851
+ }
852
+
853
+ /* ── ConnectionDetail ── */
854
+ .w6w-embed-root .w6w-embed-conn-detail {
855
+ display: flex;
856
+ flex-direction: column;
857
+ gap: var(--w6w-sp-3);
858
+ }
859
+
860
+ .w6w-embed-root .w6w-embed-conn-card {
861
+ background: var(--panel);
862
+ border: 1px solid var(--border);
863
+ border-radius: var(--radius);
864
+ padding: var(--w6w-sp-3);
865
+ }
866
+
867
+ .w6w-embed-root .w6w-embed-conn-list {
868
+ list-style: none;
869
+ margin: 0;
870
+ padding: 0;
871
+ }
872
+
873
+ .w6w-embed-root .w6w-embed-conn-tests {
874
+ margin-left: var(--w6w-sp-4);
875
+ margin-top: var(--w6w-sp-1);
876
+ }
877
+
878
+ .w6w-embed-root .w6w-embed-conn-action {
879
+ background: transparent;
880
+ border: 0;
881
+ color: inherit;
882
+ cursor: pointer;
883
+ font: inherit;
884
+ padding: var(--w6w-sp-2);
885
+ text-align: left;
886
+ width: 100%;
887
+ }
888
+
889
+ .w6w-embed-root .w6w-embed-conn-action:hover {
890
+ background: var(--panel-2);
891
+ }
892
+
893
+ .w6w-embed-root .w6w-embed-conn-filter {
894
+ margin-bottom: var(--w6w-sp-2);
895
+ }
896
+
897
+ .w6w-embed-root .w6w-embed-conn-notice {
898
+ align-items: center;
899
+ display: flex;
900
+ gap: var(--w6w-sp-2);
901
+ }
902
+
903
+ .w6w-embed-root .w6w-embed-conn-notice-text {
904
+ flex: 1;
905
+ }
906
+
907
+ .w6w-embed-root .w6w-embed-conn-notice-ok,
908
+ .w6w-embed-root .w6w-embed-conn-ok {
909
+ color: var(--accent-2);
910
+ }
911
+
912
+ .w6w-embed-root .w6w-embed-conn-notice-warn {
913
+ color: var(--warn);
914
+ }
915
+
916
+ .w6w-embed-root .w6w-embed-conn-notice-error,
917
+ .w6w-embed-root .w6w-embed-conn-fail {
918
+ color: var(--danger);
919
+ }
920
+
921
+ /* ── Config list chrome (VarsManager, SecretsManager, DocumentList) ── */
922
+ /* Copied from Studio's src/styles.css, selectors prefixed, declarations byte-identical. */
923
+ .w6w-embed-root .section {
924
+ display: flex;
925
+ flex-direction: column;
926
+ gap: var(--w6w-sp-2-5);
927
+ }
928
+ .w6w-embed-root .section-head {
929
+ display: flex;
930
+ align-items: flex-start;
931
+ justify-content: space-between;
932
+ gap: var(--w6w-sp-4);
933
+ }
934
+ .w6w-embed-root .section-head h3 {
935
+ margin: 0 0 var(--w6w-sp-0-5);
936
+ }
937
+ /* Let the description column absorb the wrapping; keep the action button on one
938
+ line (it was wrapping to "+ Add / secret" when the copy got long). */
939
+ .w6w-embed-root .section-head > :first-child {
940
+ min-width: 0;
941
+ }
942
+ .w6w-embed-root .section-head > .btn {
943
+ flex-shrink: 0;
944
+ white-space: nowrap;
945
+ }
946
+
947
+ /* ── CallableEditorFrame ── (ported from Studio src/styles.css; shared by the Function and
948
+ Endpoint editors, TargetSelector and InputListEditor) */
949
+ .w6w-embed-root .card {
950
+ background: var(--panel);
951
+ border: 1px solid var(--border);
952
+ border-radius: var(--radius);
953
+ padding: var(--w6w-sp-4);
954
+ }
955
+
956
+ .w6w-embed-root .card h3,
957
+ .w6w-embed-root .card h4 {
958
+ margin: 0 0 var(--w6w-sp-2);
959
+ }
960
+
961
+ .w6w-embed-root .exec-profile-editor {
962
+ min-width: 0;
963
+ }
964
+
965
+ .w6w-embed-root .exec-profile-body {
966
+ max-width: 1000px;
967
+ width: 100%;
968
+ margin: 0 auto;
969
+ padding: var(--w6w-sp-6) var(--w6w-sp-5);
970
+ min-width: 0;
971
+ }
972
+
973
+ .w6w-embed-root .status-failed {
974
+ color: var(--danger);
975
+ border-color: #a33;
976
+ }
977
+
978
+ /* ── ActivitySummary ── (declarations copied from Studio's `.card` / `.card h3`) */
979
+ .w6w-embed-root .w6w-activity-card {
980
+ background: var(--panel);
981
+ border: 1px solid var(--border);
982
+ border-radius: var(--radius);
983
+ padding: var(--w6w-sp-4);
984
+ }
985
+
986
+ .w6w-embed-root .w6w-activity-card h3 {
987
+ margin: 0 0 var(--w6w-sp-2);
988
+ }
989
+
990
+ .w6w-embed-root .w6w-activity-section {
991
+ margin-bottom: var(--w6w-sp-6);
992
+ }
993
+
994
+ .w6w-embed-root .w6w-activity-section > h3,
995
+ .w6w-embed-root .w6w-activity-h3 {
996
+ margin: 0 0 var(--w6w-sp-2);
997
+ }
998
+
999
+ .w6w-embed-root .w6w-activity-stats {
1000
+ display: flex;
1001
+ gap: var(--w6w-sp-3);
1002
+ flex-wrap: wrap;
1003
+ }
1004
+
1005
+ .w6w-embed-root .w6w-activity-stat {
1006
+ flex: 1 1 140px;
1007
+ min-width: 140px;
1008
+ }
1009
+
1010
+ .w6w-embed-root .w6w-activity-stat-value {
1011
+ font-size: var(--w6w-fs-3xl);
1012
+ font-weight: var(--w6w-fw-semibold);
1013
+ line-height: 1.1;
1014
+ }
1015
+
1016
+ .w6w-embed-root .w6w-activity-link {
1017
+ background: none;
1018
+ border: 0;
1019
+ padding: 0;
1020
+ font: inherit;
1021
+ color: var(--accent);
1022
+ cursor: pointer;
1023
+ text-align: left;
1024
+ }
1025
+
1026
+ .w6w-embed-root .list-preview {
1027
+ margin-top: var(--w6w-sp-1);
1028
+ overflow: hidden;
1029
+ text-overflow: ellipsis;
1030
+ white-space: nowrap;
1031
+ }
1032
+ .w6w-embed-root .list-name {
1033
+ display: inline-block;
1034
+ max-width: 100%;
1035
+ min-width: 0;
1036
+ overflow: hidden;
1037
+ text-overflow: ellipsis;
1038
+ white-space: nowrap;
1039
+ }
1040
+
1041
+ /* ── DocumentList, DocumentEditor ── */
1042
+ /* Blocks stack with the page rhythm Studio's .page gives its direct children. */
1043
+ .w6w-embed-root.w6w-doc-editor {
1044
+ display: flex;
1045
+ flex-direction: column;
1046
+ gap: var(--w6w-sp-4);
1047
+ }
1048
+ .w6w-embed-root a.list-link {
1049
+ display: flex;
1050
+ align-items: center;
1051
+ gap: var(--w6w-sp-3);
1052
+ flex: 1;
1053
+ min-width: 0;
1054
+ padding: var(--w6w-sp-2-5) 0 var(--w6w-sp-2-5) var(--w6w-sp-2-5);
1055
+ border-radius: var(--radius);
1056
+ color: inherit;
1057
+ text-decoration: none;
1058
+ }
1059
+ .w6w-embed-root a.list-link:hover {
1060
+ background: var(--panel-2);
1061
+ }
1062
+ .w6w-embed-root a.list-link:focus-visible {
1063
+ outline: 2px solid var(--accent);
1064
+ outline-offset: -2px;
1065
+ }
1066
+ /* Without `getHref` the same row is a button: reset it to read as the anchor does. */
1067
+ .w6w-embed-root button.list-link {
1068
+ display: flex;
1069
+ align-items: center;
1070
+ gap: var(--w6w-sp-3);
1071
+ flex: 1;
1072
+ min-width: 0;
1073
+ padding: var(--w6w-sp-2-5) 0 var(--w6w-sp-2-5) var(--w6w-sp-2-5);
1074
+ border: 0;
1075
+ border-radius: var(--radius);
1076
+ background: none;
1077
+ color: inherit;
1078
+ font: inherit;
1079
+ text-align: left;
1080
+ cursor: pointer;
1081
+ }
1082
+ .w6w-embed-root button.list-link:hover {
1083
+ background: var(--panel-2);
1084
+ }
1085
+ .w6w-embed-root button.list-link:focus-visible {
1086
+ outline: 2px solid var(--accent);
1087
+ outline-offset: -2px;
1088
+ }
1089
+ .w6w-embed-root textarea.code {
1090
+ font-family: var(--w6w-font-mono);
1091
+ font-size: 12.5px;
1092
+ resize: vertical;
1093
+ }
1094
+
1095
+ /* ── ServiceDetail ── */
1096
+ /* One "days with traffic" row: day label, health pill, call count, error tags.
1097
+ * Not `.row` (`:872-877`) — that rule's `margin-top` would stack an extra top
1098
+ * margin onto every one of the (up to) 14 rows in the list; this is a
1099
+ * dedicated rule instead. */
1100
+ .w6w-embed-root .rel-day-row {
1101
+ display: flex;
1102
+ align-items: center;
1103
+ gap: var(--w6w-sp-2);
1104
+ }
1105
+ /* The per-day error-kind tags — pushed to the row's right edge, with their
1106
+ own gap between tags when there is more than one. */
1107
+ .w6w-embed-root .rel-errors {
1108
+ display: flex;
1109
+ align-items: center;
1110
+ gap: var(--w6w-sp-1);
1111
+ margin-left: auto;
1112
+ }
1113
+ /* Calls-per-day bar chart. Height is volume; colour is that day's own state,
1114
+ same tokens as every other health signal on the board. */
1115
+ .w6w-embed-root .rel-daily-chart {
1116
+ display: flex;
1117
+ align-items: flex-end;
1118
+ gap: 2px;
1119
+ height: 120px;
1120
+ }
1121
+ .w6w-embed-root .rel-daily-bar {
1122
+ flex: 1 1 0;
1123
+ min-width: 2px;
1124
+ border-radius: 2px 2px 0 0;
1125
+ }
1126
+ .w6w-embed-root .rel-daily-bar-ok {
1127
+ background: var(--w6w-health-ok);
1128
+ }
1129
+ .w6w-embed-root .rel-daily-bar-degraded {
1130
+ background: var(--w6w-health-degraded);
1131
+ }
1132
+ .w6w-embed-root .rel-daily-bar-down {
1133
+ background: var(--w6w-health-down);
1134
+ }
1135
+ .w6w-embed-root .rel-daily-bar-unknown {
1136
+ background: var(--w6w-health-unknown);
1137
+ opacity: 0.5;
1138
+ }
1139
+
1140
+ /* Error-mix bars — the four kinds, as a horizontal scale rather than the
1141
+ board's bare count chips, so a page otherwise made of cards and lists gets
1142
+ at least one comparative picture. */
1143
+ .w6w-embed-root .rel-errormix-chart {
1144
+ display: flex;
1145
+ flex-direction: column;
1146
+ gap: var(--w6w-sp-1-5);
1147
+ }
1148
+ .w6w-embed-root .rel-errormix-row {
1149
+ display: grid;
1150
+ grid-template-columns: 120px 1fr 40px;
1151
+ align-items: center;
1152
+ gap: var(--w6w-sp-2-5);
1153
+ }
1154
+ .w6w-embed-root .rel-errormix-track {
1155
+ height: 10px;
1156
+ background: var(--panel-2);
1157
+ border-radius: 999px;
1158
+ overflow: hidden;
1159
+ }
1160
+ .w6w-embed-root .rel-errormix-bar {
1161
+ display: block;
1162
+ height: 100%;
1163
+ background: var(--w6w-health-degraded);
1164
+ border-radius: 999px;
1165
+ }
1166
+ .w6w-embed-root .rel-errormix-value {
1167
+ text-align: right;
1168
+ color: var(--muted);
1169
+ }
1170
+
1171
+ /* The call log — the drill from "this service looks like that" to the requests
1172
+ behind it. Scrolls inside itself so a long action name can never push the
1173
+ page into a horizontal scroll. */
1174
+ .w6w-embed-root .rel-calls {
1175
+ display: flex;
1176
+ flex-direction: column;
1177
+ overflow-x: auto;
1178
+ }
1179
+ .w6w-embed-root .rel-call {
1180
+ display: grid;
1181
+ grid-template-columns: 160px 1fr 70px 90px 80px;
1182
+ gap: var(--w6w-sp-2-5);
1183
+ align-items: center;
1184
+ padding: var(--w6w-sp-1-5) 0;
1185
+ border-bottom: 1px solid var(--border);
1186
+ min-width: 520px;
1187
+ }
1188
+ .w6w-embed-root .rel-call:last-child {
1189
+ border-bottom: none;
1190
+ }
1191
+ .w6w-embed-root .rel-call-head {
1192
+ color: var(--muted);
1193
+ font-size: 12px;
1194
+ border-bottom-color: transparent;
1195
+ }
1196
+
1197
+ /* ── EndpointEditor ── (`seg` / `seg-btn` ported from Studio src/styles.css — the URL card's
1198
+ id/key segmented control; every other class the editor uses is already defined above) */
1199
+ .w6w-embed-root .seg {
1200
+ display: inline-flex;
1201
+ align-items: stretch;
1202
+ border: 1px solid var(--border);
1203
+ border-radius: 8px;
1204
+ overflow: hidden;
1205
+ /* A <fieldset> carries UA padding, margin and a `min-inline-size: min-content`. */
1206
+ padding: 0;
1207
+ margin: 0 0 var(--w6w-sp-2-5);
1208
+ min-inline-size: 0;
1209
+ }
1210
+ .w6w-embed-root .seg-btn {
1211
+ background: transparent;
1212
+ border: none;
1213
+ border-left: 1px solid var(--border);
1214
+ color: var(--muted);
1215
+ cursor: pointer;
1216
+ font: inherit;
1217
+ font-size: 13px;
1218
+ padding: 5px var(--w6w-sp-3);
1219
+ }
1220
+ .w6w-embed-root .seg-btn:first-child {
1221
+ border-left: none;
1222
+ }
1223
+ .w6w-embed-root .seg-btn:hover {
1224
+ color: var(--text);
1225
+ }
1226
+ .w6w-embed-root .seg-btn.active {
1227
+ background: var(--panel-2);
1228
+ color: var(--text);
1229
+ }
1230
+
1231
+ /* ── EndpointList ── (Studio's `.list-main :not(.tag) + .tag` rule, ported: the "Unfinished" tag
1232
+ * follows the name inside the row title, so it needs a leading gap — `.tag`'s own spacing is
1233
+ * trailing-only.) */
1234
+ .w6w-embed-root .w6w-list-item-title :not(.tag) + .tag {
1235
+ margin-left: var(--w6w-sp-1);
1236
+ }
@@ -1,16 +0,0 @@
1
- import { createContext as o, useContext as r } from "react";
2
- const n = o(void 0);
3
- function u() {
4
- return r(n);
5
- }
6
- function c(t, e) {
7
- return t === void 0 ? e || null : t || null;
8
- }
9
- function s(t) {
10
- return c(t, u());
11
- }
12
- export {
13
- n as E,
14
- s as u
15
- };
16
- //# sourceMappingURL=project-context-Dbk0Gr1K.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-context-Dbk0Gr1K.js","sources":["../src/project-context.ts"],"sourcesContent":["/**\n * Which project does an embedded editor save into? One answer, in one place.\n *\n * A project-less workflow save is not harmless: the server resolves a missing `?project=` to the\n * account default and WRITES it on update, silently moving the row there. The editor therefore\n * always names its project explicitly, or refuses. Internal to the embed package (not exported\n * from any barrel).\n */\nimport { createContext, useContext } from \"react\";\n\n/** The provider's project, as frozen with the applied client (see `W6WEmbedProvider`). */\nexport const EmbedProjectContext = createContext<string | undefined>(undefined);\n\nexport function useProvidedProject(): string | undefined {\n return useContext(EmbedProjectContext);\n}\n\n/**\n * The editor's own prop wins over the provider's project. `undefined` (omitted) defers to the\n * provider; `null` or `\"\"` means \"no project yet\" and REFUSES (`null`) — it never falls through,\n * so a host whose project is still loading cannot have edits saved into the provider's project.\n * (`prop ?? provided` would be wrong: `null` would fall through.)\n */\nexport function resolveEditorProject(\n prop: string | null | undefined,\n provided: string | undefined,\n): string | null {\n if (prop === undefined) return provided ? provided : null;\n return prop ? prop : null;\n}\n\nexport function useEditorProject(prop: string | null | undefined): string | null {\n return resolveEditorProject(prop, useProvidedProject());\n}\n"],"names":["EmbedProjectContext","createContext","useProvidedProject","useContext","resolveEditorProject","prop","provided","useEditorProject"],"mappings":";AAWO,MAAMA,IAAsBC,EAAkC,MAAS;AAEvE,SAASC,IAAyC;AACvD,SAAOC,EAAWH,CAAmB;AACvC;AAQO,SAASI,EACdC,GACAC,GACe;AACf,SAAID,MAAS,SAAkBC,KAAsB,OAC9CD,KAAc;AACvB;AAEO,SAASE,EAAiBF,GAAgD;AAC/E,SAAOD,EAAqBC,GAAMH,GAAoB;AACxD;"}